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

Theorem wrdeqswrdlsw 12364
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 12286 . . 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 10678 . . . . . . 7  |-  0  e.  ZZ
4 lennncl 12271 . . . . . . . . . 10  |-  ( ( W  e. Word  V  /\  W  =/=  (/) )  ->  ( # `
 W )  e.  NN )
5 elnnuz 10918 . . . . . . . . . . 11  |-  ( (
# `  W )  e.  NN  <->  ( # `  W
)  e.  ( ZZ>= ` 
1 ) )
6 1e0p1 10804 . . . . . . . . . . . . 13  |-  1  =  ( 0  +  1 )
76fveq2i 5715 . . . . . . . . . . . 12  |-  ( ZZ>= ` 
1 )  =  (
ZZ>= `  ( 0  +  1 ) )
87eleq2i 2507 . . . . . . . . . . 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 11629 . . . . . . 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 2944 . . . . 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 3558 . . . . 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 6137 . . . . . . . 8  |-  ( (
# `  W )  -  1 )  e. 
_V
19 fveq2 5712 . . . . . . . . . 10  |-  ( i  =  ( ( # `  W )  -  1 )  ->  ( W `  i )  =  ( W `  ( (
# `  W )  -  1 ) ) )
20 fveq2 5712 . . . . . . . . . 10  |-  ( i  =  ( ( # `  W )  -  1 )  ->  ( U `  i )  =  ( U `  ( (
# `  W )  -  1 ) ) )
2119, 20eqeq12d 2457 . . . . . . . . 9  |-  ( i  =  ( ( # `  W )  -  1 )  ->  ( ( W `  i )  =  ( U `  i )  <->  ( W `  ( ( # `  W
)  -  1 ) )  =  ( U `
 ( ( # `  W )  -  1 ) ) ) )
2221ralsng 3933 . . . . . . . 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 6119 . . . . . . . . . 10  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( ( # `
 W )  - 
1 )  =  ( ( # `  U
)  -  1 ) )
2524fveq2d 5716 . . . . . . . . 9  |-  ( (
# `  W )  =  ( # `  U
)  ->  ( U `  ( ( # `  W
)  -  1 ) )  =  ( U `
 ( ( # `  U )  -  1 ) ) )
2625eqeq2d 2454 . . . . . . . 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 12287 . . . . . . . . . . 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 2448 . . . . . . . . 9  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( W `  (
( # `  W )  -  1 ) )  =  ( lastS  `  W
) )
31 lsw 12287 . . . . . . . . . . 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 2448 . . . . . . . . 9  |-  ( ( W  e. Word  V  /\  U  e. Word  V )  ->  ( U `  (
( # `  U )  -  1 ) )  =  ( lastS  `  U
) )
3430, 33eqeq12d 2457 . . . . . . . 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 795 . . . . . 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 10642 . . . . . . . . . 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 12270 . . . . . . . . . 10  |-  ( W  e. Word  V  ->  ( # `
 W )  e. 
NN0 )
52 nn0re 10609 . . . . . . . . . . 11  |-  ( (
# `  W )  e.  NN0  ->  ( # `  W
)  e.  RR )
5352lem1d 10287 . . . . . . . . . 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 4317 . . . . . . . . . 10  |-  ( (
# `  U )  =  ( # `  W
)  ->  ( (
( # `  W )  -  1 )  <_ 
( # `  U )  <-> 
( ( # `  W
)  -  1 )  <_  ( # `  W
) ) )
5857eqcoms 2446 . . . . . . . . 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 12361 . . . . . . 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 1227 . . . . . 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 969 . . . 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 965    = wceq 1369    e. wcel 1756    =/= wne 2620   A.wral 2736   _Vcvv 2993    u. cun 3347   (/)c0 3658   {csn 3898   <.cop 3904   class class class wbr 4313   ` cfv 5439  (class class class)co 6112   0cc0 9303   1c1 9304    + caddc 9306    <_ cle 9440    - cmin 9616   NNcn 10343   NN0cn0 10600   ZZcz 10667   ZZ>=cuz 10882  ..^cfzo 11569   #chash 12124  Word cword 12242   lastS clsw 12243   substr csubstr 12246
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 2423  ax-rep 4424  ax-sep 4434  ax-nul 4442  ax-pow 4491  ax-pr 4552  ax-un 6393  ax-cnex 9359  ax-resscn 9360  ax-1cn 9361  ax-icn 9362  ax-addcl 9363  ax-addrcl 9364  ax-mulcl 9365  ax-mulrcl 9366  ax-mulcom 9367  ax-addass 9368  ax-mulass 9369  ax-distr 9370  ax-i2m1 9371  ax-1ne0 9372  ax-1rid 9373  ax-rnegex 9374  ax-rrecex 9375  ax-cnre 9376  ax-pre-lttri 9377  ax-pre-lttrn 9378  ax-pre-ltadd 9379  ax-pre-mulgt0 9380
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2622  df-nel 2623  df-ral 2741  df-rex 2742  df-reu 2743  df-rab 2745  df-v 2995  df-sbc 3208  df-csb 3310  df-dif 3352  df-un 3354  df-in 3356  df-ss 3363  df-pss 3365  df-nul 3659  df-if 3813  df-pw 3883  df-sn 3899  df-pr 3901  df-tp 3903  df-op 3905  df-uni 4113  df-int 4150  df-iun 4194  df-br 4314  df-opab 4372  df-mpt 4373  df-tr 4407  df-eprel 4653  df-id 4657  df-po 4662  df-so 4663  df-fr 4700  df-we 4702  df-ord 4743  df-on 4744  df-lim 4745  df-suc 4746  df-xp 4867  df-rel 4868  df-cnv 4869  df-co 4870  df-dm 4871  df-rn 4872  df-res 4873  df-ima 4874  df-iota 5402  df-fun 5441  df-fn 5442  df-f 5443  df-f1 5444  df-fo 5445  df-f1o 5446  df-fv 5447  df-riota 6073  df-ov 6115  df-oprab 6116  df-mpt2 6117  df-om 6498  df-1st 6598  df-2nd 6599  df-recs 6853  df-rdg 6887  df-1o 6941  df-oadd 6945  df-er 7122  df-en 7332  df-dom 7333  df-sdom 7334  df-fin 7335  df-card 8130  df-pnf 9441  df-mnf 9442  df-xr 9443  df-ltxr 9444  df-le 9445  df-sub 9618  df-neg 9619  df-nn 10344  df-n0 10601  df-z 10668  df-uz 10883  df-fz 11459  df-fzo 11570  df-hash 12125  df-word 12250  df-lsw 12251  df-substr 12254
This theorem is referenced by:  wwlkextinj  30388
  Copyright terms: Public domain W3C validator