Skip to content

Commit fa6e3bb

Browse files
committed
merge feat/simplegraph-locally-finite-order into feat/simplegraph-aut as diff base for feat/copy-mobius
2 parents de72aec + e122078 commit fa6e3bb

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
@@ -529,6 +530,25 @@ theorem card_commonNeighbors_top [DecidableEq V] {v w : V} (h : v ≠ w) :
529530

530531
end Finite
531532

533+
section LocallyFiniteOrder
534+
535+
variable [Fintype V]
536+
537+
/-- `G ≤ H` is decidable when adjacency is decidable on both sides. -/
538+
instance decidableLE {G H : SimpleGraph V}
539+
[DecidableRel G.Adj] [DecidableRel H.Adj] : Decidable (G ≤ H) :=
540+
decidable_of_iff (∀ v w, G.Adj v w → H.Adj v w) Iff.rfl
541+
542+
/-- The lattice of simple graphs on a finite type is locally finite when the order is
543+
decidable. -/
544+
instance [DecidableEq V] [DecidableLE (SimpleGraph V)] :
545+
LocallyFiniteOrder (SimpleGraph V) :=
546+
LocallyFiniteOrder.ofIcc' (SimpleGraph V)
547+
(fun G₁ G₂ => {G | G₁ ≤ G ∧ G ≤ G₂})
548+
(fun _ _ _ => by simp)
549+
550+
end LocallyFiniteOrder
551+
532552
namespace Iso
533553

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

0 commit comments

Comments
 (0)