Metamath Proof Explorer


Theorem ballotlemic

Description: If the first vote is for B, the vote on the first tie is for A. (Contributed by Thierry Arnoux, 1-Dec-2016)

Ref Expression
Hypotheses ballotth.m M
ballotth.n N
ballotth.o O = c 𝒫 1 M + N | c = M
ballotth.p P = x 𝒫 O x O
ballotth.f F = c O i 1 i c 1 i c
ballotth.e E = c O | i 1 M + N 0 < F c i
ballotth.mgtn N < M
ballotth.i I = c O E sup k 1 M + N | F c k = 0 <
Assertion ballotlemic C O E ¬ 1 C I C C

Proof

Step Hyp Ref Expression
1 ballotth.m M
2 ballotth.n N
3 ballotth.o O = c 𝒫 1 M + N | c = M
4 ballotth.p P = x 𝒫 O x O
5 ballotth.f F = c O i 1 i c 1 i c
6 ballotth.e E = c O | i 1 M + N 0 < F c i
7 ballotth.mgtn N < M
8 ballotth.i I = c O E sup k 1 M + N | F c k = 0 <
9 eldifi C O E C O
10 9 ad2antrr C O E ¬ 1 C ¬ I C C C O
11 1 2 3 4 5 6 7 8 ballotlemiex C O E I C 1 M + N F C I C = 0
12 11 simpld C O E I C 1 M + N
13 elfznn I C 1 M + N I C
14 12 13 syl C O E I C
15 14 adantr C O E ¬ 1 C I C
16 1 2 3 4 5 6 7 8 ballotlemi1 C O E ¬ 1 C I C 1
17 eluz2b3 I C 2 I C I C 1
18 15 16 17 sylanbrc C O E ¬ 1 C I C 2
19 uz2m1nn I C 2 I C 1
20 18 19 syl C O E ¬ 1 C I C 1
21 20 adantr C O E ¬ 1 C ¬ I C C I C 1
22 elnnuz I C 1 I C 1 1
23 22 biimpi I C 1 I C 1 1
24 eluzfz1 I C 1 1 1 1 I C 1
25 20 23 24 3syl C O E ¬ 1 C 1 1 I C 1
26 25 adantr C O E ¬ 1 C ¬ I C C 1 1 I C 1
27 1nn 1
28 27 a1i C O E 1
29 1 2 3 4 5 9 28 ballotlemfp1 C O E ¬ 1 C F C 1 = F C 1 1 1 1 C F C 1 = F C 1 1 + 1
30 29 simpld C O E ¬ 1 C F C 1 = F C 1 1 1
31 30 imp C O E ¬ 1 C F C 1 = F C 1 1 1
32 1m1e0 1 1 = 0
33 32 fveq2i F C 1 1 = F C 0
34 33 oveq1i F C 1 1 1 = F C 0 1
35 34 a1i C O E ¬ 1 C F C 1 1 1 = F C 0 1
36 1 2 3 4 5 ballotlemfval0 C O F C 0 = 0
37 9 36 syl C O E F C 0 = 0
38 37 adantr C O E ¬ 1 C F C 0 = 0
39 38 oveq1d C O E ¬ 1 C F C 0 1 = 0 1
40 31 35 39 3eqtrrd C O E ¬ 1 C 0 1 = F C 1
41 0le1 0 1
42 0re 0
43 1re 1
44 suble0 0 1 0 1 0 0 1
45 42 43 44 mp2an 0 1 0 0 1
46 41 45 mpbir 0 1 0
47 40 46 eqbrtrrdi C O E ¬ 1 C F C 1 0
48 47 adantr C O E ¬ 1 C ¬ I C C F C 1 0
49 fveq2 i = 1 F C i = F C 1
50 49 breq1d i = 1 F C i 0 F C 1 0
51 50 rspcev 1 1 I C 1 F C 1 0 i 1 I C 1 F C i 0
52 26 48 51 syl2anc C O E ¬ 1 C ¬ I C C i 1 I C 1 F C i 0
53 0lt1 0 < 1
54 1p0e1 1 + 0 = 1
55 1 2 3 4 5 9 14 ballotlemfp1 C O E ¬ I C C F C I C = F C I C 1 1 I C C F C I C = F C I C 1 + 1
56 55 simpld C O E ¬ I C C F C I C = F C I C 1 1
57 56 imp C O E ¬ I C C F C I C = F C I C 1 1
58 11 simprd C O E F C I C = 0
59 58 adantr C O E ¬ I C C F C I C = 0
60 57 59 eqtr3d C O E ¬ I C C F C I C 1 1 = 0
61 9 adantr C O E ¬ I C C C O
62 14 nnzd C O E I C
63 62 adantr C O E ¬ I C C I C
64 1zzd C O E ¬ I C C 1
65 63 64 zsubcld C O E ¬ I C C I C 1
66 1 2 3 4 5 61 65 ballotlemfelz C O E ¬ I C C F C I C 1
67 66 zcnd C O E ¬ I C C F C I C 1
68 1cnd C O E ¬ I C C 1
69 0cnd C O E ¬ I C C 0
70 67 68 69 subaddd C O E ¬ I C C F C I C 1 1 = 0 1 + 0 = F C I C 1
71 60 70 mpbid C O E ¬ I C C 1 + 0 = F C I C 1
72 54 71 eqtr3id C O E ¬ I C C 1 = F C I C 1
73 53 72 breqtrid C O E ¬ I C C 0 < F C I C 1
74 73 adantlr C O E ¬ 1 C ¬ I C C 0 < F C I C 1
75 1 2 3 4 5 10 21 52 74 ballotlemfc0 C O E ¬ 1 C ¬ I C C k 1 I C 1 F C k = 0
76 1 2 3 4 5 6 7 8 ballotlemimin C O E ¬ k 1 I C 1 F C k = 0
77 76 ad2antrr C O E ¬ 1 C ¬ I C C ¬ k 1 I C 1 F C k = 0
78 75 77 condan C O E ¬ 1 C I C C