Skip to content

Commit 5372c30

Browse files
committed
merge feat/simplegraph-locally-finite-order into feat/ind-copy-count as diff base for feat/copy-mobius
2 parents 3e317f2 + e122078 commit 5372c30

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Mathlib/Combinatorics/SimpleGraph/Finite.lean

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module
88
public import Mathlib.Combinatorics.SimpleGraph.Maps
99
public import Mathlib.Data.Finset.Max
1010
public import Mathlib.Data.Sym.Card
11+
public import Mathlib.Order.Interval.Finset.Defs
1112

1213
/-!
1314
# Definitions for finite and locally finite graphs
@@ -571,6 +572,25 @@ lemma degree_lt_card_sub_one [DecidableRel G.Adj] (v : V) :
571572

572573
end Finite
573574

575+
section LocallyFiniteOrder
576+
577+
variable [Fintype V]
578+
579+
/-- `G ≤ H` is decidable when adjacency is decidable on both sides. -/
580+
instance decidableLE {G H : SimpleGraph V}
581+
[DecidableRel G.Adj] [DecidableRel H.Adj] : Decidable (G ≤ H) :=
582+
decidable_of_iff (∀ v w, G.Adj v w → H.Adj v w) Iff.rfl
583+
584+
/-- The lattice of simple graphs on a finite type is locally finite when the order is
585+
decidable. -/
586+
instance [DecidableEq V] [DecidableLE (SimpleGraph V)] :
587+
LocallyFiniteOrder (SimpleGraph V) :=
588+
LocallyFiniteOrder.ofIcc' (SimpleGraph V)
589+
(fun G₁ G₂ => {G | G₁ ≤ G ∧ G ≤ G₂})
590+
(fun _ _ _ => by simp)
591+
592+
end LocallyFiniteOrder
593+
574594
namespace Iso
575595

576596
variable {G} {W : Type*} {G' : SimpleGraph W}

0 commit comments

Comments
 (0)