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

Theorem ballotlemsdom 29344
Description: Domain of  S for a given counting  C. (Contributed by Thierry Arnoux, 12-Apr-2017.)
Hypotheses
Ref Expression
ballotth.m  |-  M  e.  NN
ballotth.n  |-  N  e.  NN
ballotth.o  |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
)  |  ( # `  c )  =  M }
ballotth.p  |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `
 O ) ) )
ballotth.f  |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
( 1 ... i
)  i^i  c )
)  -  ( # `  ( ( 1 ... i )  \  c
) ) ) ) )
ballotth.e  |-  E  =  { c  e.  O  |  A. i  e.  ( 1 ... ( M  +  N ) ) 0  <  ( ( F `  c ) `
 i ) }
ballotth.mgtn  |-  N  < 
M
ballotth.i  |-  I  =  ( c  e.  ( O  \  E ) 
|-> inf ( { k  e.  ( 1 ... ( M  +  N )
)  |  ( ( F `  c ) `
 k )  =  0 } ,  RR ,  <  ) )
ballotth.s  |-  S  =  ( c  e.  ( O  \  E ) 
|->  ( i  e.  ( 1 ... ( M  +  N ) ) 
|->  if ( i  <_ 
( I `  c
) ,  ( ( ( I `  c
)  +  1 )  -  i ) ,  i ) ) )
Assertion
Ref Expression
ballotlemsdom  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( S `
 C ) `  J )  e.  ( 1 ... ( M  +  N ) ) )
Distinct variable groups:    M, c    N, c    O, c    i, M   
i, N    i, O    k, M    k, N    k, O    i, c, F, k    C, i, k    i, E, k    C, k    k, I, c    E, c    i, I, c
Allowed substitution hints:    C( x, c)    P( x, i, k, c)    S( x, i, k, c)    E( x)    F( x)    I( x)    J( x, i, k, c)    M( x)    N( x)    O( x)

Proof of Theorem ballotlemsdom
StepHypRef Expression
1 ballotth.m . . 3  |-  M  e.  NN
2 ballotth.n . . 3  |-  N  e.  NN
3 ballotth.o . . 3  |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
)  |  ( # `  c )  =  M }
4 ballotth.p . . 3  |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `
 O ) ) )
5 ballotth.f . . 3  |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
( 1 ... i
)  i^i  c )
)  -  ( # `  ( ( 1 ... i )  \  c
) ) ) ) )
6 ballotth.e . . 3  |-  E  =  { c  e.  O  |  A. i  e.  ( 1 ... ( M  +  N ) ) 0  <  ( ( F `  c ) `
 i ) }
7 ballotth.mgtn . . 3  |-  N  < 
M
8 ballotth.i . . 3  |-  I  =  ( c  e.  ( O  \  E ) 
|-> inf ( { k  e.  ( 1 ... ( M  +  N )
)  |  ( ( F `  c ) `
 k )  =  0 } ,  RR ,  <  ) )
9 ballotth.s . . 3  |-  S  =  ( c  e.  ( O  \  E ) 
|->  ( i  e.  ( 1 ... ( M  +  N ) ) 
|->  if ( i  <_ 
( I `  c
) ,  ( ( ( I `  c
)  +  1 )  -  i ) ,  i ) ) )
101, 2, 3, 4, 5, 6, 7, 8, 9ballotlemsv 29342 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( S `
 C ) `  J )  =  if ( J  <_  (
I `  C ) ,  ( ( ( I `  C )  +  1 )  -  J ) ,  J
) )
11 fzssuz 11839 . . . . . . . 8  |-  ( 1 ... ( M  +  N ) )  C_  ( ZZ>= `  1 )
12 uzssz 11178 . . . . . . . 8  |-  ( ZZ>= ` 
1 )  C_  ZZ
1311, 12sstri 3441 . . . . . . 7  |-  ( 1 ... ( M  +  N ) )  C_  ZZ
141, 2, 3, 4, 5, 6, 7, 8ballotlemiex 29334 . . . . . . . 8  |-  ( C  e.  ( O  \  E )  ->  (
( I `  C
)  e.  ( 1 ... ( M  +  N ) )  /\  ( ( F `  C ) `  (
I `  C )
)  =  0 ) )
1514simpld 461 . . . . . . 7  |-  ( C  e.  ( O  \  E )  ->  (
I `  C )  e.  ( 1 ... ( M  +  N )
) )
1613, 15sseldi 3430 . . . . . 6  |-  ( C  e.  ( O  \  E )  ->  (
I `  C )  e.  ZZ )
1716ad2antrr 732 . . . . 5  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
I `  C )  e.  ZZ )
18 nnaddcl 10631 . . . . . . . 8  |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  +  N
)  e.  NN )
191, 2, 18mp2an 678 . . . . . . 7  |-  ( M  +  N )  e.  NN
2019nnzi 10961 . . . . . 6  |-  ( M  +  N )  e.  ZZ
2120a1i 11 . . . . 5  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  ( M  +  N )  e.  ZZ )
2215ad2antrr 732 . . . . . 6  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
I `  C )  e.  ( 1 ... ( M  +  N )
) )
23 elfzle2 11803 . . . . . 6  |-  ( ( I `  C )  e.  ( 1 ... ( M  +  N
) )  ->  (
I `  C )  <_  ( M  +  N
) )
2422, 23syl 17 . . . . 5  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
I `  C )  <_  ( M  +  N
) )
25 eluz2 11165 . . . . . 6  |-  ( ( M  +  N )  e.  ( ZZ>= `  (
I `  C )
)  <->  ( ( I `
 C )  e.  ZZ  /\  ( M  +  N )  e.  ZZ  /\  ( I `
 C )  <_ 
( M  +  N
) ) )
26 fzss2 11838 . . . . . 6  |-  ( ( M  +  N )  e.  ( ZZ>= `  (
I `  C )
)  ->  ( 1 ... ( I `  C ) )  C_  ( 1 ... ( M  +  N )
) )
2725, 26sylbir 217 . . . . 5  |-  ( ( ( I `  C
)  e.  ZZ  /\  ( M  +  N
)  e.  ZZ  /\  ( I `  C
)  <_  ( M  +  N ) )  -> 
( 1 ... (
I `  C )
)  C_  ( 1 ... ( M  +  N ) ) )
2817, 21, 24, 27syl3anc 1268 . . . 4  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
1 ... ( I `  C ) )  C_  ( 1 ... ( M  +  N )
) )
29 1zzd 10968 . . . . . . 7  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  1  e.  ZZ )
30 simplr 762 . . . . . . . 8  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  J  e.  ( 1 ... ( M  +  N )
) )
3113, 30sseldi 3430 . . . . . . 7  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  J  e.  ZZ )
32 elfzle1 11802 . . . . . . . 8  |-  ( J  e.  ( 1 ... ( M  +  N
) )  ->  1  <_  J )
3330, 32syl 17 . . . . . . 7  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  1  <_  J )
34 simpr 463 . . . . . . 7  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  J  <_  ( I `  C
) )
35 elfz4 11793 . . . . . . 7  |-  ( ( ( 1  e.  ZZ  /\  ( I `  C
)  e.  ZZ  /\  J  e.  ZZ )  /\  ( 1  <_  J  /\  J  <_  ( I `
 C ) ) )  ->  J  e.  ( 1 ... (
I `  C )
) )
3629, 17, 31, 33, 34, 35syl32anc 1276 . . . . . 6  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  J  e.  ( 1 ... (
I `  C )
) )
37 fzrev3i 11862 . . . . . 6  |-  ( J  e.  ( 1 ... ( I `  C
) )  ->  (
( 1  +  ( I `  C ) )  -  J )  e.  ( 1 ... ( I `  C
) ) )
3836, 37syl 17 . . . . 5  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
( 1  +  ( I `  C ) )  -  J )  e.  ( 1 ... ( I `  C
) ) )
39 1cnd 9659 . . . . . . . . 9  |-  ( C  e.  ( O  \  E )  ->  1  e.  CC )
4016zcnd 11041 . . . . . . . . 9  |-  ( C  e.  ( O  \  E )  ->  (
I `  C )  e.  CC )
4139, 40addcomd 9835 . . . . . . . 8  |-  ( C  e.  ( O  \  E )  ->  (
1  +  ( I `
 C ) )  =  ( ( I `
 C )  +  1 ) )
4241oveq1d 6305 . . . . . . 7  |-  ( C  e.  ( O  \  E )  ->  (
( 1  +  ( I `  C ) )  -  J )  =  ( ( ( I `  C )  +  1 )  -  J ) )
4342eleq1d 2513 . . . . . 6  |-  ( C  e.  ( O  \  E )  ->  (
( ( 1  +  ( I `  C
) )  -  J
)  e.  ( 1 ... ( I `  C ) )  <->  ( (
( I `  C
)  +  1 )  -  J )  e.  ( 1 ... (
I `  C )
) ) )
4443ad2antrr 732 . . . . 5  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
( ( 1  +  ( I `  C
) )  -  J
)  e.  ( 1 ... ( I `  C ) )  <->  ( (
( I `  C
)  +  1 )  -  J )  e.  ( 1 ... (
I `  C )
) ) )
4538, 44mpbid 214 . . . 4  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
( ( I `  C )  +  1 )  -  J )  e.  ( 1 ... ( I `  C
) ) )
4628, 45sseldd 3433 . . 3  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
( ( I `  C )  +  1 )  -  J )  e.  ( 1 ... ( M  +  N
) ) )
47 simplr 762 . . 3  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  -.  J  <_  ( I `  C
) )  ->  J  e.  ( 1 ... ( M  +  N )
) )
4846, 47ifclda 3913 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  if ( J  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  J ) ,  J )  e.  ( 1 ... ( M  +  N )
) )
4910, 48eqeltrd 2529 1  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( S `
 C ) `  J )  e.  ( 1 ... ( M  +  N ) ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 188    /\ wa 371    /\ w3a 985    = wceq 1444    e. wcel 1887   A.wral 2737   {crab 2741    \ cdif 3401    i^i cin 3403    C_ wss 3404   ifcif 3881   ~Pcpw 3951   class class class wbr 4402    |-> cmpt 4461   ` cfv 5582  (class class class)co 6290  infcinf 7955   RRcr 9538   0cc0 9539   1c1 9540    + caddc 9542    < clt 9675    <_ cle 9676    - cmin 9860    / cdiv 10269   NNcn 10609   ZZcz 10937   ZZ>=cuz 11159   ...cfz 11784   #chash 12515
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1669  ax-4 1682  ax-5 1758  ax-6 1805  ax-7 1851  ax-8 1889  ax-9 1896  ax-10 1915  ax-11 1920  ax-12 1933  ax-13 2091  ax-ext 2431  ax-rep 4515  ax-sep 4525  ax-nul 4534  ax-pow 4581  ax-pr 4639  ax-un 6583  ax-cnex 9595  ax-resscn 9596  ax-1cn 9597  ax-icn 9598  ax-addcl 9599  ax-addrcl 9600  ax-mulcl 9601  ax-mulrcl 9602  ax-mulcom 9603  ax-addass 9604  ax-mulass 9605  ax-distr 9606  ax-i2m1 9607  ax-1ne0 9608  ax-1rid 9609  ax-rnegex 9610  ax-rrecex 9611  ax-cnre 9612  ax-pre-lttri 9613  ax-pre-lttrn 9614  ax-pre-ltadd 9615  ax-pre-mulgt0 9616
This theorem depends on definitions:  df-bi 189  df-or 372  df-an 373  df-3or 986  df-3an 987  df-tru 1447  df-ex 1664  df-nf 1668  df-sb 1798  df-eu 2303  df-mo 2304  df-clab 2438  df-cleq 2444  df-clel 2447  df-nfc 2581  df-ne 2624  df-nel 2625  df-ral 2742  df-rex 2743  df-reu 2744  df-rmo 2745  df-rab 2746  df-v 3047  df-sbc 3268  df-csb 3364  df-dif 3407  df-un 3409  df-in 3411  df-ss 3418  df-pss 3420  df-nul 3732  df-if 3882  df-pw 3953  df-sn 3969  df-pr 3971  df-tp 3973  df-op 3975  df-uni 4199  df-int 4235  df-iun 4280  df-br 4403  df-opab 4462  df-mpt 4463  df-tr 4498  df-eprel 4745  df-id 4749  df-po 4755  df-so 4756  df-fr 4793  df-we 4795  df-xp 4840  df-rel 4841  df-cnv 4842  df-co 4843  df-dm 4844  df-rn 4845  df-res 4846  df-ima 4847  df-pred 5380  df-ord 5426  df-on 5427  df-lim 5428  df-suc 5429  df-iota 5546  df-fun 5584  df-fn 5585  df-f 5586  df-f1 5587  df-fo 5588  df-f1o 5589  df-fv 5590  df-riota 6252  df-ov 6293  df-oprab 6294  df-mpt2 6295  df-om 6693  df-1st 6793  df-2nd 6794  df-wrecs 7028  df-recs 7090  df-rdg 7128  df-1o 7182  df-oadd 7186  df-er 7363  df-en 7570  df-dom 7571  df-sdom 7572  df-fin 7573  df-sup 7956  df-inf 7957  df-card 8373  df-cda 8598  df-pnf 9677  df-mnf 9678  df-xr 9679  df-ltxr 9680  df-le 9681  df-sub 9862  df-neg 9863  df-nn 10610  df-2 10668  df-n0 10870  df-z 10938  df-uz 11160  df-fz 11785  df-hash 12516
This theorem is referenced by:  ballotlemsel1i  29345  ballotlemsf1o  29346  ballotlemfrceq  29361  ballotlemfrcn0  29362
  Copyright terms: Public domain W3C validator