MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  1loopgrvd2 Structured version   Visualization version   GIF version

Theorem 1loopgrvd2 28451
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.)
Hypotheses
Ref Expression
1loopgruspgr.v (𝜑 → (Vtx‘𝐺) = 𝑉)
1loopgruspgr.a (𝜑𝐴𝑋)
1loopgruspgr.n (𝜑𝑁𝑉)
1loopgruspgr.i (𝜑 → (iEdg‘𝐺) = {⟨𝐴, {𝑁}⟩})
Assertion
Ref Expression
1loopgrvd2 (𝜑 → ((VtxDeg‘𝐺)‘𝑁) = 2)

Proof of Theorem 1loopgrvd2
Dummy variables 𝑎 𝑒 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 1loopgruspgr.v . . . . 5 (𝜑 → (Vtx‘𝐺) = 𝑉)
2 1loopgruspgr.a . . . . 5 (𝜑𝐴𝑋)
3 1loopgruspgr.n . . . . 5 (𝜑𝑁𝑉)
4 1loopgruspgr.i . . . . 5 (𝜑 → (iEdg‘𝐺) = {⟨𝐴, {𝑁}⟩})
51, 2, 3, 41loopgruspgr 28448 . . . 4 (𝜑𝐺 ∈ USPGraph)
6 uspgrushgr 28126 . . . 4 (𝐺 ∈ USPGraph → 𝐺 ∈ USHGraph)
75, 6syl 17 . . 3 (𝜑𝐺 ∈ USHGraph)
83, 1eleqtrrd 2841 . . 3 (𝜑𝑁 ∈ (Vtx‘𝐺))
9 eqid 2736 . . . 4 (Vtx‘𝐺) = (Vtx‘𝐺)
10 eqid 2736 . . . 4 (Edg‘𝐺) = (Edg‘𝐺)
11 eqid 2736 . . . 4 (VtxDeg‘𝐺) = (VtxDeg‘𝐺)
129, 10, 11vtxdushgrfvedg 28438 . . 3 ((𝐺 ∈ USHGraph ∧ 𝑁 ∈ (Vtx‘𝐺)) → ((VtxDeg‘𝐺)‘𝑁) = ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) +𝑒 (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}})))
137, 8, 12syl2anc 584 . 2 (𝜑 → ((VtxDeg‘𝐺)‘𝑁) = ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) +𝑒 (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}})))
14 snex 5388 . . . . . . . 8 {𝑁} ∈ V
15 sneq 4596 . . . . . . . . 9 (𝑎 = {𝑁} → {𝑎} = {{𝑁}})
1615eqeq2d 2747 . . . . . . . 8 (𝑎 = {𝑁} → ({{𝑁}} = {𝑎} ↔ {{𝑁}} = {{𝑁}}))
17 eqid 2736 . . . . . . . 8 {{𝑁}} = {{𝑁}}
1814, 16, 17ceqsexv2d 3497 . . . . . . 7 𝑎{{𝑁}} = {𝑎}
1918a1i 11 . . . . . 6 (𝜑 → ∃𝑎{{𝑁}} = {𝑎})
20 snidg 4620 . . . . . . . . . 10 (𝑁𝑉𝑁 ∈ {𝑁})
213, 20syl 17 . . . . . . . . 9 (𝜑𝑁 ∈ {𝑁})
2221iftrued 4494 . . . . . . . 8 (𝜑 → if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {{𝑁}})
2322eqeq1d 2738 . . . . . . 7 (𝜑 → (if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎} ↔ {{𝑁}} = {𝑎}))
2423exbidv 1924 . . . . . 6 (𝜑 → (∃𝑎if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎} ↔ ∃𝑎{{𝑁}} = {𝑎}))
2519, 24mpbird 256 . . . . 5 (𝜑 → ∃𝑎if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎})
261, 2, 3, 41loopgredg 28449 . . . . . . . . 9 (𝜑 → (Edg‘𝐺) = {{𝑁}})
2726rabeqdv 3422 . . . . . . . 8 (𝜑 → {𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑒 ∈ {{𝑁}} ∣ 𝑁𝑒})
28 eleq2 2826 . . . . . . . . 9 (𝑒 = {𝑁} → (𝑁𝑒𝑁 ∈ {𝑁}))
2928rabsnif 4684 . . . . . . . 8 {𝑒 ∈ {{𝑁}} ∣ 𝑁𝑒} = if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅)
3027, 29eqtrdi 2792 . . . . . . 7 (𝜑 → {𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅))
3130eqeq1d 2738 . . . . . 6 (𝜑 → ({𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎} ↔ if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎}))
3231exbidv 1924 . . . . 5 (𝜑 → (∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎} ↔ ∃𝑎if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎}))
3325, 32mpbird 256 . . . 4 (𝜑 → ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎})
34 fvex 6855 . . . . . 6 (Edg‘𝐺) ∈ V
3534rabex 5289 . . . . 5 {𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} ∈ V
36 hash1snb 14319 . . . . 5 ({𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} ∈ V → ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) = 1 ↔ ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎}))
3735, 36ax-mp 5 . . . 4 ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) = 1 ↔ ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎})
3833, 37sylibr 233 . . 3 (𝜑 → (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) = 1)
39 eqid 2736 . . . . . . . . 9 {𝑁} = {𝑁}
4039iftruei 4493 . . . . . . . 8 if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {{𝑁}}
4140eqeq1i 2741 . . . . . . 7 (if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎} ↔ {{𝑁}} = {𝑎})
4241exbii 1850 . . . . . 6 (∃𝑎if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎} ↔ ∃𝑎{{𝑁}} = {𝑎})
4319, 42sylibr 233 . . . . 5 (𝜑 → ∃𝑎if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎})
4426rabeqdv 3422 . . . . . . . 8 (𝜑 → {𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑒 ∈ {{𝑁}} ∣ 𝑒 = {𝑁}})
45 eqeq1 2740 . . . . . . . . 9 (𝑒 = {𝑁} → (𝑒 = {𝑁} ↔ {𝑁} = {𝑁}))
4645rabsnif 4684 . . . . . . . 8 {𝑒 ∈ {{𝑁}} ∣ 𝑒 = {𝑁}} = if({𝑁} = {𝑁}, {{𝑁}}, ∅)
4744, 46eqtrdi 2792 . . . . . . 7 (𝜑 → {𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = if({𝑁} = {𝑁}, {{𝑁}}, ∅))
4847eqeq1d 2738 . . . . . 6 (𝜑 → ({𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎} ↔ if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎}))
4948exbidv 1924 . . . . 5 (𝜑 → (∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎} ↔ ∃𝑎if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎}))
5043, 49mpbird 256 . . . 4 (𝜑 → ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎})
5134rabex 5289 . . . . 5 {𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} ∈ V
52 hash1snb 14319 . . . . 5 ({𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} ∈ V → ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}}) = 1 ↔ ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎}))
5351, 52ax-mp 5 . . . 4 ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}}) = 1 ↔ ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎})
5450, 53sylibr 233 . . 3 (𝜑 → (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}}) = 1)
5538, 54oveq12d 7375 . 2 (𝜑 → ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) +𝑒 (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}})) = (1 +𝑒 1))
56 1re 11155 . . . . 5 1 ∈ ℝ
57 rexadd 13151 . . . . 5 ((1 ∈ ℝ ∧ 1 ∈ ℝ) → (1 +𝑒 1) = (1 + 1))
5856, 56, 57mp2an 690 . . . 4 (1 +𝑒 1) = (1 + 1)
59 1p1e2 12278 . . . 4 (1 + 1) = 2
6058, 59eqtri 2764 . . 3 (1 +𝑒 1) = 2
6160a1i 11 . 2 (𝜑 → (1 +𝑒 1) = 2)
6213, 55, 613eqtrd 2780 1 (𝜑 → ((VtxDeg‘𝐺)‘𝑁) = 2)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205   = wceq 1541  wex 1781  wcel 2106  {crab 3407  Vcvv 3445  c0 4282  ifcif 4486  {csn 4586  cop 4592  cfv 6496  (class class class)co 7357  cr 11050  1c1 11052   + caddc 11054  2c2 12208   +𝑒 cxad 13031  chash 14230  Vtxcvtx 27947  iEdgciedg 27948  Edgcedg 27998  USHGraphcushgr 28008  USPGraphcuspgr 28099  VtxDegcvtxdg 28413
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2707  ax-rep 5242  ax-sep 5256  ax-nul 5263  ax-pow 5320  ax-pr 5384  ax-un 7672  ax-cnex 11107  ax-resscn 11108  ax-1cn 11109  ax-icn 11110  ax-addcl 11111  ax-addrcl 11112  ax-mulcl 11113  ax-mulrcl 11114  ax-mulcom 11115  ax-addass 11116  ax-mulass 11117  ax-distr 11118  ax-i2m1 11119  ax-1ne0 11120  ax-1rid 11121  ax-rnegex 11122  ax-rrecex 11123  ax-cnre 11124  ax-pre-lttri 11125  ax-pre-lttrn 11126  ax-pre-ltadd 11127  ax-pre-mulgt0 11128
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 846  df-3or 1088  df-3an 1089  df-tru 1544  df-fal 1554  df-ex 1782  df-nf 1786  df-sb 2068  df-mo 2538  df-eu 2567  df-clab 2714  df-cleq 2728  df-clel 2814  df-nfc 2889  df-ne 2944  df-nel 3050  df-ral 3065  df-rex 3074  df-reu 3354  df-rab 3408  df-v 3447  df-sbc 3740  df-csb 3856  df-dif 3913  df-un 3915  df-in 3917  df-ss 3927  df-pss 3929  df-nul 4283  df-if 4487  df-pw 4562  df-sn 4587  df-pr 4589  df-op 4593  df-uni 4866  df-int 4908  df-iun 4956  df-br 5106  df-opab 5168  df-mpt 5189  df-tr 5223  df-id 5531  df-eprel 5537  df-po 5545  df-so 5546  df-fr 5588  df-we 5590  df-xp 5639  df-rel 5640  df-cnv 5641  df-co 5642  df-dm 5643  df-rn 5644  df-res 5645  df-ima 5646  df-pred 6253  df-ord 6320  df-on 6321  df-lim 6322  df-suc 6323  df-iota 6448  df-fun 6498  df-fn 6499  df-f 6500  df-f1 6501  df-fo 6502  df-f1o 6503  df-fv 6504  df-riota 7313  df-ov 7360  df-oprab 7361  df-mpo 7362  df-om 7803  df-1st 7921  df-2nd 7922  df-frecs 8212  df-wrecs 8243  df-recs 8317  df-rdg 8356  df-1o 8412  df-oadd 8416  df-er 8648  df-en 8884  df-dom 8885  df-sdom 8886  df-fin 8887  df-dju 9837  df-card 9875  df-pnf 11191  df-mnf 11192  df-xr 11193  df-ltxr 11194  df-le 11195  df-sub 11387  df-neg 11388  df-nn 12154  df-2 12216  df-n0 12414  df-xnn0 12486  df-z 12500  df-uz 12764  df-xadd 13034  df-fz 13425  df-hash 14231  df-edg 27999  df-uhgr 28009  df-ushgr 28010  df-uspgr 28101  df-vtxdg 28414
This theorem is referenced by:  uspgrloopvd2  28468  eupth2lem3lem3  29174
  Copyright terms: Public domain W3C validator