MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  eupath Structured version   Unicode version

Theorem eupath 24645
Description: A graph with an Eulerian path has either zero or two vertices of odd degree. (Contributed by Mario Carneiro, 7-Apr-2015.)
Assertion
Ref Expression
eupath  |-  ( ( V EulPaths  E )  =/=  (/)  ->  ( # `
 { x  e.  V  |  -.  2  ||  ( ( V VDeg  E
) `  x ) } )  e.  {
0 ,  2 } )
Distinct variable groups:    x, E    x, V

Proof of Theorem eupath
Dummy variables  f  p  y are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 releupa 24628 . . . . 5  |-  Rel  ( V EulPaths  E )
2 reldm0 5213 . . . . 5  |-  ( Rel  ( V EulPaths  E )  ->  ( ( V EulPaths  E )  =  (/)  <->  dom  ( V EulPaths  E )  =  (/) ) )
31, 2ax-mp 5 . . . 4  |-  ( ( V EulPaths  E )  =  (/)  <->  dom  ( V EulPaths  E )  =  (/) )
43necon3bii 2730 . . 3  |-  ( ( V EulPaths  E )  =/=  (/)  <->  dom  ( V EulPaths  E )  =/=  (/) )
5 n0 3789 . . 3  |-  ( dom  ( V EulPaths  E )  =/=  (/)  <->  E. f  f  e. 
dom  ( V EulPaths  E ) )
64, 5bitri 249 . 2  |-  ( ( V EulPaths  E )  =/=  (/)  <->  E. f 
f  e.  dom  ( V EulPaths  E ) )
7 vex 3111 . . . . 5  |-  f  e. 
_V
87eldm 5193 . . . 4  |-  ( f  e.  dom  ( V EulPaths  E )  <->  E. p  f ( V EulPaths  E ) p )
9 eupagra 24630 . . . . . . . . 9  |-  ( f ( V EulPaths  E )
p  ->  V UMGrph  E )
10 umgraf2 23982 . . . . . . . . 9  |-  ( V UMGrph  E  ->  E : dom  E --> { y  e.  ( ~P V  \  { (/)
} )  |  (
# `  y )  <_  2 } )
11 ffn 5724 . . . . . . . . 9  |-  ( E : dom  E --> { y  e.  ( ~P V  \  { (/) } )  |  ( # `  y
)  <_  2 }  ->  E  Fn  dom  E
)
129, 10, 113syl 20 . . . . . . . 8  |-  ( f ( V EulPaths  E )
p  ->  E  Fn  dom  E )
13 id 22 . . . . . . . 8  |-  ( f ( V EulPaths  E )
p  ->  f ( V EulPaths  E ) p )
1412, 13eupath2 24644 . . . . . . 7  |-  ( f ( V EulPaths  E )
p  ->  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) }  =  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )
1514fveq2d 5863 . . . . . 6  |-  ( f ( V EulPaths  E )
p  ->  ( # `  {
x  e.  V  |  -.  2  ||  ( ( V VDeg  E ) `  x ) } )  =  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) ) )
16 fveq2 5859 . . . . . . . 8  |-  ( (/)  =  if ( ( p `
 0 )  =  ( p `  ( # `
 f ) ) ,  (/) ,  { ( p `  0 ) ,  ( p `  ( # `  f ) ) } )  -> 
( # `  (/) )  =  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) ) )
1716eleq1d 2531 . . . . . . 7  |-  ( (/)  =  if ( ( p `
 0 )  =  ( p `  ( # `
 f ) ) ,  (/) ,  { ( p `  0 ) ,  ( p `  ( # `  f ) ) } )  -> 
( ( # `  (/) )  e. 
{ 0 ,  2 }  <->  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )  e. 
{ 0 ,  2 } ) )
18 fveq2 5859 . . . . . . . 8  |-  ( { ( p `  0
) ,  ( p `
 ( # `  f
) ) }  =  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  ->  ( # `
 { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  =  (
# `  if (
( p `  0
)  =  ( p `
 ( # `  f
) ) ,  (/) ,  { ( p ` 
0 ) ,  ( p `  ( # `  f ) ) } ) ) )
1918eleq1d 2531 . . . . . . 7  |-  ( { ( p `  0
) ,  ( p `
 ( # `  f
) ) }  =  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  ->  (
( # `  { ( p `  0 ) ,  ( p `  ( # `  f ) ) } )  e. 
{ 0 ,  2 }  <->  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )  e. 
{ 0 ,  2 } ) )
20 hash0 12394 . . . . . . . . 9  |-  ( # `  (/) )  =  0
21 c0ex 9581 . . . . . . . . . 10  |-  0  e.  _V
2221prid1 4130 . . . . . . . . 9  |-  0  e.  { 0 ,  2 }
2320, 22eqeltri 2546 . . . . . . . 8  |-  ( # `  (/) )  e.  {
0 ,  2 }
2423a1i 11 . . . . . . 7  |-  ( ( f ( V EulPaths  E ) p  /\  ( p `
 0 )  =  ( p `  ( # `
 f ) ) )  ->  ( # `  (/) )  e. 
{ 0 ,  2 } )
25 simpr 461 . . . . . . . . . 10  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  -.  ( p `  0
)  =  ( p `
 ( # `  f
) ) )
2625neqned 2665 . . . . . . . . 9  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  (
p `  0 )  =/=  ( p `  ( # `
 f ) ) )
27 fvex 5869 . . . . . . . . . 10  |-  ( p `
 0 )  e. 
_V
28 fvex 5869 . . . . . . . . . 10  |-  ( p `
 ( # `  f
) )  e.  _V
29 hashprg 12417 . . . . . . . . . 10  |-  ( ( ( p `  0
)  e.  _V  /\  ( p `  ( # `
 f ) )  e.  _V )  -> 
( ( p ` 
0 )  =/=  (
p `  ( # `  f
) )  <->  ( # `  {
( p `  0
) ,  ( p `
 ( # `  f
) ) } )  =  2 ) )
3027, 28, 29mp2an 672 . . . . . . . . 9  |-  ( ( p `  0 )  =/=  ( p `  ( # `  f ) )  <->  ( # `  {
( p `  0
) ,  ( p `
 ( # `  f
) ) } )  =  2 )
3126, 30sylib 196 . . . . . . . 8  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  ( # `
 { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  =  2 )
32 2ex 10598 . . . . . . . . 9  |-  2  e.  _V
3332prid2 4131 . . . . . . . 8  |-  2  e.  { 0 ,  2 }
3431, 33syl6eqel 2558 . . . . . . 7  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  ( # `
 { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  e.  {
0 ,  2 } )
3517, 19, 24, 34ifbothda 3969 . . . . . 6  |-  ( f ( V EulPaths  E )
p  ->  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )  e. 
{ 0 ,  2 } )
3615, 35eqeltrd 2550 . . . . 5  |-  ( f ( V EulPaths  E )
p  ->  ( # `  {
x  e.  V  |  -.  2  ||  ( ( V VDeg  E ) `  x ) } )  e.  { 0 ,  2 } )
3736exlimiv 1693 . . . 4  |-  ( E. p  f ( V EulPaths  E ) p  -> 
( # `  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) } )  e. 
{ 0 ,  2 } )
388, 37sylbi 195 . . 3  |-  ( f  e.  dom  ( V EulPaths  E )  ->  ( # `
 { x  e.  V  |  -.  2  ||  ( ( V VDeg  E
) `  x ) } )  e.  {
0 ,  2 } )
3938exlimiv 1693 . 2  |-  ( E. f  f  e.  dom  ( V EulPaths  E )  -> 
( # `  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) } )  e. 
{ 0 ,  2 } )
406, 39sylbi 195 1  |-  ( ( V EulPaths  E )  =/=  (/)  ->  ( # `
 { x  e.  V  |  -.  2  ||  ( ( V VDeg  E
) `  x ) } )  e.  {
0 ,  2 } )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1374   E.wex 1591    e. wcel 1762    =/= wne 2657   {crab 2813   _Vcvv 3108    \ cdif 3468   (/)c0 3780   ifcif 3934   ~Pcpw 4005   {csn 4022   {cpr 4024   class class class wbr 4442   dom cdm 4994   Rel wrel 4999    Fn wfn 5576   -->wf 5577   ` cfv 5581  (class class class)co 6277   0cc0 9483    <_ cle 9620   2c2 10576   #chash 12362    || cdivides 13838   UMGrph cumg 23977   VDeg cvdg 24557   EulPaths ceup 24626
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1714  ax-7 1734  ax-8 1764  ax-9 1766  ax-10 1781  ax-11 1786  ax-12 1798  ax-13 1963  ax-ext 2440  ax-rep 4553  ax-sep 4563  ax-nul 4571  ax-pow 4620  ax-pr 4681  ax-un 6569  ax-cnex 9539  ax-resscn 9540  ax-1cn 9541  ax-icn 9542  ax-addcl 9543  ax-addrcl 9544  ax-mulcl 9545  ax-mulrcl 9546  ax-mulcom 9547  ax-addass 9548  ax-mulass 9549  ax-distr 9550  ax-i2m1 9551  ax-1ne0 9552  ax-1rid 9553  ax-rnegex 9554  ax-rrecex 9555  ax-cnre 9556  ax-pre-lttri 9557  ax-pre-lttrn 9558  ax-pre-ltadd 9559  ax-pre-mulgt0 9560  ax-pre-sup 9561
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 969  df-3an 970  df-tru 1377  df-ex 1592  df-nf 1595  df-sb 1707  df-eu 2274  df-mo 2275  df-clab 2448  df-cleq 2454  df-clel 2457  df-nfc 2612  df-ne 2659  df-nel 2660  df-ral 2814  df-rex 2815  df-reu 2816  df-rmo 2817  df-rab 2818  df-v 3110  df-sbc 3327  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3781  df-if 3935  df-pw 4007  df-sn 4023  df-pr 4025  df-tp 4027  df-op 4029  df-uni 4241  df-int 4278  df-iun 4322  df-br 4443  df-opab 4501  df-mpt 4502  df-tr 4536  df-eprel 4786  df-id 4790  df-po 4795  df-so 4796  df-fr 4833  df-we 4835  df-ord 4876  df-on 4877  df-lim 4878  df-suc 4879  df-xp 5000  df-rel 5001  df-cnv 5002  df-co 5003  df-dm 5004  df-rn 5005  df-res 5006  df-ima 5007  df-iota 5544  df-fun 5583  df-fn 5584  df-f 5585  df-f1 5586  df-fo 5587  df-f1o 5588  df-fv 5589  df-riota 6238  df-ov 6280  df-oprab 6281  df-mpt2 6282  df-om 6674  df-1st 6776  df-2nd 6777  df-recs 7034  df-rdg 7068  df-1o 7122  df-oadd 7126  df-er 7303  df-pm 7415  df-en 7509  df-dom 7510  df-sdom 7511  df-fin 7512  df-sup 7892  df-card 8311  df-cda 8539  df-pnf 9621  df-mnf 9622  df-xr 9623  df-ltxr 9624  df-le 9625  df-sub 9798  df-neg 9799  df-div 10198  df-nn 10528  df-2 10585  df-3 10586  df-n0 10787  df-z 10856  df-uz 11074  df-rp 11212  df-xadd 11310  df-fz 11664  df-seq 12066  df-exp 12125  df-hash 12363  df-cj 12884  df-re 12885  df-im 12886  df-sqr 13020  df-abs 13021  df-dvds 13839  df-umgra 23978  df-vdgr 24558  df-eupa 24627
This theorem is referenced by:  konigsberg  24651
  Copyright terms: Public domain W3C validator