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

Theorem eupath 23601
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 23584 . . . . 5  |-  Rel  ( V EulPaths  E )
2 reldm0 5056 . . . . 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 2639 . . 3  |-  ( ( V EulPaths  E )  =/=  (/)  <->  dom  ( V EulPaths  E )  =/=  (/) )
5 n0 3645 . . 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 2974 . . . . 5  |-  f  e. 
_V
87eldm 5036 . . . 4  |-  ( f  e.  dom  ( V EulPaths  E )  <->  E. p  f ( V EulPaths  E ) p )
9 eupagra 23586 . . . . . . . . 9  |-  ( f ( V EulPaths  E )
p  ->  V UMGrph  E )
10 umgraf2 23250 . . . . . . . . 9  |-  ( V UMGrph  E  ->  E : dom  E --> { y  e.  ( ~P V  \  { (/)
} )  |  (
# `  y )  <_  2 } )
11 ffn 5558 . . . . . . . . 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 23600 . . . . . . 7  |-  ( f ( V EulPaths  E )
p  ->  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) }  =  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )
1514fveq2d 5694 . . . . . 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 5690 . . . . . . . 8  |-  ( (/)  =  if ( ( p `
 0 )  =  ( p `  ( # `
 f ) ) ,  (/) ,  { ( p `  0 ) ,  ( p `  ( # `  f ) ) } )  -> 
( # `  (/) )  =  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) ) )
1716eleq1d 2508 . . . . . . 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 5690 . . . . . . . 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 2508 . . . . . . 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 12134 . . . . . . . . 9  |-  ( # `  (/) )  =  0
21 c0ex 9379 . . . . . . . . . 10  |-  0  e.  _V
2221prid1 3982 . . . . . . . . 9  |-  0  e.  { 0 ,  2 }
2320, 22eqeltri 2512 . . . . . . . 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
) ) )
2625neneqad 2680 . . . . . . . . 9  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  (
p `  0 )  =/=  ( p `  ( # `
 f ) ) )
27 fvex 5700 . . . . . . . . . 10  |-  ( p `
 0 )  e. 
_V
28 fvex 5700 . . . . . . . . . 10  |-  ( p `
 ( # `  f
) )  e.  _V
29 hashprg 12154 . . . . . . . . . 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 10392 . . . . . . . . 9  |-  2  e.  _V
3332prid2 3983 . . . . . . . 8  |-  2  e.  { 0 ,  2 }
3431, 33syl6eqel 2530 . . . . . . 7  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  ( # `
 { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  e.  {
0 ,  2 } )
3517, 19, 24, 34ifbothda 3823 . . . . . 6  |-  ( f ( V EulPaths  E )
p  ->  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )  e. 
{ 0 ,  2 } )
3615, 35eqeltrd 2516 . . . . 5  |-  ( f ( V EulPaths  E )
p  ->  ( # `  {
x  e.  V  |  -.  2  ||  ( ( V VDeg  E ) `  x ) } )  e.  { 0 ,  2 } )
3736exlimiv 1688 . . . 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 1688 . 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 1369   E.wex 1586    e. wcel 1756    =/= wne 2605   {crab 2718   _Vcvv 2971    \ cdif 3324   (/)c0 3636   ifcif 3790   ~Pcpw 3859   {csn 3876   {cpr 3878   class class class wbr 4291   dom cdm 4839   Rel wrel 4844    Fn wfn 5412   -->wf 5413   ` cfv 5417  (class class class)co 6090   0cc0 9281    <_ cle 9418   2c2 10370   #chash 12102    || cdivides 13534   UMGrph cumg 23245   VDeg cvdg 23562   EulPaths ceup 23582
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-rep 4402  ax-sep 4412  ax-nul 4420  ax-pow 4469  ax-pr 4530  ax-un 6371  ax-cnex 9337  ax-resscn 9338  ax-1cn 9339  ax-icn 9340  ax-addcl 9341  ax-addrcl 9342  ax-mulcl 9343  ax-mulrcl 9344  ax-mulcom 9345  ax-addass 9346  ax-mulass 9347  ax-distr 9348  ax-i2m1 9349  ax-1ne0 9350  ax-1rid 9351  ax-rnegex 9352  ax-rrecex 9353  ax-cnre 9354  ax-pre-lttri 9355  ax-pre-lttrn 9356  ax-pre-ltadd 9357  ax-pre-mulgt0 9358  ax-pre-sup 9359
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2567  df-ne 2607  df-nel 2608  df-ral 2719  df-rex 2720  df-reu 2721  df-rmo 2722  df-rab 2723  df-v 2973  df-sbc 3186  df-csb 3288  df-dif 3330  df-un 3332  df-in 3334  df-ss 3341  df-pss 3343  df-nul 3637  df-if 3791  df-pw 3861  df-sn 3877  df-pr 3879  df-tp 3881  df-op 3883  df-uni 4091  df-int 4128  df-iun 4172  df-br 4292  df-opab 4350  df-mpt 4351  df-tr 4385  df-eprel 4631  df-id 4635  df-po 4640  df-so 4641  df-fr 4678  df-we 4680  df-ord 4721  df-on 4722  df-lim 4723  df-suc 4724  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-iota 5380  df-fun 5419  df-fn 5420  df-f 5421  df-f1 5422  df-fo 5423  df-f1o 5424  df-fv 5425  df-riota 6051  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-om 6476  df-1st 6576  df-2nd 6577  df-recs 6831  df-rdg 6865  df-1o 6919  df-oadd 6923  df-er 7100  df-pm 7216  df-en 7310  df-dom 7311  df-sdom 7312  df-fin 7313  df-sup 7690  df-card 8108  df-cda 8336  df-pnf 9419  df-mnf 9420  df-xr 9421  df-ltxr 9422  df-le 9423  df-sub 9596  df-neg 9597  df-div 9993  df-nn 10322  df-2 10379  df-3 10380  df-n0 10579  df-z 10646  df-uz 10861  df-rp 10991  df-xadd 11089  df-fz 11437  df-seq 11806  df-exp 11865  df-hash 12103  df-cj 12587  df-re 12588  df-im 12589  df-sqr 12723  df-abs 12724  df-dvds 13535  df-umgra 23246  df-vdgr 23563  df-eupa 23583
This theorem is referenced by:  konigsberg  23607
  Copyright terms: Public domain W3C validator