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

Theorem signsvfn 28179
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 3488 . . . . . 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 12574 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  <" K ">  e. Word  RR )
5 ccatcl 12554 . . . . . 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 28175 . . . . 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 12555 . . . . . . . 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 12576 . . . . . . . 8  |-  ( # `  <" K "> )  =  1
1615oveq2i 6293 . . . . . . 7  |-  ( (
# `  F )  +  ( # `  <" K "> )
)  =  ( (
# `  F )  +  1 )
1714, 16syl6eq 2524 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  ( F concat  <" K "> ) )  =  ( ( # `  F
)  +  1 ) )
1817oveq2d 6298 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( 1..^ ( # `  ( F concat  <" K "> ) ) )  =  ( 1..^ ( ( # `  F
)  +  1 ) ) )
1918sumeq1d 13482 . . . 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 4152 . . . . . . . 8  |-  ( F  e.  (Word  RR  \  { (/) } )  <->  ( F  e. Word  RR  /\  F  =/=  (/) ) )
21 lennncl 12525 . . . . . . . 8  |-  ( ( F  e. Word  RR  /\  F  =/=  (/) )  ->  ( # `
 F )  e.  NN )
2220, 21sylbi 195 . . . . . . 7  |-  ( F  e.  (Word  RR  \  { (/) } )  -> 
( # `  F )  e.  NN )
23 nnuz 11113 . . . . . . 7  |-  NN  =  ( ZZ>= `  1 )
2422, 23syl6eleq 2565 . . . . . 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 9546 . . . . . . 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 9585 . . . . . 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 3971 . . . . 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 5864 . . . . . . 7  |-  ( j  =  ( # `  F
)  ->  ( ( T `  ( F concat  <" K "> ) ) `  j
)  =  ( ( T `  ( F concat  <" K "> ) ) `  ( # `
 F ) ) )
31 oveq1 6289 . . . . . . . 8  |-  ( j  =  ( # `  F
)  ->  ( j  -  1 )  =  ( ( # `  F
)  -  1 ) )
3231fveq2d 5868 . . . . . . 7  |-  ( j  =  ( # `  F
)  ->  ( ( T `  ( F concat  <" K "> ) ) `  (
j  -  1 ) )  =  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) ) )
3330, 32neeq12d 2746 . . . . . 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 3961 . . . . 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 13526 . . . 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 2512 . . 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 10807 . . . . . . . . . . . . 13  |-  1  e.  NN0
41 nn0uz 11112 . . . . . . . . . . . . 13  |-  NN0  =  ( ZZ>= `  0 )
4240, 41eleqtri 2553 . . . . . . . . . . . 12  |-  1  e.  ( ZZ>= `  0 )
43 fzoss1 11816 . . . . . . . . . . . 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 3504 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ( 0..^ ( # `  F
) ) )
477, 8, 9, 10signstfvp 28168 . . . . . . . . 9  |-  ( ( F  e. Word  RR  /\  K  e.  RR  /\  j  e.  ( 0..^ ( # `  F ) ) )  ->  ( ( T `
 ( F concat  <" K "> ) ) `  j )  =  ( ( T `  F
) `  j )
)
4838, 39, 46, 47syl3anc 1228 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( T `  ( F concat  <" K "> ) ) `  j )  =  ( ( T `  F
) `  j )
)
49 elfzoel2 11792 . . . . . . . . . . . . 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 28131 . . . . . . . . . . . 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 11817 . . . . . . . . . . 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 11793 . . . . . . . . . . . . 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 11875 . . . . . . . . . . . 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 3505 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  -  1 )  e.  ( 0..^ ( # `  F
) ) )
627, 8, 9, 10signstfvp 28168 . . . . . . . . 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 1228 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( T `  ( F concat  <" K "> ) ) `  ( j  -  1 ) )  =  ( ( T `  F
) `  ( j  -  1 ) ) )
6448, 63neeq12d 2746 . . . . . . 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 3961 . . . . . 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 13484 . . . . 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 28175 . . . . . 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 2511 . . . 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 28166 . . . . . . 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 11868 . . . . . . . 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 28168 . . . . . . 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 1228 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  ( F concat  <" K "> ) ) `  (
( # `  F )  -  1 ) )  =  ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) ) )
8072, 79neeq12d 2746 . . . . 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 28170 . . . . . . 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 9639 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  K  e. 
RR* )
84 sgncl 28117 . . . . . . 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 28158 . . . . . 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 28127 . . . . . . . . 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 6298 . . . . . . 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 4457 . . . . . 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 10636 . . . . . . . . 9  |-  -u 1  e.  RR
93 1re 9591 . . . . . . . . 9  |-  1  e.  RR
94 prssi 4183 . . . . . . . . 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 3502 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  e.  RR )
97 sgnclre 28118 . . . . . . . 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 28128 . . . . . . 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 28128 . . . . . . 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 3961 . . 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 6300 . 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 2508 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 1379    e. wcel 1767    =/= wne 2662    \ cdif 3473    C_ wss 3476   (/)c0 3785   ifcif 3939   {csn 4027   {cpr 4029   {ctp 4031   <.cop 4033   class class class wbr 4447    |-> cmpt 4505   ` cfv 5586  (class class class)co 6282    |-> cmpt2 6284   CCcc 9486   RRcr 9487   0cc0 9488   1c1 9489    + caddc 9491    x. cmul 9493   RR*cxr 9623    < clt 9624    - cmin 9801   -ucneg 9802   NNcn 10532   NN0cn0 10791   ZZcz 10860   ZZ>=cuz 11078   ...cfz 11668  ..^cfzo 11788   #chash 12369  Word cword 12496   concat cconcat 12498   <"cs1 12499  sgncsgn 12878   sum_csu 13467   ndxcnx 14483   Basecbs 14486   +g cplusg 14551    gsumg cgsu 14692
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-inf2 8054  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  ax-pre-sup 9566
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-rmo 2822  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-se 4839  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-isom 5595  df-riota 6243  df-ov 6285  df-oprab 6286  df-mpt2 6287  df-om 6679  df-1st 6781  df-2nd 6782  df-supp 6899  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-sup 7897  df-oi 7931  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-div 10203  df-nn 10533  df-2 10590  df-3 10591  df-n0 10792  df-z 10861  df-uz 11079  df-rp 11217  df-fz 11669  df-fzo 11789  df-seq 12072  df-exp 12131  df-hash 12370  df-word 12504  df-concat 12506  df-s1 12507  df-substr 12508  df-sgn 12879  df-cj 12891  df-re 12892  df-im 12893  df-sqrt 13027  df-abs 13028  df-clim 13270  df-sum 13468  df-struct 14488  df-ndx 14489  df-slot 14490  df-base 14491  df-plusg 14564  df-0g 14693  df-gsum 14694  df-mnd 15728  df-mulg 15861  df-cntz 16150
This theorem is referenced by:  signsvtp  28180  signsvtn  28181  signlem0  28184
  Copyright terms: Public domain W3C validator