Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 8a38a69

Browse files
committed
feat(combinatorics/simple_graph/hasse): The Hasse diagram of α × β (#14978)
... is the box product of the Hasse diagrams of `α` and `β`.
1 parent 1a54e4d commit 8a38a69

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/combinatorics/simple_graph/hasse.lean

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2022 Yaël Dillies. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Yaël Dillies
55
-/
6-
import combinatorics.simple_graph.connectivity
6+
import combinatorics.simple_graph.prod
77
import data.fin.succ_pred
88
import order.succ_pred.relation
99

@@ -47,6 +47,15 @@ def hasse_dual_iso : hasse αᵒᵈ ≃g hasse α :=
4747

4848
end preorder
4949

50+
section partial_order
51+
variables [partial_order α] [partial_order β]
52+
53+
@[simp] lemma hasse_prod : hasse (α × β) = hasse α □ hasse β :=
54+
by { ext x y, simp_rw [box_prod_adj, hasse_adj, prod.covby_iff, or_and_distrib_right,
55+
@eq_comm _ y.1, @eq_comm _ y.2, or_or_or_comm] }
56+
57+
end partial_order
58+
5059
section linear_order
5160
variables [linear_order α]
5261

src/combinatorics/simple_graph/prod.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def box_prod (G : simple_graph α) (H : simple_graph β) : simple_graph (α ×
4141

4242
infix ` □ `:70 := box_prod
4343

44-
lemma box_prod_adj : (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 :=
45-
iff.rfl
44+
@[simp] lemma box_prod_adj :
45+
(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 := iff.rfl
4646

4747
@[simp] lemma box_prod_adj_left : (G □ H).adj (a₁, b) (a₂, b) ↔ G.adj a₁ a₂ :=
4848
by rw [box_prod_adj, and_iff_left rfl, or_iff_left (λ h : H.adj b b ∧ _, h.1.ne rfl)]

0 commit comments

Comments
 (0)