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

Theorem 1loopgrvd2 28514
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 28511 . . . 4 (𝜑𝐺 ∈ USPGraph)
6 uspgrushgr 28189 . . . 4 (𝐺 ∈ USPGraph → 𝐺 ∈ USHGraph)
75, 6syl 17 . . 3 (𝜑𝐺 ∈ USHGraph)
83, 1eleqtrrd 2835 . . 3 (𝜑𝑁 ∈ (Vtx‘𝐺))
9 eqid 2731 . . . 4 (Vtx‘𝐺) = (Vtx‘𝐺)
10 eqid 2731 . . . 4 (Edg‘𝐺) = (Edg‘𝐺)
11 eqid 2731 . . . 4 (VtxDeg‘𝐺) = (VtxDeg‘𝐺)
129, 10, 11vtxdushgrfvedg 28501 . . 3 ((𝐺 ∈ USHGraph ∧ 𝑁 ∈ (Vtx‘𝐺)) → ((VtxDeg‘𝐺)‘𝑁) = ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) +𝑒 (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}})))
137, 8, 12syl2anc 584 . 2 (𝜑 → ((VtxDeg‘𝐺)‘𝑁) = ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) +𝑒 (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}})))
14 snex 5393 . . . . . . . 8 {𝑁} ∈ V
15 sneq 4601 . . . . . . . . 9 (𝑎 = {𝑁} → {𝑎} = {{𝑁}})
1615eqeq2d 2742 . . . . . . . 8 (𝑎 = {𝑁} → ({{𝑁}} = {𝑎} ↔ {{𝑁}} = {{𝑁}}))
17 eqid 2731 . . . . . . . 8 {{𝑁}} = {{𝑁}}
1814, 16, 17ceqsexv2d 3498 . . . . . . 7 𝑎{{𝑁}} = {𝑎}
1918a1i 11 . . . . . 6 (𝜑 → ∃𝑎{{𝑁}} = {𝑎})
20 snidg 4625 . . . . . . . . . 10 (𝑁𝑉𝑁 ∈ {𝑁})
213, 20syl 17 . . . . . . . . 9 (𝜑𝑁 ∈ {𝑁})
2221iftrued 4499 . . . . . . . 8 (𝜑 → if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {{𝑁}})
2322eqeq1d 2733 . . . . . . 7 (𝜑 → (if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎} ↔ {{𝑁}} = {𝑎}))
2423exbidv 1924 . . . . . 6 (𝜑 → (∃𝑎if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎} ↔ ∃𝑎{{𝑁}} = {𝑎}))
2519, 24mpbird 256 . . . . 5 (𝜑 → ∃𝑎if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎})
261, 2, 3, 41loopgredg 28512 . . . . . . . . 9 (𝜑 → (Edg‘𝐺) = {{𝑁}})
2726rabeqdv 3420 . . . . . . . 8 (𝜑 → {𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑒 ∈ {{𝑁}} ∣ 𝑁𝑒})
28 eleq2 2821 . . . . . . . . 9 (𝑒 = {𝑁} → (𝑁𝑒𝑁 ∈ {𝑁}))
2928rabsnif 4689 . . . . . . . 8 {𝑒 ∈ {{𝑁}} ∣ 𝑁𝑒} = if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅)
3027, 29eqtrdi 2787 . . . . . . 7 (𝜑 → {𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅))
3130eqeq1d 2733 . . . . . 6 (𝜑 → ({𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎} ↔ if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎}))
3231exbidv 1924 . . . . 5 (𝜑 → (∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎} ↔ ∃𝑎if(𝑁 ∈ {𝑁}, {{𝑁}}, ∅) = {𝑎}))
3325, 32mpbird 256 . . . 4 (𝜑 → ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎})
34 fvex 6860 . . . . . 6 (Edg‘𝐺) ∈ V
3534rabex 5294 . . . . 5 {𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} ∈ V
36 hash1snb 14329 . . . . 5 ({𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} ∈ V → ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) = 1 ↔ ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎}))
3735, 36ax-mp 5 . . . 4 ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) = 1 ↔ ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒} = {𝑎})
3833, 37sylibr 233 . . 3 (𝜑 → (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) = 1)
39 eqid 2731 . . . . . . . . 9 {𝑁} = {𝑁}
4039iftruei 4498 . . . . . . . 8 if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {{𝑁}}
4140eqeq1i 2736 . . . . . . 7 (if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎} ↔ {{𝑁}} = {𝑎})
4241exbii 1850 . . . . . 6 (∃𝑎if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎} ↔ ∃𝑎{{𝑁}} = {𝑎})
4319, 42sylibr 233 . . . . 5 (𝜑 → ∃𝑎if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎})
4426rabeqdv 3420 . . . . . . . 8 (𝜑 → {𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑒 ∈ {{𝑁}} ∣ 𝑒 = {𝑁}})
45 eqeq1 2735 . . . . . . . . 9 (𝑒 = {𝑁} → (𝑒 = {𝑁} ↔ {𝑁} = {𝑁}))
4645rabsnif 4689 . . . . . . . 8 {𝑒 ∈ {{𝑁}} ∣ 𝑒 = {𝑁}} = if({𝑁} = {𝑁}, {{𝑁}}, ∅)
4744, 46eqtrdi 2787 . . . . . . 7 (𝜑 → {𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = if({𝑁} = {𝑁}, {{𝑁}}, ∅))
4847eqeq1d 2733 . . . . . 6 (𝜑 → ({𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎} ↔ if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎}))
4948exbidv 1924 . . . . 5 (𝜑 → (∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎} ↔ ∃𝑎if({𝑁} = {𝑁}, {{𝑁}}, ∅) = {𝑎}))
5043, 49mpbird 256 . . . 4 (𝜑 → ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎})
5134rabex 5294 . . . . 5 {𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} ∈ V
52 hash1snb 14329 . . . . 5 ({𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} ∈ V → ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}}) = 1 ↔ ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎}))
5351, 52ax-mp 5 . . . 4 ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}}) = 1 ↔ ∃𝑎{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}} = {𝑎})
5450, 53sylibr 233 . . 3 (𝜑 → (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}}) = 1)
5538, 54oveq12d 7380 . 2 (𝜑 → ((♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑁𝑒}) +𝑒 (♯‘{𝑒 ∈ (Edg‘𝐺) ∣ 𝑒 = {𝑁}})) = (1 +𝑒 1))
56 1re 11164 . . . . 5 1 ∈ ℝ
57 rexadd 13161 . . . . 5 ((1 ∈ ℝ ∧ 1 ∈ ℝ) → (1 +𝑒 1) = (1 + 1))
5856, 56, 57mp2an 690 . . . 4 (1 +𝑒 1) = (1 + 1)
59 1p1e2 12287 . . . 4 (1 + 1) = 2
6058, 59eqtri 2759 . . 3 (1 +𝑒 1) = 2
6160a1i 11 . 2 (𝜑 → (1 +𝑒 1) = 2)
6213, 55, 613eqtrd 2775 1 (𝜑 → ((VtxDeg‘𝐺)‘𝑁) = 2)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205   = wceq 1541  wex 1781  wcel 2106  {crab 3405  Vcvv 3446  c0 4287  ifcif 4491  {csn 4591  cop 4597  cfv 6501  (class class class)co 7362  cr 11059  1c1 11061   + caddc 11063  2c2 12217   +𝑒 cxad 13040  chash 14240  Vtxcvtx 28010  iEdgciedg 28011  Edgcedg 28061  USHGraphcushgr 28071  USPGraphcuspgr 28162  VtxDegcvtxdg 28476
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 2702  ax-rep 5247  ax-sep 5261  ax-nul 5268  ax-pow 5325  ax-pr 5389  ax-un 7677  ax-cnex 11116  ax-resscn 11117  ax-1cn 11118  ax-icn 11119  ax-addcl 11120  ax-addrcl 11121  ax-mulcl 11122  ax-mulrcl 11123  ax-mulcom 11124  ax-addass 11125  ax-mulass 11126  ax-distr 11127  ax-i2m1 11128  ax-1ne0 11129  ax-1rid 11130  ax-rnegex 11131  ax-rrecex 11132  ax-cnre 11133  ax-pre-lttri 11134  ax-pre-lttrn 11135  ax-pre-ltadd 11136  ax-pre-mulgt0 11137
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 2533  df-eu 2562  df-clab 2709  df-cleq 2723  df-clel 2809  df-nfc 2884  df-ne 2940  df-nel 3046  df-ral 3061  df-rex 3070  df-reu 3352  df-rab 3406  df-v 3448  df-sbc 3743  df-csb 3859  df-dif 3916  df-un 3918  df-in 3920  df-ss 3930  df-pss 3932  df-nul 4288  df-if 4492  df-pw 4567  df-sn 4592  df-pr 4594  df-op 4598  df-uni 4871  df-int 4913  df-iun 4961  df-br 5111  df-opab 5173  df-mpt 5194  df-tr 5228  df-id 5536  df-eprel 5542  df-po 5550  df-so 5551  df-fr 5593  df-we 5595  df-xp 5644  df-rel 5645  df-cnv 5646  df-co 5647  df-dm 5648  df-rn 5649  df-res 5650  df-ima 5651  df-pred 6258  df-ord 6325  df-on 6326  df-lim 6327  df-suc 6328  df-iota 6453  df-fun 6503  df-fn 6504  df-f 6505  df-f1 6506  df-fo 6507  df-f1o 6508  df-fv 6509  df-riota 7318  df-ov 7365  df-oprab 7366  df-mpo 7367  df-om 7808  df-1st 7926  df-2nd 7927  df-frecs 8217  df-wrecs 8248  df-recs 8322  df-rdg 8361  df-1o 8417  df-oadd 8421  df-er 8655  df-en 8891  df-dom 8892  df-sdom 8893  df-fin 8894  df-dju 9846  df-card 9884  df-pnf 11200  df-mnf 11201  df-xr 11202  df-ltxr 11203  df-le 11204  df-sub 11396  df-neg 11397  df-nn 12163  df-2 12225  df-n0 12423  df-xnn0 12495  df-z 12509  df-uz 12773  df-xadd 13043  df-fz 13435  df-hash 14241  df-edg 28062  df-uhgr 28072  df-ushgr 28073  df-uspgr 28164  df-vtxdg 28477
This theorem is referenced by:  uspgrloopvd2  28531  eupth2lem3lem3  29237
  Copyright terms: Public domain W3C validator