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

Theorem eupath 21214
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 21198 . . . . 5  |-  Rel  ( V EulPaths  E )
2 reldm0 4999 . . . . 5  |-  ( Rel  ( V EulPaths  E )  ->  ( ( V EulPaths  E )  =  (/)  <->  dom  ( V EulPaths  E )  =  (/) ) )
31, 2ax-mp 8 . . . 4  |-  ( ( V EulPaths  E )  =  (/)  <->  dom  ( V EulPaths  E )  =  (/) )
43necon3bii 2561 . . 3  |-  ( ( V EulPaths  E )  =/=  (/)  <->  dom  ( V EulPaths  E )  =/=  (/) )
5 n0 3552 . . 3  |-  ( dom  ( V EulPaths  E )  =/=  (/)  <->  E. f  f  e. 
dom  ( V EulPaths  E ) )
64, 5bitri 240 . 2  |-  ( ( V EulPaths  E )  =/=  (/)  <->  E. f 
f  e.  dom  ( V EulPaths  E ) )
7 vex 2876 . . . . 5  |-  f  e. 
_V
87eldm 4979 . . . 4  |-  ( f  e.  dom  ( V EulPaths  E )  <->  E. p  f ( V EulPaths  E ) p )
9 eupagra 21200 . . . . . . . . 9  |-  ( f ( V EulPaths  E )
p  ->  V UMGrph  E )
10 umgraf2 21030 . . . . . . . . 9  |-  ( V UMGrph  E  ->  E : dom  E --> { y  e.  ( ~P V  \  { (/)
} )  |  (
# `  y )  <_  2 } )
11 ffn 5495 . . . . . . . . 9  |-  ( E : dom  E --> { y  e.  ( ~P V  \  { (/) } )  |  ( # `  y
)  <_  2 }  ->  E  Fn  dom  E
)
129, 10, 113syl 18 . . . . . . . 8  |-  ( f ( V EulPaths  E )
p  ->  E  Fn  dom  E )
13 id 19 . . . . . . . 8  |-  ( f ( V EulPaths  E )
p  ->  f ( V EulPaths  E ) p )
1412, 13eupath2 21213 . . . . . . 7  |-  ( f ( V EulPaths  E )
p  ->  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) }  =  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )
1514fveq2d 5636 . . . . . 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 5632 . . . . . . . 8  |-  ( (/)  =  if ( ( p `
 0 )  =  ( p `  ( # `
 f ) ) ,  (/) ,  { ( p `  0 ) ,  ( p `  ( # `  f ) ) } )  -> 
( # `  (/) )  =  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) ) )
1716eleq1d 2432 . . . . . . 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 5632 . . . . . . . 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 2432 . . . . . . 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 11533 . . . . . . . . 9  |-  ( # `  (/) )  =  0
21 c0ex 8979 . . . . . . . . . 10  |-  0  e.  _V
2221prid1 3827 . . . . . . . . 9  |-  0  e.  { 0 ,  2 }
2320, 22eqeltri 2436 . . . . . . . 8  |-  ( # `  (/) )  e.  {
0 ,  2 }
2423a1i 10 . . . . . . 7  |-  ( ( f ( V EulPaths  E ) p  /\  ( p `
 0 )  =  ( p `  ( # `
 f ) ) )  ->  ( # `  (/) )  e. 
{ 0 ,  2 } )
25 simpr 447 . . . . . . . . . 10  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  -.  ( p `  0
)  =  ( p `
 ( # `  f
) ) )
26 df-ne 2531 . . . . . . . . . 10  |-  ( ( p `  0 )  =/=  ( p `  ( # `  f ) )  <->  -.  ( p `  0 )  =  ( p `  ( # `
 f ) ) )
2725, 26sylibr 203 . . . . . . . . 9  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  (
p `  0 )  =/=  ( p `  ( # `
 f ) ) )
28 fvex 5646 . . . . . . . . . 10  |-  ( p `
 0 )  e. 
_V
29 fvex 5646 . . . . . . . . . 10  |-  ( p `
 ( # `  f
) )  e.  _V
30 hashprg 11553 . . . . . . . . . 10  |-  ( ( ( p `  0
)  e.  _V  /\  ( p `  ( # `
 f ) )  e.  _V )  -> 
( ( p ` 
0 )  =/=  (
p `  ( # `  f
) )  <->  ( # `  {
( p `  0
) ,  ( p `
 ( # `  f
) ) } )  =  2 ) )
3128, 29, 30mp2an 653 . . . . . . . . 9  |-  ( ( p `  0 )  =/=  ( p `  ( # `  f ) )  <->  ( # `  {
( p `  0
) ,  ( p `
 ( # `  f
) ) } )  =  2 )
3227, 31sylib 188 . . . . . . . 8  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  ( # `
 { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  =  2 )
33 2cn 9963 . . . . . . . . . 10  |-  2  e.  CC
3433elexi 2882 . . . . . . . . 9  |-  2  e.  _V
3534prid2 3828 . . . . . . . 8  |-  2  e.  { 0 ,  2 }
3632, 35syl6eqel 2454 . . . . . . 7  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  ( # `
 { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  e.  {
0 ,  2 } )
3717, 19, 24, 36ifbothda 3684 . . . . . 6  |-  ( f ( V EulPaths  E )
p  ->  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )  e. 
{ 0 ,  2 } )
3815, 37eqeltrd 2440 . . . . 5  |-  ( f ( V EulPaths  E )
p  ->  ( # `  {
x  e.  V  |  -.  2  ||  ( ( V VDeg  E ) `  x ) } )  e.  { 0 ,  2 } )
3938exlimiv 1639 . . . 4  |-  ( E. p  f ( V EulPaths  E ) p  -> 
( # `  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) } )  e. 
{ 0 ,  2 } )
408, 39sylbi 187 . . 3  |-  ( f  e.  dom  ( V EulPaths  E )  ->  ( # `
 { x  e.  V  |  -.  2  ||  ( ( V VDeg  E
) `  x ) } )  e.  {
0 ,  2 } )
4140exlimiv 1639 . 2  |-  ( E. f  f  e.  dom  ( V EulPaths  E )  -> 
( # `  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) } )  e. 
{ 0 ,  2 } )
426, 41sylbi 187 1  |-  ( ( V EulPaths  E )  =/=  (/)  ->  ( # `
 { x  e.  V  |  -.  2  ||  ( ( V VDeg  E
) `  x ) } )  e.  {
0 ,  2 } )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 176    /\ wa 358   E.wex 1546    = wceq 1647    e. wcel 1715    =/= wne 2529   {crab 2632   _Vcvv 2873    \ cdif 3235   (/)c0 3543   ifcif 3654   ~Pcpw 3714   {csn 3729   {cpr 3730   class class class wbr 4125   dom cdm 4792   Rel wrel 4797    Fn wfn 5353   -->wf 5354   ` cfv 5358  (class class class)co 5981   CCcc 8882   0cc0 8884    <_ cle 9015   2c2 9942   #chash 11505    || cdivides 12739   UMGrph cumg 21025   VDeg cvdg 21176   EulPaths ceup 21196
This theorem is referenced by:  konigsberg  21220
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1551  ax-5 1562  ax-17 1621  ax-9 1659  ax-8 1680  ax-13 1717  ax-14 1719  ax-6 1734  ax-7 1739  ax-11 1751  ax-12 1937  ax-ext 2347  ax-rep 4233  ax-sep 4243  ax-nul 4251  ax-pow 4290  ax-pr 4316  ax-un 4615  ax-cnex 8940  ax-resscn 8941  ax-1cn 8942  ax-icn 8943  ax-addcl 8944  ax-addrcl 8945  ax-mulcl 8946  ax-mulrcl 8947  ax-mulcom 8948  ax-addass 8949  ax-mulass 8950  ax-distr 8951  ax-i2m1 8952  ax-1ne0 8953  ax-1rid 8954  ax-rnegex 8955  ax-rrecex 8956  ax-cnre 8957  ax-pre-lttri 8958  ax-pre-lttrn 8959  ax-pre-ltadd 8960  ax-pre-mulgt0 8961  ax-pre-sup 8962
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 936  df-3an 937  df-tru 1324  df-ex 1547  df-nf 1550  df-sb 1654  df-eu 2221  df-mo 2222  df-clab 2353  df-cleq 2359  df-clel 2362  df-nfc 2491  df-ne 2531  df-nel 2532  df-ral 2633  df-rex 2634  df-reu 2635  df-rmo 2636  df-rab 2637  df-v 2875  df-sbc 3078  df-csb 3168  df-dif 3241  df-un 3243  df-in 3245  df-ss 3252  df-pss 3254  df-nul 3544  df-if 3655  df-pw 3716  df-sn 3735  df-pr 3736  df-tp 3737  df-op 3738  df-uni 3930  df-int 3965  df-iun 4009  df-br 4126  df-opab 4180  df-mpt 4181  df-tr 4216  df-eprel 4408  df-id 4412  df-po 4417  df-so 4418  df-fr 4455  df-we 4457  df-ord 4498  df-on 4499  df-lim 4500  df-suc 4501  df-om 4760  df-xp 4798  df-rel 4799  df-cnv 4800  df-co 4801  df-dm 4802  df-rn 4803  df-res 4804  df-ima 4805  df-iota 5322  df-fun 5360  df-fn 5361  df-f 5362  df-f1 5363  df-fo 5364  df-f1o 5365  df-fv 5366  df-ov 5984  df-oprab 5985  df-mpt2 5986  df-1st 6249  df-2nd 6250  df-riota 6446  df-recs 6530  df-rdg 6565  df-1o 6621  df-2o 6622  df-oadd 6625  df-er 6802  df-pm 6918  df-en 7007  df-dom 7008  df-sdom 7009  df-fin 7010  df-sup 7341  df-card 7719  df-cda 7941  df-pnf 9016  df-mnf 9017  df-xr 9018  df-ltxr 9019  df-le 9020  df-sub 9186  df-neg 9187  df-div 9571  df-nn 9894  df-2 9951  df-3 9952  df-n0 10115  df-z 10176  df-uz 10382  df-rp 10506  df-xadd 10604  df-fz 10936  df-seq 11211  df-exp 11270  df-hash 11506  df-cj 11791  df-re 11792  df-im 11793  df-sqr 11927  df-abs 11928  df-dvds 12740  df-prm 12967  df-umgra 21026  df-vdgr 21177  df-eupa 21197
  Copyright terms: Public domain W3C validator