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

Theorem clwlkf1clwwlk 25657
Description: There is a one-to-one function between the set of closed walks (defined as words) of length n and the set of closed walks of length n (in an undirected simple graph). (Contributed by Alexander van der Vekens, 5-Jul-2018.)
Hypotheses
Ref Expression
clwlkfclwwlk.1  |-  A  =  ( 1st `  c
)
clwlkfclwwlk.2  |-  B  =  ( 2nd `  c
)
clwlkfclwwlk.c  |-  C  =  { c  e.  ( V ClWalks  E )  |  (
# `  A )  =  N }
clwlkfclwwlk.f  |-  F  =  ( c  e.  C  |->  ( B substr  <. 0 ,  ( # `  A
) >. ) )
Assertion
Ref Expression
clwlkf1clwwlk  |-  ( ( V USGrph  E  /\  V  e. 
Fin  /\  N  e.  Prime )  ->  F : C -1-1-> ( ( V ClWWalksN  E ) `  N
) )
Distinct variable groups:    E, c    N, c    V, c    C, c    F, c
Allowed substitution hints:    A( c)    B( c)

Proof of Theorem clwlkf1clwwlk
Dummy variables  i  w  u are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 clwlkfclwwlk.1 . . 3  |-  A  =  ( 1st `  c
)
2 clwlkfclwwlk.2 . . 3  |-  B  =  ( 2nd `  c
)
3 clwlkfclwwlk.c . . 3  |-  C  =  { c  e.  ( V ClWalks  E )  |  (
# `  A )  =  N }
4 clwlkfclwwlk.f . . 3  |-  F  =  ( c  e.  C  |->  ( B substr  <. 0 ,  ( # `  A
) >. ) )
51, 2, 3, 4clwlkfclwwlk 25651 . 2  |-  ( ( V USGrph  E  /\  V  e. 
Fin  /\  N  e.  Prime )  ->  F : C
--> ( ( V ClWWalksN  E ) `
 N ) )
6 simprl 772 . . . . . 6  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  u  e.  C )
7 ovex 6336 . . . . . 6  |-  ( ( 2nd `  u ) substr  <. 0 ,  ( # `  ( 1st `  u
) ) >. )  e.  _V
8 fveq2 5879 . . . . . . . . 9  |-  ( c  =  u  ->  ( 2nd `  c )  =  ( 2nd `  u
) )
92, 8syl5eq 2517 . . . . . . . 8  |-  ( c  =  u  ->  B  =  ( 2nd `  u
) )
10 fveq2 5879 . . . . . . . . . . 11  |-  ( c  =  u  ->  ( 1st `  c )  =  ( 1st `  u
) )
111, 10syl5eq 2517 . . . . . . . . . 10  |-  ( c  =  u  ->  A  =  ( 1st `  u
) )
1211fveq2d 5883 . . . . . . . . 9  |-  ( c  =  u  ->  ( # `
 A )  =  ( # `  ( 1st `  u ) ) )
1312opeq2d 4165 . . . . . . . 8  |-  ( c  =  u  ->  <. 0 ,  ( # `  A
) >.  =  <. 0 ,  ( # `  ( 1st `  u ) )
>. )
149, 13oveq12d 6326 . . . . . . 7  |-  ( c  =  u  ->  ( B substr  <. 0 ,  (
# `  A ) >. )  =  ( ( 2nd `  u ) substr  <. 0 ,  ( # `  ( 1st `  u
) ) >. )
)
1514, 4fvmptg 5961 . . . . . 6  |-  ( ( u  e.  C  /\  ( ( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  e.  _V )  ->  ( F `  u
)  =  ( ( 2nd `  u ) substr  <. 0 ,  ( # `  ( 1st `  u
) ) >. )
)
166, 7, 15sylancl 675 . . . . 5  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  ( F `  u )  =  ( ( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
) )
17 simpr 468 . . . . . . . 8  |-  ( ( u  e.  C  /\  w  e.  C )  ->  w  e.  C )
18 ovex 6336 . . . . . . . 8  |-  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )  e.  _V
1917, 18jctir 547 . . . . . . 7  |-  ( ( u  e.  C  /\  w  e.  C )  ->  ( w  e.  C  /\  ( ( 2nd `  w
) substr  <. 0 ,  (
# `  ( 1st `  w ) ) >.
)  e.  _V )
)
2019adantl 473 . . . . . 6  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  ( w  e.  C  /\  (
( 2nd `  w
) substr  <. 0 ,  (
# `  ( 1st `  w ) ) >.
)  e.  _V )
)
21 fveq2 5879 . . . . . . . . 9  |-  ( c  =  w  ->  ( 2nd `  c )  =  ( 2nd `  w
) )
222, 21syl5eq 2517 . . . . . . . 8  |-  ( c  =  w  ->  B  =  ( 2nd `  w
) )
23 fveq2 5879 . . . . . . . . . . 11  |-  ( c  =  w  ->  ( 1st `  c )  =  ( 1st `  w
) )
241, 23syl5eq 2517 . . . . . . . . . 10  |-  ( c  =  w  ->  A  =  ( 1st `  w
) )
2524fveq2d 5883 . . . . . . . . 9  |-  ( c  =  w  ->  ( # `
 A )  =  ( # `  ( 1st `  w ) ) )
2625opeq2d 4165 . . . . . . . 8  |-  ( c  =  w  ->  <. 0 ,  ( # `  A
) >.  =  <. 0 ,  ( # `  ( 1st `  w ) )
>. )
2722, 26oveq12d 6326 . . . . . . 7  |-  ( c  =  w  ->  ( B substr  <. 0 ,  (
# `  A ) >. )  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)
2827, 4fvmptg 5961 . . . . . 6  |-  ( ( w  e.  C  /\  ( ( 2nd `  w
) substr  <. 0 ,  (
# `  ( 1st `  w ) ) >.
)  e.  _V )  ->  ( F `  w
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)
2920, 28syl 17 . . . . 5  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  ( F `  w )  =  ( ( 2nd `  w
) substr  <. 0 ,  (
# `  ( 1st `  w ) ) >.
) )
3016, 29eqeq12d 2486 . . . 4  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  ( ( F `  u )  =  ( F `  w )  <->  ( ( 2nd `  u ) substr  <. 0 ,  ( # `  ( 1st `  u ) )
>. )  =  (
( 2nd `  w
) substr  <. 0 ,  (
# `  ( 1st `  w ) ) >.
) ) )
311, 2, 3, 4clwlkfclwwlk1hashn 25648 . . . . . . . . 9  |-  ( w  e.  C  ->  ( # `
 ( 1st `  w
) )  =  N )
3231eqcomd 2477 . . . . . . . 8  |-  ( w  e.  C  ->  N  =  ( # `  ( 1st `  w ) ) )
3332adantl 473 . . . . . . 7  |-  ( ( u  e.  C  /\  w  e.  C )  ->  N  =  ( # `  ( 1st `  w
) ) )
3433ad2antlr 741 . . . . . 6  |-  ( ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  ( u  e.  C  /\  w  e.  C
) )  /\  (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)  ->  N  =  ( # `  ( 1st `  w ) ) )
35 prmnn 14704 . . . . . . . . . 10  |-  ( N  e.  Prime  ->  N  e.  NN )
36353ad2ant3 1053 . . . . . . . . 9  |-  ( ( V USGrph  E  /\  V  e. 
Fin  /\  N  e.  Prime )  ->  N  e.  NN )
3736adantr 472 . . . . . . . 8  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  N  e.  NN )
3817adantl 473 . . . . . . . 8  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  w  e.  C )
391, 2, 3, 4clwlkf1clwwlklem 25656 . . . . . . . 8  |-  ( ( N  e.  NN  /\  u  e.  C  /\  w  e.  C )  ->  ( ( ( 2nd `  u ) substr  <. 0 ,  ( # `  ( 1st `  u ) )
>. )  =  (
( 2nd `  w
) substr  <. 0 ,  (
# `  ( 1st `  w ) ) >.
)  ->  A. i  e.  ( 0 ... N
) ( ( 2nd `  u ) `  i
)  =  ( ( 2nd `  w ) `
 i ) ) )
4037, 6, 38, 39syl3anc 1292 . . . . . . 7  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  ( (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )  ->  A. i  e.  ( 0 ... N ) ( ( 2nd `  u
) `  i )  =  ( ( 2nd `  w ) `  i
) ) )
4140imp 436 . . . . . 6  |-  ( ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  ( u  e.  C  /\  w  e.  C
) )  /\  (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)  ->  A. i  e.  ( 0 ... N
) ( ( 2nd `  u ) `  i
)  =  ( ( 2nd `  w ) `
 i ) )
42 simpll1 1069 . . . . . . 7  |-  ( ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  ( u  e.  C  /\  w  e.  C
) )  /\  (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)  ->  V USGrph  E )
43 elrabi 3181 . . . . . . . . . . 11  |-  ( u  e.  { c  e.  ( V ClWalks  E )  |  ( # `  A
)  =  N }  ->  u  e.  ( V ClWalks  E ) )
44 clwlkswlks 25565 . . . . . . . . . . 11  |-  ( u  e.  ( V ClWalks  E
)  ->  u  e.  ( V Walks  E ) )
4543, 44syl 17 . . . . . . . . . 10  |-  ( u  e.  { c  e.  ( V ClWalks  E )  |  ( # `  A
)  =  N }  ->  u  e.  ( V Walks 
E ) )
4645, 3eleq2s 2567 . . . . . . . . 9  |-  ( u  e.  C  ->  u  e.  ( V Walks  E ) )
47 elrabi 3181 . . . . . . . . . . 11  |-  ( w  e.  { c  e.  ( V ClWalks  E )  |  ( # `  A
)  =  N }  ->  w  e.  ( V ClWalks  E ) )
48 clwlkswlks 25565 . . . . . . . . . . 11  |-  ( w  e.  ( V ClWalks  E
)  ->  w  e.  ( V Walks  E ) )
4947, 48syl 17 . . . . . . . . . 10  |-  ( w  e.  { c  e.  ( V ClWalks  E )  |  ( # `  A
)  =  N }  ->  w  e.  ( V Walks 
E ) )
5049, 3eleq2s 2567 . . . . . . . . 9  |-  ( w  e.  C  ->  w  e.  ( V Walks  E ) )
5146, 50anim12i 576 . . . . . . . 8  |-  ( ( u  e.  C  /\  w  e.  C )  ->  ( u  e.  ( V Walks  E )  /\  w  e.  ( V Walks  E ) ) )
5251ad2antlr 741 . . . . . . 7  |-  ( ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  ( u  e.  C  /\  w  e.  C
) )  /\  (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)  ->  ( u  e.  ( V Walks  E )  /\  w  e.  ( V Walks  E ) ) )
531, 2, 3, 4clwlkfclwwlk1hashn 25648 . . . . . . . . . 10  |-  ( u  e.  C  ->  ( # `
 ( 1st `  u
) )  =  N )
5453eqcomd 2477 . . . . . . . . 9  |-  ( u  e.  C  ->  N  =  ( # `  ( 1st `  u ) ) )
5554adantr 472 . . . . . . . 8  |-  ( ( u  e.  C  /\  w  e.  C )  ->  N  =  ( # `  ( 1st `  u
) ) )
5655ad2antlr 741 . . . . . . 7  |-  ( ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  ( u  e.  C  /\  w  e.  C
) )  /\  (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)  ->  N  =  ( # `  ( 1st `  u ) ) )
57 usg2wlkeq 25515 . . . . . . 7  |-  ( ( V USGrph  E  /\  (
u  e.  ( V Walks 
E )  /\  w  e.  ( V Walks  E ) )  /\  N  =  ( # `  ( 1st `  u ) ) )  ->  ( u  =  w  <->  ( N  =  ( # `  ( 1st `  w ) )  /\  A. i  e.  ( 0 ... N
) ( ( 2nd `  u ) `  i
)  =  ( ( 2nd `  w ) `
 i ) ) ) )
5842, 52, 56, 57syl3anc 1292 . . . . . 6  |-  ( ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  ( u  e.  C  /\  w  e.  C
) )  /\  (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)  ->  ( u  =  w  <->  ( N  =  ( # `  ( 1st `  w ) )  /\  A. i  e.  ( 0 ... N
) ( ( 2nd `  u ) `  i
)  =  ( ( 2nd `  w ) `
 i ) ) ) )
5934, 41, 58mpbir2and 936 . . . . 5  |-  ( ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  ( u  e.  C  /\  w  e.  C
) )  /\  (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)  ->  u  =  w )
6059ex 441 . . . 4  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  ( (
( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )  ->  u  =  w ) )
6130, 60sylbid 223 . . 3  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  ( ( F `  u )  =  ( F `  w )  ->  u  =  w ) )
6261ralrimivva 2814 . 2  |-  ( ( V USGrph  E  /\  V  e. 
Fin  /\  N  e.  Prime )  ->  A. u  e.  C  A. w  e.  C  ( ( F `  u )  =  ( F `  w )  ->  u  =  w ) )
63 dff13 6177 . 2  |-  ( F : C -1-1-> ( ( V ClWWalksN  E ) `  N
)  <->  ( F : C
--> ( ( V ClWWalksN  E ) `
 N )  /\  A. u  e.  C  A. w  e.  C  (
( F `  u
)  =  ( F `
 w )  ->  u  =  w )
) )
645, 62, 63sylanbrc 677 1  |-  ( ( V USGrph  E  /\  V  e. 
Fin  /\  N  e.  Prime )  ->  F : C -1-1-> ( ( V ClWWalksN  E ) `  N
) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 189    /\ wa 376    /\ w3a 1007    = wceq 1452    e. wcel 1904   A.wral 2756   {crab 2760   _Vcvv 3031   <.cop 3965   class class class wbr 4395    |-> cmpt 4454   -->wf 5585   -1-1->wf1 5586   ` cfv 5589  (class class class)co 6308   1stc1st 6810   2ndc2nd 6811   Fincfn 7587   0cc0 9557   NNcn 10631   ...cfz 11810   #chash 12553   substr csubstr 12707   Primecprime 14701   USGrph cusg 25136   Walks cwalk 25305   ClWalks cclwlk 25554   ClWWalksN cclwwlkn 25556
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-8 1906  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-rep 4508  ax-sep 4518  ax-nul 4527  ax-pow 4579  ax-pr 4639  ax-un 6602  ax-cnex 9613  ax-resscn 9614  ax-1cn 9615  ax-icn 9616  ax-addcl 9617  ax-addrcl 9618  ax-mulcl 9619  ax-mulrcl 9620  ax-mulcom 9621  ax-addass 9622  ax-mulass 9623  ax-distr 9624  ax-i2m1 9625  ax-1ne0 9626  ax-1rid 9627  ax-rnegex 9628  ax-rrecex 9629  ax-cnre 9630  ax-pre-lttri 9631  ax-pre-lttrn 9632  ax-pre-ltadd 9633  ax-pre-mulgt0 9634
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3or 1008  df-3an 1009  df-tru 1455  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-nel 2644  df-ral 2761  df-rex 2762  df-reu 2763  df-rmo 2764  df-rab 2765  df-v 3033  df-sbc 3256  df-csb 3350  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-pss 3406  df-nul 3723  df-if 3873  df-pw 3944  df-sn 3960  df-pr 3962  df-tp 3964  df-op 3966  df-uni 4191  df-int 4227  df-iun 4271  df-br 4396  df-opab 4455  df-mpt 4456  df-tr 4491  df-eprel 4750  df-id 4754  df-po 4760  df-so 4761  df-fr 4798  df-we 4800  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-pred 5387  df-ord 5433  df-on 5434  df-lim 5435  df-suc 5436  df-iota 5553  df-fun 5591  df-fn 5592  df-f 5593  df-f1 5594  df-fo 5595  df-f1o 5596  df-fv 5597  df-riota 6270  df-ov 6311  df-oprab 6312  df-mpt2 6313  df-om 6712  df-1st 6812  df-2nd 6813  df-wrecs 7046  df-recs 7108  df-rdg 7146  df-1o 7200  df-2o 7201  df-oadd 7204  df-er 7381  df-map 7492  df-pm 7493  df-en 7588  df-dom 7589  df-sdom 7590  df-fin 7591  df-card 8391  df-cda 8616  df-pnf 9695  df-mnf 9696  df-xr 9697  df-ltxr 9698  df-le 9699  df-sub 9882  df-neg 9883  df-nn 10632  df-2 10690  df-n0 10894  df-z 10962  df-uz 11183  df-fz 11811  df-fzo 11943  df-hash 12554  df-word 12711  df-lsw 12712  df-substr 12715  df-dvds 14383  df-prm 14702  df-usgra 25139  df-wlk 25315  df-clwlk 25557  df-clwwlk 25558  df-clwwlkn 25559
This theorem is referenced by:  clwlkf1oclwwlk  25658
  Copyright terms: Public domain W3C validator