Metamath Proof Explorer


Definition df-upgr

Description: Define the class of all undirected pseudographs. An (undirected) pseudograph consists of a set v (of "vertices") and a function e (representing indexed "edges") into subsets of v of cardinality one or two, representing the two vertices incident to the edge, or the one vertex if the edge is a loop. This is according to Chartrand, Gary and Zhang, Ping (2012): "A First Course in Graph Theory.", Dover, ISBN 978-0-486-48368-9, section 1.4, p. 26: "In a pseudograph, not only are parallel edges permitted but an edge is also permitted to join a vertex to itself. Such an edge is called a loop." (in contrast to a multigraph, see df-umgr ). (Contributed by Mario Carneiro, 11-Mar-2015) (Revised by AV, 24-Nov-2020)

Ref Expression
Assertion df-upgr
|- UPGraph = { g | [. ( Vtx ` g ) / v ]. [. ( iEdg ` g ) / e ]. e : dom e --> { x e. ( ~P v \ { (/) } ) | ( # ` x ) <_ 2 } }

Detailed syntax breakdown

Step Hyp Ref Expression
0 cupgr
 |-  UPGraph
1 vg
 |-  g
2 cvtx
 |-  Vtx
3 1 cv
 |-  g
4 3 2 cfv
 |-  ( Vtx ` g )
5 vv
 |-  v
6 ciedg
 |-  iEdg
7 3 6 cfv
 |-  ( iEdg ` g )
8 ve
 |-  e
9 8 cv
 |-  e
10 9 cdm
 |-  dom e
11 vx
 |-  x
12 5 cv
 |-  v
13 12 cpw
 |-  ~P v
14 c0
 |-  (/)
15 14 csn
 |-  { (/) }
16 13 15 cdif
 |-  ( ~P v \ { (/) } )
17 chash
 |-  #
18 11 cv
 |-  x
19 18 17 cfv
 |-  ( # ` x )
20 cle
 |-  <_
21 c2
 |-  2
22 19 21 20 wbr
 |-  ( # ` x ) <_ 2
23 22 11 16 crab
 |-  { x e. ( ~P v \ { (/) } ) | ( # ` x ) <_ 2 }
24 10 23 9 wf
 |-  e : dom e --> { x e. ( ~P v \ { (/) } ) | ( # ` x ) <_ 2 }
25 24 8 7 wsbc
 |-  [. ( iEdg ` g ) / e ]. e : dom e --> { x e. ( ~P v \ { (/) } ) | ( # ` x ) <_ 2 }
26 25 5 4 wsbc
 |-  [. ( Vtx ` g ) / v ]. [. ( iEdg ` g ) / e ]. e : dom e --> { x e. ( ~P v \ { (/) } ) | ( # ` x ) <_ 2 }
27 26 1 cab
 |-  { g | [. ( Vtx ` g ) / v ]. [. ( iEdg ` g ) / e ]. e : dom e --> { x e. ( ~P v \ { (/) } ) | ( # ` x ) <_ 2 } }
28 0 27 wceq
 |-  UPGraph = { g | [. ( Vtx ` g ) / v ]. [. ( iEdg ` g ) / e ]. e : dom e --> { x e. ( ~P v \ { (/) } ) | ( # ` x ) <_ 2 } }