@@ -5,8 +5,9 @@ Authors: George Peter Banyard, Yaël Dillies, Kyle Miller
55-/
66module
77
8- public import Mathlib.Combinatorics.SimpleGraph.Paths
98public import Mathlib.Combinatorics.SimpleGraph.Metric
9+ public import Mathlib.Combinatorics.SimpleGraph.Paths
10+ public import Mathlib.Combinatorics.SimpleGraph.Sum
1011
1112/-!
1213# Graph products
@@ -31,7 +32,7 @@ Define all other graph products!
3132
3233@[expose] public section
3334
34- variable {α β γ : Type *}
35+ variable {α β γ V V₁ V₂ W W₁ W₂ : Type *}
3536
3637namespace SimpleGraph
3738
@@ -93,6 +94,24 @@ def boxProdRight (a : α) : H ↪g G □ H where
9394 inj' _ _ := congr_arg Prod.snd
9495 map_rel_iff' {_ _} := boxProd_adj_right
9596
97+ namespace Iso
98+
99+ /-- The box product distributes over the disjoint sum of graphs. -/
100+ @ [simps!, simps toEquiv]
101+ def boxProdSumDistrib (G : SimpleGraph V) (H₁ : SimpleGraph W₁) (H₂ : SimpleGraph W₂) :
102+ G □ (H₁ ⊕g H₂) ≃g G □ H₁ ⊕g G □ H₂ where
103+ toEquiv := .prodSumDistrib ..
104+ map_rel_iff' := by simp
105+
106+ /-- The box product distributes over the disjoint sum of graphs. -/
107+ @ [simps!, simps toEquiv]
108+ def sumBoxProdDistrib (G₁ : SimpleGraph V₁) (G₂ : SimpleGraph V₂) (H : SimpleGraph W) :
109+ (G₁ ⊕g G₂) □ H ≃g G₁ □ H ⊕g G₂ □ H where
110+ toEquiv := .sumProdDistrib ..
111+ map_rel_iff' := by simp
112+
113+ end Iso
114+
96115namespace Walk
97116
98117variable {G}
0 commit comments