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

Theorem wwlkextfun 25027
Description: Lemma 1 for wwlkextbij 25031. (Contributed by Alexander van der Vekens, 7-Aug-2018.)
Hypotheses
Ref Expression
wwlkextbij.d  |-  D  =  { w  e. Word  V  |  ( ( # `  w )  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) }
wwlkextbij.r  |-  R  =  { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E }
wwlkextbij.f  |-  F  =  ( t  e.  D  |->  ( lastS  `  t )
)
Assertion
Ref Expression
wwlkextfun  |-  ( N  e.  NN0  ->  F : D
--> R )
Distinct variable groups:    t, D    n, E, w    t, N, w    t, R    n, V, t, w    n, W, t, w
Allowed substitution hints:    D( w, n)    R( w, n)    E( t)    F( w, t, n)    N( n)

Proof of Theorem wwlkextfun
StepHypRef Expression
1 fveq2 5805 . . . . . . 7  |-  ( w  =  t  ->  ( # `
 w )  =  ( # `  t
) )
21eqeq1d 2404 . . . . . 6  |-  ( w  =  t  ->  (
( # `  w )  =  ( N  + 
2 )  <->  ( # `  t
)  =  ( N  +  2 ) ) )
3 oveq1 6241 . . . . . . 7  |-  ( w  =  t  ->  (
w substr  <. 0 ,  ( N  +  1 )
>. )  =  (
t substr  <. 0 ,  ( N  +  1 )
>. ) )
43eqeq1d 2404 . . . . . 6  |-  ( w  =  t  ->  (
( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  <-> 
( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W ) )
5 fveq2 5805 . . . . . . . 8  |-  ( w  =  t  ->  ( lastS  `  w )  =  ( lastS  `  t ) )
65preq2d 4057 . . . . . . 7  |-  ( w  =  t  ->  { ( lastS  `  W ) ,  ( lastS  `  w ) }  =  { ( lastS  `  W ) ,  ( lastS  `  t
) } )
76eleq1d 2471 . . . . . 6  |-  ( w  =  t  ->  ( { ( lastS  `  W ) ,  ( lastS  `  w
) }  e.  ran  E  <->  { ( lastS  `  W ) ,  ( lastS  `  t
) }  e.  ran  E ) )
82, 4, 73anbi123d 1301 . . . . 5  |-  ( w  =  t  ->  (
( ( # `  w
)  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  w
) }  e.  ran  E )  <->  ( ( # `  t )  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >.
)  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E
) ) )
9 wwlkextbij.d . . . . 5  |-  D  =  { w  e. Word  V  |  ( ( # `  w )  =  ( N  +  2 )  /\  ( w substr  <. 0 ,  ( N  + 
1 ) >. )  =  W  /\  { ( lastS  `  W ) ,  ( lastS  `  w ) }  e.  ran  E ) }
108, 9elrab2 3208 . . . 4  |-  ( t  e.  D  <->  ( t  e. Word  V  /\  ( (
# `  t )  =  ( N  + 
2 )  /\  (
t substr  <. 0 ,  ( N  +  1 )
>. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) ) )
11 simpll 752 . . . . . . . . . . . 12  |-  ( ( ( t  e. Word  V  /\  N  e.  NN0 )  /\  ( # `  t
)  =  ( N  +  2 ) )  ->  t  e. Word  V
)
12 nn0re 10765 . . . . . . . . . . . . . . . 16  |-  ( N  e.  NN0  ->  N  e.  RR )
13 2re 10566 . . . . . . . . . . . . . . . . 17  |-  2  e.  RR
1413a1i 11 . . . . . . . . . . . . . . . 16  |-  ( N  e.  NN0  ->  2  e.  RR )
15 nn0ge0 10782 . . . . . . . . . . . . . . . 16  |-  ( N  e.  NN0  ->  0  <_  N )
16 2pos 10588 . . . . . . . . . . . . . . . . 17  |-  0  <  2
1716a1i 11 . . . . . . . . . . . . . . . 16  |-  ( N  e.  NN0  ->  0  <  2 )
1812, 14, 15, 17addgegt0d 10086 . . . . . . . . . . . . . . 15  |-  ( N  e.  NN0  ->  0  < 
( N  +  2 ) )
1918ad2antlr 725 . . . . . . . . . . . . . 14  |-  ( ( ( t  e. Word  V  /\  N  e.  NN0 )  /\  ( # `  t
)  =  ( N  +  2 ) )  ->  0  <  ( N  +  2 ) )
20 breq2 4398 . . . . . . . . . . . . . . 15  |-  ( (
# `  t )  =  ( N  + 
2 )  ->  (
0  <  ( # `  t
)  <->  0  <  ( N  +  2 ) ) )
2120adantl 464 . . . . . . . . . . . . . 14  |-  ( ( ( t  e. Word  V  /\  N  e.  NN0 )  /\  ( # `  t
)  =  ( N  +  2 ) )  ->  ( 0  < 
( # `  t )  <->  0  <  ( N  +  2 ) ) )
2219, 21mpbird 232 . . . . . . . . . . . . 13  |-  ( ( ( t  e. Word  V  /\  N  e.  NN0 )  /\  ( # `  t
)  =  ( N  +  2 ) )  ->  0  <  ( # `
 t ) )
23 hashgt0n0 12390 . . . . . . . . . . . . 13  |-  ( ( t  e. Word  V  /\  0  <  ( # `  t
) )  ->  t  =/=  (/) )
2411, 22, 23syl2anc 659 . . . . . . . . . . . 12  |-  ( ( ( t  e. Word  V  /\  N  e.  NN0 )  /\  ( # `  t
)  =  ( N  +  2 ) )  ->  t  =/=  (/) )
2511, 24jca 530 . . . . . . . . . . 11  |-  ( ( ( t  e. Word  V  /\  N  e.  NN0 )  /\  ( # `  t
)  =  ( N  +  2 ) )  ->  ( t  e. Word  V  /\  t  =/=  (/) ) )
2625expcom 433 . . . . . . . . . 10  |-  ( (
# `  t )  =  ( N  + 
2 )  ->  (
( t  e. Word  V  /\  N  e.  NN0 )  ->  ( t  e. Word  V  /\  t  =/=  (/) ) ) )
27263ad2ant1 1018 . . . . . . . . 9  |-  ( ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E )  ->  ( (
t  e. Word  V  /\  N  e.  NN0 )  -> 
( t  e. Word  V  /\  t  =/=  (/) ) ) )
2827expd 434 . . . . . . . 8  |-  ( ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E )  ->  ( t  e. Word  V  ->  ( N  e.  NN0  ->  ( t  e. Word  V  /\  t  =/=  (/) ) ) ) )
2928impcom 428 . . . . . . 7  |-  ( ( t  e. Word  V  /\  ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) )  ->  ( N  e.  NN0  ->  (
t  e. Word  V  /\  t  =/=  (/) ) ) )
3029impcom 428 . . . . . 6  |-  ( ( N  e.  NN0  /\  ( t  e. Word  V  /\  ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) ) )  -> 
( t  e. Word  V  /\  t  =/=  (/) ) )
31 lswcl 12549 . . . . . 6  |-  ( ( t  e. Word  V  /\  t  =/=  (/) )  ->  ( lastS  `  t )  e.  V
)
3230, 31syl 17 . . . . 5  |-  ( ( N  e.  NN0  /\  ( t  e. Word  V  /\  ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) ) )  -> 
( lastS  `  t )  e.  V )
33 simprr3 1047 . . . . 5  |-  ( ( N  e.  NN0  /\  ( t  e. Word  V  /\  ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) ) )  ->  { ( lastS  `  W ) ,  ( lastS  `  t
) }  e.  ran  E )
3432, 33jca 530 . . . 4  |-  ( ( N  e.  NN0  /\  ( t  e. Word  V  /\  ( ( # `  t
)  =  ( N  +  2 )  /\  ( t substr  <. 0 ,  ( N  +  1 ) >. )  =  W  /\  { ( lastS  `  W
) ,  ( lastS  `  t
) }  e.  ran  E ) ) )  -> 
( ( lastS  `  t
)  e.  V  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E
) )
3510, 34sylan2b 473 . . 3  |-  ( ( N  e.  NN0  /\  t  e.  D )  ->  ( ( lastS  `  t
)  e.  V  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E
) )
36 preq2 4051 . . . . 5  |-  ( n  =  ( lastS  `  t
)  ->  { ( lastS  `  W ) ,  n }  =  { ( lastS  `  W ) ,  ( lastS  `  t ) } )
3736eleq1d 2471 . . . 4  |-  ( n  =  ( lastS  `  t
)  ->  ( {
( lastS  `  W ) ,  n }  e.  ran  E  <->  { ( lastS  `  W ) ,  ( lastS  `  t
) }  e.  ran  E ) )
38 wwlkextbij.r . . . 4  |-  R  =  { n  e.  V  |  { ( lastS  `  W
) ,  n }  e.  ran  E }
3937, 38elrab2 3208 . . 3  |-  ( ( lastS  `  t )  e.  R  <->  ( ( lastS  `  t )  e.  V  /\  { ( lastS  `  W ) ,  ( lastS  `  t ) }  e.  ran  E ) )
4035, 39sylibr 212 . 2  |-  ( ( N  e.  NN0  /\  t  e.  D )  ->  ( lastS  `  t )  e.  R )
41 wwlkextbij.f . 2  |-  F  =  ( t  e.  D  |->  ( lastS  `  t )
)
4240, 41fmptd 5989 1  |-  ( N  e.  NN0  ->  F : D
--> R )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 367    /\ w3a 974    = wceq 1405    e. wcel 1842    =/= wne 2598   {crab 2757   (/)c0 3737   {cpr 3973   <.cop 3977   class class class wbr 4394    |-> cmpt 4452   ran crn 4943   -->wf 5521   ` cfv 5525  (class class class)co 6234   RRcr 9441   0cc0 9442   1c1 9443    + caddc 9445    < clt 9578   2c2 10546   NN0cn0 10756   #chash 12359  Word cword 12490   lastS clsw 12491   substr csubstr 12494
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 4506  ax-sep 4516  ax-nul 4524  ax-pow 4571  ax-pr 4629  ax-un 6530  ax-cnex 9498  ax-resscn 9499  ax-1cn 9500  ax-icn 9501  ax-addcl 9502  ax-addrcl 9503  ax-mulcl 9504  ax-mulrcl 9505  ax-mulcom 9506  ax-addass 9507  ax-mulass 9508  ax-distr 9509  ax-i2m1 9510  ax-1ne0 9511  ax-1rid 9512  ax-rnegex 9513  ax-rrecex 9514  ax-cnre 9515  ax-pre-lttri 9516  ax-pre-lttrn 9517  ax-pre-ltadd 9518  ax-pre-mulgt0 9519
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 2758  df-rex 2759  df-reu 2760  df-rmo 2761  df-rab 2762  df-v 3060  df-sbc 3277  df-csb 3373  df-dif 3416  df-un 3418  df-in 3420  df-ss 3427  df-pss 3429  df-nul 3738  df-if 3885  df-pw 3956  df-sn 3972  df-pr 3974  df-tp 3976  df-op 3978  df-uni 4191  df-int 4227  df-iun 4272  df-br 4395  df-opab 4453  df-mpt 4454  df-tr 4489  df-eprel 4733  df-id 4737  df-po 4743  df-so 4744  df-fr 4781  df-we 4783  df-ord 4824  df-on 4825  df-lim 4826  df-suc 4827  df-xp 4948  df-rel 4949  df-cnv 4950  df-co 4951  df-dm 4952  df-rn 4953  df-res 4954  df-ima 4955  df-iota 5489  df-fun 5527  df-fn 5528  df-f 5529  df-f1 5530  df-fo 5531  df-f1o 5532  df-fv 5533  df-riota 6196  df-ov 6237  df-oprab 6238  df-mpt2 6239  df-om 6639  df-1st 6738  df-2nd 6739  df-recs 6999  df-rdg 7033  df-1o 7087  df-oadd 7091  df-er 7268  df-en 7475  df-dom 7476  df-sdom 7477  df-fin 7478  df-card 8272  df-cda 8500  df-pnf 9580  df-mnf 9581  df-xr 9582  df-ltxr 9583  df-le 9584  df-sub 9763  df-neg 9764  df-nn 10497  df-2 10555  df-n0 10757  df-z 10826  df-uz 11046  df-fz 11644  df-fzo 11768  df-hash 12360  df-word 12498  df-lsw 12499
This theorem is referenced by:  wwlkextinj  25028  wwlkextsur  25029
  Copyright terms: Public domain W3C validator