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
- G.IsClique s = s.Pairwise G.Adj
Instances For
A clique is a set of vertices whose induced graph is complete.
Equations
- G.instDecidableIsCliqueToSetOfDecidableEqOfDecidableRelAdj = decidable_of_iff' ((↑s).Pairwise 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 : G.IsClique ↑s
- card_eq : s.card = n
Instances For
Equations
- G.instDecidableIsNCliqueOfDecidableEqOfDecidableRelAdj = decidable_of_iff' (G.IsClique ↑s ∧ s.card = n) ⋯
Graphs without cliques #
G.CliqueFree n
means that G
has no n
-cliques.
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
.
Instances For
Set of cliques #
The n
-cliques in a graph as a set.
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
- G.cliqueFinset n = Finset.filter (fun (s : Finset α) => G.IsNClique n s) Finset.univ
Instances For
Alias of the reverse direction of SimpleGraph.cliqueFinset_eq_empty_iff
.