Metamath Proof Explorer


Definition df-umgr

Description: Define the class of all undirected multigraphs. An (undirected) multigraph consists of a set v (of "vertices") and a function e (representing indexed "edges") into subsets of v of cardinality two, representing the two vertices incident to the edge. In contrast to a pseudograph, a multigraph has no 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: "A multigraph M consists of a finite nonempty set V of vertices and a set E of edges, where every two vertices of M are joined by a finite number of edges (possibly zero). If two or more edges join the same pair of (distinct) vertices, then these edges are called parallel edges." To provide uniform definitions for all kinds of graphs, x e. ( ~P v \ { (/) } ) is used as restriction of the class abstraction, although x e. ~P v would be sufficient (see prprrab and isumgrs ). (Contributed by AV, 24-Nov-2020)

Ref Expression
Assertion df-umgr UMGraph = { 𝑔[ ( Vtx ‘ 𝑔 ) / 𝑣 ] [ ( iEdg ‘ 𝑔 ) / 𝑒 ] 𝑒 : dom 𝑒 ⟶ { 𝑥 ∈ ( 𝒫 𝑣 ∖ { ∅ } ) ∣ ( ♯ ‘ 𝑥 ) = 2 } }

Detailed syntax breakdown

Step Hyp Ref Expression
0 cumgr UMGraph
1 vg 𝑔
2 cvtx Vtx
3 1 cv 𝑔
4 3 2 cfv ( Vtx ‘ 𝑔 )
5 vv 𝑣
6 ciedg iEdg
7 3 6 cfv ( iEdg ‘ 𝑔 )
8 ve 𝑒
9 8 cv 𝑒
10 9 cdm dom 𝑒
11 vx 𝑥
12 5 cv 𝑣
13 12 cpw 𝒫 𝑣
14 c0
15 14 csn { ∅ }
16 13 15 cdif ( 𝒫 𝑣 ∖ { ∅ } )
17 chash
18 11 cv 𝑥
19 18 17 cfv ( ♯ ‘ 𝑥 )
20 c2 2
21 19 20 wceq ( ♯ ‘ 𝑥 ) = 2
22 21 11 16 crab { 𝑥 ∈ ( 𝒫 𝑣 ∖ { ∅ } ) ∣ ( ♯ ‘ 𝑥 ) = 2 }
23 10 22 9 wf 𝑒 : dom 𝑒 ⟶ { 𝑥 ∈ ( 𝒫 𝑣 ∖ { ∅ } ) ∣ ( ♯ ‘ 𝑥 ) = 2 }
24 23 8 7 wsbc [ ( iEdg ‘ 𝑔 ) / 𝑒 ] 𝑒 : dom 𝑒 ⟶ { 𝑥 ∈ ( 𝒫 𝑣 ∖ { ∅ } ) ∣ ( ♯ ‘ 𝑥 ) = 2 }
25 24 5 4 wsbc [ ( Vtx ‘ 𝑔 ) / 𝑣 ] [ ( iEdg ‘ 𝑔 ) / 𝑒 ] 𝑒 : dom 𝑒 ⟶ { 𝑥 ∈ ( 𝒫 𝑣 ∖ { ∅ } ) ∣ ( ♯ ‘ 𝑥 ) = 2 }
26 25 1 cab { 𝑔[ ( Vtx ‘ 𝑔 ) / 𝑣 ] [ ( iEdg ‘ 𝑔 ) / 𝑒 ] 𝑒 : dom 𝑒 ⟶ { 𝑥 ∈ ( 𝒫 𝑣 ∖ { ∅ } ) ∣ ( ♯ ‘ 𝑥 ) = 2 } }
27 0 26 wceq UMGraph = { 𝑔[ ( Vtx ‘ 𝑔 ) / 𝑣 ] [ ( iEdg ‘ 𝑔 ) / 𝑒 ] 𝑒 : dom 𝑒 ⟶ { 𝑥 ∈ ( 𝒫 𝑣 ∖ { ∅ } ) ∣ ( ♯ ‘ 𝑥 ) = 2 } }