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

Theorem ballotlemrv 24730
Description: Value of  R evaluated at  J. (Contributed by Thierry Arnoux, 17-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 ) ) )
ballotth.r  |-  R  =  ( c  e.  ( O  \  E ) 
|->  ( ( S `  c ) " c
) )
Assertion
Ref Expression
ballotlemrv  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( J  e.  ( R `  C
)  <->  if ( J  <_ 
( I `  C
) ,  ( ( ( I `  C
)  +  1 )  -  J ) ,  J )  e.  C
) )
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    k, J    S, k, i, c
Allowed substitution hints:    C( x, c)    P( x, i, k, c)    R( x, i, k, c)    S( x)    E( x)    F( x)    I( x)    J( x, i, c)    M( x)    N( x)    O( x)

Proof of Theorem ballotlemrv
StepHypRef Expression
1 simpl 444 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  C  e.  ( O  \  E ) )
2 ballotth.m . . . . . 6  |-  M  e.  NN
3 ballotth.n . . . . . 6  |-  N  e.  NN
4 ballotth.o . . . . . 6  |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
)  |  ( # `  c )  =  M }
5 ballotth.p . . . . . 6  |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `
 O ) ) )
6 ballotth.f . . . . . 6  |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
( 1 ... i
)  i^i  c )
)  -  ( # `  ( ( 1 ... i )  \  c
) ) ) ) )
7 ballotth.e . . . . . 6  |-  E  =  { c  e.  O  |  A. i  e.  ( 1 ... ( M  +  N ) ) 0  <  ( ( F `  c ) `
 i ) }
8 ballotth.mgtn . . . . . 6  |-  N  < 
M
9 ballotth.i . . . . . 6  |-  I  =  ( c  e.  ( O  \  E ) 
|->  sup ( { k  e.  ( 1 ... ( M  +  N
) )  |  ( ( F `  c
) `  k )  =  0 } ,  RR ,  `'  <  ) )
10 ballotth.s . . . . . 6  |-  S  =  ( c  e.  ( O  \  E ) 
|->  ( i  e.  ( 1 ... ( M  +  N ) ) 
|->  if ( i  <_ 
( I `  c
) ,  ( ( ( I `  c
)  +  1 )  -  i ) ,  i ) ) )
112, 3, 4, 5, 6, 7, 8, 9, 10ballotlemsf1o 24724 . . . . 5  |-  ( C  e.  ( O  \  E )  ->  (
( S `  C
) : ( 1 ... ( M  +  N ) ) -1-1-onto-> ( 1 ... ( M  +  N ) )  /\  `' ( S `  C )  =  ( S `  C ) ) )
1211simpld 446 . . . 4  |-  ( C  e.  ( O  \  E )  ->  ( S `  C ) : ( 1 ... ( M  +  N
) ) -1-1-onto-> ( 1 ... ( M  +  N )
) )
13 f1ofun 5635 . . . 4  |-  ( ( S `  C ) : ( 1 ... ( M  +  N
) ) -1-1-onto-> ( 1 ... ( M  +  N )
)  ->  Fun  ( S `
 C ) )
141, 12, 133syl 19 . . 3  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  Fun  ( S `  C ) )
15 simpr 448 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  J  e.  ( 1 ... ( M  +  N ) ) )
16 f1odm 5637 . . . . 5  |-  ( ( S `  C ) : ( 1 ... ( M  +  N
) ) -1-1-onto-> ( 1 ... ( M  +  N )
)  ->  dom  ( S `
 C )  =  ( 1 ... ( M  +  N )
) )
171, 12, 163syl 19 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  dom  ( S `  C )  =  ( 1 ... ( M  +  N ) ) )
1815, 17eleqtrrd 2481 . . 3  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  J  e.  dom  ( S `  C ) )
19 fvimacnv 5804 . . 3  |-  ( ( Fun  ( S `  C )  /\  J  e.  dom  ( S `  C ) )  -> 
( ( ( S `
 C ) `  J )  e.  C  <->  J  e.  ( `' ( S `  C )
" C ) ) )
2014, 18, 19syl2anc 643 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( ( S `  C ) `
 J )  e.  C  <->  J  e.  ( `' ( S `  C ) " C
) ) )
212, 3, 4, 5, 6, 7, 8, 9, 10ballotlemsv 24720 . . 3  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( S `
 C ) `  J )  =  if ( J  <_  (
I `  C ) ,  ( ( ( I `  C )  +  1 )  -  J ) ,  J
) )
2221eleq1d 2470 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( ( S `  C ) `
 J )  e.  C  <->  if ( J  <_ 
( I `  C
) ,  ( ( ( I `  C
)  +  1 )  -  J ) ,  J )  e.  C
) )
2311simprd 450 . . . . . 6  |-  ( C  e.  ( O  \  E )  ->  `' ( S `  C )  =  ( S `  C ) )
2423imaeq1d 5161 . . . . 5  |-  ( C  e.  ( O  \  E )  ->  ( `' ( S `  C ) " C
)  =  ( ( S `  C )
" C ) )
25 ballotth.r . . . . . 6  |-  R  =  ( c  e.  ( O  \  E ) 
|->  ( ( S `  c ) " c
) )
262, 3, 4, 5, 6, 7, 8, 9, 10, 25ballotlemrval 24728 . . . . 5  |-  ( C  e.  ( O  \  E )  ->  ( R `  C )  =  ( ( S `
 C ) " C ) )
2724, 26eqtr4d 2439 . . . 4  |-  ( C  e.  ( O  \  E )  ->  ( `' ( S `  C ) " C
)  =  ( R `
 C ) )
2827eleq2d 2471 . . 3  |-  ( C  e.  ( O  \  E )  ->  ( J  e.  ( `' ( S `  C )
" C )  <->  J  e.  ( R `  C ) ) )
291, 28syl 16 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( J  e.  ( `' ( S `
 C ) " C )  <->  J  e.  ( R `  C ) ) )
3020, 22, 293bitr3rd 276 1  |-  ( ( C  e.  ( O 
\  E )  /\  J  e.  ( 1 ... ( M  +  N ) ) )  ->  ( J  e.  ( R `  C
)  <->  if ( J  <_ 
( I `  C
) ,  ( ( ( I `  C
)  +  1 )  -  J ) ,  J )  e.  C
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1649    e. wcel 1721   A.wral 2666   {crab 2670    \ cdif 3277    i^i cin 3279   ifcif 3699   ~Pcpw 3759   class class class wbr 4172    e. cmpt 4226   `'ccnv 4836   dom cdm 4837   "cima 4840   Fun wfun 5407   -1-1-onto->wf1o 5412   ` cfv 5413  (class class class)co 6040   supcsup 7403   RRcr 8945   0cc0 8946   1c1 8947    + caddc 8949    < clt 9076    <_ cle 9077    - cmin 9247    / cdiv 9633   NNcn 9956   ZZcz 10238   ...cfz 10999   #chash 11573
This theorem is referenced by:  ballotlemrv1  24731  ballotlemrv2  24732
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2385  ax-rep 4280  ax-sep 4290  ax-nul 4298  ax-pow 4337  ax-pr 4363  ax-un 4660  ax-cnex 9002  ax-resscn 9003  ax-1cn 9004  ax-icn 9005  ax-addcl 9006  ax-addrcl 9007  ax-mulcl 9008  ax-mulrcl 9009  ax-mulcom 9010  ax-addass 9011  ax-mulass 9012  ax-distr 9013  ax-i2m1 9014  ax-1ne0 9015  ax-1rid 9016  ax-rnegex 9017  ax-rrecex 9018  ax-cnre 9019  ax-pre-lttri 9020  ax-pre-lttrn 9021  ax-pre-ltadd 9022  ax-pre-mulgt0 9023
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2258  df-mo 2259  df-clab 2391  df-cleq 2397  df-clel 2400  df-nfc 2529  df-ne 2569  df-nel 2570  df-ral 2671  df-rex 2672  df-reu 2673  df-rmo 2674  df-rab 2675  df-v 2918  df-sbc 3122  df-csb 3212  df-dif 3283  df-un 3285  df-in 3287  df-ss 3294  df-pss 3296  df-nul 3589  df-if 3700  df-pw 3761  df-sn 3780  df-pr 3781  df-tp 3782  df-op 3783  df-uni 3976  df-int 4011  df-iun 4055  df-br 4173  df-opab 4227  df-mpt 4228  df-tr 4263  df-eprel 4454  df-id 4458  df-po 4463  df-so 4464  df-fr 4501  df-we 4503  df-ord 4544  df-on 4545  df-lim 4546  df-suc 4547  df-om 4805  df-xp 4843  df-rel 4844  df-cnv 4845  df-co 4846  df-dm 4847  df-rn 4848  df-res 4849  df-ima 4850  df-iota 5377  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-ov 6043  df-oprab 6044  df-mpt2 6045  df-1st 6308  df-2nd 6309  df-riota 6508  df-recs 6592  df-rdg 6627  df-1o 6683  df-oadd 6687  df-er 6864  df-en 7069  df-dom 7070  df-sdom 7071  df-fin 7072  df-sup 7404  df-card 7782  df-cda 8004  df-pnf 9078  df-mnf 9079  df-xr 9080  df-ltxr 9081  df-le 9082  df-sub 9249  df-neg 9250  df-nn 9957  df-2 10014  df-n0 10178  df-z 10239  df-uz 10445  df-rp 10569  df-fz 11000  df-hash 11574
  Copyright terms: Public domain W3C validator