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

Theorem eulerpathpr 30092
Description: A graph with an Eulerian path has either zero or two vertices of odd degree. (Contributed by Mario Carneiro, 7-Apr-2015.) (Revised by AV, 26-Feb-2021.)
Hypothesis
Ref Expression
eulerpathpr.v 𝑉 = (Vtxβ€˜πΊ)
Assertion
Ref Expression
eulerpathpr ((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) β†’ (β™―β€˜{π‘₯ ∈ 𝑉 ∣ Β¬ 2 βˆ₯ ((VtxDegβ€˜πΊ)β€˜π‘₯)}) ∈ {0, 2})
Distinct variable groups:   π‘₯,𝐹   π‘₯,𝐺   π‘₯,𝑃   π‘₯,𝑉

Proof of Theorem eulerpathpr
StepHypRef Expression
1 eulerpathpr.v . . . 4 𝑉 = (Vtxβ€˜πΊ)
2 eqid 2725 . . . 4 (iEdgβ€˜πΊ) = (iEdgβ€˜πΊ)
3 simpl 481 . . . 4 ((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) β†’ 𝐺 ∈ UPGraph)
4 upgruhgr 28957 . . . . . 6 (𝐺 ∈ UPGraph β†’ 𝐺 ∈ UHGraph)
52uhgrfun 28921 . . . . . 6 (𝐺 ∈ UHGraph β†’ Fun (iEdgβ€˜πΊ))
64, 5syl 17 . . . . 5 (𝐺 ∈ UPGraph β†’ Fun (iEdgβ€˜πΊ))
76adantr 479 . . . 4 ((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) β†’ Fun (iEdgβ€˜πΊ))
8 simpr 483 . . . 4 ((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) β†’ 𝐹(EulerPathsβ€˜πΊ)𝑃)
91, 2, 3, 7, 8eupth2 30091 . . 3 ((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) β†’ {π‘₯ ∈ 𝑉 ∣ Β¬ 2 βˆ₯ ((VtxDegβ€˜πΊ)β€˜π‘₯)} = if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}))
109fveq2d 6895 . 2 ((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) β†’ (β™―β€˜{π‘₯ ∈ 𝑉 ∣ Β¬ 2 βˆ₯ ((VtxDegβ€˜πΊ)β€˜π‘₯)}) = (β™―β€˜if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))})))
11 fveq2 6891 . . . 4 (βˆ… = if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) β†’ (β™―β€˜βˆ…) = (β™―β€˜if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))})))
1211eleq1d 2810 . . 3 (βˆ… = if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) β†’ ((β™―β€˜βˆ…) ∈ {0, 2} ↔ (β™―β€˜if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))})) ∈ {0, 2}))
13 fveq2 6891 . . . 4 ({(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))} = if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) β†’ (β™―β€˜{(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) = (β™―β€˜if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))})))
1413eleq1d 2810 . . 3 ({(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))} = if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) β†’ ((β™―β€˜{(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) ∈ {0, 2} ↔ (β™―β€˜if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))})) ∈ {0, 2}))
15 hash0 14356 . . . . 5 (β™―β€˜βˆ…) = 0
16 c0ex 11236 . . . . . 6 0 ∈ V
1716prid1 4762 . . . . 5 0 ∈ {0, 2}
1815, 17eqeltri 2821 . . . 4 (β™―β€˜βˆ…) ∈ {0, 2}
1918a1i 11 . . 3 (((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) ∧ (π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ))) β†’ (β™―β€˜βˆ…) ∈ {0, 2})
20 simpr 483 . . . . . 6 (((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) ∧ Β¬ (π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ))) β†’ Β¬ (π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)))
2120neqned 2937 . . . . 5 (((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) ∧ Β¬ (π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ))) β†’ (π‘ƒβ€˜0) β‰  (π‘ƒβ€˜(β™―β€˜πΉ)))
22 fvex 6904 . . . . . 6 (π‘ƒβ€˜0) ∈ V
23 fvex 6904 . . . . . 6 (π‘ƒβ€˜(β™―β€˜πΉ)) ∈ V
24 hashprg 14384 . . . . . 6 (((π‘ƒβ€˜0) ∈ V ∧ (π‘ƒβ€˜(β™―β€˜πΉ)) ∈ V) β†’ ((π‘ƒβ€˜0) β‰  (π‘ƒβ€˜(β™―β€˜πΉ)) ↔ (β™―β€˜{(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) = 2))
2522, 23, 24mp2an 690 . . . . 5 ((π‘ƒβ€˜0) β‰  (π‘ƒβ€˜(β™―β€˜πΉ)) ↔ (β™―β€˜{(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) = 2)
2621, 25sylib 217 . . . 4 (((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) ∧ Β¬ (π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ))) β†’ (β™―β€˜{(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) = 2)
27 2ex 12317 . . . . 5 2 ∈ V
2827prid2 4763 . . . 4 2 ∈ {0, 2}
2926, 28eqeltrdi 2833 . . 3 (((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) ∧ Β¬ (π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ))) β†’ (β™―β€˜{(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))}) ∈ {0, 2})
3012, 14, 19, 29ifbothda 4562 . 2 ((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) β†’ (β™―β€˜if((π‘ƒβ€˜0) = (π‘ƒβ€˜(β™―β€˜πΉ)), βˆ…, {(π‘ƒβ€˜0), (π‘ƒβ€˜(β™―β€˜πΉ))})) ∈ {0, 2})
3110, 30eqeltrd 2825 1 ((𝐺 ∈ UPGraph ∧ 𝐹(EulerPathsβ€˜πΊ)𝑃) β†’ (β™―β€˜{π‘₯ ∈ 𝑉 ∣ Β¬ 2 βˆ₯ ((VtxDegβ€˜πΊ)β€˜π‘₯)}) ∈ {0, 2})
Colors of variables: wff setvar class
Syntax hints:  Β¬ wn 3   β†’ wi 4   ↔ wb 205   ∧ wa 394   = wceq 1533   ∈ wcel 2098   β‰  wne 2930  {crab 3419  Vcvv 3463  βˆ…c0 4318  ifcif 4524  {cpr 4626   class class class wbr 5143  Fun wfun 6536  β€˜cfv 6542  0cc0 11136  2c2 12295  β™―chash 14319   βˆ₯ cdvds 16228  Vtxcvtx 28851  iEdgciedg 28852  UHGraphcuhgr 28911  UPGraphcupgr 28935  VtxDegcvtxdg 29321  EulerPathsceupth 30049
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1789  ax-4 1803  ax-5 1905  ax-6 1963  ax-7 2003  ax-8 2100  ax-9 2108  ax-10 2129  ax-11 2146  ax-12 2166  ax-ext 2696  ax-rep 5280  ax-sep 5294  ax-nul 5301  ax-pow 5359  ax-pr 5423  ax-un 7737  ax-cnex 11192  ax-resscn 11193  ax-1cn 11194  ax-icn 11195  ax-addcl 11196  ax-addrcl 11197  ax-mulcl 11198  ax-mulrcl 11199  ax-mulcom 11200  ax-addass 11201  ax-mulass 11202  ax-distr 11203  ax-i2m1 11204  ax-1ne0 11205  ax-1rid 11206  ax-rnegex 11207  ax-rrecex 11208  ax-cnre 11209  ax-pre-lttri 11210  ax-pre-lttrn 11211  ax-pre-ltadd 11212  ax-pre-mulgt0 11213  ax-pre-sup 11214
This theorem depends on definitions:  df-bi 206  df-an 395  df-or 846  df-ifp 1061  df-3or 1085  df-3an 1086  df-tru 1536  df-fal 1546  df-ex 1774  df-nf 1778  df-sb 2060  df-mo 2528  df-eu 2557  df-clab 2703  df-cleq 2717  df-clel 2802  df-nfc 2877  df-ne 2931  df-nel 3037  df-ral 3052  df-rex 3061  df-rmo 3364  df-reu 3365  df-rab 3420  df-v 3465  df-sbc 3770  df-csb 3886  df-dif 3943  df-un 3945  df-in 3947  df-ss 3957  df-pss 3960  df-nul 4319  df-if 4525  df-pw 4600  df-sn 4625  df-pr 4627  df-op 4631  df-uni 4904  df-int 4945  df-iun 4993  df-br 5144  df-opab 5206  df-mpt 5227  df-tr 5261  df-id 5570  df-eprel 5576  df-po 5584  df-so 5585  df-fr 5627  df-we 5629  df-xp 5678  df-rel 5679  df-cnv 5680  df-co 5681  df-dm 5682  df-rn 5683  df-res 5684  df-ima 5685  df-pred 6300  df-ord 6367  df-on 6368  df-lim 6369  df-suc 6370  df-iota 6494  df-fun 6544  df-fn 6545  df-f 6546  df-f1 6547  df-fo 6548  df-f1o 6549  df-fv 6550  df-riota 7371  df-ov 7418  df-oprab 7419  df-mpo 7420  df-om 7868  df-1st 7989  df-2nd 7990  df-frecs 8283  df-wrecs 8314  df-recs 8388  df-rdg 8427  df-1o 8483  df-2o 8484  df-oadd 8487  df-er 8721  df-map 8843  df-pm 8844  df-en 8961  df-dom 8962  df-sdom 8963  df-fin 8964  df-sup 9463  df-inf 9464  df-dju 9922  df-card 9960  df-pnf 11278  df-mnf 11279  df-xr 11280  df-ltxr 11281  df-le 11282  df-sub 11474  df-neg 11475  df-div 11900  df-nn 12241  df-2 12303  df-3 12304  df-n0 12501  df-xnn0 12573  df-z 12587  df-uz 12851  df-rp 13005  df-xadd 13123  df-fz 13515  df-fzo 13658  df-seq 13997  df-exp 14057  df-hash 14320  df-word 14495  df-cj 15076  df-re 15077  df-im 15078  df-sqrt 15212  df-abs 15213  df-dvds 16229  df-vtx 28853  df-iedg 28854  df-edg 28903  df-uhgr 28913  df-ushgr 28914  df-upgr 28937  df-uspgr 29005  df-vtxdg 29322  df-wlks 29455  df-trls 29548  df-eupth 30050
This theorem is referenced by:  eulerpath  30093
  Copyright terms: Public domain W3C validator