Coloring, chromatic number and clique cover
Lax799700.Coloring · concepts/Lax799700/Coloring.lean · lax-799700
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
Three problems built on one generic property, ColorableOn: a map into colors separating the pairs related by a conflict relation. KCol , on graphs, asks whether the graph is -colorable for a fixed once and for all, and is NP-complete for every by a first-order reduction from 3-colorability. ChromaticNumber, on marked graphs, asks whether the chromatic number is at most where is the cardinality of the marked set, the unary representation of a threshold; this is Karp's CHROMATIC NUMBER, and it is NP-hard by an ordered first-order reduction from 3-colorability. CliqueCover, on the same vocabulary, asks whether the vertices can be covered by at most cliques; a clique cover is a proper coloring of the complement graph, so the first-order interpretation complementing the edges off the diagonal reduces Chromatic Number to Clique Cover.
The two threshold problems take their conflict relation off the diagonal, so they are about the underlying loopless graph. Their existential second-order definitions guess a coloring in palette form, a map into the marked set itself, since the number is not available to a formula.
Concept map
Evidence
This concept declares 9 statements. Each proof establishes one of them relative to its assumptions.
1 chromaticNumber_iff proven
2 chromaticNumber_NP_complete proven
3 cliqueCover_iff proven
4 cliqueCover_NP_complete proven
5 hasSmallChromaticNumber_iso proven
6 hasSmallCliqueCover_iso proven
7 kCol_iff proven
8 kCol_NP_complete proven
9 kColorable_iso proven
Lean source view on GitHub
| 1 | import Mathlib.Data.Fintype.EquivFin |
| 2 | import Mathlib.Data.Set.Card |
| 3 | import Mathlib.SetTheory.Cardinal.Finite |
| 4 | import Mathlib.Logic.Equiv.Prod |
| 5 | import Mathlib.ModelTheory.Semantics |
| 6 | import Mathlib.ModelTheory.Complexity |
| 7 | import Mathlib.Tactic.FinCases |
| 8 | import Mathlib.ModelTheory.Syntax |
| 9 | import Mathlib.ModelTheory.Order |
| 10 | import Mathlib.Data.Set.Finite.Lemmas |
| 11 | import Mathlib.Order.PiLex |
| 12 | import Mathlib.Data.Prod.Lex |
| 13 | import Mathlib.Logic.Equiv.Fin.Basic |
| 14 | import Mathlib.Data.Finite.Sigma |
| 15 | import Mathlib.Data.Fintype.Lattice |
| 16 | import Mathlib.ModelTheory.Graph |
| 17 | import Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex |
| 18 | import Lax799700.CliqueFamily |
| 19 | import Lax904597.Classes |
| 20 | import Lax799700.Problems |
| 21 | |
| 22 | /-! |
| 23 | --- |
| 24 | title: Coloring, chromatic number and clique cover |
| 25 | type: theorem |
| 26 | --- |
| 27 | Three problems built on one generic property, ColorableOn: a map into |
| 28 | colors separating the pairs related by a conflict relation. KCol , |
| 29 | on graphs, asks whether the graph is -colorable for a fixed once |
| 30 | and for all, and is NP-complete for every by a first-order |
| 31 | reduction from 3-colorability. ChromaticNumber, on marked graphs, asks |
| 32 | whether the chromatic number is at most where is the cardinality |
| 33 | of the marked set, the unary representation of a threshold; this is |
| 34 | Karp's CHROMATIC NUMBER, and it is NP-hard by an ordered first-order |
| 35 | reduction from 3-colorability. CliqueCover, on the same vocabulary, asks |
| 36 | whether the vertices can be covered by at most cliques; a clique |
| 37 | cover is a proper coloring of the complement graph, so the first-order |
| 38 | interpretation complementing the edges off the diagonal reduces |
| 39 | Chromatic Number to Clique Cover. |
| 40 | |
| 41 | The two threshold problems take their conflict relation off the diagonal, |
| 42 | so they are about the underlying loopless graph. Their existential |
| 43 | second-order definitions guess a coloring in palette form, a map into the |
| 44 | marked set itself, since the number is not available to a formula. |
| 45 | |
| 46 | -/ |
| 47 | |
| 48 | namespace Lax799700.Coloring |
| 49 | |
| 50 | open Lax799700.CliqueFamily |
| 51 | |
| 52 | open FirstOrder |
| 53 | |
| 54 | open Language Structure |
| 55 | |
| 56 | section Generic |
| 57 | |
| 58 | variable {A : Type} |
| 59 | |
| 60 | /-- A `k`-coloring for the conflict relation `Cfl`: a map into `Fin k` giving |
| 61 | distinct values to conflicting elements. -/ |
| 62 | def ColorableOn (Cfl : A → A → Prop) (k : ℕ) : Prop := |
| 63 | ∃ c : A → Fin k, ∀ x y, Cfl x y → c x ≠ c y |
| 64 | |
| 65 | end Generic |
| 66 | |
| 67 | section Fixed |
| 68 | |
| 69 | variable (k : ℕ) (V : Type) [Language.graph.Structure V] |
| 70 | |
| 71 | /-- A `Language.graph`-structure is `k`-colorable if the vertices can be |
| 72 | colored with `k` colors so that adjacent vertices get distinct colors. -/ |
| 73 | def KColorable : Prop := |
| 74 | ColorableOn (fun x y : V => RelMap adj ![x, y]) k |
| 75 | |
| 76 | end Fixed |
| 77 | |
| 78 | section Conflicts |
| 79 | |
| 80 | variable {A : Type} [markedGraph.Structure A] |
| 81 | |
| 82 | /-- The conflict relation of the chromatic-number problem: adjacency off the |
| 83 | diagonal. -/ |
| 84 | def MGConflict (x y : A) : Prop := x ≠ y ∧ MGAdj x y |
| 85 | |
| 86 | /-- The conflict relation of the clique-cover problem: non-adjacency off the |
| 87 | diagonal – two vertices may share a clique exactly when they are adjacent. -/ |
| 88 | def MGCoConflict (x y : A) : Prop := x ≠ y ∧ ¬MGAdj x y |
| 89 | |
| 90 | end Conflicts |
| 91 | |
| 92 | section Threshold |
| 93 | |
| 94 | variable (A : Type) [markedGraph.Structure A] |
| 95 | |
| 96 | /-- A marked graph has chromatic number at most the size of its marked set. |
| 97 | (Finiteness of the universe is part of the property: cardinality thresholds |
| 98 | are only meaningful on finite structures.) -/ |
| 99 | def HasSmallChromaticNumber : Prop := |
| 100 | Finite A ∧ ColorableOn (MGConflict (A := A)) {x : A | MGMarked x}.ncard |
| 101 | |
| 102 | /-- A marked graph can be covered by at most as many cliques as its marked |
| 103 | set has elements. -/ |
| 104 | def HasSmallCliqueCover : Prop := |
| 105 | Finite A ∧ ColorableOn (MGCoConflict (A := A)) {x : A | MGMarked x}.ncard |
| 106 | |
| 107 | end Threshold |
| 108 | |
| 109 | open Lax904597.Problems Lax904597.Classes Lax799700.Problems |
| 110 | |
| 111 | /-- The property `HasSmallChromaticNumber` is isomorphism-invariant. -/ |
| 112 | axiom hasSmallChromaticNumber_iso : ∀ {A B : Type} [Lax799700.CliqueFamily.markedGraph.Structure A] [Lax799700.CliqueFamily.markedGraph.Structure B], |
| 113 | (A ≃[Lax799700.CliqueFamily.markedGraph] B) → (HasSmallChromaticNumber A ↔ HasSmallChromaticNumber B) |
| 114 | |
| 115 | /-- The problem ChromaticNumber: does the structure satisfy `HasSmallChromaticNumber`? -/ |
| 116 | def ChromaticNumber : DecisionProblem Lax799700.CliqueFamily.markedGraph := |
| 117 | DecisionProblem.ofPred HasSmallChromaticNumber |
| 118 | |
| 119 | /-- The yes-instances of ChromaticNumber are exactly the structures satisfying |
| 120 | `HasSmallChromaticNumber`. -/ |
| 121 | axiom chromaticNumber_iff : ∀ (A : Type) [Lax799700.CliqueFamily.markedGraph.Structure A], ChromaticNumber A ↔ HasSmallChromaticNumber A |
| 122 | |
| 123 | /-- ChromaticNumber is NP-complete. -/ |
| 124 | axiom chromaticNumber_NP_complete : NP.Complete ChromaticNumber |
| 125 | |
| 126 | /-- The property `HasSmallCliqueCover` is isomorphism-invariant. -/ |
| 127 | axiom hasSmallCliqueCover_iso : ∀ {A B : Type} [Lax799700.CliqueFamily.markedGraph.Structure A] [Lax799700.CliqueFamily.markedGraph.Structure B], |
| 128 | (A ≃[Lax799700.CliqueFamily.markedGraph] B) → (HasSmallCliqueCover A ↔ HasSmallCliqueCover B) |
| 129 | |
| 130 | /-- The problem CliqueCover: does the structure satisfy `HasSmallCliqueCover`? -/ |
| 131 | def CliqueCover : DecisionProblem Lax799700.CliqueFamily.markedGraph := |
| 132 | DecisionProblem.ofPred HasSmallCliqueCover |
| 133 | |
| 134 | /-- The yes-instances of CliqueCover are exactly the structures satisfying |
| 135 | `HasSmallCliqueCover`. -/ |
| 136 | axiom cliqueCover_iff : ∀ (A : Type) [Lax799700.CliqueFamily.markedGraph.Structure A], CliqueCover A ↔ HasSmallCliqueCover A |
| 137 | |
| 138 | /-- CliqueCover is NP-complete. -/ |
| 139 | axiom cliqueCover_NP_complete : NP.Complete CliqueCover |
| 140 | |
| 141 | /-- The property `KColorable k` is isomorphism-invariant, for every `k`. -/ |
| 142 | axiom kColorable_iso : ∀ {k : ℕ} {A B : Type} [FirstOrder.Language.graph.Structure A] |
| 143 | [FirstOrder.Language.graph.Structure B], |
| 144 | (A ≃[FirstOrder.Language.graph] B) → (KColorable k A ↔ KColorable k B) |
| 145 | |
| 146 | /-- The problem KCol k: is the graph k-colorable? -/ |
| 147 | def KCol (k : ℕ) : DecisionProblem FirstOrder.Language.graph := |
| 148 | DecisionProblem.ofPred (KColorable k) |
| 149 | |
| 150 | /-- The yes-instances of KCol k are exactly the k-colorable graphs. -/ |
| 151 | axiom kCol_iff : ∀ (k : ℕ) (A : Type) [FirstOrder.Language.graph.Structure A], |
| 152 | KCol k A ↔ KColorable k A |
| 153 | |
| 154 | /-- k-colorability is NP-complete for every k ≥ 3. -/ |
| 155 | axiom kCol_NP_complete : ∀ {k : ℕ}, 3 ≤ k → NP.Complete (KCol k) |
| 156 | |
| 157 | end Lax799700.Coloring |
| 158 |
Used by
none
From Mathlib
Mathlib.Combinatorics.SimpleGraph.Coloring.VertexMathlib.Data.Finite.SigmaMathlib.Data.Fintype.EquivFinMathlib.Data.Fintype.LatticeMathlib.Data.Prod.LexMathlib.Data.Set.CardMathlib.Data.Set.Finite.LemmasMathlib.Logic.Equiv.Fin.BasicMathlib.Logic.Equiv.ProdMathlib.ModelTheory.ComplexityMathlib.ModelTheory.GraphMathlib.ModelTheory.OrderMathlib.ModelTheory.SemanticsMathlib.ModelTheory.SyntaxMathlib.Order.PiLexMathlib.SetTheory.Cardinal.FiniteMathlib.Tactic.FinCases
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments