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.
Cliques #
A clique in a graph is a set of vertices that are pairwise adjacent.
Instances For
A clique is a set of vertices whose induced graph is complete.
Equations
Alias of SimpleGraph.isClique_insert_of_notMem.
Alias of the forward direction of SimpleGraph.isClique_bot_iff.
If a set of vertices A is a clique in subgraph of G induced by a superset of A,
its embedding is a clique in G.
n-cliques #
An n-clique in a graph is a set of n vertices which are pairwise connected.
- isClique : G.IsClique ↑s
Instances For
Equations
- G.instDecidableIsNCliqueOfDecidableEqOfDecidableRelAdj = decidable_of_iff' (G.IsClique ↑s ∧ s.card = n) ⋯
If a set of vertices A is an n-clique in subgraph of G induced by a superset of A,
its embedding is an n-clique in G.
Graphs without cliques #
G.CliqueFree n means that G has no n-cliques.
Equations
- G.CliqueFree n = ∀ (t : Finset α), ¬G.IsNClique 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.
Embedding of the complete graph on ι into completeMultipartiteGraph on ι nonempty parts
Equations
Instances For
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 #
Alias of the reverse direction of SimpleGraph.cliqueSet_eq_empty_iff.
Clique number #
Finset of cliques #
The n-cliques in a graph as a finset.
Equations
- G.cliqueFinset n = {s : Finset α | G.IsNClique n s}
Instances For
Alias of the reverse direction of SimpleGraph.cliqueFinset_eq_empty_iff.
Independent Sets #
An independent set in a graph is a set of vertices that are pairwise not adjacent.
Equations
- G.IsIndepSet s = s.Pairwise fun (v w : α) => ¬G.Adj v w
Instances For
An independent set is a clique in the complement graph and vice versa.
An independent set in the complement graph is a clique and vice versa.
Equations
- G.instDecidableIsIndepSetToSetOfDecidableEqOfDecidableRelAdj = decidable_of_iff' ((↑s).Pairwise fun (v w : α) => ¬G.Adj v w) ⋯
If s is an independent set, its complement meets every edge of G.
The neighbors of a vertex v form an independent set in a triangle free graph G.
The embedding of an independent set of an induced subgraph of the subgraph G is an independent
set in G and vice versa.
N-Independent sets #
An n-independent set in a graph is a set of n vertices which are pairwise nonadjacent.
- isIndepSet : G.IsIndepSet ↑s
Instances For
An n-independent set is an n-clique in the complement graph and vice versa.
An n-independent set in the complement graph is an n-clique and vice versa.
Equations
The embedding of an n-independent set of an induced subgraph of the subgraph G is an
n-independent set in G and vice versa.
Graphs without independent sets #
G.IndepSetFree n means that G has no n-independent sets.
Equations
- G.IndepSetFree n = ∀ (t : Finset α), ¬G.IsNIndepSet n t
Instances For
An graph is n-independent set free iff its complement is n-clique free.
An graph's complement is n-independent set free iff it is n-clique free.
G.IndepSetFreeOn s n means that G has no n-independent sets contained in s.
Equations
- G.IndepSetFreeOn s n = ∀ ⦃t : Finset α⦄, ↑t ⊆ s → ¬G.IsNIndepSet n t
Instances For
Set of independent sets #
The n-independent sets in a graph as a set.
Equations
- G.indepSetSet n = {s : Finset α | G.IsNIndepSet n s}
Instances For
Independence Number #
The maximal number of vertices of an independent set in a graph G.
Instances For
An independent set in a graph G such that there is no independent set with more vertices.
- isIndepSet : G.IsIndepSet ↑s
- maximum (t : Finset α) : G.IsIndepSet ↑t → t.card ≤ s.card
Instances For
An independent set in a graph G that cannot be extended by adding more vertices.
Finset of independent sets #
The n-independent sets in a graph as a finset.
Equations
- G.indepSetFinset n = {s : Finset α | G.IsNIndepSet n s}