Graph cliques #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines cliques in simple graphs. A clique is a set of vertices that are pairwise adjacent.
Main declarations #
simple_graph.is_clique
: Predicate for a set of vertices to be a clique.simple_graph.is_n_clique
: Predicate for a set of vertices to be an
-clique.simple_graph.clique_finset
: Finset ofn
-cliques of a graph.simple_graph.clique_free
: 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.
A clique is a set of vertices whose induced graph is complete.
Equations
Alias of the forward direction of simple_graph.is_clique_bot_iff
.
n
-cliques #
A n
-clique in a graph is a set of n
vertices which are pairwise connected.
Instances for simple_graph.is_n_clique
Equations
- simple_graph.is_n_clique.decidable G = decidable_of_iff' (G.is_clique ↑s ∧ s.card = n) _
Graphs without cliques #
G.clique_free n
means that G
has no n
-cliques.
Equations
- G.clique_free n = ∀ (t : finset α), ¬G.is_n_clique n t
An embedding of a complete graph that witnesses the fact that the graph is not clique-free.
Equations
- simple_graph.top_embedding_of_not_clique_free h = and.dcases_on _ (λ (ha : simple_graph.induce ↑(_.some) G = ⊤) (hb : _.some.card = n), _.mpr ((simple_graph.embedding.induce ↑(_.some)).comp (_.mp (simple_graph.iso.complete_graph (_.mpr (_.mp (fintype.equiv_fin ↥(_.some)).symm)))).to_embedding))
See simple_graph.clique_free_chromatic_number_succ
for a tighter bound.
G.clique_free_on s n
means that G
has no n
-cliques contained in s
.
Equations
- G.clique_free_on s n = ∀ ⦃t : finset α⦄, ↑t ⊆ s → ¬G.is_n_clique n t
Set of cliques #
The n
-cliques in a graph as a set.
Equations
- G.clique_set n = {s : finset α | G.is_n_clique n s}
Finset of cliques #
The n
-cliques in a graph as a finset.
Equations
- G.clique_finset n = finset.filter (G.is_n_clique n) finset.univ
Alias of the reverse direction of simple_graph.clique_finset_eq_empty_iff
.