Metamath Proof Explorer


Theorem 1loopgrvd2

Description: The vertex degree of a one-edge graph, case 4: an edge from a vertex to itself contributes two to the vertex's degree. I. e. in a graph (simple pseudograph) with one edge which is a loop, the vertex connected with itself by the loop has degree 2. (Contributed by Mario Carneiro, 12-Mar-2015) (Revised by Alexander van der Vekens, 22-Dec-2017) (Revised by AV, 21-Feb-2021)

Ref Expression
Hypotheses 1loopgruspgr.v φVtxG=V
1loopgruspgr.a φAX
1loopgruspgr.n φNV
1loopgruspgr.i φiEdgG=AN
Assertion 1loopgrvd2 φVtxDegGN=2

Proof

Step Hyp Ref Expression
1 1loopgruspgr.v φVtxG=V
2 1loopgruspgr.a φAX
3 1loopgruspgr.n φNV
4 1loopgruspgr.i φiEdgG=AN
5 1 2 3 4 1loopgruspgr φGUSHGraph
6 uspgrushgr GUSHGraphGUSHGraph
7 5 6 syl φGUSHGraph
8 3 1 eleqtrrd φNVtxG
9 eqid VtxG=VtxG
10 eqid EdgG=EdgG
11 eqid VtxDegG=VtxDegG
12 9 10 11 vtxdushgrfvedg GUSHGraphNVtxGVtxDegGN=eEdgG|Ne+𝑒eEdgG|e=N
13 7 8 12 syl2anc φVtxDegGN=eEdgG|Ne+𝑒eEdgG|e=N
14 snex NV
15 sneq a=Na=N
16 15 eqeq2d a=NN=aN=N
17 eqid N=N
18 14 16 17 ceqsexv2d aN=a
19 18 a1i φaN=a
20 snidg NVNN
21 3 20 syl φNN
22 21 iftrued φifNNN=N
23 22 eqeq1d φifNNN=aN=a
24 23 exbidv φaifNNN=aaN=a
25 19 24 mpbird φaifNNN=a
26 1 2 3 4 1loopgredg φEdgG=N
27 26 rabeqdv φeEdgG|Ne=eN|Ne
28 eleq2 e=NNeNN
29 28 rabsnif eN|Ne=ifNNN
30 27 29 eqtrdi φeEdgG|Ne=ifNNN
31 30 eqeq1d φeEdgG|Ne=aifNNN=a
32 31 exbidv φaeEdgG|Ne=aaifNNN=a
33 25 32 mpbird φaeEdgG|Ne=a
34 fvex EdgGV
35 34 rabex eEdgG|NeV
36 hash1snb eEdgG|NeVeEdgG|Ne=1aeEdgG|Ne=a
37 35 36 ax-mp eEdgG|Ne=1aeEdgG|Ne=a
38 33 37 sylibr φeEdgG|Ne=1
39 eqid N=N
40 39 iftruei ifN=NN=N
41 40 eqeq1i ifN=NN=aN=a
42 41 exbii aifN=NN=aaN=a
43 19 42 sylibr φaifN=NN=a
44 26 rabeqdv φeEdgG|e=N=eN|e=N
45 eqeq1 e=Ne=NN=N
46 45 rabsnif eN|e=N=ifN=NN
47 44 46 eqtrdi φeEdgG|e=N=ifN=NN
48 47 eqeq1d φeEdgG|e=N=aifN=NN=a
49 48 exbidv φaeEdgG|e=N=aaifN=NN=a
50 43 49 mpbird φaeEdgG|e=N=a
51 34 rabex eEdgG|e=NV
52 hash1snb eEdgG|e=NVeEdgG|e=N=1aeEdgG|e=N=a
53 51 52 ax-mp eEdgG|e=N=1aeEdgG|e=N=a
54 50 53 sylibr φeEdgG|e=N=1
55 38 54 oveq12d φeEdgG|Ne+𝑒eEdgG|e=N=1+𝑒1
56 1re 1
57 rexadd 111+𝑒1=1+1
58 56 56 57 mp2an 1+𝑒1=1+1
59 1p1e2 1+1=2
60 58 59 eqtri 1+𝑒1=2
61 60 a1i φ1+𝑒1=2
62 13 55 61 3eqtrd φVtxDegGN=2