Documentation

Mathlib.Combinatorics.SimpleGraph.Prod

Graph products #

This file defines the box product of graphs and other product constructions. The box product of G and H is the graph on the product of the vertices such that x and y are related iff they agree on one component and the other one is related via either G or H. For example, the box product of two edges is a square.

Main declarations #

Notation #

TODO #

Define all other graph products!

def SimpleGraph.boxProd {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) (H : SimpleGraph β) :
SimpleGraph (α × β)

Box product of simple graphs. It relates (a₁, b) and (a₂, b) if G relates a₁ and a₂, and (a, b₁) and (a, b₂) if H relates b₁ and b₂.

Equations
Instances For

    Box product of simple graphs. It relates (a₁, b) and (a₂, b) if G relates a₁ and a₂, and (a, b₁) and (a, b₂) if H relates b₁ and b₂.

    Equations
    Instances For
      @[simp]
      theorem SimpleGraph.boxProd_adj {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {H : SimpleGraph β} {x : α × β} {y : α × β} :
      (G H).Adj x y G.Adj x.1 y.1 x.2 = y.2 H.Adj x.2 y.2 x.1 = y.1
      theorem SimpleGraph.boxProd_adj_left {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {H : SimpleGraph β} {a₁ : α} {b : β} {a₂ : α} :
      (G H).Adj (a₁, b) (a₂, b) G.Adj a₁ a₂
      theorem SimpleGraph.boxProd_adj_right {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {H : SimpleGraph β} {a : α} {b₁ : β} {b₂ : β} :
      (G H).Adj (a, b₁) (a, b₂) H.Adj b₁ b₂
      theorem SimpleGraph.boxProd_neighborSet {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {H : SimpleGraph β} (x : α × β) :
      @[simp]
      theorem SimpleGraph.boxProdComm_apply {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) (H : SimpleGraph β) :
      ∀ (a : α × β), (SimpleGraph.boxProdComm G H) a = Prod.swap a
      @[simp]
      theorem SimpleGraph.boxProdComm_symm_apply {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) (H : SimpleGraph β) :
      ∀ (a : β × α), (RelIso.symm (SimpleGraph.boxProdComm G H)) a = Prod.swap a
      def SimpleGraph.boxProdComm {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) (H : SimpleGraph β) :
      G H ≃g H G

      The box product is commutative up to isomorphism. Equiv.prodComm as a graph isomorphism.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[simp]
        theorem SimpleGraph.boxProdAssoc_symm_apply {α : Type u_1} {β : Type u_2} {γ : Type u_3} (G : SimpleGraph α) (H : SimpleGraph β) (I : SimpleGraph γ) (p : α × β × γ) :
        (RelIso.symm (SimpleGraph.boxProdAssoc G H I)) p = ((p.1, p.2.1), p.2.2)
        @[simp]
        theorem SimpleGraph.boxProdAssoc_apply {α : Type u_1} {β : Type u_2} {γ : Type u_3} (G : SimpleGraph α) (H : SimpleGraph β) (I : SimpleGraph γ) (p : (α × β) × γ) :
        (SimpleGraph.boxProdAssoc G H I) p = (p.1.1, p.1.2, p.2)
        def SimpleGraph.boxProdAssoc {α : Type u_1} {β : Type u_2} {γ : Type u_3} (G : SimpleGraph α) (H : SimpleGraph β) (I : SimpleGraph γ) :
        G H I ≃g G (H I)

        The box product is associative up to isomorphism. Equiv.prodAssoc as a graph isomorphism.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          @[simp]
          theorem SimpleGraph.boxProdLeft_apply {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) (H : SimpleGraph β) (b : β) (a : α) :
          (SimpleGraph.boxProdLeft G H b) a = (a, b)
          def SimpleGraph.boxProdLeft {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) (H : SimpleGraph β) (b : β) :
          G ↪g G H

          The embedding of G into G □ H given by b.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem SimpleGraph.boxProdRight_apply {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) (H : SimpleGraph β) (a : α) (snd : β) :
            (SimpleGraph.boxProdRight G H a) snd = (a, snd)
            def SimpleGraph.boxProdRight {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) (H : SimpleGraph β) (a : α) :
            H ↪g G H

            The embedding of H into G □ H given by a.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def SimpleGraph.Walk.boxProdLeft {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} (H : SimpleGraph β) {a₁ : α} {a₂ : α} (b : β) :
              SimpleGraph.Walk G a₁ a₂SimpleGraph.Walk (G H) (a₁, b) (a₂, b)

              Turn a walk on G into a walk on G □ H.

              Equations
              Instances For
                def SimpleGraph.Walk.boxProdRight {α : Type u_1} {β : Type u_2} (G : SimpleGraph α) {H : SimpleGraph β} {b₁ : β} {b₂ : β} (a : α) :
                SimpleGraph.Walk H b₁ b₂SimpleGraph.Walk (G H) (a, b₁) (a, b₂)

                Turn a walk on H into a walk on G □ H.

                Equations
                Instances For
                  def SimpleGraph.Walk.ofBoxProdLeft {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {H : SimpleGraph β} [DecidableEq β] [DecidableRel G.Adj] {x : α × β} {y : α × β} :
                  SimpleGraph.Walk (G H) x ySimpleGraph.Walk G x.1 y.1

                  Project a walk on G □ H to a walk on G by discarding the moves in the direction of H.

                  Equations
                  Instances For
                    def SimpleGraph.Walk.ofBoxProdRight {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {H : SimpleGraph β} [DecidableEq α] [DecidableRel H.Adj] {x : α × β} {y : α × β} :
                    SimpleGraph.Walk (G H) x ySimpleGraph.Walk H x.2 y.2

                    Project a walk on G □ H to a walk on H by discarding the moves in the direction of G.

                    Equations
                    Instances For
                      @[simp]
                      theorem SimpleGraph.Walk.ofBoxProdLeft_boxProdLeft {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {H : SimpleGraph β} {b : β} [DecidableEq β] [DecidableRel G.Adj] {a₁ : α} {a₂ : α} (w : SimpleGraph.Walk G a₁ a₂) :
                      @[simp]
                      theorem SimpleGraph.Walk.ofBoxProdLeft_boxProdRight {α : Type u_1} {G : SimpleGraph α} {a : α} [DecidableEq α] [DecidableRel G.Adj] {b₁ : α} {b₂ : α} (w : SimpleGraph.Walk G b₁ b₂) :
                      instance SimpleGraph.boxProdFintypeNeighborSet {α : Type u_1} {β : Type u_2} {G : SimpleGraph α} {H : SimpleGraph β} (x : α × β) [Fintype (SimpleGraph.neighborSet G x.1)] [Fintype (SimpleGraph.neighborSet H x.2)] :
                      Equations
                      • One or more equations did not get rendered due to their size.