Graph cliques #
This file defines cliques in simple graphs. A clique is a set of vertices that are pairwise adjacent.
Main declarations #
SimpleGraph.IsClique: Predicate for a set of vertices to be a clique.SimpleGraph.IsNClique: Predicate for a set of vertices to be ann-clique.SimpleGraph.cliqueFinset: Finset ofn-cliques of a graph.SimpleGraph.CliqueFree: Predicate for a graph to have non-cliques.
TODO #
- Clique numbers
- Dualise all the API to get independent sets
Cliques #
A clique in a graph is a set of vertices that are pairwise adjacent.
Equations
- SimpleGraph.IsClique G s = Set.Pairwise s G.Adj
Instances For
A clique is a set of vertices whose induced graph is complete.
Equations
- SimpleGraph.instDecidableIsCliqueToSet G = decidable_of_iff' (Set.Pairwise (↑s) G.Adj) ⋯
Alias of the forward direction of SimpleGraph.isClique_bot_iff.
n-cliques #
An n-clique in a graph is a set of n vertices which are pairwise connected.
- clique : SimpleGraph.IsClique G ↑s
- card_eq : s.card = n
Instances For
Equations
- SimpleGraph.instDecidableIsNClique G = decidable_of_iff' (SimpleGraph.IsClique G ↑s ∧ s.card = n) ⋯
Graphs without cliques #
G.CliqueFree n means that G has no n-cliques.
Equations
- SimpleGraph.CliqueFree G n = ∀ (t : Finset α), ¬SimpleGraph.IsNClique G n t
Instances For
An embedding of a complete graph that witnesses the fact that the graph is not clique-free.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If a graph is cliquefree, any graph that embeds into it is also cliquefree.
See SimpleGraph.cliqueFree_of_chromaticNumber_lt for a tighter bound.
A complete r-partite graph has no n-cliques for r < n.
Clique-freeness is preserved by replaceVertex.
Adding an edge increases the clique number by at most one.
G.CliqueFreeOn s n means that G has no n-cliques contained in s.
Equations
- SimpleGraph.CliqueFreeOn G s n = ∀ ⦃t : Finset α⦄, ↑t ⊆ s → ¬SimpleGraph.IsNClique G n t
Instances For
Set of cliques #
The n-cliques in a graph as a set.
Equations
- SimpleGraph.cliqueSet G n = {s : Finset α | SimpleGraph.IsNClique G n s}
Instances For
Alias of the reverse direction of SimpleGraph.cliqueSet_eq_empty_iff.
Finset of cliques #
The n-cliques in a graph as a finset.
Equations
- SimpleGraph.cliqueFinset G n = Finset.filter (SimpleGraph.IsNClique G n) Finset.univ
Instances For
Alias of the reverse direction of SimpleGraph.cliqueFinset_eq_empty_iff.