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

Theorem signsvfn 28714
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 ++  <" 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 3483 . . . . . 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 12623 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  <" K ">  e. Word  RR )
5 ccatcl 12601 . . . . . 6  |-  ( ( F  e. Word  RR  /\  <" K ">  e. Word  RR )  ->  ( F ++  <" K "> )  e. Word  RR )
62, 4, 5syl2anc 661 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( F ++  <" 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 28710 . . . . 5  |-  ( ( F ++  <" K "> )  e. Word  RR  ->  ( V `  ( F ++ 
<" K "> ) )  =  sum_ j  e.  ( 1..^ ( # `  ( F ++  <" K "> ) ) ) if ( ( ( T `
 ( F ++  <" K "> )
) `  j )  =/=  ( ( T `  ( F ++  <" K "> ) ) `  ( j  -  1 ) ) ,  1 ,  0 ) )
126, 11syl 16 . . . 4  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( V `  ( F ++  <" K "> ) )  =  sum_ j  e.  ( 1..^ ( # `  ( F ++  <" K "> ) ) ) if ( ( ( T `
 ( F ++  <" K "> )
) `  j )  =/=  ( ( T `  ( F ++  <" K "> ) ) `  ( j  -  1 ) ) ,  1 ,  0 ) )
13 ccatlen 12602 . . . . . . . 8  |-  ( ( F  e. Word  RR  /\  <" K ">  e. Word  RR )  ->  ( # `
 ( F ++  <" K "> )
)  =  ( (
# `  F )  +  ( # `  <" K "> )
) )
142, 4, 13syl2anc 661 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  ( F ++  <" K "> ) )  =  ( ( # `  F
)  +  ( # `  <" K "> ) ) )
15 s1len 12625 . . . . . . . 8  |-  ( # `  <" K "> )  =  1
1615oveq2i 6307 . . . . . . 7  |-  ( (
# `  F )  +  ( # `  <" K "> )
)  =  ( (
# `  F )  +  1 )
1714, 16syl6eq 2514 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  ( F ++  <" K "> ) )  =  ( ( # `  F
)  +  1 ) )
1817oveq2d 6312 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( 1..^ ( # `  ( F ++  <" K "> ) ) )  =  ( 1..^ ( ( # `  F
)  +  1 ) ) )
1918sumeq1d 13534 . . . 4  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  -> 
sum_ j  e.  ( 1..^ ( # `  ( F ++  <" K "> ) ) ) if ( ( ( T `
 ( F ++  <" K "> )
) `  j )  =/=  ( ( T `  ( F ++  <" K "> ) ) `  ( j  -  1 ) ) ,  1 ,  0 )  = 
sum_ j  e.  ( 1..^ ( ( # `  F )  +  1 ) ) if ( ( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 ) )
20 eldifsn 4157 . . . . . . . 8  |-  ( F  e.  (Word  RR  \  { (/) } )  <->  ( F  e. Word  RR  /\  F  =/=  (/) ) )
21 lennncl 12569 . . . . . . . 8  |-  ( ( F  e. Word  RR  /\  F  =/=  (/) )  ->  ( # `
 F )  e.  NN )
2220, 21sylbi 195 . . . . . . 7  |-  ( F  e.  (Word  RR  \  { (/) } )  -> 
( # `  F )  e.  NN )
23 nnuz 11141 . . . . . . 7  |-  NN  =  ( ZZ>= `  1 )
2422, 23syl6eleq 2555 . . . . . 6  |-  ( F  e.  (Word  RR  \  { (/) } )  -> 
( # `  F )  e.  ( ZZ>= `  1
) )
2524adantr 465 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  F
)  e.  ( ZZ>= ` 
1 ) )
26 1cnd 9629 . . . . . 6  |-  ( ( ( ( F  e.  (Word  RR  \  { (/)
} )  /\  K  e.  RR )  /\  j  e.  ( 1 ... ( # `
 F ) ) )  /\  ( ( T `  ( F ++ 
<" K "> ) ) `  j
)  =/=  ( ( T `  ( F ++ 
<" K "> ) ) `  (
j  -  1 ) ) )  ->  1  e.  CC )
27 0cnd 9606 . . . . . 6  |-  ( ( ( ( F  e.  (Word  RR  \  { (/)
} )  /\  K  e.  RR )  /\  j  e.  ( 1 ... ( # `
 F ) ) )  /\  -.  (
( T `  ( F ++  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F ++ 
<" K "> ) ) `  (
j  -  1 ) ) )  ->  0  e.  CC )
2826, 27ifclda 3976 . . . . 5  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1 ... ( # `  F ) ) )  ->  if ( ( ( T `  ( F ++  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F ++ 
<" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  e.  CC )
29 fveq2 5872 . . . . . . 7  |-  ( j  =  ( # `  F
)  ->  ( ( T `  ( F ++  <" K "> ) ) `  j
)  =  ( ( T `  ( F ++ 
<" K "> ) ) `  ( # `
 F ) ) )
30 oveq1 6303 . . . . . . . 8  |-  ( j  =  ( # `  F
)  ->  ( j  -  1 )  =  ( ( # `  F
)  -  1 ) )
3130fveq2d 5876 . . . . . . 7  |-  ( j  =  ( # `  F
)  ->  ( ( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) )  =  ( ( T `  ( F ++ 
<" K "> ) ) `  (
( # `  F )  -  1 ) ) )
3229, 31neeq12d 2736 . . . . . 6  |-  ( j  =  ( # `  F
)  ->  ( (
( T `  ( F ++  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F ++ 
<" K "> ) ) `  (
j  -  1 ) )  <->  ( ( T `
 ( F ++  <" K "> )
) `  ( # `  F
) )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ) )
3332ifbid 3966 . . . . 5  |-  ( j  =  ( # `  F
)  ->  if (
( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( T `
 ( F ++  <" K "> )
) `  ( # `  F
) )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) )
3425, 28, 33fzosump1 13578 . . . 4  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  -> 
sum_ j  e.  ( 1..^ ( ( # `  F )  +  1 ) ) if ( ( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  (
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  +  if ( ( ( T `
 ( F ++  <" K "> )
) `  ( # `  F
) )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) ) )
3512, 19, 343eqtrd 2502 . . 3  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( V `  ( F ++  <" K "> ) )  =  (
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  +  if ( ( ( T `
 ( F ++  <" K "> )
) `  ( # `  F
) )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) ) )
3635adantlr 714 . 2  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( V `
 ( F ++  <" K "> )
)  =  ( sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  +  if ( ( ( T `
 ( F ++  <" K "> )
) `  ( # `  F
) )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) ) )
372adantr 465 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  ->  F  e. Word  RR )
383adantr 465 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  ->  K  e.  RR )
39 fzo0ss1 11853 . . . . . . . . . . 11  |-  ( 1..^ ( # `  F
) )  C_  (
0..^ ( # `  F
) )
4039a1i 11 . . . . . . . . . 10  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( 1..^ ( # `  F ) )  C_  ( 0..^ ( # `  F
) ) )
4140sselda 3499 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ( 0..^ ( # `  F
) ) )
427, 8, 9, 10signstfvp 28703 . . . . . . . . 9  |-  ( ( F  e. Word  RR  /\  K  e.  RR  /\  j  e.  ( 0..^ ( # `  F ) ) )  ->  ( ( T `
 ( F ++  <" K "> )
) `  j )  =  ( ( T `
 F ) `  j ) )
4337, 38, 41, 42syl3anc 1228 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( T `  ( F ++  <" K "> ) ) `  j )  =  ( ( T `  F
) `  j )
)
44 elfzoel2 11824 . . . . . . . . . . . . 13  |-  ( j  e.  ( 1..^ (
# `  F )
)  ->  ( # `  F
)  e.  ZZ )
4544adantl 466 . . . . . . . . . . . 12  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( # `  F )  e.  ZZ )
46 1nn0 10832 . . . . . . . . . . . 12  |-  1  e.  NN0
47 eluzmn 28666 . . . . . . . . . . . 12  |-  ( ( ( # `  F
)  e.  ZZ  /\  1  e.  NN0 )  -> 
( # `  F )  e.  ( ZZ>= `  (
( # `  F )  -  1 ) ) )
4845, 46, 47sylancl 662 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( # `  F )  e.  ( ZZ>= `  (
( # `  F )  -  1 ) ) )
49 fzoss2 11851 . . . . . . . . . . 11  |-  ( (
# `  F )  e.  ( ZZ>= `  ( ( # `
 F )  - 
1 ) )  -> 
( 0..^ ( (
# `  F )  -  1 ) ) 
C_  ( 0..^ (
# `  F )
) )
5048, 49syl 16 . . . . . . . . . 10  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( 0..^ ( (
# `  F )  -  1 ) ) 
C_  ( 0..^ (
# `  F )
) )
51 simpr 461 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ( 1..^ ( # `  F
) ) )
52 elfzoelz 11825 . . . . . . . . . . . . 13  |-  ( j  e.  ( 1..^ (
# `  F )
)  ->  j  e.  ZZ )
5352adantl 466 . . . . . . . . . . . 12  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ZZ )
54 elfzom1b 11913 . . . . . . . . . . . 12  |-  ( ( j  e.  ZZ  /\  ( # `  F )  e.  ZZ )  -> 
( j  e.  ( 1..^ ( # `  F
) )  <->  ( j  -  1 )  e.  ( 0..^ ( (
# `  F )  -  1 ) ) ) )
5553, 45, 54syl2anc 661 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  e.  ( 1..^ ( # `  F
) )  <->  ( j  -  1 )  e.  ( 0..^ ( (
# `  F )  -  1 ) ) ) )
5651, 55mpbid 210 . . . . . . . . . 10  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  -  1 )  e.  ( 0..^ ( ( # `  F
)  -  1 ) ) )
5750, 56sseldd 3500 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  -  1 )  e.  ( 0..^ ( # `  F
) ) )
587, 8, 9, 10signstfvp 28703 . . . . . . . . 9  |-  ( ( F  e. Word  RR  /\  K  e.  RR  /\  (
j  -  1 )  e.  ( 0..^ (
# `  F )
) )  ->  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) )  =  ( ( T `  F ) `
 ( j  - 
1 ) ) )
5937, 38, 57, 58syl3anc 1228 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( T `  ( F ++  <" K "> ) ) `  ( j  -  1 ) )  =  ( ( T `  F
) `  ( j  -  1 ) ) )
6043, 59neeq12d 2736 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( ( T `
 ( F ++  <" K "> )
) `  j )  =/=  ( ( T `  ( F ++  <" K "> ) ) `  ( j  -  1 ) )  <->  ( ( T `  F ) `  j )  =/=  (
( T `  F
) `  ( j  -  1 ) ) ) )
6160ifbid 3966 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  ->  if ( ( ( T `
 ( F ++  <" K "> )
) `  j )  =/=  ( ( T `  ( F ++  <" K "> ) ) `  ( j  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( T `  F ) `
 j )  =/=  ( ( T `  F ) `  (
j  -  1 ) ) ,  1 ,  0 ) )
6261sumeq2dv 13536 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  -> 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
637, 8, 9, 10signsvvfval 28710 . . . . . 6  |-  ( F  e. Word  RR  ->  ( V `
 F )  = 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
642, 63syl 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 ) )
6562, 64eqtr4d 2501 . . . 4  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  -> 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  =  ( V `  F ) )
6665adantlr 714 . . 3  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  sum_ j  e.  ( 1..^ ( # `  F ) ) if ( ( ( T `
 ( F ++  <" K "> )
) `  j )  =/=  ( ( T `  ( F ++  <" K "> ) ) `  ( j  -  1 ) ) ,  1 ,  0 )  =  ( V `  F
) )
677, 8, 9, 10signstfvn 28701 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( ( T `  ( F ++  <" K "> ) ) `  ( # `  F ) )  =  ( ( ( T `  F
) `  ( ( # `
 F )  - 
1 ) )  .+^  (sgn `  K ) ) )
6867adantlr 714 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  ( F ++ 
<" K "> ) ) `  ( # `
 F ) )  =  ( ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  .+^  (sgn `  K ) ) )
692adantlr 714 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  F  e. Word  RR )
70 simpr 461 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  K  e.  RR )
7122ad2antrr 725 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( # `  F )  e.  NN )
72 fzo0end 11906 . . . . . . . 8  |-  ( (
# `  F )  e.  NN  ->  ( ( # `
 F )  - 
1 )  e.  ( 0..^ ( # `  F
) ) )
7371, 72syl 16 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( (
# `  F )  -  1 )  e.  ( 0..^ ( # `  F ) ) )
747, 8, 9, 10signstfvp 28703 . . . . . . 7  |-  ( ( F  e. Word  RR  /\  K  e.  RR  /\  (
( # `  F )  -  1 )  e.  ( 0..^ ( # `  F ) ) )  ->  ( ( T `
 ( F ++  <" K "> )
) `  ( ( # `
 F )  - 
1 ) )  =  ( ( T `  F ) `  (
( # `  F )  -  1 ) ) )
7569, 70, 73, 74syl3anc 1228 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  ( F ++ 
<" K "> ) ) `  (
( # `  F )  -  1 ) )  =  ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) ) )
7668, 75neeq12d 2736 . . . . 5  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( ( T `  ( F ++  <" K "> ) ) `  ( # `
 F ) )  =/=  ( ( T `
 ( F ++  <" K "> )
) `  ( ( # `
 F )  - 
1 ) )  <->  ( (
( T `  F
) `  ( ( # `
 F )  - 
1 ) )  .+^  (sgn `  K ) )  =/=  ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) ) ) )
777, 8, 9, 10signstfvcl 28705 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  ( ( # `
 F )  - 
1 )  e.  ( 0..^ ( # `  F
) ) )  -> 
( ( T `  F ) `  (
( # `  F )  -  1 ) )  e.  { -u 1 ,  1 } )
7873, 77syldan 470 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  e.  { -u 1 ,  1 } )
7970rexrd 9660 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  K  e. 
RR* )
80 sgncl 28652 . . . . . . 7  |-  ( K  e.  RR*  ->  (sgn `  K )  e.  { -u 1 ,  0 ,  1 } )
8179, 80syl 16 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  K )  e.  { -u 1 ,  0 ,  1 } )
827, 8signswch 28693 . . . . . 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 ) )
8378, 81, 82syl2anc 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 ) )
84 sgnsgn 28662 . . . . . . . . 9  |-  ( K  e.  RR*  ->  (sgn `  (sgn `  K ) )  =  (sgn `  K
) )
8579, 84syl 16 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  (sgn `  K ) )  =  (sgn `  K
) )
8685oveq2d 6312 . . . . . . 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 ) ) )
8786breq1d 4466 . . . . . 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 ) )
88 neg1rr 10661 . . . . . . . . 9  |-  -u 1  e.  RR
89 1re 9612 . . . . . . . . 9  |-  1  e.  RR
90 prssi 4188 . . . . . . . . 9  |-  ( (
-u 1  e.  RR  /\  1  e.  RR )  ->  { -u 1 ,  1 }  C_  RR )
9188, 89, 90mp2an 672 . . . . . . . 8  |-  { -u
1 ,  1 } 
C_  RR
9291, 78sseldi 3497 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  e.  RR )
93 sgnclre 28653 . . . . . . . 8  |-  ( K  e.  RR  ->  (sgn `  K )  e.  RR )
9493adantl 466 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  K )  e.  RR )
95 sgnmulsgn 28663 . . . . . . 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 ) )
9692, 94, 95syl2anc 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
) )
97 sgnmulsgn 28663 . . . . . . 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 ) )
9892, 70, 97syl2anc 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 ) )
9987, 96, 983bitr4d 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 ) )
10076, 83, 993bitrd 279 . . . 4  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( ( T `  ( F ++  <" K "> ) ) `  ( # `
 F ) )  =/=  ( ( T `
 ( F ++  <" K "> )
) `  ( ( # `
 F )  - 
1 ) )  <->  ( (
( T `  F
) `  ( ( # `
 F )  - 
1 ) )  x.  K )  <  0
) )
101100ifbid 3966 . . 3  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  if ( ( ( T `  ( F ++  <" K "> ) ) `  ( # `  F ) )  =/=  ( ( T `  ( F ++ 
<" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) )  x.  K )  <  0 ,  1 ,  0 ) )
10266, 101oveq12d 6314 . 2  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  ( F ++  <" K "> ) ) `  j )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) ) ,  1 ,  0 )  +  if ( ( ( T `
 ( F ++  <" K "> )
) `  ( # `  F
) )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ,  1 ,  0 ) )  =  ( ( V `  F
)  +  if ( ( ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) )  x.  K )  <  0 ,  1 ,  0 ) ) )
10336, 102eqtrd 2498 1  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( V `
 ( F ++  <" 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 1395    e. wcel 1819    =/= wne 2652    \ cdif 3468    C_ wss 3471   (/)c0 3793   ifcif 3944   {csn 4032   {cpr 4034   {ctp 4036   <.cop 4038   class class class wbr 4456    |-> cmpt 4515   ` cfv 5594  (class class class)co 6296    |-> cmpt2 6298   CCcc 9507   RRcr 9508   0cc0 9509   1c1 9510    + caddc 9512    x. cmul 9514   RR*cxr 9644    < clt 9645    - cmin 9824   -ucneg 9825   NNcn 10556   NN0cn0 10816   ZZcz 10885   ZZ>=cuz 11106   ...cfz 11697  ..^cfzo 11820   #chash 12407  Word cword 12537   ++ cconcat 12539   <"cs1 12540  sgncsgn 12930   sum_csu 13519   ndxcnx 14640   Basecbs 14643   +g cplusg 14711    gsumg cgsu 14857
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-rep 4568  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695  ax-un 6591  ax-inf2 8075  ax-cnex 9565  ax-resscn 9566  ax-1cn 9567  ax-icn 9568  ax-addcl 9569  ax-addrcl 9570  ax-mulcl 9571  ax-mulrcl 9572  ax-mulcom 9573  ax-addass 9574  ax-mulass 9575  ax-distr 9576  ax-i2m1 9577  ax-1ne0 9578  ax-1rid 9579  ax-rnegex 9580  ax-rrecex 9581  ax-cnre 9582  ax-pre-lttri 9583  ax-pre-lttrn 9584  ax-pre-ltadd 9585  ax-pre-mulgt0 9586  ax-pre-sup 9587
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1398  df-fal 1401  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-nel 2655  df-ral 2812  df-rex 2813  df-reu 2814  df-rmo 2815  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-pss 3487  df-nul 3794  df-if 3945  df-pw 4017  df-sn 4033  df-pr 4035  df-tp 4037  df-op 4039  df-uni 4252  df-int 4289  df-iun 4334  df-br 4457  df-opab 4516  df-mpt 4517  df-tr 4551  df-eprel 4800  df-id 4804  df-po 4809  df-so 4810  df-fr 4847  df-se 4848  df-we 4849  df-ord 4890  df-on 4891  df-lim 4892  df-suc 4893  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602  df-isom 5603  df-riota 6258  df-ov 6299  df-oprab 6300  df-mpt2 6301  df-om 6700  df-1st 6799  df-2nd 6800  df-supp 6918  df-recs 7060  df-rdg 7094  df-1o 7148  df-oadd 7152  df-er 7329  df-en 7536  df-dom 7537  df-sdom 7538  df-fin 7539  df-sup 7919  df-oi 7953  df-card 8337  df-cda 8565  df-pnf 9647  df-mnf 9648  df-xr 9649  df-ltxr 9650  df-le 9651  df-sub 9826  df-neg 9827  df-div 10228  df-nn 10557  df-2 10615  df-3 10616  df-n0 10817  df-z 10886  df-uz 11107  df-rp 11246  df-fz 11698  df-fzo 11821  df-seq 12110  df-exp 12169  df-hash 12408  df-word 12545  df-lsw 12546  df-concat 12547  df-s1 12548  df-substr 12549  df-sgn 12931  df-cj 12943  df-re 12944  df-im 12945  df-sqrt 13079  df-abs 13080  df-clim 13322  df-sum 13520  df-struct 14645  df-ndx 14646  df-slot 14647  df-base 14648  df-plusg 14724  df-0g 14858  df-gsum 14859  df-mgm 15998  df-sgrp 16037  df-mnd 16047  df-mulg 16186  df-cntz 16481
This theorem is referenced by:  signsvtp  28715  signsvtn  28716  signlem0  28719
  Copyright terms: Public domain W3C validator