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

Theorem ballotlem4 24756
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 10022 . . . . . . . 8  |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  +  N
)  e.  NN )
41, 2, 3mp2an 654 . . . . . . 7  |-  ( M  +  N )  e.  NN
5 elnnuz 10522 . . . . . . 7  |-  ( ( M  +  N )  e.  NN  <->  ( M  +  N )  e.  (
ZZ>= `  1 ) )
64, 5mpbi 200 . . . . . 6  |-  ( M  +  N )  e.  ( ZZ>= `  1 )
7 eluzfz1 11064 . . . . . 6  |-  ( ( M  +  N )  e.  ( ZZ>= `  1
)  ->  1  e.  ( 1 ... ( M  +  N )
) )
86, 7ax-mp 8 . . . . 5  |-  1  e.  ( 1 ... ( M  +  N )
)
9 0le1 9551 . . . . . . . . . 10  |-  0  <_  1
10 0re 9091 . . . . . . . . . . 11  |-  0  e.  RR
11 1re 9090 . . . . . . . . . . 11  |-  1  e.  RR
1210, 11lenlti 9193 . . . . . . . . . 10  |-  ( 0  <_  1  <->  -.  1  <  0 )
139, 12mpbi 200 . . . . . . . . 9  |-  -.  1  <  0
14 ltsub13 9509 . . . . . . . . . . 11  |-  ( ( 0  e.  RR  /\  0  e.  RR  /\  1  e.  RR )  ->  (
0  <  ( 0  -  1 )  <->  1  <  ( 0  -  0 ) ) )
1510, 10, 11, 14mp3an 1279 . . . . . . . . . 10  |-  ( 0  <  ( 0  -  1 )  <->  1  <  ( 0  -  0 ) )
16 0cn 9084 . . . . . . . . . . . 12  |-  0  e.  CC
1716subidi 9371 . . . . . . . . . . 11  |-  ( 0  -  0 )  =  0
1817breq2i 4220 . . . . . . . . . 10  |-  ( 1  <  ( 0  -  0 )  <->  1  <  0 )
1915, 18bitri 241 . . . . . . . . 9  |-  ( 0  <  ( 0  -  1 )  <->  1  <  0 )
2013, 19mtbir 291 . . . . . . . 8  |-  -.  0  <  ( 0  -  1 )
21 1m1e0 10068 . . . . . . . . . . . 12  |-  ( 1  -  1 )  =  0
2221fveq2i 5731 . . . . . . . . . . 11  |-  ( ( F `  C ) `
 ( 1  -  1 ) )  =  ( ( F `  C ) `  0
)
23 ballotth.o . . . . . . . . . . . 12  |-  O  =  { c  e.  ~P ( 1 ... ( M  +  N )
)  |  ( # `  c )  =  M }
24 ballotth.p . . . . . . . . . . . 12  |-  P  =  ( x  e.  ~P O  |->  ( ( # `  x )  /  ( # `
 O ) ) )
25 ballotth.f . . . . . . . . . . . 12  |-  F  =  ( c  e.  O  |->  ( i  e.  ZZ  |->  ( ( # `  (
( 1 ... i
)  i^i  c )
)  -  ( # `  ( ( 1 ... i )  \  c
) ) ) ) )
261, 2, 23, 24, 25ballotlemfval0 24753 . . . . . . . . . . 11  |-  ( C  e.  O  ->  (
( F `  C
) `  0 )  =  0 )
2722, 26syl5eq 2480 . . . . . . . . . 10  |-  ( C  e.  O  ->  (
( F `  C
) `  ( 1  -  1 ) )  =  0 )
2827oveq1d 6096 . . . . . . . . 9  |-  ( C  e.  O  ->  (
( ( F `  C ) `  (
1  -  1 ) )  -  1 )  =  ( 0  -  1 ) )
2928breq2d 4224 . . . . . . . 8  |-  ( C  e.  O  ->  (
0  <  ( (
( F `  C
) `  ( 1  -  1 ) )  -  1 )  <->  0  <  ( 0  -  1 ) ) )
3020, 29mtbiri 295 . . . . . . 7  |-  ( C  e.  O  ->  -.  0  <  ( ( ( F `  C ) `
 ( 1  -  1 ) )  - 
1 ) )
3130adantr 452 . . . . . 6  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  -.  0  <  ( ( ( F `
 C ) `  ( 1  -  1 ) )  -  1 ) )
32 simpl 444 . . . . . . . . . . 11  |-  ( ( C  e.  O  /\  1  e.  ( 1 ... ( M  +  N ) ) )  ->  C  e.  O
)
33 1nn 10011 . . . . . . . . . . . 12  |-  1  e.  NN
3433a1i 11 . . . . . . . . . . 11  |-  ( ( C  e.  O  /\  1  e.  ( 1 ... ( M  +  N ) ) )  ->  1  e.  NN )
351, 2, 23, 24, 25, 32, 34ballotlemfp1 24749 . . . . . . . . . 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 ) ) ) )
3635simpld 446 . . . . . . . . 9  |-  ( ( C  e.  O  /\  1  e.  ( 1 ... ( M  +  N ) ) )  ->  ( -.  1  e.  C  ->  ( ( F `  C ) `
 1 )  =  ( ( ( F `
 C ) `  ( 1  -  1 ) )  -  1 ) ) )
378, 36mpan2 653 . . . . . . . 8  |-  ( C  e.  O  ->  ( -.  1  e.  C  ->  ( ( F `  C ) `  1
)  =  ( ( ( F `  C
) `  ( 1  -  1 ) )  -  1 ) ) )
3837imp 419 . . . . . . 7  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  ( ( F `  C ) `  1 )  =  ( ( ( F `
 C ) `  ( 1  -  1 ) )  -  1 ) )
3938breq2d 4224 . . . . . 6  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  ( 0  <  ( ( F `
 C ) ` 
1 )  <->  0  <  ( ( ( F `  C ) `  (
1  -  1 ) )  -  1 ) ) )
4031, 39mtbird 293 . . . . 5  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  -.  0  <  ( ( F `  C ) `  1
) )
41 fveq2 5728 . . . . . . . 8  |-  ( i  =  1  ->  (
( F `  C
) `  i )  =  ( ( F `
 C ) ` 
1 ) )
4241breq2d 4224 . . . . . . 7  |-  ( i  =  1  ->  (
0  <  ( ( F `  C ) `  i )  <->  0  <  ( ( F `  C
) `  1 )
) )
4342notbid 286 . . . . . 6  |-  ( i  =  1  ->  ( -.  0  <  ( ( F `  C ) `
 i )  <->  -.  0  <  ( ( F `  C ) `  1
) ) )
4443rspcev 3052 . . . . 5  |-  ( ( 1  e.  ( 1 ... ( M  +  N ) )  /\  -.  0  <  ( ( F `  C ) `
 1 ) )  ->  E. i  e.  ( 1 ... ( M  +  N ) )  -.  0  <  (
( F `  C
) `  i )
)
458, 40, 44sylancr 645 . . . 4  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  E. i  e.  ( 1 ... ( M  +  N )
)  -.  0  < 
( ( F `  C ) `  i
) )
46 rexnal 2716 . . . 4  |-  ( E. i  e.  ( 1 ... ( M  +  N ) )  -.  0  <  ( ( F `  C ) `
 i )  <->  -.  A. i  e.  ( 1 ... ( M  +  N )
) 0  <  (
( F `  C
) `  i )
)
4745, 46sylib 189 . . 3  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  -.  A. i  e.  ( 1 ... ( M  +  N )
) 0  <  (
( F `  C
) `  i )
)
48 ballotth.e . . . . 5  |-  E  =  { c  e.  O  |  A. i  e.  ( 1 ... ( M  +  N ) ) 0  <  ( ( F `  c ) `
 i ) }
491, 2, 23, 24, 25, 48ballotleme 24754 . . . 4  |-  ( C  e.  E  <->  ( C  e.  O  /\  A. i  e.  ( 1 ... ( M  +  N )
) 0  <  (
( F `  C
) `  i )
) )
5049simprbi 451 . . 3  |-  ( C  e.  E  ->  A. i  e.  ( 1 ... ( M  +  N )
) 0  <  (
( F `  C
) `  i )
)
5147, 50nsyl 115 . 2  |-  ( ( C  e.  O  /\  -.  1  e.  C
)  ->  -.  C  e.  E )
5251ex 424 1  |-  ( C  e.  O  ->  ( -.  1  e.  C  ->  -.  C  e.  E
) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 177    /\ wa 359    = wceq 1652    e. wcel 1725   A.wral 2705   E.wrex 2706   {crab 2709    \ cdif 3317    i^i cin 3319   ~Pcpw 3799   class class class wbr 4212    e. cmpt 4266   ` cfv 5454  (class class class)co 6081   RRcr 8989   0cc0 8990   1c1 8991    + caddc 8993    < clt 9120    <_ cle 9121    - cmin 9291    / cdiv 9677   NNcn 10000   ZZcz 10282   ZZ>=cuz 10488   ...cfz 11043   #chash 11618
This theorem is referenced by:  ballotth  24795
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1555  ax-5 1566  ax-17 1626  ax-9 1666  ax-8 1687  ax-13 1727  ax-14 1729  ax-6 1744  ax-7 1749  ax-11 1761  ax-12 1950  ax-ext 2417  ax-rep 4320  ax-sep 4330  ax-nul 4338  ax-pow 4377  ax-pr 4403  ax-un 4701  ax-cnex 9046  ax-resscn 9047  ax-1cn 9048  ax-icn 9049  ax-addcl 9050  ax-addrcl 9051  ax-mulcl 9052  ax-mulrcl 9053  ax-mulcom 9054  ax-addass 9055  ax-mulass 9056  ax-distr 9057  ax-i2m1 9058  ax-1ne0 9059  ax-1rid 9060  ax-rnegex 9061  ax-rrecex 9062  ax-cnre 9063  ax-pre-lttri 9064  ax-pre-lttrn 9065  ax-pre-ltadd 9066  ax-pre-mulgt0 9067
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1328  df-ex 1551  df-nf 1554  df-sb 1659  df-eu 2285  df-mo 2286  df-clab 2423  df-cleq 2429  df-clel 2432  df-nfc 2561  df-ne 2601  df-nel 2602  df-ral 2710  df-rex 2711  df-reu 2712  df-rmo 2713  df-rab 2714  df-v 2958  df-sbc 3162  df-csb 3252  df-dif 3323  df-un 3325  df-in 3327  df-ss 3334  df-pss 3336  df-nul 3629  df-if 3740  df-pw 3801  df-sn 3820  df-pr 3821  df-tp 3822  df-op 3823  df-uni 4016  df-int 4051  df-iun 4095  df-br 4213  df-opab 4267  df-mpt 4268  df-tr 4303  df-eprel 4494  df-id 4498  df-po 4503  df-so 4504  df-fr 4541  df-we 4543  df-ord 4584  df-on 4585  df-lim 4586  df-suc 4587  df-om 4846  df-xp 4884  df-rel 4885  df-cnv 4886  df-co 4887  df-dm 4888  df-rn 4889  df-res 4890  df-ima 4891  df-iota 5418  df-fun 5456  df-fn 5457  df-f 5458  df-f1 5459  df-fo 5460  df-f1o 5461  df-fv 5462  df-ov 6084  df-oprab 6085  df-mpt2 6086  df-1st 6349  df-2nd 6350  df-riota 6549  df-recs 6633  df-rdg 6668  df-1o 6724  df-oadd 6728  df-er 6905  df-en 7110  df-dom 7111  df-sdom 7112  df-fin 7113  df-card 7826  df-cda 8048  df-pnf 9122  df-mnf 9123  df-xr 9124  df-ltxr 9125  df-le 9126  df-sub 9293  df-neg 9294  df-nn 10001  df-n0 10222  df-z 10283  df-uz 10489  df-fz 11044  df-hash 11619
  Copyright terms: Public domain W3C validator