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

Theorem ballotlem4 28188
Description: If the first pick is a vote for B, A is not ahead throughout the count (Contributed by Thierry Arnoux, 25-Nov-2016.)
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 ) }
Assertion
Ref Expression
ballotlem4  |-  ( C  e.  O  ->  ( -.  1  e.  C  ->  -.  C  e.  E
) )
Distinct variable groups:    M, c    N, c    O, c    i, M   
i, N    i, O, c    F, c, i    C, i
Allowed substitution hints:    C( x, c)    P( x, i, c)    E( x, i, c)    F( x)    M( x)    N( x)    O( x)

Proof of Theorem ballotlem4
StepHypRef Expression
1 ballotth.m . . . . . . . 8  |-  M  e.  NN
2 ballotth.n . . . . . . . 8  |-  N  e.  NN
3 nnaddcl 10559 . . . . . . . 8  |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  +  N
)  e.  NN )
41, 2, 3mp2an 672 . . . . . . 7  |-  ( M  +  N )  e.  NN
5 elnnuz 11119 . . . . . . 7  |-  ( ( M  +  N )  e.  NN  <->  ( M  +  N )  e.  (
ZZ>= `  1 ) )
64, 5mpbi 208 . . . . . 6  |-  ( M  +  N )  e.  ( ZZ>= `  1 )
7 eluzfz1 11694 . . . . . 6  |-  ( ( M  +  N )  e.  ( ZZ>= `  1
)  ->  1  e.  ( 1 ... ( M  +  N )
) )
86, 7ax-mp 5 . . . . 5  |-  1  e.  ( 1 ... ( M  +  N )
)
9 0le1 10077 . . . . . . . . . 10  |-  0  <_  1
10 0re 9597 . . . . . . . . . . 11  |-  0  e.  RR
11 1re 9596 . . . . . . . . . . 11  |-  1  e.  RR
1210, 11lenlti 9705 . . . . . . . . . 10  |-  ( 0  <_  1  <->  -.  1  <  0 )
139, 12mpbi 208 . . . . . . . . 9  |-  -.  1  <  0
14 ltsub13 10034 . . . . . . . . . . 11  |-  ( ( 0  e.  RR  /\  0  e.  RR  /\  1  e.  RR )  ->  (
0  <  ( 0  -  1 )  <->  1  <  ( 0  -  0 ) ) )
1510, 10, 11, 14mp3an 1324 . . . . . . . . . 10  |-  ( 0  <  ( 0  -  1 )  <->  1  <  ( 0  -  0 ) )
16 0m0e0 10646 . . . . . . . . . . 11  |-  ( 0  -  0 )  =  0
1716breq2i 4455 . . . . . . . . . 10  |-  ( 1  <  ( 0  -  0 )  <->  1  <  0 )
1815, 17bitri 249 . . . . . . . . 9  |-  ( 0  <  ( 0  -  1 )  <->  1  <  0 )
1913, 18mtbir 299 . . . . . . . 8  |-  -.  0  <  ( 0  -  1 )
20 1m1e0 10605 . . . . . . . . . . . 12  |-  ( 1  -  1 )  =  0
2120fveq2i 5869 . . . . . . . . . . 11  |-  ( ( F `  C ) `
 ( 1  -  1 ) )  =  ( ( F `  C ) `  0
)
22 ballotth.o . . . . . . . . . . . 12  |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
)  |  ( # `  c )  =  M }
23 ballotth.p . . . . . . . . . . . 12  |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `
 O ) ) )
24 ballotth.f . . . . . . . . . . . 12  |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
( 1 ... i
)  i^i  c )
)  -  ( # `  ( ( 1 ... i )  \  c
) ) ) ) )
251, 2, 22, 23, 24ballotlemfval0 28185 . . . . . . . . . . 11  |-  ( C  e.  O  ->  (
( F `  C
) `  0 )  =  0 )
2621, 25syl5eq 2520 . . . . . . . . . 10  |-  ( C  e.  O  ->  (
( F `  C
) `  ( 1  -  1 ) )  =  0 )
2726oveq1d 6300 . . . . . . . . 9  |-  ( C  e.  O  ->  (
( ( F `  C ) `  (
1  -  1 ) )  -  1 )  =  ( 0  -  1 ) )
2827breq2d 4459 . . . . . . . 8  |-  ( C  e.  O  ->  (
0  <  ( (
( F `  C
) `  ( 1  -  1 ) )  -  1 )  <->  0  <  ( 0  -  1 ) ) )
2919, 28mtbiri 303 . . . . . . 7  |-  ( C  e.  O  ->  -.  0  <  ( ( ( F `  C ) `
 ( 1  -  1 ) )  - 
1 ) )
3029adantr 465 . . . . . 6  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  -.  0  <  ( ( ( F `
 C ) `  ( 1  -  1 ) )  -  1 ) )
31 simpl 457 . . . . . . . . . . 11  |-  ( ( C  e.  O  /\  1  e.  ( 1 ... ( M  +  N ) ) )  ->  C  e.  O
)
32 1nn 10548 . . . . . . . . . . . 12  |-  1  e.  NN
3332a1i 11 . . . . . . . . . . 11  |-  ( ( C  e.  O  /\  1  e.  ( 1 ... ( M  +  N ) ) )  ->  1  e.  NN )
341, 2, 22, 23, 24, 31, 33ballotlemfp1 28181 . . . . . . . . . 10  |-  ( ( C  e.  O  /\  1  e.  ( 1 ... ( M  +  N ) ) )  ->  ( ( -.  1  e.  C  -> 
( ( F `  C ) `  1
)  =  ( ( ( F `  C
) `  ( 1  -  1 ) )  -  1 ) )  /\  ( 1  e.  C  ->  ( ( F `  C ) `  1 )  =  ( ( ( F `
 C ) `  ( 1  -  1 ) )  +  1 ) ) ) )
3534simpld 459 . . . . . . . . 9  |-  ( ( C  e.  O  /\  1  e.  ( 1 ... ( M  +  N ) ) )  ->  ( -.  1  e.  C  ->  ( ( F `  C ) `
 1 )  =  ( ( ( F `
 C ) `  ( 1  -  1 ) )  -  1 ) ) )
368, 35mpan2 671 . . . . . . . 8  |-  ( C  e.  O  ->  ( -.  1  e.  C  ->  ( ( F `  C ) `  1
)  =  ( ( ( F `  C
) `  ( 1  -  1 ) )  -  1 ) ) )
3736imp 429 . . . . . . 7  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  ( ( F `  C ) `  1 )  =  ( ( ( F `
 C ) `  ( 1  -  1 ) )  -  1 ) )
3837breq2d 4459 . . . . . 6  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  ( 0  <  ( ( F `
 C ) ` 
1 )  <->  0  <  ( ( ( F `  C ) `  (
1  -  1 ) )  -  1 ) ) )
3930, 38mtbird 301 . . . . 5  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  -.  0  <  ( ( F `  C ) `  1
) )
40 fveq2 5866 . . . . . . . 8  |-  ( i  =  1  ->  (
( F `  C
) `  i )  =  ( ( F `
 C ) ` 
1 ) )
4140breq2d 4459 . . . . . . 7  |-  ( i  =  1  ->  (
0  <  ( ( F `  C ) `  i )  <->  0  <  ( ( F `  C
) `  1 )
) )
4241notbid 294 . . . . . 6  |-  ( i  =  1  ->  ( -.  0  <  ( ( F `  C ) `
 i )  <->  -.  0  <  ( ( F `  C ) `  1
) ) )
4342rspcev 3214 . . . . 5  |-  ( ( 1  e.  ( 1 ... ( M  +  N ) )  /\  -.  0  <  ( ( F `  C ) `
 1 ) )  ->  E. i  e.  ( 1 ... ( M  +  N ) )  -.  0  <  (
( F `  C
) `  i )
)
448, 39, 43sylancr 663 . . . 4  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  E. i  e.  ( 1 ... ( M  +  N )
)  -.  0  < 
( ( F `  C ) `  i
) )
45 rexnal 2912 . . . 4  |-  ( E. i  e.  ( 1 ... ( M  +  N ) )  -.  0  <  ( ( F `  C ) `
 i )  <->  -.  A. i  e.  ( 1 ... ( M  +  N )
) 0  <  (
( F `  C
) `  i )
)
4644, 45sylib 196 . . 3  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  -.  A. i  e.  ( 1 ... ( M  +  N )
) 0  <  (
( F `  C
) `  i )
)
47 ballotth.e . . . . 5  |-  E  =  { c  e.  O  |  A. i  e.  ( 1 ... ( M  +  N ) ) 0  <  ( ( F `  c ) `
 i ) }
481, 2, 22, 23, 24, 47ballotleme 28186 . . . 4  |-  ( C  e.  E  <->  ( C  e.  O  /\  A. i  e.  ( 1 ... ( M  +  N )
) 0  <  (
( F `  C
) `  i )
) )
4948simprbi 464 . . 3  |-  ( C  e.  E  ->  A. i  e.  ( 1 ... ( M  +  N )
) 0  <  (
( F `  C
) `  i )
)
5046, 49nsyl 121 . 2  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  -.  C  e.  E )
5150ex 434 1  |-  ( C  e.  O  ->  ( -.  1  e.  C  ->  -.  C  e.  E
) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1379    e. wcel 1767   A.wral 2814   E.wrex 2815   {crab 2818    \ cdif 3473    i^i cin 3475   ~Pcpw 4010   class class class wbr 4447    |-> cmpt 4505   ` cfv 5588  (class class class)co 6285   RRcr 9492   0cc0 9493   1c1 9494    + caddc 9496    < clt 9629    <_ cle 9630    - cmin 9806    / cdiv 10207   NNcn 10537   ZZcz 10865   ZZ>=cuz 11083   ...cfz 11673   #chash 12374
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-rep 4558  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6577  ax-cnex 9549  ax-resscn 9550  ax-1cn 9551  ax-icn 9552  ax-addcl 9553  ax-addrcl 9554  ax-mulcl 9555  ax-mulrcl 9556  ax-mulcom 9557  ax-addass 9558  ax-mulass 9559  ax-distr 9560  ax-i2m1 9561  ax-1ne0 9562  ax-1rid 9563  ax-rnegex 9564  ax-rrecex 9565  ax-cnre 9566  ax-pre-lttri 9567  ax-pre-lttrn 9568  ax-pre-ltadd 9569  ax-pre-mulgt0 9570
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rmo 2822  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-int 4283  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5551  df-fun 5590  df-fn 5591  df-f 5592  df-f1 5593  df-fo 5594  df-f1o 5595  df-fv 5596  df-riota 6246  df-ov 6288  df-oprab 6289  df-mpt2 6290  df-om 6686  df-1st 6785  df-2nd 6786  df-recs 7043  df-rdg 7077  df-1o 7131  df-oadd 7135  df-er 7312  df-en 7518  df-dom 7519  df-sdom 7520  df-fin 7521  df-card 8321  df-cda 8549  df-pnf 9631  df-mnf 9632  df-xr 9633  df-ltxr 9634  df-le 9635  df-sub 9808  df-neg 9809  df-nn 10538  df-n0 10797  df-z 10866  df-uz 11084  df-fz 11674  df-hash 12375
This theorem is referenced by:  ballotth  28227
  Copyright terms: Public domain W3C validator