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

Theorem signsvfn 29543
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 464 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  F  e.  (Word  RR  \  { (/) } ) )
21eldifad 3402 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  F  e. Word  RR )
3 simpr 468 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  K  e.  RR )
43s1cld 12795 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  <" K ">  e. Word  RR )
5 ccatcl 12771 . . . . . 6  |-  ( ( F  e. Word  RR  /\  <" K ">  e. Word  RR )  ->  ( F ++  <" K "> )  e. Word  RR )
62, 4, 5syl2anc 673 . . . . 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 29539 . . . . 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 17 . . . 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 12772 . . . . . . . 8  |-  ( ( F  e. Word  RR  /\  <" K ">  e. Word  RR )  ->  ( # `
 ( F ++  <" K "> )
)  =  ( (
# `  F )  +  ( # `  <" K "> )
) )
142, 4, 13syl2anc 673 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  ( F ++  <" K "> ) )  =  ( ( # `  F
)  +  ( # `  <" K "> ) ) )
15 s1len 12797 . . . . . . . 8  |-  ( # `  <" K "> )  =  1
1615oveq2i 6319 . . . . . . 7  |-  ( (
# `  F )  +  ( # `  <" K "> )
)  =  ( (
# `  F )  +  1 )
1714, 16syl6eq 2521 . . . . . 6  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  ( F ++  <" K "> ) )  =  ( ( # `  F
)  +  1 ) )
1817oveq2d 6324 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( 1..^ ( # `  ( F ++  <" K "> ) ) )  =  ( 1..^ ( ( # `  F
)  +  1 ) ) )
1918sumeq1d 13844 . . . 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 4088 . . . . . . . 8  |-  ( F  e.  (Word  RR  \  { (/) } )  <->  ( F  e. Word  RR  /\  F  =/=  (/) ) )
21 lennncl 12738 . . . . . . . 8  |-  ( ( F  e. Word  RR  /\  F  =/=  (/) )  ->  ( # `
 F )  e.  NN )
2220, 21sylbi 200 . . . . . . 7  |-  ( F  e.  (Word  RR  \  { (/) } )  -> 
( # `  F )  e.  NN )
23 nnuz 11218 . . . . . . 7  |-  NN  =  ( ZZ>= `  1 )
2422, 23syl6eleq 2559 . . . . . 6  |-  ( F  e.  (Word  RR  \  { (/) } )  -> 
( # `  F )  e.  ( ZZ>= `  1
) )
2524adantr 472 . . . . 5  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( # `  F
)  e.  ( ZZ>= ` 
1 ) )
26 1cnd 9677 . . . . . 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 9654 . . . . . 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 3904 . . . . 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 5879 . . . . . . 7  |-  ( j  =  ( # `  F
)  ->  ( ( T `  ( F ++  <" K "> ) ) `  j
)  =  ( ( T `  ( F ++ 
<" K "> ) ) `  ( # `
 F ) ) )
30 oveq1 6315 . . . . . . . 8  |-  ( j  =  ( # `  F
)  ->  ( j  -  1 )  =  ( ( # `  F
)  -  1 ) )
3130fveq2d 5883 . . . . . . 7  |-  ( j  =  ( # `  F
)  ->  ( ( T `  ( F ++  <" K "> ) ) `  (
j  -  1 ) )  =  ( ( T `  ( F ++ 
<" K "> ) ) `  (
( # `  F )  -  1 ) ) )
3229, 31neeq12d 2704 . . . . . 6  |-  ( j  =  ( # `  F
)  ->  ( (
( T `  ( F ++  <" K "> ) ) `  j
)  =/=  ( ( T `  ( F ++ 
<" K "> ) ) `  (
j  -  1 ) )  <->  ( ( T `
 ( F ++  <" K "> )
) `  ( # `  F
) )  =/=  (
( T `  ( F ++  <" K "> ) ) `  (
( # `  F )  -  1 ) ) ) )
3332ifbid 3894 . . . . 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 13890 . . . 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 2509 . . 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 729 . 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 472 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  ->  F  e. Word  RR )
383adantr 472 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  ->  K  e.  RR )
39 fzo0ss1 11975 . . . . . . . . . . 11  |-  ( 1..^ ( # `  F
) )  C_  (
0..^ ( # `  F
) )
4039a1i 11 . . . . . . . . . 10  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( 1..^ ( # `  F ) )  C_  ( 0..^ ( # `  F
) ) )
4140sselda 3418 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ( 0..^ ( # `  F
) ) )
427, 8, 9, 10signstfvp 29532 . . . . . . . . 9  |-  ( ( F  e. Word  RR  /\  K  e.  RR  /\  j  e.  ( 0..^ ( # `  F ) ) )  ->  ( ( T `
 ( F ++  <" K "> )
) `  j )  =  ( ( T `
 F ) `  j ) )
4337, 38, 41, 42syl3anc 1292 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( T `  ( F ++  <" K "> ) ) `  j )  =  ( ( T `  F
) `  j )
)
44 elfzoel2 11946 . . . . . . . . . . . . 13  |-  ( j  e.  ( 1..^ (
# `  F )
)  ->  ( # `  F
)  e.  ZZ )
4544adantl 473 . . . . . . . . . . . 12  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( # `  F )  e.  ZZ )
46 1nn0 10909 . . . . . . . . . . . 12  |-  1  e.  NN0
47 eluzmn 11189 . . . . . . . . . . . 12  |-  ( ( ( # `  F
)  e.  ZZ  /\  1  e.  NN0 )  -> 
( # `  F )  e.  ( ZZ>= `  (
( # `  F )  -  1 ) ) )
4845, 46, 47sylancl 675 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( # `  F )  e.  ( ZZ>= `  (
( # `  F )  -  1 ) ) )
49 fzoss2 11973 . . . . . . . . . . 11  |-  ( (
# `  F )  e.  ( ZZ>= `  ( ( # `
 F )  - 
1 ) )  -> 
( 0..^ ( (
# `  F )  -  1 ) ) 
C_  ( 0..^ (
# `  F )
) )
5048, 49syl 17 . . . . . . . . . 10  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( 0..^ ( (
# `  F )  -  1 ) ) 
C_  ( 0..^ (
# `  F )
) )
51 simpr 468 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ( 1..^ ( # `  F
) ) )
52 elfzoelz 11947 . . . . . . . . . . . . 13  |-  ( j  e.  ( 1..^ (
# `  F )
)  ->  j  e.  ZZ )
5352adantl 473 . . . . . . . . . . . 12  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
j  e.  ZZ )
54 elfzom1b 12039 . . . . . . . . . . . 12  |-  ( ( j  e.  ZZ  /\  ( # `  F )  e.  ZZ )  -> 
( j  e.  ( 1..^ ( # `  F
) )  <->  ( j  -  1 )  e.  ( 0..^ ( (
# `  F )  -  1 ) ) ) )
5553, 45, 54syl2anc 673 . . . . . . . . . . 11  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  e.  ( 1..^ ( # `  F
) )  <->  ( j  -  1 )  e.  ( 0..^ ( (
# `  F )  -  1 ) ) ) )
5651, 55mpbid 215 . . . . . . . . . 10  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  -  1 )  e.  ( 0..^ ( ( # `  F
)  -  1 ) ) )
5750, 56sseldd 3419 . . . . . . . . 9  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( j  -  1 )  e.  ( 0..^ ( # `  F
) ) )
587, 8, 9, 10signstfvp 29532 . . . . . . . . 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 1292 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  K  e.  RR )  /\  j  e.  ( 1..^ ( # `  F
) ) )  -> 
( ( T `  ( F ++  <" K "> ) ) `  ( j  -  1 ) )  =  ( ( T `  F
) `  ( j  -  1 ) ) )
6043, 59neeq12d 2704 . . . . . . 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 3894 . . . . . 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 13846 . . . . 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 29539 . . . . . 6  |-  ( F  e. Word  RR  ->  ( V `
 F )  = 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
642, 63syl 17 . . . . 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 2508 . . . 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 729 . . 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 29530 . . . . . . 7  |-  ( ( F  e.  (Word  RR  \  { (/) } )  /\  K  e.  RR )  ->  ( ( T `  ( F ++  <" K "> ) ) `  ( # `  F ) )  =  ( ( ( T `  F
) `  ( ( # `
 F )  - 
1 ) )  .+^  (sgn `  K ) ) )
6867adantlr 729 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  ( F ++ 
<" K "> ) ) `  ( # `
 F ) )  =  ( ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  .+^  (sgn `  K ) ) )
692adantlr 729 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  F  e. Word  RR )
70 simpr 468 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  K  e.  RR )
7122ad2antrr 740 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( # `  F )  e.  NN )
72 fzo0end 12032 . . . . . . . 8  |-  ( (
# `  F )  e.  NN  ->  ( ( # `
 F )  - 
1 )  e.  ( 0..^ ( # `  F
) ) )
7371, 72syl 17 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( (
# `  F )  -  1 )  e.  ( 0..^ ( # `  F ) ) )
747, 8, 9, 10signstfvp 29532 . . . . . . 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 1292 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  ( F ++ 
<" K "> ) ) `  (
( # `  F )  -  1 ) )  =  ( ( T `
 F ) `  ( ( # `  F
)  -  1 ) ) )
7668, 75neeq12d 2704 . . . . 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 29534 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  ( ( # `
 F )  - 
1 )  e.  ( 0..^ ( # `  F
) ) )  -> 
( ( T `  F ) `  (
( # `  F )  -  1 ) )  e.  { -u 1 ,  1 } )
7873, 77syldan 478 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  e.  { -u 1 ,  1 } )
7970rexrd 9708 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  K  e. 
RR* )
80 sgncl 29482 . . . . . . 7  |-  ( K  e.  RR*  ->  (sgn `  K )  e.  { -u 1 ,  0 ,  1 } )
8179, 80syl 17 . . . . . 6  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  K )  e.  { -u 1 ,  0 ,  1 } )
827, 8signswch 29522 . . . . . 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 673 . . . . 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 29492 . . . . . . . . 9  |-  ( K  e.  RR*  ->  (sgn `  (sgn `  K ) )  =  (sgn `  K
) )
8579, 84syl 17 . . . . . . . 8  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  (sgn `  K ) )  =  (sgn `  K
) )
8685oveq2d 6324 . . . . . . 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 4405 . . . . . 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 10736 . . . . . . . . 9  |-  -u 1  e.  RR
89 1re 9660 . . . . . . . . 9  |-  1  e.  RR
90 prssi 4119 . . . . . . . . 9  |-  ( (
-u 1  e.  RR  /\  1  e.  RR )  ->  { -u 1 ,  1 }  C_  RR )
9188, 89, 90mp2an 686 . . . . . . . 8  |-  { -u
1 ,  1 } 
C_  RR
9291, 78sseldi 3416 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  ( ( T `  F ) `
 ( ( # `  F )  -  1 ) )  e.  RR )
93 sgnclre 29483 . . . . . . . 8  |-  ( K  e.  RR  ->  (sgn `  K )  e.  RR )
9493adantl 473 . . . . . . 7  |-  ( ( ( F  e.  (Word 
RR  \  { (/) } )  /\  ( F ` 
0 )  =/=  0
)  /\  K  e.  RR )  ->  (sgn `  K )  e.  RR )
95 sgnmulsgn 29493 . . . . . . 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 673 . . . . . 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 29493 . . . . . . 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 673 . . . . . 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 293 . . . . 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 287 . . . 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 3894 . . 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 6326 . 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 2505 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 189    /\ wa 376    = wceq 1452    e. wcel 1904    =/= wne 2641    \ cdif 3387    C_ wss 3390   (/)c0 3722   ifcif 3872   {csn 3959   {cpr 3961   {ctp 3963   <.cop 3965   class class class wbr 4395    |-> cmpt 4454   ` cfv 5589  (class class class)co 6308    |-> cmpt2 6310   CCcc 9555   RRcr 9556   0cc0 9557   1c1 9558    + caddc 9560    x. cmul 9562   RR*cxr 9692    < clt 9693    - cmin 9880   -ucneg 9881   NNcn 10631   NN0cn0 10893   ZZcz 10961   ZZ>=cuz 11182   ...cfz 11810  ..^cfzo 11942   #chash 12553  Word cword 12703   ++ cconcat 12705   <"cs1 12706  sgncsgn 13226   sum_csu 13829   ndxcnx 15196   Basecbs 15199   +g cplusg 15268    gsumg cgsu 15417
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-8 1906  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-rep 4508  ax-sep 4518  ax-nul 4527  ax-pow 4579  ax-pr 4639  ax-un 6602  ax-inf2 8164  ax-cnex 9613  ax-resscn 9614  ax-1cn 9615  ax-icn 9616  ax-addcl 9617  ax-addrcl 9618  ax-mulcl 9619  ax-mulrcl 9620  ax-mulcom 9621  ax-addass 9622  ax-mulass 9623  ax-distr 9624  ax-i2m1 9625  ax-1ne0 9626  ax-1rid 9627  ax-rnegex 9628  ax-rrecex 9629  ax-cnre 9630  ax-pre-lttri 9631  ax-pre-lttrn 9632  ax-pre-ltadd 9633  ax-pre-mulgt0 9634  ax-pre-sup 9635
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3or 1008  df-3an 1009  df-tru 1455  df-fal 1458  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-nel 2644  df-ral 2761  df-rex 2762  df-reu 2763  df-rmo 2764  df-rab 2765  df-v 3033  df-sbc 3256  df-csb 3350  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-pss 3406  df-nul 3723  df-if 3873  df-pw 3944  df-sn 3960  df-pr 3962  df-tp 3964  df-op 3966  df-uni 4191  df-int 4227  df-iun 4271  df-br 4396  df-opab 4455  df-mpt 4456  df-tr 4491  df-eprel 4750  df-id 4754  df-po 4760  df-so 4761  df-fr 4798  df-se 4799  df-we 4800  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-pred 5387  df-ord 5433  df-on 5434  df-lim 5435  df-suc 5436  df-iota 5553  df-fun 5591  df-fn 5592  df-f 5593  df-f1 5594  df-fo 5595  df-f1o 5596  df-fv 5597  df-isom 5598  df-riota 6270  df-ov 6311  df-oprab 6312  df-mpt2 6313  df-om 6712  df-1st 6812  df-2nd 6813  df-supp 6934  df-wrecs 7046  df-recs 7108  df-rdg 7146  df-1o 7200  df-oadd 7204  df-er 7381  df-en 7588  df-dom 7589  df-sdom 7590  df-fin 7591  df-sup 7974  df-oi 8043  df-card 8391  df-cda 8616  df-pnf 9695  df-mnf 9696  df-xr 9697  df-ltxr 9698  df-le 9699  df-sub 9882  df-neg 9883  df-div 10292  df-nn 10632  df-2 10690  df-3 10691  df-n0 10894  df-z 10962  df-uz 11183  df-rp 11326  df-fz 11811  df-fzo 11943  df-seq 12252  df-exp 12311  df-hash 12554  df-word 12711  df-lsw 12712  df-concat 12713  df-s1 12714  df-substr 12715  df-sgn 13227  df-cj 13239  df-re 13240  df-im 13241  df-sqrt 13375  df-abs 13376  df-clim 13629  df-sum 13830  df-struct 15201  df-ndx 15202  df-slot 15203  df-base 15204  df-plusg 15281  df-0g 15418  df-gsum 15419  df-mgm 16566  df-sgrp 16605  df-mnd 16615  df-mulg 16754  df-cntz 17049
This theorem is referenced by:  signsvtp  29544  signsvtn  29545  signlem0  29548
  Copyright terms: Public domain W3C validator