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

Theorem 2swrd2eqwrdeq 12551
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 12247 . . . . 5  |-  ( W  e. Word  V  ->  ( # `
 W )  e. 
NN0 )
2 1z 10674 . . . . . . . . . 10  |-  1  e.  ZZ
3 nn0z 10667 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  ( # `  W
)  e.  ZZ )
4 zltp1le 10692 . . . . . . . . . 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 10433 . . . . . . . . . . . 12  |-  ( 1  +  1 )  =  2
76a1i 11 . . . . . . . . . . 11  |-  ( (
# `  W )  e.  NN0  ->  ( 1  +  1 )  =  2 )
87breq1d 4300 . . . . . . . . . 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 10594 . . . . . . . 8  |-  2  e.  NN0
13 simpl 457 . . . . . . . 8  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  ( # `
 W )  e. 
NN0 )
14 nn0sub 10628 . . . . . . . 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 9385 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  0  e.  RR )
19 1red 9399 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  1  e.  RR )
20 nn0re 10586 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  ( # `  W
)  e.  RR )
2118, 19, 203jca 1168 . . . . . . . . 9  |-  ( (
# `  W )  e.  NN0  ->  ( 0  e.  RR  /\  1  e.  RR  /\  ( # `  W )  e.  RR ) )
22 0lt1 9860 . . . . . . . . 9  |-  0  <  1
23 lttr 9449 . . . . . . . . . 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 10654 . . . . . . 7  |-  ( (
# `  W )  e.  NN  <->  ( ( # `  W )  e.  ZZ  /\  0  <  ( # `  W ) ) )
2817, 26, 27sylanbrc 664 . . . . . 6  |-  ( ( ( # `  W
)  e.  NN0  /\  1  <  ( # `  W
) )  ->  ( # `
 W )  e.  NN )
29 2pos 10411 . . . . . . . 8  |-  0  <  2
30 2re 10389 . . . . . . . . . 10  |-  2  e.  RR
3130a1i 11 . . . . . . . . 9  |-  ( (
# `  W )  e.  NN0  ->  2  e.  RR )
3231, 20ltsubposd 9923 . . . . . . . 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 11585 . . . . . 6  |-  ( ( ( # `  W
)  -  2 )  e.  ( 0..^ (
# `  W )
)  <->  ( ( (
# `  W )  -  2 )  e. 
NN0  /\  ( # `  W
)  e.  NN  /\  ( ( # `  W
)  -  2 )  <  ( # `  W
) ) )
3616, 28, 34, 35syl3anbrc 1172 . . . . 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 1007 . . 3  |-  ( ( W  e. Word  V  /\  U  e. Word  V  /\  1  <  ( # `  W
) )  ->  (
( # `  W )  -  2 )  e.  ( 0..^ ( # `  W ) ) )
39 2swrdeqwrdeq 12345 . . 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 1263 . 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 12550 . . . . . . . . 9  |-  ( ( W  e. Word  V  /\  1  <  ( # `  W
) )  ->  ( W substr  <. ( ( # `  W )  -  2 ) ,  ( # `  W ) >. )  =  <" ( W `
 ( ( # `  W )  -  2 ) ) ( lastS  `  W
) "> )
42413adant2 1007 . . . . . . . 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 4294 . . . . . . . . . . 11  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( 1  <  ( # `  W
)  <->  1  <  ( # `
 U ) ) )
45443anbi3d 1295 . . . . . . . . . 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 12550 . . . . . . . . . . 11  |-  ( ( U  e. Word  V  /\  1  <  ( # `  U
) )  ->  ( U substr  <. ( ( # `  U )  -  2 ) ,  ( # `  U ) >. )  =  <" ( U `
 ( ( # `  U )  -  2 ) ) ( lastS  `  U
) "> )
47463adant1 1006 . . . . . . . . . 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 6096 . . . . . . . . . . . 12  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( ( # `
 W )  - 
2 )  =  ( ( # `  U
)  -  2 ) )
51 id 22 . . . . . . . . . . . 12  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( # `  W
)  =  ( # `  U ) )
5250, 51opeq12d 4065 . . . . . . . . . . 11  |-  ( (
# `  W )  =  ( # `  U
)  ->  <. ( (
# `  W )  -  2 ) ,  ( # `  W
) >.  =  <. (
( # `  U )  -  2 ) ,  ( # `  U
) >. )
5352oveq2d 6105 . . . . . . . . . 10  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( U substr  <.
( ( # `  W
)  -  2 ) ,  ( # `  W
) >. )  =  ( U substr  <. ( ( # `  U )  -  2 ) ,  ( # `  U ) >. )
)
5453eqeq1d 2449 . . . . . . . . 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 2455 . . . . . 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 5699 . . . . . . . 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 5699 . . . . . . . 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 5699 . . . . . . . 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 5699 . . . . . . . 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 12541 . . . . . . 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 1219 . . . . . 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 12300 . . . . . . . . 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 6096 . . . . . . . . . . . 12  |-  ( (
# `  U )  =  ( # `  W
)  ->  ( ( # `
 U )  - 
2 )  =  ( ( # `  W
)  -  2 ) )
7170fveq2d 5693 . . . . . . . . . . 11  |-  ( (
# `  U )  =  ( # `  W
)  ->  ( U `  ( ( # `  U
)  -  2 ) )  =  ( U `
 ( ( # `  W )  -  2 ) ) )
7271eqcoms 2444 . . . . . . . . . 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 2452 . . . . . . . 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 12300 . . . . . . . 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 969 . . . 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 965    = wceq 1369    e. wcel 1756   _Vcvv 2970   <.cop 3881   class class class wbr 4290   ` cfv 5416  (class class class)co 6089   RRcr 9279   0cc0 9280   1c1 9281    + caddc 9283    < clt 9416    <_ cle 9417    - cmin 9593   NNcn 10320   2c2 10369   NN0cn0 10577   ZZcz 10644  ..^cfzo 11546   #chash 12101  Word cword 12219   lastS clsw 12220   <"cs1 12222   substr csubstr 12223   <"cs2 12466
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2422  ax-rep 4401  ax-sep 4411  ax-nul 4419  ax-pow 4468  ax-pr 4529  ax-un 6370  ax-cnex 9336  ax-resscn 9337  ax-1cn 9338  ax-icn 9339  ax-addcl 9340  ax-addrcl 9341  ax-mulcl 9342  ax-mulrcl 9343  ax-mulcom 9344  ax-addass 9345  ax-mulass 9346  ax-distr 9347  ax-i2m1 9348  ax-1ne0 9349  ax-1rid 9350  ax-rnegex 9351  ax-rrecex 9352  ax-cnre 9353  ax-pre-lttri 9354  ax-pre-lttrn 9355  ax-pre-ltadd 9356  ax-pre-mulgt0 9357
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-fal 1375  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-reu 2720  df-rab 2722  df-v 2972  df-sbc 3185  df-csb 3287  df-dif 3329  df-un 3331  df-in 3333  df-ss 3340  df-pss 3342  df-nul 3636  df-if 3790  df-pw 3860  df-sn 3876  df-pr 3878  df-tp 3880  df-op 3882  df-uni 4090  df-int 4127  df-iun 4171  df-br 4291  df-opab 4349  df-mpt 4350  df-tr 4384  df-eprel 4630  df-id 4634  df-po 4639  df-so 4640  df-fr 4677  df-we 4679  df-ord 4720  df-on 4721  df-lim 4722  df-suc 4723  df-xp 4844  df-rel 4845  df-cnv 4846  df-co 4847  df-dm 4848  df-rn 4849  df-res 4850  df-ima 4851  df-iota 5379  df-fun 5418  df-fn 5419  df-f 5420  df-f1 5421  df-fo 5422  df-f1o 5423  df-fv 5424  df-riota 6050  df-ov 6092  df-oprab 6093  df-mpt2 6094  df-om 6475  df-1st 6575  df-2nd 6576  df-recs 6830  df-rdg 6864  df-1o 6918  df-oadd 6922  df-er 7099  df-en 7309  df-dom 7310  df-sdom 7311  df-fin 7312  df-card 8107  df-pnf 9418  df-mnf 9419  df-xr 9420  df-ltxr 9421  df-le 9422  df-sub 9595  df-neg 9596  df-nn 10321  df-2 10378  df-n0 10578  df-z 10645  df-uz 10860  df-fz 11436  df-fzo 11547  df-hash 12102  df-word 12227  df-lsw 12228  df-concat 12229  df-s1 12230  df-substr 12231  df-s2 12473
This theorem is referenced by:  numclwlk1lem2f1  30684
  Copyright terms: Public domain W3C validator