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

Theorem clwwlkfo 24924
Description: Lemma 4 for clwwlkbij 24926: F is an onto function. (Contributed by Alexander van der Vekens, 29-Sep-2018.)
Hypotheses
Ref Expression
clwwlkbij.d  |-  D  =  { w  e.  ( ( V WWalksN  E ) `  N )  |  ( lastS  `  w )  =  ( w `  0 ) }
clwwlkbij.f  |-  F  =  ( t  e.  D  |->  ( t substr  <. 0 ,  N >. ) )
Assertion
Ref Expression
clwwlkfo  |-  ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  ->  F : D -onto-> (
( V ClWWalksN  E ) `  N ) )
Distinct variable groups:    w, E    w, N    w, V    t, D    t, E, w    t, N    t, V    t, X    t, Y
Allowed substitution hints:    D( w)    F( w, t)    X( w)    Y( w)

Proof of Theorem clwwlkfo
Dummy variables  i  x  p are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 clwwlkbij.d . . 3  |-  D  =  { w  e.  ( ( V WWalksN  E ) `  N )  |  ( lastS  `  w )  =  ( w `  0 ) }
2 clwwlkbij.f . . 3  |-  F  =  ( t  e.  D  |->  ( t substr  <. 0 ,  N >. ) )
31, 2clwwlkf 24921 . 2  |-  ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  ->  F : D --> ( ( V ClWWalksN  E ) `  N
) )
4 clwwlknimp 24903 . . . . . . 7  |-  ( p  e.  ( ( V ClWWalksN  E ) `  N
)  ->  ( (
p  e. Word  V  /\  ( # `  p )  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p ) ,  ( p `  0 ) }  e.  ran  E
) )
5 simpr 461 . . . . . . . . . 10  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  -> 
( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )
6 simpl1 999 . . . . . . . . . 10  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  -> 
( p  e. Word  V  /\  ( # `  p
)  =  N ) )
7 3simpc 995 . . . . . . . . . . 11  |-  ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  ->  ( A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E ) )
87adantr 465 . . . . . . . . . 10  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  -> 
( A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E ) )
91clwwlkel 24920 . . . . . . . . . 10  |-  ( ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  /\  ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  ( A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E ) )  ->  ( p ++  <" ( p ` 
0 ) "> )  e.  D )
105, 6, 8, 9syl3anc 1228 . . . . . . . . 9  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  -> 
( p ++  <" (
p `  0 ) "> )  e.  D
)
11 opeq2 4220 . . . . . . . . . . . . . . 15  |-  ( N  =  ( # `  p
)  ->  <. 0 ,  N >.  =  <. 0 ,  ( # `  p
) >. )
1211eqcoms 2469 . . . . . . . . . . . . . 14  |-  ( (
# `  p )  =  N  ->  <. 0 ,  N >.  =  <. 0 ,  ( # `  p
) >. )
1312oveq2d 6312 . . . . . . . . . . . . 13  |-  ( (
# `  p )  =  N  ->  ( ( p ++  <" ( p `
 0 ) "> ) substr  <. 0 ,  N >. )  =  ( ( p ++  <" (
p `  0 ) "> ) substr  <. 0 ,  ( # `  p
) >. ) )
1413adantl 466 . . . . . . . . . . . 12  |-  ( ( p  e. Word  V  /\  ( # `  p )  =  N )  -> 
( ( p ++  <" ( p `  0
) "> ) substr  <.
0 ,  N >. )  =  ( ( p ++ 
<" ( p ` 
0 ) "> ) substr  <. 0 ,  (
# `  p ) >. ) )
15143ad2ant1 1017 . . . . . . . . . . 11  |-  ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  ->  ( ( p ++ 
<" ( p ` 
0 ) "> ) substr  <. 0 ,  N >. )  =  ( ( p ++  <" ( p `
 0 ) "> ) substr  <. 0 ,  ( # `  p
) >. ) )
1615adantr 465 . . . . . . . . . 10  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  -> 
( ( p ++  <" ( p `  0
) "> ) substr  <.
0 ,  N >. )  =  ( ( p ++ 
<" ( p ` 
0 ) "> ) substr  <. 0 ,  (
# `  p ) >. ) )
17 simpll 753 . . . . . . . . . . . . . . . . 17  |-  ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  N  e.  NN )  ->  p  e. Word  V
)
18 fstwrdne0 12589 . . . . . . . . . . . . . . . . . . 19  |-  ( ( N  e.  NN  /\  ( p  e. Word  V  /\  ( # `  p )  =  N ) )  ->  ( p ` 
0 )  e.  V
)
1918ancoms 453 . . . . . . . . . . . . . . . . . 18  |-  ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  N  e.  NN )  ->  ( p ` 
0 )  e.  V
)
2019s1cld 12624 . . . . . . . . . . . . . . . . 17  |-  ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  N  e.  NN )  ->  <" ( p `
 0 ) ">  e. Word  V )
2117, 20jca 532 . . . . . . . . . . . . . . . 16  |-  ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  N  e.  NN )  ->  ( p  e. Word  V  /\  <" ( p `
 0 ) ">  e. Word  V )
)
2221ex 434 . . . . . . . . . . . . . . 15  |-  ( ( p  e. Word  V  /\  ( # `  p )  =  N )  -> 
( N  e.  NN  ->  ( p  e. Word  V  /\  <" ( p `
 0 ) ">  e. Word  V )
) )
23223ad2ant1 1017 . . . . . . . . . . . . . 14  |-  ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  ->  ( N  e.  NN  ->  ( p  e. Word  V  /\  <" (
p `  0 ) ">  e. Word  V )
) )
2423com12 31 . . . . . . . . . . . . 13  |-  ( N  e.  NN  ->  (
( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  ->  ( p  e. Word  V  /\  <" ( p `
 0 ) ">  e. Word  V )
) )
25243ad2ant3 1019 . . . . . . . . . . . 12  |-  ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  ->  ( ( ( p  e. Word  V  /\  ( # `
 p )  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p ) ,  ( p `  0 ) }  e.  ran  E
)  ->  ( p  e. Word  V  /\  <" (
p `  0 ) ">  e. Word  V )
) )
2625impcom 430 . . . . . . . . . . 11  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  -> 
( p  e. Word  V  /\  <" ( p `
 0 ) ">  e. Word  V )
)
27 swrdccat1 12694 . . . . . . . . . . 11  |-  ( ( p  e. Word  V  /\  <" ( p ` 
0 ) ">  e. Word  V )  ->  (
( p ++  <" (
p `  0 ) "> ) substr  <. 0 ,  ( # `  p
) >. )  =  p )
2826, 27syl 16 . . . . . . . . . 10  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  -> 
( ( p ++  <" ( p `  0
) "> ) substr  <.
0 ,  ( # `  p ) >. )  =  p )
2916, 28eqtr2d 2499 . . . . . . . . 9  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  ->  p  =  ( (
p ++  <" ( p `
 0 ) "> ) substr  <. 0 ,  N >. ) )
3010, 29jca 532 . . . . . . . 8  |-  ( ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  /\  ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN ) )  -> 
( ( p ++  <" ( p `  0
) "> )  e.  D  /\  p  =  ( ( p ++ 
<" ( p ` 
0 ) "> ) substr  <. 0 ,  N >. ) ) )
3130ex 434 . . . . . . 7  |-  ( ( ( p  e. Word  V  /\  ( # `  p
)  =  N )  /\  A. i  e.  ( 0..^ ( N  -  1 ) ) { ( p `  i ) ,  ( p `  ( i  +  1 ) ) }  e.  ran  E  /\  { ( lastS  `  p
) ,  ( p `
 0 ) }  e.  ran  E )  ->  ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  ->  (
( p ++  <" (
p `  0 ) "> )  e.  D  /\  p  =  (
( p ++  <" (
p `  0 ) "> ) substr  <. 0 ,  N >. ) ) ) )
324, 31syl 16 . . . . . 6  |-  ( p  e.  ( ( V ClWWalksN  E ) `  N
)  ->  ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  ->  ( ( p ++  <" ( p `  0
) "> )  e.  D  /\  p  =  ( ( p ++ 
<" ( p ` 
0 ) "> ) substr  <. 0 ,  N >. ) ) ) )
3332impcom 430 . . . . 5  |-  ( ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  /\  p  e.  ( ( V ClWWalksN  E ) `  N ) )  -> 
( ( p ++  <" ( p `  0
) "> )  e.  D  /\  p  =  ( ( p ++ 
<" ( p ` 
0 ) "> ) substr  <. 0 ,  N >. ) ) )
34 oveq1 6303 . . . . . . 7  |-  ( x  =  ( p ++  <" ( p `  0
) "> )  ->  ( x substr  <. 0 ,  N >. )  =  ( ( p ++  <" (
p `  0 ) "> ) substr  <. 0 ,  N >. ) )
3534eqeq2d 2471 . . . . . 6  |-  ( x  =  ( p ++  <" ( p `  0
) "> )  ->  ( p  =  ( x substr  <. 0 ,  N >. )  <->  p  =  (
( p ++  <" (
p `  0 ) "> ) substr  <. 0 ,  N >. ) ) )
3635rspcev 3210 . . . . 5  |-  ( ( ( p ++  <" (
p `  0 ) "> )  e.  D  /\  p  =  (
( p ++  <" (
p `  0 ) "> ) substr  <. 0 ,  N >. ) )  ->  E. x  e.  D  p  =  ( x substr  <.
0 ,  N >. ) )
3733, 36syl 16 . . . 4  |-  ( ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  /\  p  e.  ( ( V ClWWalksN  E ) `  N ) )  ->  E. x  e.  D  p  =  ( x substr  <.
0 ,  N >. ) )
381, 2clwwlkfv 24922 . . . . . . 7  |-  ( x  e.  D  ->  ( F `  x )  =  ( x substr  <. 0 ,  N >. ) )
3938eqeq2d 2471 . . . . . 6  |-  ( x  e.  D  ->  (
p  =  ( F `
 x )  <->  p  =  ( x substr  <. 0 ,  N >. ) ) )
4039adantl 466 . . . . 5  |-  ( ( ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  /\  p  e.  ( ( V ClWWalksN  E ) `
 N ) )  /\  x  e.  D
)  ->  ( p  =  ( F `  x )  <->  p  =  ( x substr  <. 0 ,  N >. ) ) )
4140rexbidva 2965 . . . 4  |-  ( ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  /\  p  e.  ( ( V ClWWalksN  E ) `  N ) )  -> 
( E. x  e.  D  p  =  ( F `  x )  <->  E. x  e.  D  p  =  ( x substr  <.
0 ,  N >. ) ) )
4237, 41mpbird 232 . . 3  |-  ( ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  /\  p  e.  ( ( V ClWWalksN  E ) `  N ) )  ->  E. x  e.  D  p  =  ( F `  x ) )
4342ralrimiva 2871 . 2  |-  ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  ->  A. p  e.  ( ( V ClWWalksN  E ) `  N ) E. x  e.  D  p  =  ( F `  x ) )
44 dffo3 6047 . 2  |-  ( F : D -onto-> ( ( V ClWWalksN  E ) `  N
)  <->  ( F : D
--> ( ( V ClWWalksN  E ) `
 N )  /\  A. p  e.  ( ( V ClWWalksN  E ) `  N
) E. x  e.  D  p  =  ( F `  x ) ) )
453, 43, 44sylanbrc 664 1  |-  ( ( V  e.  X  /\  E  e.  Y  /\  N  e.  NN )  ->  F : D -onto-> (
( V ClWWalksN  E ) `  N ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 973    = wceq 1395    e. wcel 1819   A.wral 2807   E.wrex 2808   {crab 2811   {cpr 4034   <.cop 4038    |-> cmpt 4515   ran crn 5009   -->wf 5590   -onto->wfo 5592   ` cfv 5594  (class class class)co 6296   0cc0 9509   1c1 9510    + caddc 9512    - cmin 9824   NNcn 10556  ..^cfzo 11821   #chash 12408  Word cword 12538   lastS clsw 12539   ++ cconcat 12540   <"cs1 12541   substr csubstr 12542   WWalksN cwwlkn 24805   ClWWalksN cclwwlkn 24876
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-rep 4568  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-uni 4252  df-int 4289  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-1st 6799  df-2nd 6800  df-recs 7060  df-rdg 7094  df-1o 7148  df-oadd 7152  df-er 7329  df-map 7440  df-pm 7441  df-en 7536  df-dom 7537  df-sdom 7538  df-fin 7539  df-card 8337  df-cda 8565  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-nn 10557  df-2 10615  df-n0 10817  df-z 10886  df-uz 11107  df-rp 11246  df-fz 11698  df-fzo 11822  df-hash 12409  df-word 12546  df-lsw 12547  df-concat 12548  df-s1 12549  df-substr 12550  df-wwlk 24806  df-wwlkn 24807  df-clwwlk 24878  df-clwwlkn 24879
This theorem is referenced by:  clwwlkf1o  24925
  Copyright terms: Public domain W3C validator