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

Theorem clwlkf1clwwlk 25267
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 25261 . 2  |-  ( ( V USGrph  E  /\  V  e. 
Fin  /\  N  e.  Prime )  ->  F : C
--> ( ( V ClWWalksN  E ) `
 N ) )
6 simprl 756 . . . . . 6  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  u  e.  C )
7 ovex 6306 . . . . . 6  |-  ( ( 2nd `  u ) substr  <. 0 ,  ( # `  ( 1st `  u
) ) >. )  e.  _V
8 fveq2 5849 . . . . . . . . 9  |-  ( c  =  u  ->  ( 2nd `  c )  =  ( 2nd `  u
) )
92, 8syl5eq 2455 . . . . . . . 8  |-  ( c  =  u  ->  B  =  ( 2nd `  u
) )
10 fveq2 5849 . . . . . . . . . . 11  |-  ( c  =  u  ->  ( 1st `  c )  =  ( 1st `  u
) )
111, 10syl5eq 2455 . . . . . . . . . 10  |-  ( c  =  u  ->  A  =  ( 1st `  u
) )
1211fveq2d 5853 . . . . . . . . 9  |-  ( c  =  u  ->  ( # `
 A )  =  ( # `  ( 1st `  u ) ) )
1312opeq2d 4166 . . . . . . . 8  |-  ( c  =  u  ->  <. 0 ,  ( # `  A
) >.  =  <. 0 ,  ( # `  ( 1st `  u ) )
>. )
149, 13oveq12d 6296 . . . . . . 7  |-  ( c  =  u  ->  ( B substr  <. 0 ,  (
# `  A ) >. )  =  ( ( 2nd `  u ) substr  <. 0 ,  ( # `  ( 1st `  u
) ) >. )
)
1514, 4fvmptg 5930 . . . . . 6  |-  ( ( u  e.  C  /\  ( ( 2nd `  u
) substr  <. 0 ,  (
# `  ( 1st `  u ) ) >.
)  e.  _V )  ->  ( F `  u
)  =  ( ( 2nd `  u ) substr  <. 0 ,  ( # `  ( 1st `  u
) ) >. )
)
166, 7, 15sylancl 660 . . . . 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 459 . . . . . . . 8  |-  ( ( u  e.  C  /\  w  e.  C )  ->  w  e.  C )
18 ovex 6306 . . . . . . . 8  |-  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )  e.  _V
1917, 18jctir 536 . . . . . . 7  |-  ( ( u  e.  C  /\  w  e.  C )  ->  ( w  e.  C  /\  ( ( 2nd `  w
) substr  <. 0 ,  (
# `  ( 1st `  w ) ) >.
)  e.  _V )
)
2019adantl 464 . . . . . 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 5849 . . . . . . . . 9  |-  ( c  =  w  ->  ( 2nd `  c )  =  ( 2nd `  w
) )
222, 21syl5eq 2455 . . . . . . . 8  |-  ( c  =  w  ->  B  =  ( 2nd `  w
) )
23 fveq2 5849 . . . . . . . . . . 11  |-  ( c  =  w  ->  ( 1st `  c )  =  ( 1st `  w
) )
241, 23syl5eq 2455 . . . . . . . . . 10  |-  ( c  =  w  ->  A  =  ( 1st `  w
) )
2524fveq2d 5853 . . . . . . . . 9  |-  ( c  =  w  ->  ( # `
 A )  =  ( # `  ( 1st `  w ) ) )
2625opeq2d 4166 . . . . . . . 8  |-  ( c  =  w  ->  <. 0 ,  ( # `  A
) >.  =  <. 0 ,  ( # `  ( 1st `  w ) )
>. )
2722, 26oveq12d 6296 . . . . . . 7  |-  ( c  =  w  ->  ( B substr  <. 0 ,  (
# `  A ) >. )  =  ( ( 2nd `  w ) substr  <. 0 ,  ( # `  ( 1st `  w
) ) >. )
)
2827, 4fvmptg 5930 . . . . . 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 2424 . . . 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 25258 . . . . . . . . 9  |-  ( w  e.  C  ->  ( # `
 ( 1st `  w
) )  =  N )
3231eqcomd 2410 . . . . . . . 8  |-  ( w  e.  C  ->  N  =  ( # `  ( 1st `  w ) ) )
3332adantl 464 . . . . . . 7  |-  ( ( u  e.  C  /\  w  e.  C )  ->  N  =  ( # `  ( 1st `  w
) ) )
3433ad2antlr 725 . . . . . 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 14429 . . . . . . . . . 10  |-  ( N  e.  Prime  ->  N  e.  NN )
36353ad2ant3 1020 . . . . . . . . 9  |-  ( ( V USGrph  E  /\  V  e. 
Fin  /\  N  e.  Prime )  ->  N  e.  NN )
3736adantr 463 . . . . . . . 8  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  N  e.  NN )
3817adantl 464 . . . . . . . 8  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  w  e.  C )
391, 2, 3, 4clwlkf1clwwlklem 25266 . . . . . . . 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 1230 . . . . . . 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 427 . . . . . 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 1036 . . . . . . 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 3204 . . . . . . . . . . 11  |-  ( u  e.  { c  e.  ( V ClWalks  E )  |  ( # `  A
)  =  N }  ->  u  e.  ( V ClWalks  E ) )
44 clwlkswlks 25175 . . . . . . . . . . 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 2510 . . . . . . . . 9  |-  ( u  e.  C  ->  u  e.  ( V Walks  E ) )
47 elrabi 3204 . . . . . . . . . . 11  |-  ( w  e.  { c  e.  ( V ClWalks  E )  |  ( # `  A
)  =  N }  ->  w  e.  ( V ClWalks  E ) )
48 clwlkswlks 25175 . . . . . . . . . . 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 2510 . . . . . . . . 9  |-  ( w  e.  C  ->  w  e.  ( V Walks  E ) )
5146, 50anim12i 564 . . . . . . . 8  |-  ( ( u  e.  C  /\  w  e.  C )  ->  ( u  e.  ( V Walks  E )  /\  w  e.  ( V Walks  E ) ) )
5251ad2antlr 725 . . . . . . 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 25258 . . . . . . . . . 10  |-  ( u  e.  C  ->  ( # `
 ( 1st `  u
) )  =  N )
5453eqcomd 2410 . . . . . . . . 9  |-  ( u  e.  C  ->  N  =  ( # `  ( 1st `  u ) ) )
5554adantr 463 . . . . . . . 8  |-  ( ( u  e.  C  /\  w  e.  C )  ->  N  =  ( # `  ( 1st `  u
) ) )
5655ad2antlr 725 . . . . . . 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 25125 . . . . . . 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 1230 . . . . . 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 923 . . . . 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 432 . . . 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 215 . . 3  |-  ( ( ( V USGrph  E  /\  V  e.  Fin  /\  N  e.  Prime )  /\  (
u  e.  C  /\  w  e.  C )
)  ->  ( ( F `  u )  =  ( F `  w )  ->  u  =  w ) )
6261ralrimivva 2825 . 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 6147 . 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 662 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 184    /\ wa 367    /\ w3a 974    = wceq 1405    e. wcel 1842   A.wral 2754   {crab 2758   _Vcvv 3059   <.cop 3978   class class class wbr 4395    |-> cmpt 4453   -->wf 5565   -1-1->wf1 5566   ` cfv 5569  (class class class)co 6278   1stc1st 6782   2ndc2nd 6783   Fincfn 7554   0cc0 9522   NNcn 10576   ...cfz 11726   #chash 12452   substr csubstr 12587   Primecprime 14426   USGrph cusg 24747   Walks cwalk 24915   ClWalks cclwlk 25164   ClWWalksN cclwwlkn 25166
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1639  ax-4 1652  ax-5 1725  ax-6 1771  ax-7 1814  ax-8 1844  ax-9 1846  ax-10 1861  ax-11 1866  ax-12 1878  ax-13 2026  ax-ext 2380  ax-rep 4507  ax-sep 4517  ax-nul 4525  ax-pow 4572  ax-pr 4630  ax-un 6574  ax-cnex 9578  ax-resscn 9579  ax-1cn 9580  ax-icn 9581  ax-addcl 9582  ax-addrcl 9583  ax-mulcl 9584  ax-mulrcl 9585  ax-mulcom 9586  ax-addass 9587  ax-mulass 9588  ax-distr 9589  ax-i2m1 9590  ax-1ne0 9591  ax-1rid 9592  ax-rnegex 9593  ax-rrecex 9594  ax-cnre 9595  ax-pre-lttri 9596  ax-pre-lttrn 9597  ax-pre-ltadd 9598  ax-pre-mulgt0 9599
This theorem depends on definitions:  df-bi 185  df-or 368  df-an 369  df-3or 975  df-3an 976  df-tru 1408  df-ex 1634  df-nf 1638  df-sb 1764  df-eu 2242  df-mo 2243  df-clab 2388  df-cleq 2394  df-clel 2397  df-nfc 2552  df-ne 2600  df-nel 2601  df-ral 2759  df-rex 2760  df-reu 2761  df-rmo 2762  df-rab 2763  df-v 3061  df-sbc 3278  df-csb 3374  df-dif 3417  df-un 3419  df-in 3421  df-ss 3428  df-pss 3430  df-nul 3739  df-if 3886  df-pw 3957  df-sn 3973  df-pr 3975  df-tp 3977  df-op 3979  df-uni 4192  df-int 4228  df-iun 4273  df-br 4396  df-opab 4454  df-mpt 4455  df-tr 4490  df-eprel 4734  df-id 4738  df-po 4744  df-so 4745  df-fr 4782  df-we 4784  df-xp 4829  df-rel 4830  df-cnv 4831  df-co 4832  df-dm 4833  df-rn 4834  df-res 4835  df-ima 4836  df-pred 5367  df-ord 5413  df-on 5414  df-lim 5415  df-suc 5416  df-iota 5533  df-fun 5571  df-fn 5572  df-f 5573  df-f1 5574  df-fo 5575  df-f1o 5576  df-fv 5577  df-riota 6240  df-ov 6281  df-oprab 6282  df-mpt2 6283  df-om 6684  df-1st 6784  df-2nd 6785  df-wrecs 7013  df-recs 7075  df-rdg 7113  df-1o 7167  df-2o 7168  df-oadd 7171  df-er 7348  df-map 7459  df-pm 7460  df-en 7555  df-dom 7556  df-sdom 7557  df-fin 7558  df-card 8352  df-cda 8580  df-pnf 9660  df-mnf 9661  df-xr 9662  df-ltxr 9663  df-le 9664  df-sub 9843  df-neg 9844  df-nn 10577  df-2 10635  df-n0 10837  df-z 10906  df-uz 11128  df-fz 11727  df-fzo 11855  df-hash 12453  df-word 12591  df-lsw 12592  df-substr 12595  df-dvds 14196  df-prm 14427  df-usgra 24750  df-wlk 24925  df-clwlk 25167  df-clwwlk 25168  df-clwwlkn 25169
This theorem is referenced by:  clwlkf1oclwwlk  25268
  Copyright terms: Public domain W3C validator