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

Theorem signsvvfval 26977
Description: The value of  V, which represents the number of times the sign changes in a word. (Contributed by Thierry Arnoux, 7-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
signsvvfval  |-  ( F  e. Word  RR  ->  ( V `
 F )  = 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
Distinct variable groups:    a, b,  .+^    f, i, n, F    f, W, i, n    f, j, F    T, f
Allowed substitution hints:    .+^ ( f, i,
j, n)    T( i,
j, n, a, b)    F( a, b)    V( f, i, j, n, a, b)    W( j, a, b)

Proof of Theorem signsvvfval
StepHypRef Expression
1 fveq2 5689 . . . 4  |-  ( f  =  F  ->  ( # `
 f )  =  ( # `  F
) )
21oveq2d 6105 . . 3  |-  ( f  =  F  ->  (
1..^ ( # `  f
) )  =  ( 1..^ ( # `  F
) ) )
3 fveq2 5689 . . . . . . . 8  |-  ( f  =  F  ->  ( T `  f )  =  ( T `  F ) )
4 eqidd 2442 . . . . . . . 8  |-  ( f  =  F  ->  j  =  j )
53, 4fveq12d 5695 . . . . . . 7  |-  ( f  =  F  ->  (
( T `  f
) `  j )  =  ( ( T `
 F ) `  j ) )
6 eqidd 2442 . . . . . . . 8  |-  ( f  =  F  ->  (
j  -  1 )  =  ( j  - 
1 ) )
73, 6fveq12d 5695 . . . . . . 7  |-  ( f  =  F  ->  (
( T `  f
) `  ( j  -  1 ) )  =  ( ( T `
 F ) `  ( j  -  1 ) ) )
85, 7neeq12d 2621 . . . . . 6  |-  ( f  =  F  ->  (
( ( T `  f ) `  j
)  =/=  ( ( T `  f ) `
 ( j  - 
1 ) )  <->  ( ( T `  F ) `  j )  =/=  (
( T `  F
) `  ( j  -  1 ) ) ) )
98ifbid 3809 . . . . 5  |-  ( f  =  F  ->  if ( ( ( T `
 f ) `  j )  =/=  (
( T `  f
) `  ( j  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
109ralrimivw 2798 . . . 4  |-  ( f  =  F  ->  A. j  e.  ( 1..^ ( # `  f ) ) if ( ( ( T `
 f ) `  j )  =/=  (
( T `  f
) `  ( j  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
1110r19.21bi 2812 . . 3  |-  ( ( f  =  F  /\  j  e.  ( 1..^ ( # `  f
) ) )  ->  if ( ( ( T `
 f ) `  j )  =/=  (
( T `  f
) `  ( j  -  1 ) ) ,  1 ,  0 )  =  if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
122, 11sumeq12dv 13181 . 2  |-  ( f  =  F  ->  sum_ j  e.  ( 1..^ ( # `  f ) ) if ( ( ( T `
 f ) `  j )  =/=  (
( T `  f
) `  ( j  -  1 ) ) ,  1 ,  0 )  =  sum_ j  e.  ( 1..^ ( # `  F ) ) if ( ( ( T `
 F ) `  j )  =/=  (
( T `  F
) `  ( j  -  1 ) ) ,  1 ,  0 ) )
13 signsv.v . 2  |-  V  =  ( f  e. Word  RR  |->  sum_ j  e.  ( 1..^ ( # `  f
) ) if ( ( ( T `  f ) `  j
)  =/=  ( ( T `  f ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
14 sumex 13163 . 2  |-  sum_ j  e.  ( 1..^ ( # `  F ) ) if ( ( ( T `
 F ) `  j )  =/=  (
( T `  F
) `  ( j  -  1 ) ) ,  1 ,  0 )  e.  _V
1512, 13, 14fvmpt 5772 1  |-  ( F  e. Word  RR  ->  ( V `
 F )  = 
sum_ j  e.  ( 1..^ ( # `  F
) ) if ( ( ( T `  F ) `  j
)  =/=  ( ( T `  F ) `
 ( j  - 
1 ) ) ,  1 ,  0 ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    = wceq 1369    e. wcel 1756    =/= wne 2604   ifcif 3789   {cpr 3877   {ctp 3879   <.cop 3881    e. cmpt 4348   ` cfv 5416  (class class class)co 6089    e. cmpt2 6091   RRcr 9279   0cc0 9280   1c1 9281    - cmin 9593   -ucneg 9594   ...cfz 11435  ..^cfzo 11546   #chash 12101  Word cword 12219  sgncsgn 12573   sum_csu 13161   ndxcnx 14169   Basecbs 14172   +g cplusg 14236    gsumg cgsu 14377
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 2422  ax-sep 4411  ax-nul 4419  ax-pow 4468  ax-pr 4529  ax-un 6370  ax-cnex 9336  ax-resscn 9337  ax-1cn 9338  ax-icn 9339  ax-addcl 9340  ax-addrcl 9341  ax-mulcl 9342  ax-mulrcl 9343  ax-mulcom 9344  ax-addass 9345  ax-mulass 9346  ax-distr 9347  ax-i2m1 9348  ax-1ne0 9349  ax-1rid 9350  ax-rnegex 9351  ax-rrecex 9352  ax-cnre 9353  ax-pre-lttri 9354  ax-pre-lttrn 9355  ax-pre-ltadd 9356  ax-pre-mulgt0 9357
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 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-reu 2720  df-rab 2722  df-v 2972  df-sbc 3185  df-csb 3287  df-dif 3329  df-un 3331  df-in 3333  df-ss 3340  df-pss 3342  df-nul 3636  df-if 3790  df-pw 3860  df-sn 3876  df-pr 3878  df-tp 3880  df-op 3882  df-uni 4090  df-iun 4171  df-br 4291  df-opab 4349  df-mpt 4350  df-tr 4384  df-eprel 4630  df-id 4634  df-po 4639  df-so 4640  df-fr 4677  df-we 4679  df-ord 4720  df-on 4721  df-lim 4722  df-suc 4723  df-xp 4844  df-rel 4845  df-cnv 4846  df-co 4847  df-dm 4848  df-rn 4849  df-res 4850  df-ima 4851  df-iota 5379  df-fun 5418  df-fn 5419  df-f 5420  df-f1 5421  df-fo 5422  df-f1o 5423  df-fv 5424  df-riota 6050  df-ov 6092  df-oprab 6093  df-mpt2 6094  df-om 6475  df-1st 6575  df-2nd 6576  df-recs 6830  df-rdg 6864  df-er 7099  df-en 7309  df-dom 7310  df-sdom 7311  df-pnf 9418  df-mnf 9419  df-xr 9420  df-ltxr 9421  df-le 9422  df-sub 9595  df-neg 9596  df-nn 10321  df-n0 10578  df-z 10645  df-uz 10860  df-fz 11436  df-seq 11805  df-sum 13162
This theorem is referenced by:  signsvf0  26979  signsvf1  26980  signsvfn  26981
  Copyright terms: Public domain W3C validator