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

Theorem 2swrd2eqwrdeq 12848
Description: Two words of length at least 2 are equal if and only if they have the same prefix and the same two single symbols suffix. (Contributed by AV, 24-Sep-2018.) (Revised by Mario Carneiro/AV, 23-Oct-2018.)
Assertion
Ref Expression
2swrd2eqwrdeq  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  ->  ( W  =  U  <->  ( ( # `
 W )  =  ( # `  U
)  /\  ( ( W substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W `  ( ( # `
 W )  - 
2 ) )  =  ( U `  (
( # `  W )  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) ) ) ) )

Proof of Theorem 2swrd2eqwrdeq
StepHypRef Expression
1 lencl 12522 . . . . 5  |-  ( W  e. Word  V  ->  ( # `
 W )  e. 
NN0 )
2 1z 10890 . . . . . . . . . 10  |-  1  e.  ZZ
3 nn0z 10883 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  ( # `  W
)  e.  ZZ )
4 zltp1le 10908 . . . . . . . . . 10  |-  ( ( 1  e.  ZZ  /\  ( # `  W )  e.  ZZ )  -> 
( 1  <  ( # `
 W )  <->  ( 1  +  1 )  <_ 
( # `  W ) ) )
52, 3, 4sylancr 663 . . . . . . . . 9  |-  ( (
# `  W )  e.  NN0  ->  ( 1  <  ( # `  W
)  <->  ( 1  +  1 )  <_  ( # `
 W ) ) )
6 1p1e2 10645 . . . . . . . . . . . 12  |-  ( 1  +  1 )  =  2
76a1i 11 . . . . . . . . . . 11  |-  ( (
# `  W )  e.  NN0  ->  ( 1  +  1 )  =  2 )
87breq1d 4457 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  ( (
1  +  1 )  <_  ( # `  W
)  <->  2  <_  ( # `
 W ) ) )
98biimpd 207 . . . . . . . . 9  |-  ( (
# `  W )  e.  NN0  ->  ( (
1  +  1 )  <_  ( # `  W
)  ->  2  <_  (
# `  W )
) )
105, 9sylbid 215 . . . . . . . 8  |-  ( (
# `  W )  e.  NN0  ->  ( 1  <  ( # `  W
)  ->  2  <_  (
# `  W )
) )
1110imp 429 . . . . . . 7  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  2  <_  ( # `  W
) )
12 2nn0 10808 . . . . . . . 8  |-  2  e.  NN0
13 simpl 457 . . . . . . . 8  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  ( # `
 W )  e. 
NN0 )
14 nn0sub 10842 . . . . . . . 8  |-  ( ( 2  e.  NN0  /\  ( # `  W )  e.  NN0 )  -> 
( 2  <_  ( # `
 W )  <->  ( ( # `
 W )  - 
2 )  e.  NN0 ) )
1512, 13, 14sylancr 663 . . . . . . 7  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  (
2  <_  ( # `  W
)  <->  ( ( # `  W )  -  2 )  e.  NN0 )
)
1611, 15mpbid 210 . . . . . 6  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  (
( # `  W )  -  2 )  e. 
NN0 )
173adantr 465 . . . . . . 7  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  ( # `
 W )  e.  ZZ )
18 0red 9593 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  0  e.  RR )
19 1red 9607 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  1  e.  RR )
20 nn0re 10800 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  ( # `  W
)  e.  RR )
2118, 19, 203jca 1176 . . . . . . . . 9  |-  ( (
# `  W )  e.  NN0  ->  ( 0  e.  RR  /\  1  e.  RR  /\  ( # `  W )  e.  RR ) )
22 0lt1 10071 . . . . . . . . 9  |-  0  <  1
23 lttr 9657 . . . . . . . . . 10  |-  ( ( 0  e.  RR  /\  1  e.  RR  /\  ( # `
 W )  e.  RR )  ->  (
( 0  <  1  /\  1  <  ( # `  W ) )  -> 
0  <  ( # `  W
) ) )
2423expd 436 . . . . . . . . 9  |-  ( ( 0  e.  RR  /\  1  e.  RR  /\  ( # `
 W )  e.  RR )  ->  (
0  <  1  ->  ( 1  <  ( # `  W )  ->  0  <  ( # `  W
) ) ) )
2521, 22, 24mpisyl 18 . . . . . . . 8  |-  ( (
# `  W )  e.  NN0  ->  ( 1  <  ( # `  W
)  ->  0  <  (
# `  W )
) )
2625imp 429 . . . . . . 7  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  0  <  ( # `  W
) )
27 elnnz 10870 . . . . . . 7  |-  ( (
# `  W )  e.  NN  <->  ( ( # `  W )  e.  ZZ  /\  0  <  ( # `  W ) ) )
2817, 26, 27sylanbrc 664 . . . . . 6  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  ( # `
 W )  e.  NN )
29 2pos 10623 . . . . . . . 8  |-  0  <  2
30 2re 10601 . . . . . . . . . 10  |-  2  e.  RR
3130a1i 11 . . . . . . . . 9  |-  ( (
# `  W )  e.  NN0  ->  2  e.  RR )
3231, 20ltsubposd 10134 . . . . . . . 8  |-  ( (
# `  W )  e.  NN0  ->  ( 0  <  2  <->  ( ( # `
 W )  - 
2 )  <  ( # `
 W ) ) )
3329, 32mpbii 211 . . . . . . 7  |-  ( (
# `  W )  e.  NN0  ->  ( ( # `
 W )  - 
2 )  <  ( # `
 W ) )
3433adantr 465 . . . . . 6  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  (
( # `  W )  -  2 )  < 
( # `  W ) )
35 elfzo0 11827 . . . . . 6  |-  ( ( ( # `  W
)  -  2 )  e.  ( 0..^ (
# `  W )
)  <->  ( ( (
# `  W )  -  2 )  e. 
NN0  /\  ( # `  W
)  e.  NN  /\  ( ( # `  W
)  -  2 )  <  ( # `  W
) ) )
3616, 28, 34, 35syl3anbrc 1180 . . . . 5  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  (
( # `  W )  -  2 )  e.  ( 0..^ ( # `  W ) ) )
371, 36sylan 471 . . . 4  |-  ( ( W  e. Word  V  /\  1  <  ( # `  W
) )  ->  (
( # `  W )  -  2 )  e.  ( 0..^ ( # `  W ) ) )
38373adant2 1015 . . 3  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  ->  (
( # `  W )  -  2 )  e.  ( 0..^ ( # `  W ) ) )
39 2swrdeqwrdeq 12635 . . 3  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  (
( # `  W )  -  2 )  e.  ( 0..^ ( # `  W ) ) )  ->  ( W  =  U  <->  ( ( # `  W )  =  (
# `  U )  /\  ( ( W substr  <. 0 ,  ( ( # `  W )  -  2 ) >. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  ( U substr  <. (
( # `  W )  -  2 ) ,  ( # `  W
) >. ) ) ) ) )
4038, 39syld3an3 1273 . 2  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  ->  ( W  =  U  <->  ( ( # `
 W )  =  ( # `  U
)  /\  ( ( W substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  ( U substr  <. (
( # `  W )  -  2 ) ,  ( # `  W
) >. ) ) ) ) )
41 swrd2lsw 12847 . . . . . . . . 9  |-  ( ( W  e. Word  V  /\  1  <  ( # `  W
) )  ->  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  <" ( W `
 ( ( # `  W )  -  2 ) ) ( lastS  `  W
) "> )
42413adant2 1015 . . . . . . . 8  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  ->  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  <" ( W `
 ( ( # `  W )  -  2 ) ) ( lastS  `  W
) "> )
4342adantr 465 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  <" ( W `
 ( ( # `  W )  -  2 ) ) ( lastS  `  W
) "> )
44 breq2 4451 . . . . . . . . . . 11  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( 1  <  ( # `  W
)  <->  1  <  ( # `
 U ) ) )
45443anbi3d 1305 . . . . . . . . . 10  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  < 
( # `  W ) )  <->  ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  U ) ) ) )
46 swrd2lsw 12847 . . . . . . . . . . 11  |-  ( ( U  e. Word  V  /\  1  <  ( # `  U
) )  ->  ( U substr  <. ( ( # `  U )  -  2 ) ,  ( # `  U ) >. )  =  <" ( U `
 ( ( # `  U )  -  2 ) ) ( lastS  `  U
) "> )
47463adant1 1014 . . . . . . . . . 10  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  U
) )  ->  ( U substr  <. ( ( # `  U )  -  2 ) ,  ( # `  U ) >. )  =  <" ( U `
 ( ( # `  U )  -  2 ) ) ( lastS  `  U
) "> )
4845, 47syl6bi 228 . . . . . . . . 9  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  < 
( # `  W ) )  ->  ( U substr  <.
( ( # `  U
)  -  2 ) ,  ( # `  U
) >. )  =  <" ( U `  (
( # `  U )  -  2 ) ) ( lastS  `  U ) "> ) )
4948impcom 430 . . . . . . . 8  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( U substr  <. ( ( # `  U )  -  2 ) ,  ( # `  U ) >. )  =  <" ( U `
 ( ( # `  U )  -  2 ) ) ( lastS  `  U
) "> )
50 oveq1 6289 . . . . . . . . . . . 12  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( ( # `
 W )  - 
2 )  =  ( ( # `  U
)  -  2 ) )
51 id 22 . . . . . . . . . . . 12  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( # `  W
)  =  ( # `  U ) )
5250, 51opeq12d 4221 . . . . . . . . . . 11  |-  ( (
# `  W )  =  ( # `  U
)  ->  <. ( (
# `  W )  -  2 ) ,  ( # `  W
) >.  =  <. (
( # `  U )  -  2 ) ,  ( # `  U
) >. )
5352oveq2d 6298 . . . . . . . . . 10  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( U substr  <.
( ( # `  W
)  -  2 ) ,  ( # `  W
) >. )  =  ( U substr  <. ( ( # `  U )  -  2 ) ,  ( # `  U ) >. )
)
5453eqeq1d 2469 . . . . . . . . 9  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( ( U substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  <" ( U `
 ( ( # `  U )  -  2 ) ) ( lastS  `  U
) ">  <->  ( U substr  <.
( ( # `  U
)  -  2 ) ,  ( # `  U
) >. )  =  <" ( U `  (
( # `  U )  -  2 ) ) ( lastS  `  U ) "> ) )
5554adantl 466 . . . . . . . 8  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( U substr  <. ( (
# `  W )  -  2 ) ,  ( # `  W
) >. )  =  <" ( U `  (
( # `  U )  -  2 ) ) ( lastS  `  U ) ">  <->  ( U substr  <. (
( # `  U )  -  2 ) ,  ( # `  U
) >. )  =  <" ( U `  (
( # `  U )  -  2 ) ) ( lastS  `  U ) "> ) )
5649, 55mpbird 232 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( U substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  <" ( U `
 ( ( # `  U )  -  2 ) ) ( lastS  `  U
) "> )
5743, 56eqeq12d 2489 . . . . . 6  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( W substr  <. ( (
# `  W )  -  2 ) ,  ( # `  W
) >. )  =  ( U substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  <->  <" ( W `  ( ( # `  W
)  -  2 ) ) ( lastS  `  W
) ">  =  <" ( U `  ( ( # `  U
)  -  2 ) ) ( lastS  `  U
) "> )
)
58 fvex 5874 . . . . . . . 8  |-  ( W `
 ( ( # `  W )  -  2 ) )  e.  _V
5958a1i 11 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( W `  ( ( # `
 W )  - 
2 ) )  e. 
_V )
60 fvex 5874 . . . . . . . 8  |-  ( lastS  `  W
)  e.  _V
6160a1i 11 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( lastS  `  W )  e.  _V )
62 fvex 5874 . . . . . . . 8  |-  ( U `
 ( ( # `  U )  -  2 ) )  e.  _V
6362a1i 11 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( U `  ( ( # `
 U )  - 
2 ) )  e. 
_V )
64 fvex 5874 . . . . . . . 8  |-  ( lastS  `  U
)  e.  _V
6564a1i 11 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( lastS  `  U )  e.  _V )
66 s2eq2s1eq 12838 . . . . . . 7  |-  ( ( ( ( W `  ( ( # `  W
)  -  2 ) )  e.  _V  /\  ( lastS  `  W )  e. 
_V )  /\  (
( U `  (
( # `  U )  -  2 ) )  e.  _V  /\  ( lastS  `  U )  e.  _V ) )  ->  ( <" ( W `  ( ( # `  W
)  -  2 ) ) ( lastS  `  W
) ">  =  <" ( U `  ( ( # `  U
)  -  2 ) ) ( lastS  `  U
) ">  <->  ( <" ( W `  (
( # `  W )  -  2 ) ) ">  =  <" ( U `  (
( # `  U )  -  2 ) ) ">  /\  <" ( lastS  `  W ) ">  =  <" ( lastS  `  U ) "> ) ) )
6759, 61, 63, 65, 66syl22anc 1229 . . . . . 6  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( <" ( W `  ( ( # `  W
)  -  2 ) ) ( lastS  `  W
) ">  =  <" ( U `  ( ( # `  U
)  -  2 ) ) ( lastS  `  U
) ">  <->  ( <" ( W `  (
( # `  W )  -  2 ) ) ">  =  <" ( U `  (
( # `  U )  -  2 ) ) ">  /\  <" ( lastS  `  W ) ">  =  <" ( lastS  `  U ) "> ) ) )
68 s111 12580 . . . . . . . . 9  |-  ( ( ( W `  (
( # `  W )  -  2 ) )  e.  _V  /\  ( U `  ( ( # `
 U )  - 
2 ) )  e. 
_V )  ->  ( <" ( W `  ( ( # `  W
)  -  2 ) ) ">  =  <" ( U `  ( ( # `  U
)  -  2 ) ) ">  <->  ( W `  ( ( # `  W
)  -  2 ) )  =  ( U `
 ( ( # `  U )  -  2 ) ) ) )
6958, 63, 68sylancr 663 . . . . . . . 8  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( <" ( W `  ( ( # `  W
)  -  2 ) ) ">  =  <" ( U `  ( ( # `  U
)  -  2 ) ) ">  <->  ( W `  ( ( # `  W
)  -  2 ) )  =  ( U `
 ( ( # `  U )  -  2 ) ) ) )
70 oveq1 6289 . . . . . . . . . . . 12  |-  ( (
# `  U )  =  ( # `  W
)  ->  ( ( # `
 U )  - 
2 )  =  ( ( # `  W
)  -  2 ) )
7170fveq2d 5868 . . . . . . . . . . 11  |-  ( (
# `  U )  =  ( # `  W
)  ->  ( U `  ( ( # `  U
)  -  2 ) )  =  ( U `
 ( ( # `  W )  -  2 ) ) )
7271eqcoms 2479 . . . . . . . . . 10  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( U `  ( ( # `  U
)  -  2 ) )  =  ( U `
 ( ( # `  W )  -  2 ) ) )
7372adantl 466 . . . . . . . . 9  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( U `  ( ( # `
 U )  - 
2 ) )  =  ( U `  (
( # `  W )  -  2 ) ) )
7473eqeq2d 2481 . . . . . . . 8  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( W `  (
( # `  W )  -  2 ) )  =  ( U `  ( ( # `  U
)  -  2 ) )  <->  ( W `  ( ( # `  W
)  -  2 ) )  =  ( U `
 ( ( # `  W )  -  2 ) ) ) )
7569, 74bitrd 253 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( <" ( W `  ( ( # `  W
)  -  2 ) ) ">  =  <" ( U `  ( ( # `  U
)  -  2 ) ) ">  <->  ( W `  ( ( # `  W
)  -  2 ) )  =  ( U `
 ( ( # `  W )  -  2 ) ) ) )
76 s111 12580 . . . . . . . 8  |-  ( ( ( lastS  `  W )  e.  _V  /\  ( lastS  `  U
)  e.  _V )  ->  ( <" ( lastS  `  W ) ">  =  <" ( lastS  `  U
) ">  <->  ( lastS  `  W
)  =  ( lastS  `  U
) ) )
7760, 65, 76sylancr 663 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( <" ( lastS  `  W
) ">  =  <" ( lastS  `  U
) ">  <->  ( lastS  `  W
)  =  ( lastS  `  U
) ) )
7875, 77anbi12d 710 . . . . . 6  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( <" ( W `
 ( ( # `  W )  -  2 ) ) ">  =  <" ( U `
 ( ( # `  U )  -  2 ) ) ">  /\ 
<" ( lastS  `  W
) ">  =  <" ( lastS  `  U
) "> )  <->  ( ( W `  (
( # `  W )  -  2 ) )  =  ( U `  ( ( # `  W
)  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) ) ) )
7957, 67, 783bitrd 279 . . . . 5  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( W substr  <. ( (
# `  W )  -  2 ) ,  ( # `  W
) >. )  =  ( U substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  <->  ( ( W `  (
( # `  W )  -  2 ) )  =  ( U `  ( ( # `  W
)  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) ) ) )
8079anbi2d 703 . . . 4  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( ( W substr  <. 0 ,  ( ( # `  W )  -  2 ) >. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  ( U substr  <. (
( # `  W )  -  2 ) ,  ( # `  W
) >. ) )  <->  ( ( W substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  (
( W `  (
( # `  W )  -  2 ) )  =  ( U `  ( ( # `  W
)  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) ) ) ) )
81 3anass 977 . . . 4  |-  ( ( ( W substr  <. 0 ,  ( ( # `  W )  -  2 ) >. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W `  ( ( # `
 W )  - 
2 ) )  =  ( U `  (
( # `  W )  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) )  <->  ( ( W substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  (
( W `  (
( # `  W )  -  2 ) )  =  ( U `  ( ( # `  W
)  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) ) ) )
8280, 81syl6bbr 263 . . 3  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( ( W substr  <. 0 ,  ( ( # `  W )  -  2 ) >. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  ( U substr  <. (
( # `  W )  -  2 ) ,  ( # `  W
) >. ) )  <->  ( ( W substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W `  ( ( # `
 W )  - 
2 ) )  =  ( U `  (
( # `  W )  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) ) ) )
8382pm5.32da 641 . 2  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  ->  (
( ( # `  W
)  =  ( # `  U )  /\  (
( W substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  ( U substr  <. (
( # `  W )  -  2 ) ,  ( # `  W
) >. ) ) )  <-> 
( ( # `  W
)  =  ( # `  U )  /\  (
( W substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W `  ( ( # `
 W )  - 
2 ) )  =  ( U `  (
( # `  W )  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) ) ) ) )
8440, 83bitrd 253 1  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  ->  ( W  =  U  <->  ( ( # `
 W )  =  ( # `  U
)  /\  ( ( W substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  2 )
>. )  /\  ( W `  ( ( # `
 W )  - 
2 ) )  =  ( U `  (
( # `  W )  -  2 ) )  /\  ( lastS  `  W
)  =  ( lastS  `  U
) ) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 973    = wceq 1379    e. wcel 1767   _Vcvv 3113   <.cop 4033   class class class wbr 4447   ` cfv 5586  (class class class)co 6282   RRcr 9487   0cc0 9488   1c1 9489    + caddc 9491    < clt 9624    <_ cle 9625    - cmin 9801   NNcn 10532   2c2 10581   NN0cn0 10791   ZZcz 10860  ..^cfzo 11788   #chash 12367  Word cword 12494   lastS clsw 12495   <"cs1 12497   substr csubstr 12498   <"cs2 12763
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-rep 4558  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6574  ax-cnex 9544  ax-resscn 9545  ax-1cn 9546  ax-icn 9547  ax-addcl 9548  ax-addrcl 9549  ax-mulcl 9550  ax-mulrcl 9551  ax-mulcom 9552  ax-addass 9553  ax-mulass 9554  ax-distr 9555  ax-i2m1 9556  ax-1ne0 9557  ax-1rid 9558  ax-rnegex 9559  ax-rrecex 9560  ax-cnre 9561  ax-pre-lttri 9562  ax-pre-lttrn 9563  ax-pre-ltadd 9564  ax-pre-mulgt0 9565
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-fal 1385  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-int 4283  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5549  df-fun 5588  df-fn 5589  df-f 5590  df-f1 5591  df-fo 5592  df-f1o 5593  df-fv 5594  df-riota 6243  df-ov 6285  df-oprab 6286  df-mpt2 6287  df-om 6679  df-1st 6781  df-2nd 6782  df-recs 7039  df-rdg 7073  df-1o 7127  df-oadd 7131  df-er 7308  df-en 7514  df-dom 7515  df-sdom 7516  df-fin 7517  df-card 8316  df-pnf 9626  df-mnf 9627  df-xr 9628  df-ltxr 9629  df-le 9630  df-sub 9803  df-neg 9804  df-nn 10533  df-2 10590  df-n0 10792  df-z 10861  df-uz 11079  df-fz 11669  df-fzo 11789  df-hash 12368  df-word 12502  df-lsw 12503  df-concat 12504  df-s1 12505  df-substr 12506  df-s2 12770
This theorem is referenced by:  numclwlk1lem2f1  24768
  Copyright terms: Public domain W3C validator