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

Theorem eupath 21708
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 21691 . . . . 5  |-  Rel  ( V EulPaths  E )
2 reldm0 5090 . . . . 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 2635 . . 3  |-  ( ( V EulPaths  E )  =/=  (/)  <->  dom  ( V EulPaths  E )  =/=  (/) )
5 n0 3639 . . 3  |-  ( dom  ( V EulPaths  E )  =/=  (/)  <->  E. f  f  e. 
dom  ( V EulPaths  E ) )
64, 5bitri 242 . 2  |-  ( ( V EulPaths  E )  =/=  (/)  <->  E. f 
f  e.  dom  ( V EulPaths  E ) )
7 vex 2961 . . . . 5  |-  f  e. 
_V
87eldm 5070 . . . 4  |-  ( f  e.  dom  ( V EulPaths  E )  <->  E. p  f ( V EulPaths  E ) p )
9 eupagra 21693 . . . . . . . . 9  |-  ( f ( V EulPaths  E )
p  ->  V UMGrph  E )
10 umgraf2 21357 . . . . . . . . 9  |-  ( V UMGrph  E  ->  E : dom  E --> { y  e.  ( ~P V  \  { (/)
} )  |  (
# `  y )  <_  2 } )
11 ffn 5594 . . . . . . . . 9  |-  ( E : dom  E --> { y  e.  ( ~P V  \  { (/) } )  |  ( # `  y
)  <_  2 }  ->  E  Fn  dom  E
)
129, 10, 113syl 19 . . . . . . . 8  |-  ( f ( V EulPaths  E )
p  ->  E  Fn  dom  E )
13 id 21 . . . . . . . 8  |-  ( f ( V EulPaths  E )
p  ->  f ( V EulPaths  E ) p )
1412, 13eupath2 21707 . . . . . . 7  |-  ( f ( V EulPaths  E )
p  ->  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) }  =  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )
1514fveq2d 5735 . . . . . 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 5731 . . . . . . . 8  |-  ( (/)  =  if ( ( p `
 0 )  =  ( p `  ( # `
 f ) ) ,  (/) ,  { ( p `  0 ) ,  ( p `  ( # `  f ) ) } )  -> 
( # `  (/) )  =  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) ) )
1716eleq1d 2504 . . . . . . 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 5731 . . . . . . . 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 2504 . . . . . . 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 11651 . . . . . . . . 9  |-  ( # `  (/) )  =  0
21 c0ex 9090 . . . . . . . . . 10  |-  0  e.  _V
2221prid1 3914 . . . . . . . . 9  |-  0  e.  { 0 ,  2 }
2320, 22eqeltri 2508 . . . . . . . 8  |-  ( # `  (/) )  e.  {
0 ,  2 }
2423a1i 11 . . . . . . 7  |-  ( ( f ( V EulPaths  E ) p  /\  ( p `
 0 )  =  ( p `  ( # `
 f ) ) )  ->  ( # `  (/) )  e. 
{ 0 ,  2 } )
25 simpr 449 . . . . . . . . . 10  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  -.  ( p `  0
)  =  ( p `
 ( # `  f
) ) )
2625neneqad 2676 . . . . . . . . 9  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  (
p `  0 )  =/=  ( p `  ( # `
 f ) ) )
27 fvex 5745 . . . . . . . . . 10  |-  ( p `
 0 )  e. 
_V
28 fvex 5745 . . . . . . . . . 10  |-  ( p `
 ( # `  f
) )  e.  _V
29 hashprg 11671 . . . . . . . . . 10  |-  ( ( ( p `  0
)  e.  _V  /\  ( p `  ( # `
 f ) )  e.  _V )  -> 
( ( p ` 
0 )  =/=  (
p `  ( # `  f
) )  <->  ( # `  {
( p `  0
) ,  ( p `
 ( # `  f
) ) } )  =  2 ) )
3027, 28, 29mp2an 655 . . . . . . . . 9  |-  ( ( p `  0 )  =/=  ( p `  ( # `  f ) )  <->  ( # `  {
( p `  0
) ,  ( p `
 ( # `  f
) ) } )  =  2 )
3126, 30sylib 190 . . . . . . . 8  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  ( # `
 { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  =  2 )
32 2cn 10075 . . . . . . . . . 10  |-  2  e.  CC
3332elexi 2967 . . . . . . . . 9  |-  2  e.  _V
3433prid2 3915 . . . . . . . 8  |-  2  e.  { 0 ,  2 }
3531, 34syl6eqel 2526 . . . . . . 7  |-  ( ( f ( V EulPaths  E ) p  /\  -.  (
p `  0 )  =  ( p `  ( # `  f ) ) )  ->  ( # `
 { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } )  e.  {
0 ,  2 } )
3617, 19, 24, 35ifbothda 3771 . . . . . 6  |-  ( f ( V EulPaths  E )
p  ->  ( # `  if ( ( p ` 
0 )  =  ( p `  ( # `  f ) ) ,  (/) ,  { ( p `
 0 ) ,  ( p `  ( # `
 f ) ) } ) )  e. 
{ 0 ,  2 } )
3715, 36eqeltrd 2512 . . . . 5  |-  ( f ( V EulPaths  E )
p  ->  ( # `  {
x  e.  V  |  -.  2  ||  ( ( V VDeg  E ) `  x ) } )  e.  { 0 ,  2 } )
3837exlimiv 1645 . . . 4  |-  ( E. p  f ( V EulPaths  E ) p  -> 
( # `  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) } )  e. 
{ 0 ,  2 } )
398, 38sylbi 189 . . 3  |-  ( f  e.  dom  ( V EulPaths  E )  ->  ( # `
 { x  e.  V  |  -.  2  ||  ( ( V VDeg  E
) `  x ) } )  e.  {
0 ,  2 } )
4039exlimiv 1645 . 2  |-  ( E. f  f  e.  dom  ( V EulPaths  E )  -> 
( # `  { x  e.  V  |  -.  2  ||  ( ( V VDeg 
E ) `  x
) } )  e. 
{ 0 ,  2 } )
416, 40sylbi 189 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 178    /\ wa 360   E.wex 1551    = wceq 1653    e. wcel 1726    =/= wne 2601   {crab 2711   _Vcvv 2958    \ cdif 3319   (/)c0 3630   ifcif 3741   ~Pcpw 3801   {csn 3816   {cpr 3817   class class class wbr 4215   dom cdm 4881   Rel wrel 4886    Fn wfn 5452   -->wf 5453   ` cfv 5457  (class class class)co 6084   CCcc 8993   0cc0 8995    <_ cle 9126   2c2 10054   #chash 11623    || cdivides 12857   UMGrph cumg 21352   VDeg cvdg 21669   EulPaths ceup 21689
This theorem is referenced by:  konigsberg  21714
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-rep 4323  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704  ax-cnex 9051  ax-resscn 9052  ax-1cn 9053  ax-icn 9054  ax-addcl 9055  ax-addrcl 9056  ax-mulcl 9057  ax-mulrcl 9058  ax-mulcom 9059  ax-addass 9060  ax-mulass 9061  ax-distr 9062  ax-i2m1 9063  ax-1ne0 9064  ax-1rid 9065  ax-rnegex 9066  ax-rrecex 9067  ax-cnre 9068  ax-pre-lttri 9069  ax-pre-lttrn 9070  ax-pre-ltadd 9071  ax-pre-mulgt0 9072  ax-pre-sup 9073
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rmo 2715  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-int 4053  df-iun 4097  df-br 4216  df-opab 4270  df-mpt 4271  df-tr 4306  df-eprel 4497  df-id 4501  df-po 4506  df-so 4507  df-fr 4544  df-we 4546  df-ord 4587  df-on 4588  df-lim 4589  df-suc 4590  df-om 4849  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-res 4893  df-ima 4894  df-iota 5421  df-fun 5459  df-fn 5460  df-f 5461  df-f1 5462  df-fo 5463  df-f1o 5464  df-fv 5465  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-1st 6352  df-2nd 6353  df-riota 6552  df-recs 6636  df-rdg 6671  df-1o 6727  df-2o 6728  df-oadd 6731  df-er 6908  df-pm 7024  df-en 7113  df-dom 7114  df-sdom 7115  df-fin 7116  df-sup 7449  df-card 7831  df-cda 8053  df-pnf 9127  df-mnf 9128  df-xr 9129  df-ltxr 9130  df-le 9131  df-sub 9298  df-neg 9299  df-div 9683  df-nn 10006  df-2 10063  df-3 10064  df-n0 10227  df-z 10288  df-uz 10494  df-rp 10618  df-xadd 10716  df-fz 11049  df-seq 11329  df-exp 11388  df-hash 11624  df-cj 11909  df-re 11910  df-im 11911  df-sqr 12045  df-abs 12046  df-dvds 12858  df-prm 13085  df-umgra 21353  df-vdgr 21670  df-eupa 21690
  Copyright terms: Public domain W3C validator