Documentation

Mathlib.Combinatorics.SimpleGraph.CompleteMultipartite

Complete Multipartite Graphs #

A graph is complete multipartite iff non-adjacency is transitive.

Main declarations #

Implementation Notes #

The definition of completeEquipartiteGraph is similar to completeMultipartiteGraph except that Sigma.fst is replaced by Prod.fst in the definition. The difference is that the former vertices are a product type whereas the latter vertices are a dependent product type.

While completeEquipartiteGraph r t could have been defined as the specialisation completeMultipartiteGraph (const (Fin r) (Fin t)) (or turanGraph (r * t) r), it is convenient to instead have a non-dependent product type for the vertices.

See completeEquipartiteGraph.completeMultipartiteGraph, completeEquipartiteGraph.turanGraph for the isomorphisms between a completeEquipartiteGraph and a corresponding completeMultipartiteGraph, turanGraph.

G is IsCompleteMultipartite iff non-adjacency is transitive

Instances For
    @[implicit_reducible]

    The setoid given by non-adjacency

    Instances For
      def SimpleGraph.IsCompleteMultipartite.iso {α : Type u} {G : SimpleGraph α} (h : G.IsCompleteMultipartite) :
      G ≃g completeMultipartiteGraph fun (c : Quotient h.setoid) => { x : α // h.setoid c.out x }

      The graph isomorphism from a graph G that IsCompleteMultipartite to the corresponding completeMultipartiteGraph (see also isCompleteMultipartite_iff)

      Instances For
        theorem SimpleGraph.isCompleteMultipartite_iff {α : Type u} {G : SimpleGraph α} :
        G.IsCompleteMultipartite ∃ (ι : Type u) (V : ιType u) (_ : ∀ (i : ι), Nonempty (V i)), Nonempty (G ≃g completeMultipartiteGraph V)
        structure SimpleGraph.IsPathGraph3Compl {α : Type u} (G : SimpleGraph α) (v w₁ w₂ : α) :

        The vertices v, w₁, w₂ form an IsPathGraph3Compl in G iff w₁w₂ is the only edge present between these three vertices. It is a witness to the non-complete-multipartite-ness of G (see not_isCompleteMultipartite_iff_exists_isPathGraph3Compl). This structure is an explicit way of saying that the induced graph on {v, w₁, w₂} is the complement of P3.

        • adj : G.Adj w₁ w₂
        • not_adj_fst : ¬G.Adj v w₁
        • not_adj_snd : ¬G.Adj v w₂
        Instances For
          theorem SimpleGraph.IsPathGraph3Compl.ne_fst {α : Type u} {G : SimpleGraph α} {v w₁ w₂ : α} (h2 : G.IsPathGraph3Compl v w₁ w₂) :
          v w₁
          theorem SimpleGraph.IsPathGraph3Compl.ne_snd {α : Type u} {G : SimpleGraph α} {v w₁ w₂ : α} (h2 : G.IsPathGraph3Compl v w₁ w₂) :
          v w₂
          theorem SimpleGraph.IsPathGraph3Compl.fst_ne_snd {α : Type u} {G : SimpleGraph α} {v w₁ w₂ : α} (h2 : G.IsPathGraph3Compl v w₁ w₂) :
          w₁ w₂
          theorem SimpleGraph.IsPathGraph3Compl.symm {α : Type u} {G : SimpleGraph α} {v w₁ w₂ : α} (h : G.IsPathGraph3Compl v w₁ w₂) :
          G.IsPathGraph3Compl v w₂ w₁
          theorem SimpleGraph.exists_isPathGraph3Compl_of_not_isCompleteMultipartite {α : Type u} {G : SimpleGraph α} (h : ¬G.IsCompleteMultipartite) :
          ∃ (v : α) (w₁ : α) (w₂ : α), G.IsPathGraph3Compl v w₁ w₂
          def SimpleGraph.IsPathGraph3Compl.pathGraph3ComplEmbedding {α : Type u} {G : SimpleGraph α} {v w₁ w₂ : α} (h : G.IsPathGraph3Compl v w₁ w₂) :

          Any IsPathGraph3Compl in G gives rise to a graph embedding of the complement of the path graph

          Instances For

            Embedding of (pathGraph 3)ᶜ into G that is not complete-multipartite.

            Instances For
              @[reducible, inline]
              abbrev SimpleGraph.completeEquipartiteGraph (r t : ) :
              SimpleGraph (Fin r × Fin t)

              The complete equipartite graph in r parts each of equal size t such that two vertices are adjacent if and only if they are in different parts, often denoted $K_r(t)$.

              This is isomorphic to a corresponding completeMultipartiteGraph and turanGraph. The difference is that the former vertices are a product type.

              See completeEquipartiteGraph.completeMultipartiteGraph, completeEquipartiteGraph.turanGraph.

              Instances For
                theorem SimpleGraph.completeEquipartiteGraph_adj {r t : } {v w : Fin r × Fin t} :
                (completeEquipartiteGraph r t).Adj v w v.1 w.1

                A completeEquipartiteGraph is isomorphic to a corresponding completeMultipartiteGraph.

                The difference is that the former vertices are a product type whereas the latter vertices are a dependent product type.

                Instances For

                  A completeEquipartiteGraph is isomorphic to a corresponding turanGraph.

                  The difference is that the former vertices are a product type whereas the latter vertices are not.

                  Instances For

                    completeEquipartiteGraph r t contains no edges when r ≤ 1 or t = 0.

                    theorem SimpleGraph.degree_completeEquipartiteGraph {r t : } (v : Fin r × Fin t) :
                    (completeEquipartiteGraph r t).degree v = (r - 1) * t
                    theorem SimpleGraph.isContained_completeEquipartiteGraph_of_colorable {α : Type u} {G : SimpleGraph α} [Fintype α] {n : } (C : G.Coloring (Fin n)) (t : ) (h : ∀ (c : Fin n), Fintype.card (C.colorClass c) t) :

                    Every n-colorable graph is contained in a completeEquipartiteGraph in n parts (as long as the parts are at least as large as the largest color class).

                    structure SimpleGraph.CompleteEquipartiteSubgraph {V : Type u_1} (G : SimpleGraph V) (r t : ) :
                    Type u_1

                    A complete equipartite subgraph in r > 0 parts each of size t ≠ 0 in G is r subsets of vertices each of size t such that vertices in distinct subsets are adjacent.

                    If r > 0 but t = 0, then parts = {{}}. If r = 0, then parts = {}. These are the two distinct "empty" complete equipartite subgraphs, that is, the complete equipartite subgraphs having no vertices.

                    • parts : Finset (Finset V)

                      The parts in a complete equipartite subgraph.

                    • card_parts : self.parts.card = r t = 0

                      There are r parts or t = 0.

                    • card_mem_parts {p : Finset V} : p self.partsp.card = t

                      There are t vertices in each part.

                    • isCompleteBetween : (↑self.parts).Pairwise fun (x1 x2 : Finset V) => G.IsCompleteBetween x1 x2

                      The vertices in distinct parts are adjacent.

                    Instances For
                      theorem SimpleGraph.CompleteEquipartiteSubgraph.ext {V : Type u_1} {G : SimpleGraph V} {r t : } {x y : G.CompleteEquipartiteSubgraph r t} (parts : x.parts = y.parts) :
                      x = y
                      theorem SimpleGraph.CompleteEquipartiteSubgraph.nonempty_of_eq_zero_or_eq_zero {V : Type u_1} {G : SimpleGraph V} {r t : } (h : r = 0 t = 0) :

                      At least one of the "empty" complete equipartite subgraphs is contained in a simple graph.

                      The parts in a complete equipartite subgraph are pairwise disjoint.

                      The finset of vertices in a complete equipartite subgraph.

                      Instances For

                        The finset of vertices in a complete equipartite subgraph as a biUnion.

                        There are r * t vertices in a complete equipartite subgraph with r parts of size t.

                        A complete equipartite subgraph gives rise to a copy of a complete equipartite graph.

                        Instances For

                          A copy of a complete equipartite graph identifies a complete equipartite subgraph.

                          Instances For

                            Simple graphs contain a copy of a completeEquipartiteGraph r t iff the type G.CompleteEquipartiteSubgraph r t is nonempty.

                            theorem SimpleGraph.completeEquipartiteGraph_succ_isContained_iff {V : Type u_1} {G : SimpleGraph V} {r t : } :
                            (completeEquipartiteGraph (r + 1) t).IsContained G ∃ (K : G.CompleteEquipartiteSubgraph r t) (s : Finset V), s.card = t pK.parts, G.IsCompleteBetween p s

                            Simple graphs contain a copy of a completeEquipartiteGraph (r + 1) t iff there exists s : Finset V of size #s = t and K : G.CompleteEquipartiteSubgraph r t such that the vertices in s are adjacent to the vertices in K.