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

Theorem ballotlemsdom 27031
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 ) 
|->  sup ( { 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 ) 
|->  sup ( { 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 27029 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( S `
 C ) `  J )  =  if ( J  <_  (
I `  C ) ,  ( ( ( I `  C )  +  1 )  -  J ) ,  J
) )
11 fzssuz 11609 . . . . . . . 8  |-  ( 1 ... ( M  +  N ) )  C_  ( ZZ>= `  1 )
12 uzssz 10984 . . . . . . . 8  |-  ( ZZ>= ` 
1 )  C_  ZZ
1311, 12sstri 3466 . . . . . . 7  |-  ( 1 ... ( M  +  N ) )  C_  ZZ
141, 2, 3, 4, 5, 6, 7, 8ballotlemiex 27021 . . . . . . . 8  |-  ( C  e.  ( O  \  E )  ->  (
( I `  C
)  e.  ( 1 ... ( M  +  N ) )  /\  ( ( F `  C ) `  (
I `  C )
)  =  0 ) )
1514simpld 459 . . . . . . 7  |-  ( C  e.  ( O  \  E )  ->  (
I `  C )  e.  ( 1 ... ( M  +  N )
) )
1613, 15sseldi 3455 . . . . . 6  |-  ( C  e.  ( O  \  E )  ->  (
I `  C )  e.  ZZ )
1716ad2antrr 725 . . . . 5  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
I `  C )  e.  ZZ )
18 nnaddcl 10448 . . . . . . . 8  |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  +  N
)  e.  NN )
191, 2, 18mp2an 672 . . . . . . 7  |-  ( M  +  N )  e.  NN
2019nnzi 10774 . . . . . 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 725 . . . . . 6  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
I `  C )  e.  ( 1 ... ( M  +  N )
) )
23 elfzle2 11565 . . . . . 6  |-  ( ( I `  C )  e.  ( 1 ... ( M  +  N
) )  ->  (
I `  C )  <_  ( M  +  N
) )
2422, 23syl 16 . . . . 5  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
I `  C )  <_  ( M  +  N
) )
25 eluz2 10971 . . . . . 6  |-  ( ( M  +  N )  e.  ( ZZ>= `  (
I `  C )
)  <->  ( ( I `
 C )  e.  ZZ  /\  ( M  +  N )  e.  ZZ  /\  ( I `
 C )  <_ 
( M  +  N
) ) )
26 fzss2 11608 . . . . . 6  |-  ( ( M  +  N )  e.  ( ZZ>= `  (
I `  C )
)  ->  ( 1 ... ( I `  C ) )  C_  ( 1 ... ( M  +  N )
) )
2725, 26sylbir 213 . . . . 5  |-  ( ( ( I `  C
)  e.  ZZ  /\  ( M  +  N
)  e.  ZZ  /\  ( I `  C
)  <_  ( M  +  N ) )  -> 
( 1 ... (
I `  C )
)  C_  ( 1 ... ( M  +  N ) ) )
2817, 21, 24, 27syl3anc 1219 . . . 4  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
1 ... ( I `  C ) )  C_  ( 1 ... ( M  +  N )
) )
29 1z 10780 . . . . . . . 8  |-  1  e.  ZZ
3029a1i 11 . . . . . . 7  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  1  e.  ZZ )
31 simplr 754 . . . . . . . 8  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  J  e.  ( 1 ... ( M  +  N )
) )
3213, 31sseldi 3455 . . . . . . 7  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  J  e.  ZZ )
33 elfzle1 11564 . . . . . . . 8  |-  ( J  e.  ( 1 ... ( M  +  N
) )  ->  1  <_  J )
3431, 33syl 16 . . . . . . 7  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  1  <_  J )
35 simpr 461 . . . . . . 7  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  J  <_  ( I `  C
) )
36 elfz4 11556 . . . . . . 7  |-  ( ( ( 1  e.  ZZ  /\  ( I `  C
)  e.  ZZ  /\  J  e.  ZZ )  /\  ( 1  <_  J  /\  J  <_  ( I `
 C ) ) )  ->  J  e.  ( 1 ... (
I `  C )
) )
3730, 17, 32, 34, 35, 36syl32anc 1227 . . . . . 6  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  J  e.  ( 1 ... (
I `  C )
) )
38 fzrev3i 11633 . . . . . 6  |-  ( J  e.  ( 1 ... ( I `  C
) )  ->  (
( 1  +  ( I `  C ) )  -  J )  e.  ( 1 ... ( I `  C
) ) )
3937, 38syl 16 . . . . 5  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
( 1  +  ( I `  C ) )  -  J )  e.  ( 1 ... ( I `  C
) ) )
40 ax-1cn 9444 . . . . . . . . . 10  |-  1  e.  CC
4140a1i 11 . . . . . . . . 9  |-  ( C  e.  ( O  \  E )  ->  1  e.  CC )
4216zcnd 10852 . . . . . . . . 9  |-  ( C  e.  ( O  \  E )  ->  (
I `  C )  e.  CC )
4341, 42addcomd 9675 . . . . . . . 8  |-  ( C  e.  ( O  \  E )  ->  (
1  +  ( I `
 C ) )  =  ( ( I `
 C )  +  1 ) )
4443oveq1d 6208 . . . . . . 7  |-  ( C  e.  ( O  \  E )  ->  (
( 1  +  ( I `  C ) )  -  J )  =  ( ( ( I `  C )  +  1 )  -  J ) )
4544eleq1d 2520 . . . . . 6  |-  ( C  e.  ( O  \  E )  ->  (
( ( 1  +  ( I `  C
) )  -  J
)  e.  ( 1 ... ( I `  C ) )  <->  ( (
( I `  C
)  +  1 )  -  J )  e.  ( 1 ... (
I `  C )
) ) )
4645ad2antrr 725 . . . . 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 )
) ) )
4739, 46mpbid 210 . . . 4  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
( ( I `  C )  +  1 )  -  J )  e.  ( 1 ... ( I `  C
) ) )
4828, 47sseldd 3458 . . 3  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  J  <_ 
( I `  C
) )  ->  (
( ( I `  C )  +  1 )  -  J )  e.  ( 1 ... ( M  +  N
) ) )
49 simplr 754 . . 3  |-  ( ( ( C  e.  ( O  \  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  /\  -.  J  <_  ( I `  C
) )  ->  J  e.  ( 1 ... ( M  +  N )
) )
5048, 49ifclda 3922 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  if ( J  <_  ( I `  C ) ,  ( ( ( I `  C )  +  1 )  -  J ) ,  J )  e.  ( 1 ... ( M  +  N )
) )
5110, 50eqeltrd 2539 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 184    /\ wa 369    /\ w3a 965    = wceq 1370    e. wcel 1758   A.wral 2795   {crab 2799    \ cdif 3426    i^i cin 3428    C_ wss 3429   ifcif 3892   ~Pcpw 3961   class class class wbr 4393    |-> cmpt 4451   `'ccnv 4940   ` cfv 5519  (class class class)co 6193   supcsup 7794   CCcc 9384   RRcr 9385   0cc0 9386   1c1 9387    + caddc 9389    < clt 9522    <_ cle 9523    - cmin 9699    / cdiv 10097   NNcn 10426   ZZcz 10750   ZZ>=cuz 10965   ...cfz 11547   #chash 12213
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1592  ax-4 1603  ax-5 1671  ax-6 1710  ax-7 1730  ax-8 1760  ax-9 1762  ax-10 1777  ax-11 1782  ax-12 1794  ax-13 1952  ax-ext 2430  ax-rep 4504  ax-sep 4514  ax-nul 4522  ax-pow 4571  ax-pr 4632  ax-un 6475  ax-cnex 9442  ax-resscn 9443  ax-1cn 9444  ax-icn 9445  ax-addcl 9446  ax-addrcl 9447  ax-mulcl 9448  ax-mulrcl 9449  ax-mulcom 9450  ax-addass 9451  ax-mulass 9452  ax-distr 9453  ax-i2m1 9454  ax-1ne0 9455  ax-1rid 9456  ax-rnegex 9457  ax-rrecex 9458  ax-cnre 9459  ax-pre-lttri 9460  ax-pre-lttrn 9461  ax-pre-ltadd 9462  ax-pre-mulgt0 9463
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1373  df-ex 1588  df-nf 1591  df-sb 1703  df-eu 2264  df-mo 2265  df-clab 2437  df-cleq 2443  df-clel 2446  df-nfc 2601  df-ne 2646  df-nel 2647  df-ral 2800  df-rex 2801  df-reu 2802  df-rmo 2803  df-rab 2804  df-v 3073  df-sbc 3288  df-csb 3390  df-dif 3432  df-un 3434  df-in 3436  df-ss 3443  df-pss 3445  df-nul 3739  df-if 3893  df-pw 3963  df-sn 3979  df-pr 3981  df-tp 3983  df-op 3985  df-uni 4193  df-int 4230  df-iun 4274  df-br 4394  df-opab 4452  df-mpt 4453  df-tr 4487  df-eprel 4733  df-id 4737  df-po 4742  df-so 4743  df-fr 4780  df-we 4782  df-ord 4823  df-on 4824  df-lim 4825  df-suc 4826  df-xp 4947  df-rel 4948  df-cnv 4949  df-co 4950  df-dm 4951  df-rn 4952  df-res 4953  df-ima 4954  df-iota 5482  df-fun 5521  df-fn 5522  df-f 5523  df-f1 5524  df-fo 5525  df-f1o 5526  df-fv 5527  df-riota 6154  df-ov 6196  df-oprab 6197  df-mpt2 6198  df-om 6580  df-1st 6680  df-2nd 6681  df-recs 6935  df-rdg 6969  df-1o 7023  df-oadd 7027  df-er 7204  df-en 7414  df-dom 7415  df-sdom 7416  df-fin 7417  df-sup 7795  df-card 8213  df-cda 8441  df-pnf 9524  df-mnf 9525  df-xr 9526  df-ltxr 9527  df-le 9528  df-sub 9701  df-neg 9702  df-nn 10427  df-2 10484  df-n0 10684  df-z 10751  df-uz 10966  df-fz 11548  df-hash 12214
This theorem is referenced by:  ballotlemsel1i  27032  ballotlemsf1o  27033  ballotlemfrceq  27048  ballotlemfrcn0  27049
  Copyright terms: Public domain W3C validator