Skip to content

Commit e122078

Browse files
committed
feat(Combinatorics/SimpleGraph/Finite): LocallyFiniteOrder
Adds the order-theoretic local-finiteness of `SimpleGraph V` (every `Icc G H` is a `Finset`), distinct from the existing graph-theoretic `LocallyFinite` (every vertex has a finite neighborhood) elsewhere in the file. * `SimpleGraph.decidableLE` (instance): `G ≤ H` is decidable under `[Fintype V]` and per-graph adjacency decidability `[DecidableRel G.Adj] [DecidableRel H.Adj]`. * `SimpleGraph.locallyFiniteOrder` (non-instance abbrev): produces `LocallyFiniteOrder (SimpleGraph V)` under `[Fintype V] [DecidableEq V] [DecidableLE (SimpleGraph V)]`, built via `LocallyFiniteOrder.ofIcc'`. The abbrev is deliberately not an instance — `DecidableLE (SimpleGraph V)` cannot be synthesised globally because `DecidableRel G.Adj` is value-dependent. Callers either compose `decidableLE` after providing per-graph adjacency decidability, or use `letI := Classical.decRel _` for a noncomputable order. Required downstream for `Finset.Icc G ⊤` in the Möbius inversion between copy counts and induced copy counts.
1 parent 11a4a72 commit e122078

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)