Graph classes
Lax871432.GraphClasses Β· concepts/Lax871432/GraphClasses.lean Β· lax-871432
No public endorsements yet.
Loading reviewβ¦
Sign in with ORCIDNatural Language Statement
Definition
A graph class is a class of finite simple graphs which is closed under isomorphism: if and , then .
Graph classes are ordered by inclusion, , written . The intersection and the union of a family of graph classes are again graph classes, written and .
Concept map
In the paper
- page 1 of the paper of lax-326031, Graph Classes and Width Parameters
Lean source view on GitHub
| 1 | import Mathlib.Combinatorics.SimpleGraph.Maps |
| 2 | import Mathlib.Order.SetNotation |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Graph classes |
| 7 | type: definition |
| 8 | --- |
| 9 | A *graph class* is a class of finite simple graphs which is closed under |
| 10 | isomorphism: if and , then . |
| 11 | |
| 12 | Graph classes are ordered by inclusion, , written |
| 13 | `π β€ π'`. The intersection and the union |
| 14 | of a family of graph classes are again graph classes, |
| 15 | written `β¨ i, π i` and `β¨ i, π i`. |
| 16 | |
| 17 | # Implementation notes |
| 18 | |
| 19 | A class of finite simple graphs cannot be a `Set` of graphs, since graphs live over arbitrary |
| 20 | vertex types. The underlying datum is therefore a predicate on the finite simple graphs over |
| 21 | an arbitrary vertex type, together with a proof that it is invariant under isomorphism. |
| 22 | |
| 23 | The results about graph classes need that invariance β the homomorphism distinguishing |
| 24 | closure is defined by a condition on all graphs of a given isomorphism type β so it is carried |
| 25 | in the structure rather than assumed afresh in every statement. |
| 26 | |
| 27 | The vertex types range over `Type` rather than over an arbitrary universe, matching the |
| 28 | quantifiers of `GraphIsoRelaxation`. A universe-polymorphic `Mem` is not available here: a |
| 29 | `Type*` in a structure field is not quantified inside the field, it becomes a parameter of |
| 30 | `GraphClass` itself, so a class would be tied to one fixed universe instead of covering them |
| 31 | all. Fixing `Type` is no loss of generality either, since every finite graph is isomorphic to |
| 32 | a graph on some `Fin n` and membership is invariant under isomorphism. |
| 33 | -/ |
| 34 | |
| 35 | namespace Lax871432.GraphClasses |
| 36 | |
| 37 | /-- A class of finite simple graphs, given by an isomorphism-invariant predicate on the |
| 38 | finite simple graphs. -/ |
| 39 | structure GraphClass where |
| 40 | /-- The graphs of the class. -/ |
| 41 | Mem : β {V : Type} [Finite V], SimpleGraph V β Prop |
| 42 | /-- The class is invariant under isomorphism. -/ |
| 43 | mem_congr : β {V W : Type} [Finite V] [Finite W] {F : SimpleGraph V} {F' : SimpleGraph W}, |
| 44 | Nonempty (F βg F') β (Mem F β Mem F') |
| 45 | |
| 46 | /-- Inclusion of graph classes: `π β€ π'` if every graph in `π` is in `π'`. -/ |
| 47 | instance : PartialOrder GraphClass where |
| 48 | le π π' := β β¦V : Typeβ¦ [Finite V] (F : SimpleGraph V), π.Mem F β π'.Mem F |
| 49 | le_refl _ _ _ _ hF := hF |
| 50 | le_trans _ _ _ h h' _ _ F hF := h' F (h F hF) |
| 51 | le_antisymm := by |
| 52 | rintro β¨Mem, _β© β¨Mem', _β© h h' |
| 53 | have : @Mem = @Mem' := by |
| 54 | funext V _ F |
| 55 | exact propext β¨h F, h' Fβ© |
| 56 | subst this |
| 57 | rfl |
| 58 | |
| 59 | /-- The intersection of a set of graph classes: the graphs lying in each of them. The |
| 60 | intersection of a family is written `β¨ i, π i`. -/ |
| 61 | instance : InfSet GraphClass where |
| 62 | sInf S := |
| 63 | { Mem F := β π β S, π.Mem F |
| 64 | mem_congr he := |
| 65 | forall_congr' fun π : GraphClass => imp_congr_right fun _ => π.mem_congr he } |
| 66 | |
| 67 | /-- The union of a set of graph classes: the graphs lying in at least one of them. The union |
| 68 | of a family is written `β¨ i, π i`. -/ |
| 69 | instance : SupSet GraphClass where |
| 70 | sSup S := |
| 71 | { Mem F := β π β S, π.Mem F |
| 72 | mem_congr he := exists_congr fun π : GraphClass => and_congr_right' (π.mem_congr he) } |
| 73 | |
| 74 | end Lax871432.GraphClasses |
| 75 |
Implementation notes
A class of finite simple graphs cannot be a of graphs, since graphs live over arbitrary vertex types. The underlying datum is therefore a predicate on the finite simple graphs over an arbitrary vertex type, together with a proof that it is invariant under isomorphism.
The results about graph classes need that invariance β the homomorphism distinguishing closure is defined by a condition on all graphs of a given isomorphism type β so it is carried in the structure rather than assumed afresh in every statement.
The vertex types range over rather than over an arbitrary universe, matching the quantifiers of . A universe-polymorphic is not available here: a in a structure field is not quantified inside the field, it becomes a parameter of itself, so a class would be tied to one fixed universe instead of covering them all. Fixing is no loss of generality either, since every finite graph is isomorphic to a graph on some and membership is invariant under isomorphism.
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments