Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  signsvfn Structured version   Unicode version

Theorem signsvfn 26998
Description: Number of changes in a word compared to a shorter word. (Contributed by Thierry Arnoux, 12-Oct-2018.)
Hypotheses
Ref Expression
signsv.p  |-  .+^  =  ( a  e.  { -u
1 ,  0 ,  1 } ,  b  e.  { -u 1 ,  0 ,  1 }  |->  if ( b  =  0 ,  a ,  b ) )
signsv.w  |-  W  =  { <. ( Base `  ndx ) ,  { -u 1 ,  0 ,  1 } >. ,  <. ( +g  `  ndx ) , 
.+^  >. }
signsv.t  |-  T  =  ( f  e. Word  RR  |->  ( n  e.  (
0..^ ( # `  f
) )  |->  ( W 
gsumg  ( i  e.  ( 0 ... n ) 
|->  (sgn `  ( f `  i ) ) ) ) ) )
signsv.v  |-  V  =  ( f  e. Word  RR  |->  sum_ j  e.  ( 1..^ ( # `  f
) ) if ( ( ( T `  f ) `  j
)  =/=  ( ( T `  f ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
Assertion
Ref Expression
signsvfn  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( V `
 ( F concat  <" K "> ) )  =  ( ( V `  F )  +  if ( ( ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  x.  K
)  <  0 , 
1 ,  0 ) ) )
Distinct variable groups:    a, b,  .+^    f, i, n, F    f, K, i, n    f, W, i, n    i, a, j, n, F, b    K, a, b, j, f    T, a    f, b, T, j, n
Allowed substitution hints:    .+^ ( f, i,
j, n)    T( i)    V( f, i, j, n, a, b)    W( j, a, b)

Proof of Theorem signsvfn
StepHypRef Expression
1 simpl 457 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  F  e.  (Word  RR  \  { (/) } ) )
21eldifad 3355 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  F  e. Word  RR )
3 simpr 461 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  K  e.  RR )
43s1cld 12309 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  <" K ">  e. Word  RR )
5 ccatcl 12289 . . . . . 6  |-  ( ( F  e. Word  RR  /\  <" K ">  e. Word  RR )  ->  ( F concat  <" K "> )  e. Word  RR )
62, 4, 5syl2anc 661 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( F concat  <" K "> )  e. Word  RR )
7 signsv.p . . . . . 6  |-  .+^  =  ( a  e.  { -u
1 ,  0 ,  1 } ,  b  e.  { -u 1 ,  0 ,  1 }  |->  if ( b  =  0 ,  a ,  b ) )
8 signsv.w . . . . . 6  |-  W  =  { <. ( Base `  ndx ) ,  { -u 1 ,  0 ,  1 } >. ,  <. ( +g  `  ndx ) , 
.+^  >. }
9 signsv.t . . . . . 6  |-  T  =  ( f  e. Word  RR  |->  ( n  e.  (
0..^ ( # `  f
) )  |->  ( W 
gsumg  ( i  e.  ( 0 ... n ) 
|->  (sgn `  ( f `  i ) ) ) ) ) )
10 signsv.v . . . . . 6  |-  V  =  ( f  e. Word  RR  |->  sum_ j  e.  ( 1..^ ( # `  f
) ) if ( ( ( T `  f ) `  j
)  =/=  ( ( T `  f ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
117, 8, 9, 10signsvvfval 26994 . . . . 5  |-  ( ( F concat  <" K "> )  e. Word  RR  ->  ( V `  ( F concat  <" K "> ) )  =  sum_ j  e.  ( 1..^ ( # `  ( F concat  <" K "> ) ) ) if ( ( ( T `
 ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 ) )
126, 11syl 16 . . . 4  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( V `  ( F concat  <" K "> ) )  =  sum_ j  e.  ( 1..^ ( # `  ( F concat  <" K "> ) ) ) if ( ( ( T `
 ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 ) )
13 ccatlen 12290 . . . . . . . 8  |-  ( ( F  e. Word  RR  /\  <" K ">  e. Word  RR )  ->  ( # `
 ( F concat  <" K "> ) )  =  ( ( # `  F
)  +  ( # `  <" K "> ) ) )
142, 4, 13syl2anc 661 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  ( F concat  <" K "> ) )  =  ( ( # `  F
)  +  ( # `  <" K "> ) ) )
15 s1len 12311 . . . . . . . 8  |-  ( # `  <" K "> )  =  1
1615oveq2i 6117 . . . . . . 7  |-  ( (
# `  F )  +  ( # `  <" K "> )
)  =  ( (
# `  F )  +  1 )
1714, 16syl6eq 2491 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  ( F concat  <" K "> ) )  =  ( ( # `  F
)  +  1 ) )
1817oveq2d 6122 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( 1..^ ( # `  ( F concat  <" K "> ) ) )  =  ( 1..^ ( ( # `  F
)  +  1 ) ) )
1918sumeq1d 13193 . . . 4  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  -> 
sum_ j  e.  ( 1..^ ( # `  ( F concat  <" K "> ) ) ) if ( ( ( T `
 ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  sum_ j  e.  ( 1..^ ( ( # `  F
)  +  1 ) ) if ( ( ( T `  ( F concat  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 ) )
20 eldifsn 4015 . . . . . . . 8  |-  ( F  e.  (Word  RR  \  { (/) } )  <->  ( F  e. Word  RR  /\  F  =/=  (/) ) )
21 lennncl 12265 . . . . . . . 8  |-  ( ( F  e. Word  RR  /\  F  =/=  (/) )  ->  ( # `
 F )  e.  NN )
2220, 21sylbi 195 . . . . . . 7  |-  ( F  e.  (Word  RR  \  { (/) } )  -> 
( # `  F )  e.  NN )
23 nnuz 10911 . . . . . . 7  |-  NN  =  ( ZZ>= `  1 )
2422, 23syl6eleq 2533 . . . . . 6  |-  ( F  e.  (Word  RR  \  { (/) } )  -> 
( # `  F )  e.  ( ZZ>= `  1
) )
2524adantr 465 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  F
)  e.  ( ZZ>= ` 
1 ) )
26 ax-1cn 9355 . . . . . . 7  |-  1  e.  CC
2726a1i 11 . . . . . 6  |-  ( ( ( ( F  e.  (Word  RR  \  { (/)
} )  /\  K  e.  RR )  /\  j  e.  ( 1 ... ( # `
 F ) ) )  /\  ( ( T `  ( F concat  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) )  ->  1  e.  CC )
28 0cnd 9394 . . . . . 6  |-  ( ( ( ( F  e.  (Word  RR  \  { (/)
} )  /\  K  e.  RR )  /\  j  e.  ( 1 ... ( # `
 F ) ) )  /\  -.  (
( T `  ( F concat  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) )  ->  0  e.  CC )
2927, 28ifclda 3836 . . . . 5  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1 ... ( # `  F ) ) )  ->  if ( ( ( T `  ( F concat  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  e.  CC )
30 fveq2 5706 . . . . . . 7  |-  ( j  =  ( # `  F
)  ->  ( ( T `  ( F concat  <" K "> ) ) `  j
)  =  ( ( T `  ( F concat  <" K "> ) ) `  ( # `
 F ) ) )
31 oveq1 6113 . . . . . . . 8  |-  ( j  =  ( # `  F
)  ->  ( j  -  1 )  =  ( ( # `  F
)  -  1 ) )
3231fveq2d 5710 . . . . . . 7  |-  ( j  =  ( # `  F
)  ->  ( ( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) )  =  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) )
3330, 32neeq12d 2638 . . . . . 6  |-  ( j  =  ( # `  F
)  ->  ( (
( T `  ( F concat  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) )  <->  ( ( T `
 ( F concat  <" K "> ) ) `  ( # `  F ) )  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ) )
3433ifbid 3826 . . . . 5  |-  ( j  =  ( # `  F
)  ->  if (
( ( T `  ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( T `
 ( F concat  <" K "> ) ) `  ( # `  F ) )  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) )
3525, 29, 34fzosump1 13236 . . . 4  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  -> 
sum_ j  e.  ( 1..^ ( ( # `  F )  +  1 ) ) if ( ( ( T `  ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  (
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  +  if ( ( ( T `
 ( F concat  <" K "> ) ) `  ( # `  F ) )  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) ) )
3612, 19, 353eqtrd 2479 . . 3  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( V `  ( F concat  <" K "> ) )  =  (
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  +  if ( ( ( T `
 ( F concat  <" K "> ) ) `  ( # `  F ) )  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) ) )
3736adantlr 714 . 2  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( V `
 ( F concat  <" K "> ) )  =  ( sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  +  if ( ( ( T `
 ( F concat  <" K "> ) ) `  ( # `  F ) )  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) ) )
382adantr 465 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  ->  F  e. Word  RR )
393adantr 465 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  ->  K  e.  RR )
40 1nn0 10610 . . . . . . . . . . . . 13  |-  1  e.  NN0
41 nn0uz 10910 . . . . . . . . . . . . 13  |-  NN0  =  ( ZZ>= `  0 )
4240, 41eleqtri 2515 . . . . . . . . . . . 12  |-  1  e.  ( ZZ>= `  0 )
43 fzoss1 11591 . . . . . . . . . . . 12  |-  ( 1  e.  ( ZZ>= `  0
)  ->  ( 1..^ ( # `  F
) )  C_  (
0..^ ( # `  F
) ) )
4442, 43ax-mp 5 . . . . . . . . . . 11  |-  ( 1..^ ( # `  F
) )  C_  (
0..^ ( # `  F
) )
4544a1i 11 . . . . . . . . . 10  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( 1..^ ( # `  F ) )  C_  ( 0..^ ( # `  F
) ) )
4645sselda 3371 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ( 0..^ ( # `  F
) ) )
477, 8, 9, 10signstfvp 26987 . . . . . . . . 9  |-  ( ( F  e. Word  RR  /\  K  e.  RR  /\  j  e.  ( 0..^ ( # `  F ) ) )  ->  ( ( T `
 ( F concat  <" K "> ) ) `  j )  =  ( ( T `  F
) `  j )
)
4838, 39, 46, 47syl3anc 1218 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( T `  ( F concat  <" K "> ) ) `  j )  =  ( ( T `  F
) `  j )
)
49 elfzoel2 11567 . . . . . . . . . . . . 13  |-  ( j  e.  ( 1..^ (
# `  F )
)  ->  ( # `  F
)  e.  ZZ )
5049adantl 466 . . . . . . . . . . . 12  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( # `  F )  e.  ZZ )
51 eluzmn 26950 . . . . . . . . . . . 12  |-  ( ( ( # `  F
)  e.  ZZ  /\  1  e.  NN0 )  -> 
( # `  F )  e.  ( ZZ>= `  (
( # `  F )  -  1 ) ) )
5250, 40, 51sylancl 662 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( # `  F )  e.  ( ZZ>= `  (
( # `  F )  -  1 ) ) )
53 fzoss2 11592 . . . . . . . . . . 11  |-  ( (
# `  F )  e.  ( ZZ>= `  ( ( # `
 F )  - 
1 ) )  -> 
( 0..^ ( (
# `  F )  -  1 ) ) 
C_  ( 0..^ (
# `  F )
) )
5452, 53syl 16 . . . . . . . . . 10  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( 0..^ ( (
# `  F )  -  1 ) ) 
C_  ( 0..^ (
# `  F )
) )
55 simpr 461 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ( 1..^ ( # `  F
) ) )
56 elfzoelz 11568 . . . . . . . . . . . . 13  |-  ( j  e.  ( 1..^ (
# `  F )
)  ->  j  e.  ZZ )
5756adantl 466 . . . . . . . . . . . 12  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ZZ )
58 elfzom1b 11641 . . . . . . . . . . . 12  |-  ( ( j  e.  ZZ  /\  ( # `  F )  e.  ZZ )  -> 
( j  e.  ( 1..^ ( # `  F
) )  <->  ( j  -  1 )  e.  ( 0..^ ( (
# `  F )  -  1 ) ) ) )
5957, 50, 58syl2anc 661 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  e.  ( 1..^ ( # `  F
) )  <->  ( j  -  1 )  e.  ( 0..^ ( (
# `  F )  -  1 ) ) ) )
6055, 59mpbid 210 . . . . . . . . . 10  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  -  1 )  e.  ( 0..^ ( ( # `  F
)  -  1 ) ) )
6154, 60sseldd 3372 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  -  1 )  e.  ( 0..^ ( # `  F
) ) )
627, 8, 9, 10signstfvp 26987 . . . . . . . . 9  |-  ( ( F  e. Word  RR  /\  K  e.  RR  /\  (
j  -  1 )  e.  ( 0..^ (
# `  F )
) )  ->  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) )  =  ( ( T `  F ) `
 ( j  - 
1 ) ) )
6338, 39, 61, 62syl3anc 1218 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( T `  ( F concat  <" K "> ) ) `  ( j  -  1 ) )  =  ( ( T `  F
) `  ( j  -  1 ) ) )
6448, 63neeq12d 2638 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( ( T `
 ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) )  <->  ( ( T `
 F ) `  j )  =/=  (
( T `  F
) `  ( j  -  1 ) ) ) )
6564ifbid 3826 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  ->  if ( ( ( T `
 ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( T `
 F ) `  j )  =/=  (
( T `  F
) `  ( j  -  1 ) ) ,  1 ,  0 ) )
6665sumeq2dv 13195 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  -> 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
677, 8, 9, 10signsvvfval 26994 . . . . . 6  |-  ( F  e. Word  RR  ->  ( V `
 F )  = 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
682, 67syl 16 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( V `  F
)  =  sum_ j  e.  ( 1..^ ( # `  F ) ) if ( ( ( T `
 F ) `  j )  =/=  (
( T `  F
) `  ( j  -  1 ) ) ,  1 ,  0 ) )
6966, 68eqtr4d 2478 . . . 4  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  -> 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  ( V `  F ) )
7069adantlr 714 . . 3  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  sum_ j  e.  ( 1..^ ( # `  F ) ) if ( ( ( T `
 ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  ( V `  F ) )
717, 8, 9, 10signstfvn 26985 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( ( T `  ( F concat  <" K "> ) ) `  ( # `  F ) )  =  ( ( ( T `  F
) `  ( ( # `
 F )  - 
1 ) )  .+^  (sgn `  K ) ) )
7271adantlr 714 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  ( F concat  <" K "> ) ) `  ( # `
 F ) )  =  ( ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  .+^  (sgn `  K ) ) )
732adantlr 714 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  F  e. Word  RR )
74 simpr 461 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  K  e.  RR )
7522ad2antrr 725 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( # `  F )  e.  NN )
76 fzo0end 11634 . . . . . . . 8  |-  ( (
# `  F )  e.  NN  ->  ( ( # `
 F )  - 
1 )  e.  ( 0..^ ( # `  F
) ) )
7775, 76syl 16 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( (
# `  F )  -  1 )  e.  ( 0..^ ( # `  F ) ) )
787, 8, 9, 10signstfvp 26987 . . . . . . 7  |-  ( ( F  e. Word  RR  /\  K  e.  RR  /\  (
( # `  F )  -  1 )  e.  ( 0..^ ( # `  F ) ) )  ->  ( ( T `
 ( F concat  <" K "> ) ) `  ( ( # `  F
)  -  1 ) )  =  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) ) )
7973, 74, 77, 78syl3anc 1218 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) )  =  ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) ) )
8072, 79neeq12d 2638 . . . . 5  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( ( T `  ( F concat  <" K "> ) ) `  ( # `
 F ) )  =/=  ( ( T `
 ( F concat  <" K "> ) ) `  ( ( # `  F
)  -  1 ) )  <->  ( ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  .+^  (sgn `  K ) )  =/=  ( ( T `  F ) `  (
( # `  F )  -  1 ) ) ) )
817, 8, 9, 10signstfvcl 26989 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  ( ( # `
 F )  - 
1 )  e.  ( 0..^ ( # `  F
) ) )  -> 
( ( T `  F ) `  (
( # `  F )  -  1 ) )  e.  { -u 1 ,  1 } )
8277, 81syldan 470 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  e.  { -u 1 ,  1 } )
8374rexrd 9448 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  K  e. 
RR* )
84 sgncl 26936 . . . . . . 7  |-  ( K  e.  RR*  ->  (sgn `  K )  e.  { -u 1 ,  0 ,  1 } )
8583, 84syl 16 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  K )  e.  { -u 1 ,  0 ,  1 } )
867, 8signswch 26977 . . . . . 6  |-  ( ( ( ( T `  F ) `  (
( # `  F )  -  1 ) )  e.  { -u 1 ,  1 }  /\  (sgn `  K )  e. 
{ -u 1 ,  0 ,  1 } )  ->  ( ( ( ( T `  F
) `  ( ( # `
 F )  - 
1 ) )  .+^  (sgn `  K ) )  =/=  ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) )  <->  ( ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  x.  (sgn `  K ) )  <  0 ) )
8782, 85, 86syl2anc 661 . . . . 5  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( ( ( T `  F ) `  (
( # `  F )  -  1 ) ) 
.+^  (sgn `  K )
)  =/=  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  <->  ( (
( T `  F
) `  ( ( # `
 F )  - 
1 ) )  x.  (sgn `  K )
)  <  0 ) )
88 sgnsgn 26946 . . . . . . . . 9  |-  ( K  e.  RR*  ->  (sgn `  (sgn `  K ) )  =  (sgn `  K
) )
8983, 88syl 16 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  (sgn `  K ) )  =  (sgn `  K
) )
9089oveq2d 6122 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( (sgn
`  ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) ) )  x.  (sgn `  (sgn `  K )
) )  =  ( (sgn `  ( ( T `  F ) `  ( ( # `  F
)  -  1 ) ) )  x.  (sgn `  K ) ) )
9190breq1d 4317 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( (sgn `  ( ( T `  F ) `  ( ( # `  F
)  -  1 ) ) )  x.  (sgn `  (sgn `  K )
) )  <  0  <->  ( (sgn `  ( ( T `  F ) `  ( ( # `  F
)  -  1 ) ) )  x.  (sgn `  K ) )  <  0 ) )
92 neg1rr 10441 . . . . . . . . 9  |-  -u 1  e.  RR
93 1re 9400 . . . . . . . . 9  |-  1  e.  RR
94 prssi 4044 . . . . . . . . 9  |-  ( (
-u 1  e.  RR  /\  1  e.  RR )  ->  { -u 1 ,  1 }  C_  RR )
9592, 93, 94mp2an 672 . . . . . . . 8  |-  { -u
1 ,  1 } 
C_  RR
9695, 82sseldi 3369 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  e.  RR )
97 sgnclre 26937 . . . . . . . 8  |-  ( K  e.  RR  ->  (sgn `  K )  e.  RR )
9874, 97syl 16 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  K )  e.  RR )
99 sgnmulsgn 26947 . . . . . . 7  |-  ( ( ( ( T `  F ) `  (
( # `  F )  -  1 ) )  e.  RR  /\  (sgn `  K )  e.  RR )  ->  ( ( ( ( T `  F
) `  ( ( # `
 F )  - 
1 ) )  x.  (sgn `  K )
)  <  0  <->  ( (sgn `  ( ( T `  F ) `  (
( # `  F )  -  1 ) ) )  x.  (sgn `  (sgn `  K ) ) )  <  0 ) )
10096, 98, 99syl2anc 661 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( ( ( T `  F ) `  (
( # `  F )  -  1 ) )  x.  (sgn `  K
) )  <  0  <->  ( (sgn `  ( ( T `  F ) `  ( ( # `  F
)  -  1 ) ) )  x.  (sgn `  (sgn `  K )
) )  <  0
) )
101 sgnmulsgn 26947 . . . . . . 7  |-  ( ( ( ( T `  F ) `  (
( # `  F )  -  1 ) )  e.  RR  /\  K  e.  RR )  ->  (
( ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) )  x.  K )  <  0  <->  ( (sgn `  ( ( T `  F ) `  (
( # `  F )  -  1 ) ) )  x.  (sgn `  K ) )  <  0 ) )
10296, 74, 101syl2anc 661 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( ( ( T `  F ) `  (
( # `  F )  -  1 ) )  x.  K )  <  0  <->  ( (sgn `  ( ( T `  F ) `  (
( # `  F )  -  1 ) ) )  x.  (sgn `  K ) )  <  0 ) )
10391, 100, 1023bitr4d 285 . . . . 5  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( ( ( T `  F ) `  (
( # `  F )  -  1 ) )  x.  (sgn `  K
) )  <  0  <->  ( ( ( T `  F ) `  (
( # `  F )  -  1 ) )  x.  K )  <  0 ) )
10480, 87, 1033bitrd 279 . . . 4  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( ( T `  ( F concat  <" K "> ) ) `  ( # `
 F ) )  =/=  ( ( T `
 ( F concat  <" K "> ) ) `  ( ( # `  F
)  -  1 ) )  <->  ( ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  x.  K
)  <  0 ) )
105104ifbid 3826 . . 3  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  if ( ( ( T `  ( F concat  <" K "> ) ) `  ( # `  F ) )  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) )  x.  K )  <  0 ,  1 ,  0 ) )
10670, 105oveq12d 6124 . 2  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F concat  <" K "> ) ) `  j )  =/=  (
( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  +  if ( ( ( T `
 ( F concat  <" K "> ) ) `  ( # `  F ) )  =/=  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) )  =  ( ( V `  F
)  +  if ( ( ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) )  x.  K )  <  0 ,  1 ,  0 ) ) )
10737, 106eqtrd 2475 1  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( V `
 ( F concat  <" K "> ) )  =  ( ( V `  F )  +  if ( ( ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  x.  K
)  <  0 , 
1 ,  0 ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1369    e. wcel 1756    =/= wne 2620    \ cdif 3340    C_ wss 3343   (/)c0 3652   ifcif 3806   {csn 3892   {cpr 3894   {ctp 3896   <.cop 3898   class class class wbr 4307    e. cmpt 4365   ` cfv 5433  (class class class)co 6106    e. cmpt2 6108   CCcc 9295   RRcr 9296   0cc0 9297   1c1 9298    + caddc 9300    x. cmul 9302   RR*cxr 9432    < clt 9433    - cmin 9610   -ucneg 9611   NNcn 10337   NN0cn0 10594   ZZcz 10661   ZZ>=cuz 10876   ...cfz 11452  ..^cfzo 11563   #chash 12118  Word cword 12236   concat cconcat 12238   <"cs1 12239  sgncsgn 12590   sum_csu 13178   ndxcnx 14186   Basecbs 14189   +g cplusg 14253    gsumg cgsu 14394
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 4418  ax-sep 4428  ax-nul 4436  ax-pow 4485  ax-pr 4546  ax-un 6387  ax-inf2 7862  ax-cnex 9353  ax-resscn 9354  ax-1cn 9355  ax-icn 9356  ax-addcl 9357  ax-addrcl 9358  ax-mulcl 9359  ax-mulrcl 9360  ax-mulcom 9361  ax-addass 9362  ax-mulass 9363  ax-distr 9364  ax-i2m1 9365  ax-1ne0 9366  ax-1rid 9367  ax-rnegex 9368  ax-rrecex 9369  ax-cnre 9370  ax-pre-lttri 9371  ax-pre-lttrn 9372  ax-pre-ltadd 9373  ax-pre-mulgt0 9374  ax-pre-sup 9375
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 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2622  df-nel 2623  df-ral 2735  df-rex 2736  df-reu 2737  df-rmo 2738  df-rab 2739  df-v 2989  df-sbc 3202  df-csb 3304  df-dif 3346  df-un 3348  df-in 3350  df-ss 3357  df-pss 3359  df-nul 3653  df-if 3807  df-pw 3877  df-sn 3893  df-pr 3895  df-tp 3897  df-op 3899  df-uni 4107  df-int 4144  df-iun 4188  df-br 4308  df-opab 4366  df-mpt 4367  df-tr 4401  df-eprel 4647  df-id 4651  df-po 4656  df-so 4657  df-fr 4694  df-se 4695  df-we 4696  df-ord 4737  df-on 4738  df-lim 4739  df-suc 4740  df-xp 4861  df-rel 4862  df-cnv 4863  df-co 4864  df-dm 4865  df-rn 4866  df-res 4867  df-ima 4868  df-iota 5396  df-fun 5435  df-fn 5436  df-f 5437  df-f1 5438  df-fo 5439  df-f1o 5440  df-fv 5441  df-isom 5442  df-riota 6067  df-ov 6109  df-oprab 6110  df-mpt2 6111  df-om 6492  df-1st 6592  df-2nd 6593  df-supp 6706  df-recs 6847  df-rdg 6881  df-1o 6935  df-oadd 6939  df-er 7116  df-en 7326  df-dom 7327  df-sdom 7328  df-fin 7329  df-sup 7706  df-oi 7739  df-card 8124  df-pnf 9435  df-mnf 9436  df-xr 9437  df-ltxr 9438  df-le 9439  df-sub 9612  df-neg 9613  df-div 10009  df-nn 10338  df-2 10395  df-3 10396  df-n0 10595  df-z 10662  df-uz 10877  df-rp 11007  df-fz 11453  df-fzo 11564  df-seq 11822  df-exp 11881  df-hash 12119  df-word 12244  df-concat 12246  df-s1 12247  df-substr 12248  df-sgn 12591  df-cj 12603  df-re 12604  df-im 12605  df-sqr 12739  df-abs 12740  df-clim 12981  df-sum 13179  df-struct 14191  df-ndx 14192  df-slot 14193  df-base 14194  df-plusg 14266  df-0g 14395  df-gsum 14396  df-mnd 15430  df-mulg 15563  df-cntz 15850
This theorem is referenced by:  signsvtp  26999  signsvtn  27000  signlem0  27003
  Copyright terms: Public domain W3C validator