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

Theorem wrdeqswrdlsw 12656
Description: Two words are equal iff they have the same length and the same prefix and the same last symbol. (Contributed by Alexander van der Vekens, 7-Aug-2018.)
Assertion
Ref Expression
wrdeqswrdlsw  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V )  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  ->  ( W  =  U  <->  ( ( # `  W )  =  (
# `  U )  /\  ( lastS  `  W )  =  ( lastS  `  U
)  /\  ( W substr  <.
0 ,  ( (
# `  W )  -  1 ) >.
)  =  ( U substr  <. 0 ,  ( (
# `  W )  -  1 ) >.
) ) ) )

Proof of Theorem wrdeqswrdlsw
Dummy variable  i is distinct from all other variables.
StepHypRef Expression
1 eqwrd 12564 . . 3  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( W  =  U  <-> 
( ( # `  W
)  =  ( # `  U )  /\  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( U `  i
) ) ) )
21adantr 465 . 2  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V )  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  ->  ( W  =  U  <->  ( ( # `  W )  =  (
# `  U )  /\  A. i  e.  ( 0..^ ( # `  W
) ) ( W `
 i )  =  ( U `  i
) ) ) )
3 0z 10882 . . . . . . 7  |-  0  e.  ZZ
4 lennncl 12545 . . . . . . . . . 10  |-  ( ( W  e. Word  V  /\  W  =/=  (/) )  ->  ( # `
 W )  e.  NN )
5 elnnuz 11128 . . . . . . . . . . 11  |-  ( (
# `  W )  e.  NN  <->  ( # `  W
)  e.  ( ZZ>= ` 
1 ) )
6 1e0p1 11014 . . . . . . . . . . . . 13  |-  1  =  ( 0  +  1 )
76fveq2i 5859 . . . . . . . . . . . 12  |-  ( ZZ>= ` 
1 )  =  (
ZZ>= `  ( 0  +  1 ) )
87eleq2i 2521 . . . . . . . . . . 11  |-  ( (
# `  W )  e.  ( ZZ>= `  1 )  <->  (
# `  W )  e.  ( ZZ>= `  ( 0  +  1 ) ) )
95, 8sylbb 197 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN  ->  ( # `  W
)  e.  ( ZZ>= `  ( 0  +  1 ) ) )
104, 9syl 16 . . . . . . . . 9  |-  ( ( W  e. Word  V  /\  W  =/=  (/) )  ->  ( # `
 W )  e.  ( ZZ>= `  ( 0  +  1 ) ) )
1110ad2ant2r 746 . . . . . . . 8  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V )  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  ->  ( # `  W
)  e.  ( ZZ>= `  ( 0  +  1 ) ) )
1211adantr 465 . . . . . . 7  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( # `
 W )  e.  ( ZZ>= `  ( 0  +  1 ) ) )
13 fzosplitsnm1 11872 . . . . . . 7  |-  ( ( 0  e.  ZZ  /\  ( # `  W )  e.  ( ZZ>= `  (
0  +  1 ) ) )  ->  (
0..^ ( # `  W
) )  =  ( ( 0..^ ( (
# `  W )  -  1 ) )  u.  { ( (
# `  W )  -  1 ) } ) )
143, 12, 13sylancr 663 . . . . . 6  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
0..^ ( # `  W
) )  =  ( ( 0..^ ( (
# `  W )  -  1 ) )  u.  { ( (
# `  W )  -  1 ) } ) )
1514raleqdv 3046 . . . . 5  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( A. i  e.  (
0..^ ( # `  W
) ) ( W `
 i )  =  ( U `  i
)  <->  A. i  e.  ( ( 0..^ ( (
# `  W )  -  1 ) )  u.  { ( (
# `  W )  -  1 ) } ) ( W `  i )  =  ( U `  i ) ) )
16 ralunb 3670 . . . . 5  |-  ( A. i  e.  ( (
0..^ ( ( # `  W )  -  1 ) )  u.  {
( ( # `  W
)  -  1 ) } ) ( W `
 i )  =  ( U `  i
)  <->  ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i )  /\  A. i  e.  { ( ( # `  W
)  -  1 ) }  ( W `  i )  =  ( U `  i ) ) )
1715, 16syl6bb 261 . . . 4  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( A. i  e.  (
0..^ ( # `  W
) ) ( W `
 i )  =  ( U `  i
)  <->  ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i )  /\  A. i  e.  { ( ( # `  W
)  -  1 ) }  ( W `  i )  =  ( U `  i ) ) ) )
18 ovex 6309 . . . . . . . 8  |-  ( (
# `  W )  -  1 )  e. 
_V
19 fveq2 5856 . . . . . . . . . 10  |-  ( i  =  ( ( # `  W )  -  1 )  ->  ( W `  i )  =  ( W `  ( (
# `  W )  -  1 ) ) )
20 fveq2 5856 . . . . . . . . . 10  |-  ( i  =  ( ( # `  W )  -  1 )  ->  ( U `  i )  =  ( U `  ( (
# `  W )  -  1 ) ) )
2119, 20eqeq12d 2465 . . . . . . . . 9  |-  ( i  =  ( ( # `  W )  -  1 )  ->  ( ( W `  i )  =  ( U `  i )  <->  ( W `  ( ( # `  W
)  -  1 ) )  =  ( U `
 ( ( # `  W )  -  1 ) ) ) )
2221ralsng 4049 . . . . . . . 8  |-  ( ( ( # `  W
)  -  1 )  e.  _V  ->  ( A. i  e.  { ( ( # `  W
)  -  1 ) }  ( W `  i )  =  ( U `  i )  <-> 
( W `  (
( # `  W )  -  1 ) )  =  ( U `  ( ( # `  W
)  -  1 ) ) ) )
2318, 22mp1i 12 . . . . . . 7  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( A. i  e.  { ( ( # `  W
)  -  1 ) }  ( W `  i )  =  ( U `  i )  <-> 
( W `  (
( # `  W )  -  1 ) )  =  ( U `  ( ( # `  W
)  -  1 ) ) ) )
24 oveq1 6288 . . . . . . . . . 10  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( ( # `
 W )  - 
1 )  =  ( ( # `  U
)  -  1 ) )
2524fveq2d 5860 . . . . . . . . 9  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( U `  ( ( # `  W
)  -  1 ) )  =  ( U `
 ( ( # `  U )  -  1 ) ) )
2625eqeq2d 2457 . . . . . . . 8  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( ( W `  ( ( # `
 W )  - 
1 ) )  =  ( U `  (
( # `  W )  -  1 ) )  <-> 
( W `  (
( # `  W )  -  1 ) )  =  ( U `  ( ( # `  U
)  -  1 ) ) ) )
2726adantl 466 . . . . . . 7  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( W `  (
( # `  W )  -  1 ) )  =  ( U `  ( ( # `  W
)  -  1 ) )  <->  ( W `  ( ( # `  W
)  -  1 ) )  =  ( U `
 ( ( # `  U )  -  1 ) ) ) )
28 lsw 12567 . . . . . . . . . . 11  |-  ( W  e. Word  V  ->  ( lastS  `  W )  =  ( W `  ( (
# `  W )  -  1 ) ) )
2928adantr 465 . . . . . . . . . 10  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( lastS  `  W )  =  ( W `  ( ( # `  W
)  -  1 ) ) )
3029eqcomd 2451 . . . . . . . . 9  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( W `  (
( # `  W )  -  1 ) )  =  ( lastS  `  W
) )
31 lsw 12567 . . . . . . . . . . 11  |-  ( U  e. Word  V  ->  ( lastS  `  U )  =  ( U `  ( (
# `  U )  -  1 ) ) )
3231adantl 466 . . . . . . . . . 10  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( lastS  `  U )  =  ( U `  ( ( # `  U
)  -  1 ) ) )
3332eqcomd 2451 . . . . . . . . 9  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( U `  (
( # `  U )  -  1 ) )  =  ( lastS  `  U
) )
3430, 33eqeq12d 2465 . . . . . . . 8  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( ( W `  ( ( # `  W
)  -  1 ) )  =  ( U `
 ( ( # `  U )  -  1 ) )  <->  ( lastS  `  W
)  =  ( lastS  `  U
) ) )
3534ad2antrr 725 . . . . . . 7  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( W `  (
( # `  W )  -  1 ) )  =  ( U `  ( ( # `  U
)  -  1 ) )  <->  ( lastS  `  W )  =  ( lastS  `  U
) ) )
3623, 27, 353bitrd 279 . . . . . 6  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( A. i  e.  { ( ( # `  W
)  -  1 ) }  ( W `  i )  =  ( U `  i )  <-> 
( lastS  `  W )  =  ( lastS  `  U )
) )
3736anbi2d 703 . . . . 5  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i )  /\  A. i  e.  { ( ( # `  W
)  -  1 ) }  ( W `  i )  =  ( U `  i ) )  <->  ( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i )  /\  ( lastS  `  W )  =  ( lastS  `  U )
) ) )
38 ancom 450 . . . . . 6  |-  ( ( A. i  e.  ( 0..^ ( ( # `  W )  -  1 ) ) ( W `
 i )  =  ( U `  i
)  /\  ( lastS  `  W
)  =  ( lastS  `  U
) )  <->  ( ( lastS  `  W )  =  ( lastS  `  U )  /\  A. i  e.  ( 0..^ ( ( # `  W
)  -  1 ) ) ( W `  i )  =  ( U `  i ) ) )
3938a1i 11 . . . . 5  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i )  /\  ( lastS  `  W )  =  ( lastS  `  U )
)  <->  ( ( lastS  `  W
)  =  ( lastS  `  U
)  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) ) )
40 eqid 2443 . . . . . . . 8  |-  ( (
# `  W )  -  1 )  =  ( ( # `  W
)  -  1 )
4140biantrur 506 . . . . . . 7  |-  ( ( ( lastS  `  W )  =  ( lastS  `  U )  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) )  <-> 
( ( ( # `  W )  -  1 )  =  ( (
# `  W )  -  1 )  /\  ( ( lastS  `  W )  =  ( lastS  `  U
)  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) ) )
4241a1i 11 . . . . . 6  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( ( lastS  `  W
)  =  ( lastS  `  U
)  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) )  <-> 
( ( ( # `  W )  -  1 )  =  ( (
# `  W )  -  1 )  /\  ( ( lastS  `  W )  =  ( lastS  `  U
)  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) ) ) )
43 an12 797 . . . . . 6  |-  ( ( ( ( # `  W
)  -  1 )  =  ( ( # `  W )  -  1 )  /\  ( ( lastS  `  W )  =  ( lastS  `  U )  /\  A. i  e.  ( 0..^ ( ( # `  W
)  -  1 ) ) ( W `  i )  =  ( U `  i ) ) )  <->  ( ( lastS  `  W )  =  ( lastS  `  U )  /\  (
( ( # `  W
)  -  1 )  =  ( ( # `  W )  -  1 )  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) ) )
4442, 43syl6bb 261 . . . . 5  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( ( lastS  `  W
)  =  ( lastS  `  U
)  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) )  <-> 
( ( lastS  `  W
)  =  ( lastS  `  U
)  /\  ( (
( # `  W )  -  1 )  =  ( ( # `  W
)  -  1 )  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) ) ) )
4537, 39, 443bitrd 279 . . . 4  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i )  /\  A. i  e.  { ( ( # `  W
)  -  1 ) }  ( W `  i )  =  ( U `  i ) )  <->  ( ( lastS  `  W
)  =  ( lastS  `  U
)  /\  ( (
( # `  W )  -  1 )  =  ( ( # `  W
)  -  1 )  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) ) ) )
46 simpll 753 . . . . . . 7  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( W  e. Word  V  /\  U  e. Word  V ) )
47 nnm1nn0 10844 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN  ->  ( ( # `
 W )  - 
1 )  e.  NN0 )
484, 47syl 16 . . . . . . . . 9  |-  ( ( W  e. Word  V  /\  W  =/=  (/) )  ->  (
( # `  W )  -  1 )  e. 
NN0 )
4948ad2ant2r 746 . . . . . . . 8  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V )  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  ->  ( ( # `  W )  -  1 )  e.  NN0 )
5049adantr 465 . . . . . . 7  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( # `  W )  -  1 )  e. 
NN0 )
51 lencl 12544 . . . . . . . . . 10  |-  ( W  e. Word  V  ->  ( # `
 W )  e. 
NN0 )
52 nn0re 10811 . . . . . . . . . . 11  |-  ( (
# `  W )  e.  NN0  ->  ( # `  W
)  e.  RR )
5352lem1d 10486 . . . . . . . . . 10  |-  ( (
# `  W )  e.  NN0  ->  ( ( # `
 W )  - 
1 )  <_  ( # `
 W ) )
5451, 53syl 16 . . . . . . . . 9  |-  ( W  e. Word  V  ->  (
( # `  W )  -  1 )  <_ 
( # `  W ) )
5554adantr 465 . . . . . . . 8  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( ( # `  W
)  -  1 )  <_  ( # `  W
) )
5655ad2antrr 725 . . . . . . 7  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( # `  W )  -  1 )  <_ 
( # `  W ) )
57 breq2 4441 . . . . . . . . . 10  |-  ( (
# `  U )  =  ( # `  W
)  ->  ( (
( # `  W )  -  1 )  <_ 
( # `  U )  <-> 
( ( # `  W
)  -  1 )  <_  ( # `  W
) ) )
5857eqcoms 2455 . . . . . . . . 9  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( (
( # `  W )  -  1 )  <_ 
( # `  U )  <-> 
( ( # `  W
)  -  1 )  <_  ( # `  W
) ) )
5958adantl 466 . . . . . . . 8  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( ( # `  W
)  -  1 )  <_  ( # `  U
)  <->  ( ( # `  W )  -  1 )  <_  ( # `  W
) ) )
6056, 59mpbird 232 . . . . . . 7  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( # `  W )  -  1 )  <_ 
( # `  U ) )
61 swrdeq 12653 . . . . . . 7  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V )  /\  ( ( (
# `  W )  -  1 )  e. 
NN0  /\  ( ( # `
 W )  - 
1 )  e.  NN0 )  /\  ( ( (
# `  W )  -  1 )  <_ 
( # `  W )  /\  ( ( # `  W )  -  1 )  <_  ( # `  U
) ) )  -> 
( ( W substr  <. 0 ,  ( ( # `  W )  -  1 ) >. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. )  <->  ( ( (
# `  W )  -  1 )  =  ( ( # `  W
)  -  1 )  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) ) )
6246, 50, 50, 56, 60, 61syl122anc 1238 . . . . . 6  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( W substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. )  <->  ( ( (
# `  W )  -  1 )  =  ( ( # `  W
)  -  1 )  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) ) )
6362bicomd 201 . . . . 5  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( ( ( # `  W )  -  1 )  =  ( (
# `  W )  -  1 )  /\  A. i  e.  ( 0..^ ( ( # `  W
)  -  1 ) ) ( W `  i )  =  ( U `  i ) )  <->  ( W substr  <. 0 ,  ( ( # `  W )  -  1 ) >. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. ) ) )
6463anbi2d 703 . . . 4  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  (
( ( lastS  `  W
)  =  ( lastS  `  U
)  /\  ( (
( # `  W )  -  1 )  =  ( ( # `  W
)  -  1 )  /\  A. i  e.  ( 0..^ ( (
# `  W )  -  1 ) ) ( W `  i
)  =  ( U `
 i ) ) )  <->  ( ( lastS  `  W
)  =  ( lastS  `  U
)  /\  ( W substr  <.
0 ,  ( (
# `  W )  -  1 ) >.
)  =  ( U substr  <. 0 ,  ( (
# `  W )  -  1 ) >.
) ) ) )
6517, 45, 643bitrd 279 . . 3  |-  ( ( ( ( W  e. Word  V  /\  U  e. Word  V
)  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  /\  ( # `
 W )  =  ( # `  U
) )  ->  ( A. i  e.  (
0..^ ( # `  W
) ) ( W `
 i )  =  ( U `  i
)  <->  ( ( lastS  `  W
)  =  ( lastS  `  U
)  /\  ( W substr  <.
0 ,  ( (
# `  W )  -  1 ) >.
)  =  ( U substr  <. 0 ,  ( (
# `  W )  -  1 ) >.
) ) ) )
6665pm5.32da 641 . 2  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V )  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  ->  ( ( (
# `  W )  =  ( # `  U
)  /\  A. i  e.  ( 0..^ ( # `  W ) ) ( W `  i )  =  ( U `  i ) )  <->  ( ( # `
 W )  =  ( # `  U
)  /\  ( ( lastS  `  W )  =  ( lastS  `  U )  /\  ( W substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. ) ) ) ) )
67 3anass 978 . . . 4  |-  ( ( ( # `  W
)  =  ( # `  U )  /\  ( lastS  `  W )  =  ( lastS  `  U )  /\  ( W substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. ) )  <->  ( ( # `
 W )  =  ( # `  U
)  /\  ( ( lastS  `  W )  =  ( lastS  `  U )  /\  ( W substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. ) ) ) )
6867bicomi 202 . . 3  |-  ( ( ( # `  W
)  =  ( # `  U )  /\  (
( lastS  `  W )  =  ( lastS  `  U )  /\  ( W substr  <. 0 ,  ( ( # `  W )  -  1 ) >. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. ) ) )  <->  ( ( # `
 W )  =  ( # `  U
)  /\  ( lastS  `  W
)  =  ( lastS  `  U
)  /\  ( W substr  <.
0 ,  ( (
# `  W )  -  1 ) >.
)  =  ( U substr  <. 0 ,  ( (
# `  W )  -  1 ) >.
) ) )
6968a1i 11 . 2  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V )  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  ->  ( ( (
# `  W )  =  ( # `  U
)  /\  ( ( lastS  `  W )  =  ( lastS  `  U )  /\  ( W substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. )  =  ( U substr  <. 0 ,  ( ( # `  W
)  -  1 )
>. ) ) )  <->  ( ( # `
 W )  =  ( # `  U
)  /\  ( lastS  `  W
)  =  ( lastS  `  U
)  /\  ( W substr  <.
0 ,  ( (
# `  W )  -  1 ) >.
)  =  ( U substr  <. 0 ,  ( (
# `  W )  -  1 ) >.
) ) ) )
702, 66, 693bitrd 279 1  |-  ( ( ( W  e. Word  V  /\  U  e. Word  V )  /\  ( W  =/=  (/)  /\  U  =/=  (/) ) )  ->  ( W  =  U  <->  ( ( # `  W )  =  (
# `  U )  /\  ( lastS  `  W )  =  ( lastS  `  U
)  /\  ( W substr  <.
0 ,  ( (
# `  W )  -  1 ) >.
)  =  ( U substr  <. 0 ,  ( (
# `  W )  -  1 ) >.
) ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    <-> wb 184    /\ wa 369    /\ w3a 974    = wceq 1383    e. wcel 1804    =/= wne 2638   A.wral 2793   _Vcvv 3095    u. cun 3459   (/)c0 3770   {csn 4014   <.cop 4020   class class class wbr 4437   ` cfv 5578  (class class class)co 6281   0cc0 9495   1c1 9496    + caddc 9498    <_ cle 9632    - cmin 9810   NNcn 10543   NN0cn0 10802   ZZcz 10871   ZZ>=cuz 11092  ..^cfzo 11806   #chash 12387  Word cword 12516   lastS clsw 12517   substr csubstr 12520
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1605  ax-4 1618  ax-5 1691  ax-6 1734  ax-7 1776  ax-8 1806  ax-9 1808  ax-10 1823  ax-11 1828  ax-12 1840  ax-13 1985  ax-ext 2421  ax-rep 4548  ax-sep 4558  ax-nul 4566  ax-pow 4615  ax-pr 4676  ax-un 6577  ax-cnex 9551  ax-resscn 9552  ax-1cn 9553  ax-icn 9554  ax-addcl 9555  ax-addrcl 9556  ax-mulcl 9557  ax-mulrcl 9558  ax-mulcom 9559  ax-addass 9560  ax-mulass 9561  ax-distr 9562  ax-i2m1 9563  ax-1ne0 9564  ax-1rid 9565  ax-rnegex 9566  ax-rrecex 9567  ax-cnre 9568  ax-pre-lttri 9569  ax-pre-lttrn 9570  ax-pre-ltadd 9571  ax-pre-mulgt0 9572
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 975  df-3an 976  df-tru 1386  df-ex 1600  df-nf 1604  df-sb 1727  df-eu 2272  df-mo 2273  df-clab 2429  df-cleq 2435  df-clel 2438  df-nfc 2593  df-ne 2640  df-nel 2641  df-ral 2798  df-rex 2799  df-reu 2800  df-rmo 2801  df-rab 2802  df-v 3097  df-sbc 3314  df-csb 3421  df-dif 3464  df-un 3466  df-in 3468  df-ss 3475  df-pss 3477  df-nul 3771  df-if 3927  df-pw 3999  df-sn 4015  df-pr 4017  df-tp 4019  df-op 4021  df-uni 4235  df-int 4272  df-iun 4317  df-br 4438  df-opab 4496  df-mpt 4497  df-tr 4531  df-eprel 4781  df-id 4785  df-po 4790  df-so 4791  df-fr 4828  df-we 4830  df-ord 4871  df-on 4872  df-lim 4873  df-suc 4874  df-xp 4995  df-rel 4996  df-cnv 4997  df-co 4998  df-dm 4999  df-rn 5000  df-res 5001  df-ima 5002  df-iota 5541  df-fun 5580  df-fn 5581  df-f 5582  df-f1 5583  df-fo 5584  df-f1o 5585  df-fv 5586  df-riota 6242  df-ov 6284  df-oprab 6285  df-mpt2 6286  df-om 6686  df-1st 6785  df-2nd 6786  df-recs 7044  df-rdg 7078  df-1o 7132  df-oadd 7136  df-er 7313  df-en 7519  df-dom 7520  df-sdom 7521  df-fin 7522  df-card 8323  df-cda 8551  df-pnf 9633  df-mnf 9634  df-xr 9635  df-ltxr 9636  df-le 9637  df-sub 9812  df-neg 9813  df-nn 10544  df-2 10601  df-n0 10803  df-z 10872  df-uz 11093  df-fz 11684  df-fzo 11807  df-hash 12388  df-word 12524  df-lsw 12525  df-substr 12528
This theorem is referenced by:  wwlkextinj  24708
  Copyright terms: Public domain W3C validator