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.
Equations
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
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 #
An embedding of a complete graph that witnesses the fact that the graph is not clique-free.
Equations
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.
Set of cliques #
The n
-cliques in a graph as a set.
Equations
Instances For
Alias of the reverse direction of SimpleGraph.cliqueSet_eq_empty_iff
.
Clique number #
The maximum number of vertices in a clique of a graph G
.
Equations
Instances For
Finset of cliques #
The n
-cliques in a graph as a finset.
Equations
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
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
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 #
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.
Set of independent sets #
The n
-independent sets in a graph as a set.
Equations
Instances For
Independence Number #
The maximal number of vertices of an independent set in a graph G
.
Equations
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.