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

Theorem ballotlemrinv0 29191
Description: Lemma for ballotlemrinv 29192. (Contributed by Thierry Arnoux, 18-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
ballotlemrinv0  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( D  e.  ( O  \  E )  /\  C  =  ( ( S `  D
) " D ) ) )
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    S, k    D, i, k    S, i, c    R, i, k    x, c    x, C    x, F    x, M    x, N, i, k
Allowed substitution hints:    C( c)    D( x, c)    P( x, i, k, c)    R( x, c)    S( x)    E( x)    I( x)    O( x)

Proof of Theorem ballotlemrinv0
StepHypRef Expression
1 ballotth.m . . . . . 6  |-  M  e.  NN
2 ballotth.n . . . . . 6  |-  N  e.  NN
3 ballotth.o . . . . . 6  |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
)  |  ( # `  c )  =  M }
4 ballotth.p . . . . . 6  |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `
 O ) ) )
5 ballotth.f . . . . . 6  |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
( 1 ... i
)  i^i  c )
)  -  ( # `  ( ( 1 ... i )  \  c
) ) ) ) )
6 ballotth.e . . . . . 6  |-  E  =  { c  e.  O  |  A. i  e.  ( 1 ... ( M  +  N ) ) 0  <  ( ( F `  c ) `
 i ) }
7 ballotth.mgtn . . . . . 6  |-  N  < 
M
8 ballotth.i . . . . . 6  |-  I  =  ( c  e.  ( O  \  E ) 
|->  sup ( { k  e.  ( 1 ... ( M  +  N
) )  |  ( ( F `  c
) `  k )  =  0 } ,  RR ,  `'  <  ) )
9 ballotth.s . . . . . 6  |-  S  =  ( c  e.  ( O  \  E ) 
|->  ( i  e.  ( 1 ... ( M  +  N ) ) 
|->  if ( i  <_ 
( I `  c
) ,  ( ( ( I `  c
)  +  1 )  -  i ) ,  i ) ) )
10 ballotth.r . . . . . 6  |-  R  =  ( c  e.  ( O  \  E ) 
|->  ( ( S `  c ) " c
) )
111, 2, 3, 4, 5, 6, 7, 8, 9, 10ballotlemrval 29176 . . . . 5  |-  ( C  e.  ( O  \  E )  ->  ( R `  C )  =  ( ( S `
 C ) " C ) )
1211adantr 466 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( R `  C
)  =  ( ( S `  C )
" C ) )
13 simpr 462 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  ->  D  =  ( ( S `  C ) " C ) )
1412, 13eqtr4d 2473 . . 3  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( R `  C
)  =  D )
151, 2, 3, 4, 5, 6, 7, 8, 9, 10ballotlemrc 29189 . . . 4  |-  ( C  e.  ( O  \  E )  ->  ( R `  C )  e.  ( O  \  E
) )
1615adantr 466 . . 3  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( R `  C
)  e.  ( O 
\  E ) )
1714, 16eqeltrrd 2518 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  ->  D  e.  ( O  \  E ) )
181, 2, 3, 4, 5, 6, 7, 8, 9ballotlemsf1o 29172 . . . . . . 7  |-  ( C  e.  ( O  \  E )  ->  (
( S `  C
) : ( 1 ... ( M  +  N ) ) -1-1-onto-> ( 1 ... ( M  +  N ) )  /\  `' ( S `  C )  =  ( S `  C ) ) )
1918simprd 464 . . . . . 6  |-  ( C  e.  ( O  \  E )  ->  `' ( S `  C )  =  ( S `  C ) )
2019adantr 466 . . . . 5  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  ->  `' ( S `  C )  =  ( S `  C ) )
2120eqcomd 2437 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( S `  C
)  =  `' ( S `  C ) )
2221, 13imaeq12d 5189 . . 3  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( ( S `  C ) " D
)  =  ( `' ( S `  C
) " ( ( S `  C )
" C ) ) )
23 simpl 458 . . . . 5  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  ->  C  e.  ( O  \  E ) )
241, 2, 3, 4, 5, 6, 7, 8, 9, 10ballotlemirc 29190 . . . . . . 7  |-  ( C  e.  ( O  \  E )  ->  (
I `  ( R `  C ) )  =  ( I `  C
) )
2524adantr 466 . . . . . 6  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( I `  ( R `  C )
)  =  ( I `
 C ) )
2614fveq2d 5885 . . . . . 6  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( I `  ( R `  C )
)  =  ( I `
 D ) )
2725, 26eqtr3d 2472 . . . . 5  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( I `  C
)  =  ( I `
 D ) )
281, 2, 3, 4, 5, 6, 7, 8, 9ballotlemieq 29175 . . . . 5  |-  ( ( C  e.  ( O 
\  E )  /\  D  e.  ( O  \  E )  /\  (
I `  C )  =  ( I `  D ) )  -> 
( S `  C
)  =  ( S `
 D ) )
2923, 17, 27, 28syl3anc 1264 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( S `  C
)  =  ( S `
 D ) )
3029imaeq1d 5187 . . 3  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( ( S `  C ) " D
)  =  ( ( S `  D )
" D ) )
3118simpld 460 . . . . 5  |-  ( C  e.  ( O  \  E )  ->  ( S `  C ) : ( 1 ... ( M  +  N
) ) -1-1-onto-> ( 1 ... ( M  +  N )
) )
32 f1of1 5830 . . . . 5  |-  ( ( S `  C ) : ( 1 ... ( M  +  N
) ) -1-1-onto-> ( 1 ... ( M  +  N )
)  ->  ( S `  C ) : ( 1 ... ( M  +  N ) )
-1-1-> ( 1 ... ( M  +  N )
) )
3323, 31, 323syl 18 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( S `  C
) : ( 1 ... ( M  +  N ) ) -1-1-> ( 1 ... ( M  +  N ) ) )
34 eldifi 3593 . . . . 5  |-  ( C  e.  ( O  \  E )  ->  C  e.  O )
351, 2, 3ballotlemelo 29146 . . . . . 6  |-  ( C  e.  O  <->  ( C  C_  ( 1 ... ( M  +  N )
)  /\  ( # `  C
)  =  M ) )
3635simplbi 461 . . . . 5  |-  ( C  e.  O  ->  C  C_  ( 1 ... ( M  +  N )
) )
3723, 34, 363syl 18 . . . 4  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  ->  C  C_  ( 1 ... ( M  +  N
) ) )
38 f1imacnv 5847 . . . 4  |-  ( ( ( S `  C
) : ( 1 ... ( M  +  N ) ) -1-1-> ( 1 ... ( M  +  N ) )  /\  C  C_  (
1 ... ( M  +  N ) ) )  ->  ( `' ( S `  C )
" ( ( S `
 C ) " C ) )  =  C )
3933, 37, 38syl2anc 665 . . 3  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( `' ( S `
 C ) "
( ( S `  C ) " C
) )  =  C )
4022, 30, 393eqtr3rd 2479 . 2  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  ->  C  =  ( ( S `  D ) " D ) )
4117, 40jca 534 1  |-  ( ( C  e.  ( O 
\  E )  /\  D  =  ( ( S `  C ) " C ) )  -> 
( D  e.  ( O  \  E )  /\  C  =  ( ( S `  D
) " D ) ) )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 370    = wceq 1437    e. wcel 1870   A.wral 2782   {crab 2786    \ cdif 3439    i^i cin 3441    C_ wss 3442   ifcif 3915   ~Pcpw 3985   class class class wbr 4426    |-> cmpt 4484   `'ccnv 4853   "cima 4857   -1-1->wf1 5598   -1-1-onto->wf1o 5600   ` cfv 5601  (class class class)co 6305   supcsup 7960   RRcr 9537   0cc0 9538   1c1 9539    + caddc 9541    < clt 9674    <_ cle 9675    - cmin 9859    / cdiv 10268   NNcn 10609   ZZcz 10937   ...cfz 11782   #chash 12512
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1751  ax-6 1797  ax-7 1841  ax-8 1872  ax-9 1874  ax-10 1889  ax-11 1894  ax-12 1907  ax-13 2055  ax-ext 2407  ax-rep 4538  ax-sep 4548  ax-nul 4556  ax-pow 4603  ax-pr 4661  ax-un 6597  ax-cnex 9594  ax-resscn 9595  ax-1cn 9596  ax-icn 9597  ax-addcl 9598  ax-addrcl 9599  ax-mulcl 9600  ax-mulrcl 9601  ax-mulcom 9602  ax-addass 9603  ax-mulass 9604  ax-distr 9605  ax-i2m1 9606  ax-1ne0 9607  ax-1rid 9608  ax-rnegex 9609  ax-rrecex 9610  ax-cnre 9611  ax-pre-lttri 9612  ax-pre-lttrn 9613  ax-pre-ltadd 9614  ax-pre-mulgt0 9615
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3or 983  df-3an 984  df-tru 1440  df-ex 1660  df-nf 1664  df-sb 1790  df-eu 2270  df-mo 2271  df-clab 2415  df-cleq 2421  df-clel 2424  df-nfc 2579  df-ne 2627  df-nel 2628  df-ral 2787  df-rex 2788  df-reu 2789  df-rmo 2790  df-rab 2791  df-v 3089  df-sbc 3306  df-csb 3402  df-dif 3445  df-un 3447  df-in 3449  df-ss 3456  df-pss 3458  df-nul 3768  df-if 3916  df-pw 3987  df-sn 4003  df-pr 4005  df-tp 4007  df-op 4009  df-uni 4223  df-int 4259  df-iun 4304  df-br 4427  df-opab 4485  df-mpt 4486  df-tr 4521  df-eprel 4765  df-id 4769  df-po 4775  df-so 4776  df-fr 4813  df-we 4815  df-xp 4860  df-rel 4861  df-cnv 4862  df-co 4863  df-dm 4864  df-rn 4865  df-res 4866  df-ima 4867  df-pred 5399  df-ord 5445  df-on 5446  df-lim 5447  df-suc 5448  df-iota 5565  df-fun 5603  df-fn 5604  df-f 5605  df-f1 5606  df-fo 5607  df-f1o 5608  df-fv 5609  df-riota 6267  df-ov 6308  df-oprab 6309  df-mpt2 6310  df-om 6707  df-1st 6807  df-2nd 6808  df-wrecs 7036  df-recs 7098  df-rdg 7136  df-1o 7190  df-oadd 7194  df-er 7371  df-en 7578  df-dom 7579  df-sdom 7580  df-fin 7581  df-sup 7962  df-card 8372  df-cda 8596  df-pnf 9676  df-mnf 9677  df-xr 9678  df-ltxr 9679  df-le 9680  df-sub 9861  df-neg 9862  df-nn 10610  df-2 10668  df-n0 10870  df-z 10938  df-uz 11160  df-rp 11303  df-fz 11783  df-hash 12513
This theorem is referenced by:  ballotlemrinv  29192
  Copyright terms: Public domain W3C validator