File: Mathlib/Combinatorics/SimpleGraph/Prod.lean

full_name: SimpleGraph.boxProd
code: /-- 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₂`. -/
def boxProd (G : SimpleGraph α) (H : SimpleGraph β) : SimpleGraph (α × β) 
goal: SimpleGraph (α × β)

full_name: SimpleGraph._aux_Mathlib_Combinatorics_SimpleGraph_Prod___unexpand_SimpleGraph_boxProd_1
code: /-- 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₂`. -/
infixl:70 " □ " => boxProd
goal: Lean.PrettyPrinter.Unexpander

full_name: SimpleGraph.«_aux_Mathlib_Combinatorics_SimpleGraph_Prod___macroRules_SimpleGraph_term_□__1»
code: /-- 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₂`. -/
infixl:70 " □ " => boxProd
goal: Lean.Macro

full_name: SimpleGraph.boxProd_adj
code: @[simp]
theorem boxProd_adj {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 
goal: (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

full_name: SimpleGraph.boxProd_adj_left
code: theorem boxProd_adj_left {a₁ : α} {b : β} {a₂ : α} :
    (G □ H).Adj (a₁, b) (a₂, b) ↔ G.Adj a₁ a₂ 
goal: (G □ H).Adj (a₁, b) (a₂, b) ↔ G.Adj a₁ a₂

full_name: SimpleGraph.boxProd_adj_right
code: theorem boxProd_adj_right {a : α} {b₁ b₂ : β} : (G □ H).Adj (a, b₁) (a, b₂) ↔ H.Adj b₁ b₂ 
goal: (G □ H).Adj (a, b₁) (a, b₂) ↔ H.Adj b₁ b₂

full_name: SimpleGraph.boxProd_neighborSet
code: theorem boxProd_neighborSet (x : α × β) :
    (G □ H).neighborSet x = G.neighborSet x.1 ×ˢ {x.2} ∪ {x.1} ×ˢ H.neighborSet x.2 
goal: (G □ H).neighborSet x = G.neighborSet x.1 ×ˢ {x.2} ∪ {x.1} ×ˢ H.neighborSet x.2

full_name: SimpleGraph.boxProdComm
code: /-- The box product is commutative up to isomorphism. `Equiv.prodComm` as a graph isomorphism. -/
@[simps!]
def boxProdComm : G □ H ≃g H □ G 
goal: G □ H ≃g H □ G

full_name: SimpleGraph.boxProdComm_apply
code: /-- The box product is commutative up to isomorphism. `Equiv.prodComm` as a graph isomorphism. -/
@[simps!]
def boxProdComm : G □ H ≃g H □ G 
goal: ∀ (a : α × β), (G.boxProdComm H) a = a.swap

full_name: SimpleGraph.boxProdComm_symm_apply
code: /-- The box product is commutative up to isomorphism. `Equiv.prodComm` as a graph isomorphism. -/
@[simps!]
def boxProdComm : G □ H ≃g H □ G 
goal: ∀ (a : β × α), (RelIso.symm (G.boxProdComm H)) a = a.swap

full_name: SimpleGraph.boxProdAssoc
code: /-- The box product is associative up to isomorphism. `Equiv.prodAssoc` as a graph isomorphism. -/
@[simps!]
def boxProdAssoc (I : SimpleGraph γ) : G □ H □ I ≃g G □ (H □ I) 
goal: G □ H □ I ≃g G □ (H □ I)

full_name: SimpleGraph.boxProdAssoc_apply
code: /-- The box product is associative up to isomorphism. `Equiv.prodAssoc` as a graph isomorphism. -/
@[simps!]
def boxProdAssoc (I : SimpleGraph γ) : G □ H □ I ≃g G □ (H □ I) 
goal: (G.boxProdAssoc H I) p = (p.1.1, p.1.2, p.2)

full_name: SimpleGraph.boxProdAssoc_symm_apply
code: /-- The box product is associative up to isomorphism. `Equiv.prodAssoc` as a graph isomorphism. -/
@[simps!]
def boxProdAssoc (I : SimpleGraph γ) : G □ H □ I ≃g G □ (H □ I) 
goal: (RelIso.symm (G.boxProdAssoc H I)) p = ((p.1, p.2.1), p.2.2)

full_name: SimpleGraph.boxProdLeft_apply
code: /-- The embedding of `G` into `G □ H` given by `b`. -/
@[simps]
def boxProdLeft (b : β) : G ↪g G □ H 
goal: (G.boxProdLeft H b) a = (a, b)

full_name: SimpleGraph.boxProdLeft
code: /-- The embedding of `G` into `G □ H` given by `b`. -/
@[simps]
def boxProdLeft (b : β) : G ↪g G □ H 
goal: G ↪g G □ H

full_name: SimpleGraph.boxProdRight_apply
code: /-- The embedding of `H` into `G □ H` given by `a`. -/
@[simps]
def boxProdRight (a : α) : H ↪g G □ H 
goal: (G.boxProdRight H a) snd = (a, snd)

full_name: SimpleGraph.boxProdRight
code: /-- The embedding of `H` into `G □ H` given by `a`. -/
@[simps]
def boxProdRight (a : α) : H ↪g G □ H 
goal: H ↪g G □ H

full_name: SimpleGraph.Walk.boxProdLeft
code: /-- Turn a walk on `G` into a walk on `G □ H`. -/
protected def boxProdLeft {a₁ a₂ : α} (b : β) : G.Walk a₁ a₂ → (G □ H).Walk (a₁, b) (a₂, b) 
goal: G.Walk a₁ a₂ → (G □ H).Walk (a₁, b) (a₂, b)

full_name: SimpleGraph.Walk.boxProdRight
code: /-- Turn a walk on `H` into a walk on `G □ H`. -/
protected def boxProdRight {b₁ b₂ : β} (a : α) : H.Walk b₁ b₂ → (G □ H).Walk (a, b₁) (a, b₂) 
goal: H.Walk b₁ b₂ → (G □ H).Walk (a, b₁) (a, b₂)

full_name: SimpleGraph.Walk.ofBoxProdLeft
code: /-- Project a walk on `G □ H` to a walk on `G` by discarding the moves in the direction of `H`. -/
def ofBoxProdLeft [DecidableEq β] [DecidableRel G.Adj] {x y : α × β} :
    (G □ H).Walk x y → G.Walk x.1 y.1
  
goal: (G □ H).Walk x y → G.Walk x.1 y.1

full_name: SimpleGraph.Walk.ofBoxProdRight
code: /-- Project a walk on `G □ H` to a walk on `H` by discarding the moves in the direction of `G`. -/
def ofBoxProdRight [DecidableEq α] [DecidableRel H.Adj] {x y : α × β} :
    (G □ H).Walk x y → H.Walk x.2 y.2
  
goal: (G □ H).Walk x y → H.Walk x.2 y.2

full_name: SimpleGraph.Walk.ofBoxProdLeft_boxProdLeft
code: @[simp]
theorem ofBoxProdLeft_boxProdLeft [DecidableEq β] [DecidableRel G.Adj] {a₁ a₂ : α} {b : β} :
    ∀ (w : G.Walk a₁ a₂), (w.boxProdLeft H b).ofBoxProdLeft = w
  
goal: (SimpleGraph.Walk.boxProdLeft H b w).ofBoxProdLeft = w

full_name: SimpleGraph.Walk.ofBoxProdLeft_boxProdRight
code: @[simp]
theorem ofBoxProdLeft_boxProdRight [DecidableEq α] [DecidableRel G.Adj] {a b₁ b₂ : α} :
    ∀ (w : G.Walk b₁ b₂), (w.boxProdRight G a).ofBoxProdRight = w
  
goal: (SimpleGraph.Walk.boxProdRight G a w).ofBoxProdRight = w

full_name: SimpleGraph.Preconnected.boxProd
code: protected theorem Preconnected.boxProd (hG : G.Preconnected) (hH : H.Preconnected) :
    (G □ H).Preconnected 
goal: (G □ H).Preconnected

full_name: SimpleGraph.Preconnected.ofBoxProdLeft
code: protected theorem Preconnected.ofBoxProdLeft [Nonempty β] (h : (G □ H).Preconnected) :
    G.Preconnected 
goal: G.Preconnected

full_name: SimpleGraph.Preconnected.ofBoxProdRight
code: protected theorem Preconnected.ofBoxProdRight [Nonempty α] (h : (G □ H).Preconnected) :
    H.Preconnected 
goal: H.Preconnected

full_name: SimpleGraph.Connected.boxProd
code: protected theorem Connected.boxProd (hG : G.Connected) (hH : H.Connected) : (G □ H).Connected 
goal: (G □ H).Connected

full_name: SimpleGraph.Connected.ofBoxProdLeft
code: protected theorem Connected.ofBoxProdLeft (h : (G □ H).Connected) : G.Connected 
goal: G.Connected

full_name: SimpleGraph.Connected.ofBoxProdRight
code: protected theorem Connected.ofBoxProdRight (h : (G □ H).Connected) : H.Connected 
goal: H.Connected

full_name: SimpleGraph.boxProd_connected
code: @[simp]
theorem boxProd_connected : (G □ H).Connected ↔ G.Connected ∧ H.Connected 
goal: (G □ H).Connected ↔ G.Connected ∧ H.Connected

full_name: SimpleGraph.boxProdFintypeNeighborSet
code: instance boxProdFintypeNeighborSet (x : α × β)
    [Fintype (G.neighborSet x.1)] [Fintype (H.neighborSet x.2)] :
    Fintype ((G □ H).neighborSet x) 
goal: Fintype ↑((G □ H).neighborSet x)

full_name: SimpleGraph.boxProd_neighborFinset
code: theorem boxProd_neighborFinset (x : α × β)
    [Fintype (G.neighborSet x.1)] [Fintype (H.neighborSet x.2)] [Fintype ((G □ H).neighborSet x)] :
    (G □ H).neighborFinset x =
      (G.neighborFinset x.1 ×ˢ {x.2}).disjUnion ({x.1} ×ˢ H.neighborFinset x.2)
        (Finset.disjoint_product.mpr <| Or.inl <| neighborFinset_disjoint_singleton _ _) 
goal: (G □ H).neighborFinset x = (G.neighborFinset x.1 ×ˢ {x.2}).disjUnion ({x.1} ×ˢ H.neighborFinset x.2) ⋯

full_name: SimpleGraph.boxProd_degree
code: theorem boxProd_degree (x : α × β)
    [Fintype (G.neighborSet x.1)] [Fintype (H.neighborSet x.2)] [Fintype ((G □ H).neighborSet x)] :
    (G □ H).degree x = G.degree x.1 + H.degree x.2 
goal: (G □ H).degree x = G.degree x.1 + H.degree x.2