Skip to content

Commit

Permalink
feat(combinatorics/simple_graph/basic): add decidable instance for ad…
Browse files Browse the repository at this point in the history
…jacency of complement (#6000)

Add instance that states that, if the adjacency relation for a simple graph is decidable, the adjacency relation for its complement is also decidable. 



Co-authored-by: agusakov <39916842+agusakov@users.noreply.github.com>
  • Loading branch information
agusakov and agusakov committed Feb 1, 2021
1 parent 1706e55 commit 4d3b26f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/combinatorics/simple_graph/basic.lean
Expand Up @@ -442,6 +442,9 @@ instance has_compl : has_compl (simple_graph V) :=
@[simp]
lemma compl_adj (G : simple_graph V) (v w : V) : Gᶜ.adj v w ↔ v ≠ w ∧ ¬G.adj v w := iff.rfl

instance compl_adj_decidable (V : Type u) [decidable_eq V] (G : simple_graph V)
[decidable_rel G.adj] : decidable_rel Gᶜ.adj := λ v w, and.decidable

@[simp]
lemma compl_compl (G : simple_graph V) : Gᶜᶜ = G :=
begin
Expand Down

0 comments on commit 4d3b26f

Please sign in to comment.