Documentation

Mathlib.Combinatorics.SimpleGraph.Clique

Graph cliques #

This file defines cliques in simple graphs. A clique is a set of vertices that are pairwise adjacent.

Main declarations #

TODO #

Cliques #

@[inline, reducible]
abbrev SimpleGraph.IsClique {α : Type u_1} (G : SimpleGraph α) (s : Set α) :

A clique in a graph is a set of vertices that are pairwise adjacent.

Equations
Instances For
    theorem SimpleGraph.isClique_iff {α : Type u_1} (G : SimpleGraph α) {s : Set α} :

    A clique is a set of vertices whose induced graph is complete.

    theorem SimpleGraph.isClique_pair {α : Type u_1} {G : SimpleGraph α} {a : α} {b : α} :
    SimpleGraph.IsClique G {a, b} a bG.Adj a b
    @[simp]
    theorem SimpleGraph.isClique_insert {α : Type u_1} {G : SimpleGraph α} {s : Set α} {a : α} :
    SimpleGraph.IsClique G (insert a s) SimpleGraph.IsClique G s bs, a bG.Adj a b
    theorem SimpleGraph.isClique_insert_of_not_mem {α : Type u_1} {G : SimpleGraph α} {s : Set α} {a : α} (ha : as) :
    SimpleGraph.IsClique G (insert a s) SimpleGraph.IsClique G s bs, G.Adj a b
    theorem SimpleGraph.IsClique.insert {α : Type u_1} {G : SimpleGraph α} {s : Set α} {a : α} (hs : SimpleGraph.IsClique G s) (h : bs, a bG.Adj a b) :
    theorem SimpleGraph.IsClique.mono {α : Type u_1} {G : SimpleGraph α} {H : SimpleGraph α} {s : Set α} (h : G H) :
    theorem SimpleGraph.IsClique.subset {α : Type u_1} {G : SimpleGraph α} {s : Set α} {t : Set α} (h : t s) :
    theorem SimpleGraph.IsClique.map {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {s : Set α} (h : SimpleGraph.IsClique G s) {f : α β} :

    Alias of the forward direction of SimpleGraph.isClique_bot_iff.

    n-cliques #

    structure SimpleGraph.IsNClique {α : Type u_1} (G : SimpleGraph α) (n : ) (s : Finset α) :

    An n-clique in a graph is a set of n vertices which are pairwise connected.

    Instances For
      theorem SimpleGraph.isNClique_iff {α : Type u_1} (G : SimpleGraph α) {n : } {s : Finset α} :
      @[simp]
      theorem SimpleGraph.isNClique_empty {α : Type u_1} {G : SimpleGraph α} {n : } :
      @[simp]
      theorem SimpleGraph.isNClique_singleton {α : Type u_1} {G : SimpleGraph α} {n : } {a : α} :
      theorem SimpleGraph.IsNClique.mono {α : Type u_1} {G : SimpleGraph α} {H : SimpleGraph α} {n : } {s : Finset α} (h : G H) :
      theorem SimpleGraph.IsNClique.map {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {n : } {s : Finset α} (h : SimpleGraph.IsNClique G n s) {f : α β} :
      @[simp]
      theorem SimpleGraph.isNClique_bot_iff {α : Type u_1} {n : } {s : Finset α} :
      @[simp]
      theorem SimpleGraph.isNClique_zero {α : Type u_1} {G : SimpleGraph α} {s : Finset α} :
      @[simp]
      theorem SimpleGraph.isNClique_one {α : Type u_1} {G : SimpleGraph α} {s : Finset α} :
      SimpleGraph.IsNClique G 1 s ∃ (a : α), s = {a}
      theorem SimpleGraph.IsNClique.insert {α : Type u_1} {G : SimpleGraph α} {n : } {s : Finset α} {a : α} [DecidableEq α] (hs : SimpleGraph.IsNClique G n s) (h : bs, G.Adj a b) :
      theorem SimpleGraph.is3Clique_triple_iff {α : Type u_1} {G : SimpleGraph α} {a : α} {b : α} {c : α} [DecidableEq α] :
      SimpleGraph.IsNClique G 3 {a, b, c} G.Adj a b G.Adj a c G.Adj b c
      theorem SimpleGraph.is3Clique_iff {α : Type u_1} {G : SimpleGraph α} {s : Finset α} [DecidableEq α] :
      SimpleGraph.IsNClique G 3 s ∃ (a : α) (b : α) (c : α), G.Adj a b G.Adj a c G.Adj b c s = {a, b, c}

      Graphs without cliques #

      def SimpleGraph.CliqueFree {α : Type u_1} (G : SimpleGraph α) (n : ) :

      G.CliqueFree n means that G has no n-cliques.

      Equations
      Instances For
        noncomputable def SimpleGraph.topEmbeddingOfNotCliqueFree {α : Type u_1} {G : SimpleGraph α} {n : } (h : ¬SimpleGraph.CliqueFree G n) :

        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
          @[simp]
          theorem SimpleGraph.cliqueFree_bot {α : Type u_1} {n : } (h : 2 n) :
          theorem SimpleGraph.CliqueFree.mono {α : Type u_1} {G : SimpleGraph α} {m : } {n : } (h : m n) :
          theorem SimpleGraph.CliqueFree.anti {α : Type u_1} {G : SimpleGraph α} {H : SimpleGraph α} {n : } (h : G H) :
          theorem SimpleGraph.CliqueFree.comap {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {n : } {H : SimpleGraph β} (f : H ↪g G) :

          If a graph is cliquefree, any graph that embeds into it is also cliquefree.

          theorem SimpleGraph.cliqueFree_of_card_lt {α : Type u_1} {G : SimpleGraph α} {n : } [Fintype α] (hc : Fintype.card α < n) :

          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.

          theorem SimpleGraph.CliqueFree.addEdge {α : Type u_1} {G : SimpleGraph α} {n : } (h : SimpleGraph.CliqueFree G n) (v : α) (w : α) :

          Adding an edge increases the clique number by at most one.

          def SimpleGraph.CliqueFreeOn {α : Type u_1} (G : SimpleGraph α) (s : Set α) (n : ) :

          G.CliqueFreeOn s n means that G has no n-cliques contained in s.

          Equations
          Instances For
            theorem SimpleGraph.CliqueFreeOn.subset {α : Type u_1} (G : SimpleGraph α) {s₁ : Set α} {s₂ : Set α} {n : } (hs : s₁ s₂) (h₂ : SimpleGraph.CliqueFreeOn G s₂ n) :
            theorem SimpleGraph.CliqueFreeOn.mono {α : Type u_1} (G : SimpleGraph α) {s : Set α} {m : } {n : } (hmn : m n) (hG : SimpleGraph.CliqueFreeOn G s m) :
            theorem SimpleGraph.CliqueFreeOn.anti {α : Type u_1} (G : SimpleGraph α) (H : SimpleGraph α) {s : Set α} {n : } (hGH : G H) (hH : SimpleGraph.CliqueFreeOn H s n) :
            @[simp]
            @[simp]
            theorem SimpleGraph.cliqueFreeOn_singleton {α : Type u_1} (G : SimpleGraph α) {a : α} {n : } :
            theorem SimpleGraph.cliqueFreeOn_of_card_lt {α : Type u_1} (G : SimpleGraph α) {n : } {s : Finset α} (h : s.card < n) :
            @[simp]
            theorem SimpleGraph.CliqueFreeOn.of_succ {α : Type u_1} (G : SimpleGraph α) {s : Set α} {a : α} {n : } (hs : SimpleGraph.CliqueFreeOn G s (n + 1)) (ha : a s) :

            Set of cliques #

            def SimpleGraph.cliqueSet {α : Type u_1} (G : SimpleGraph α) (n : ) :
            Set (Finset α)

            The n-cliques in a graph as a set.

            Equations
            Instances For
              @[simp]
              @[simp]
              @[simp]
              theorem SimpleGraph.cliqueSet_one {α : Type u_1} (G : SimpleGraph α) :
              @[simp]
              theorem SimpleGraph.cliqueSet_bot {α : Type u_1} {n : } (hn : 1 < n) :
              @[simp]
              theorem SimpleGraph.cliqueSet_map {α : Type u_1} {β : Type u_2} {n : } (hn : n 1) (G : SimpleGraph α) (f : α β) :

              Finset of cliques #

              def SimpleGraph.cliqueFinset {α : Type u_1} (G : SimpleGraph α) [Fintype α] [DecidableEq α] [DecidableRel G.Adj] (n : ) :

              The n-cliques in a graph as a finset.

              Equations
              Instances For
                @[simp]
                theorem SimpleGraph.cliqueFinset_map {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) [Fintype α] [DecidableEq α] [DecidableRel G.Adj] {n : } [Fintype β] [DecidableEq β] (f : α β) (hn : n 1) :