Metamath Proof Explorer


Theorem elfznelfzo

Description: A value in a finite set of sequential integers is a border value if it is not contained in the half-open integer range contained in the finite set of sequential integers. (Contributed by Alexander van der Vekens, 31-Oct-2017) (Revised by Thierry Arnoux, 22-Dec-2021)

Ref Expression
Assertion elfznelfzo M 0 K ¬ M 1 ..^ K M = 0 M = K

Proof

Step Hyp Ref Expression
1 elfz2nn0 M 0 K M 0 K 0 M K
2 nn0z M 0 M
3 nn0z K 0 K
4 2 3 anim12i M 0 K 0 M K
5 4 3adant3 M 0 K 0 M K M K
6 elfzom1b M K M 1 ..^ K M 1 0 ..^ K 1
7 5 6 syl M 0 K 0 M K M 1 ..^ K M 1 0 ..^ K 1
8 7 notbid M 0 K 0 M K ¬ M 1 ..^ K ¬ M 1 0 ..^ K 1
9 elfzo0 M 1 0 ..^ K 1 M 1 0 K 1 M 1 < K 1
10 9 a1i M 0 K 0 M K M 1 0 ..^ K 1 M 1 0 K 1 M 1 < K 1
11 10 notbid M 0 K 0 M K ¬ M 1 0 ..^ K 1 ¬ M 1 0 K 1 M 1 < K 1
12 3ianor ¬ M 1 0 K 1 M 1 < K 1 ¬ M 1 0 ¬ K 1 ¬ M 1 < K 1
13 elnnne0 M M 0 M 0
14 df-ne M 0 ¬ M = 0
15 14 anbi2i M 0 M 0 M 0 ¬ M = 0
16 13 15 bitr2i M 0 ¬ M = 0 M
17 nnm1nn0 M M 1 0
18 16 17 sylbi M 0 ¬ M = 0 M 1 0
19 18 ex M 0 ¬ M = 0 M 1 0
20 19 con1d M 0 ¬ M 1 0 M = 0
21 20 imp M 0 ¬ M 1 0 M = 0
22 21 orcd M 0 ¬ M 1 0 M = 0 M = K
23 22 ex M 0 ¬ M 1 0 M = 0 M = K
24 23 3ad2ant1 M 0 K 0 M K ¬ M 1 0 M = 0 M = K
25 24 com12 ¬ M 1 0 M 0 K 0 M K M = 0 M = K
26 ioran ¬ M = 0 M = K ¬ M = 0 ¬ M = K
27 nn1m1nn M M = 1 M 1
28 df-ne M K ¬ M = K
29 necom M K K M
30 nn0re M 0 M
31 30 ad2antlr K 0 M 0 M K M
32 nn0re K 0 K
33 32 adantr K 0 M 0 K
34 33 adantr K 0 M 0 M K K
35 simpr K 0 M 0 M K M K
36 31 34 35 leltned K 0 M 0 M K M < K K M
37 29 36 bitr4id K 0 M 0 M K M K M < K
38 37 adantr K 0 M 0 M K M = 1 M K M < K
39 breq1 M = 1 M < K 1 < K
40 39 biimpa M = 1 M < K 1 < K
41 1red K 0 M 0 1
42 41 33 41 ltsub1d K 0 M 0 1 < K 1 1 < K 1
43 1m1e0 1 1 = 0
44 43 breq1i 1 1 < K 1 0 < K 1
45 1zzd K 0 1
46 3 45 zsubcld K 0 K 1
47 46 adantr K 0 M 0 K 1
48 47 adantr K 0 M 0 0 < K 1 K 1
49 simpr K 0 M 0 0 < K 1 0 < K 1
50 elnnz K 1 K 1 0 < K 1
51 48 49 50 sylanbrc K 0 M 0 0 < K 1 K 1
52 51 ex K 0 M 0 0 < K 1 K 1
53 44 52 syl5bi K 0 M 0 1 1 < K 1 K 1
54 42 53 sylbid K 0 M 0 1 < K K 1
55 40 54 syl5 K 0 M 0 M = 1 M < K K 1
56 55 expd K 0 M 0 M = 1 M < K K 1
57 56 adantr K 0 M 0 M K M = 1 M < K K 1
58 57 imp K 0 M 0 M K M = 1 M < K K 1
59 38 58 sylbid K 0 M 0 M K M = 1 M K K 1
60 59 exp31 K 0 M 0 M K M = 1 M K K 1
61 60 com14 M K M K M = 1 K 0 M 0 K 1
62 28 61 sylbir ¬ M = K M K M = 1 K 0 M 0 K 1
63 62 com23 ¬ M = K M = 1 M K K 0 M 0 K 1
64 63 com14 K 0 M 0 M = 1 M K ¬ M = K K 1
65 64 ex K 0 M 0 M = 1 M K ¬ M = K K 1
66 65 com14 M K M 0 M = 1 K 0 ¬ M = K K 1
67 66 com13 M = 1 M 0 M K K 0 ¬ M = K K 1
68 30 ad2antlr M 1 M 0 K 0 M
69 32 adantl M 1 M 0 K 0 K
70 1red M 1 M 0 K 0 1
71 68 69 70 lesub1d M 1 M 0 K 0 M K M 1 K 1
72 3 ad2antlr M 1 M 0 K 0 M 1 K 1 K
73 1zzd M 1 M 0 K 0 M 1 K 1 1
74 72 73 zsubcld M 1 M 0 K 0 M 1 K 1 K 1
75 nngt0 M 1 0 < M 1
76 0red M 0 K 0 0
77 peano2rem M M 1
78 30 77 syl M 0 M 1
79 78 adantr M 0 K 0 M 1
80 peano2rem K K 1
81 32 80 syl K 0 K 1
82 81 adantl M 0 K 0 K 1
83 ltletr 0 M 1 K 1 0 < M 1 M 1 K 1 0 < K 1
84 76 79 82 83 syl3anc M 0 K 0 0 < M 1 M 1 K 1 0 < K 1
85 84 ex M 0 K 0 0 < M 1 M 1 K 1 0 < K 1
86 85 com13 0 < M 1 M 1 K 1 K 0 M 0 0 < K 1
87 86 ex 0 < M 1 M 1 K 1 K 0 M 0 0 < K 1
88 87 com24 0 < M 1 M 0 K 0 M 1 K 1 0 < K 1
89 75 88 syl M 1 M 0 K 0 M 1 K 1 0 < K 1
90 89 imp41 M 1 M 0 K 0 M 1 K 1 0 < K 1
91 74 90 50 sylanbrc M 1 M 0 K 0 M 1 K 1 K 1
92 91 a1d M 1 M 0 K 0 M 1 K 1 ¬ M = K K 1
93 92 ex M 1 M 0 K 0 M 1 K 1 ¬ M = K K 1
94 71 93 sylbid M 1 M 0 K 0 M K ¬ M = K K 1
95 94 ex M 1 M 0 K 0 M K ¬ M = K K 1
96 95 com23 M 1 M 0 M K K 0 ¬ M = K K 1
97 96 ex M 1 M 0 M K K 0 ¬ M = K K 1
98 67 97 jaoi M = 1 M 1 M 0 M K K 0 ¬ M = K K 1
99 27 98 syl M M 0 M K K 0 ¬ M = K K 1
100 13 99 sylbir M 0 M 0 M 0 M K K 0 ¬ M = K K 1
101 100 ex M 0 M 0 M 0 M K K 0 ¬ M = K K 1
102 101 pm2.43a M 0 M 0 M K K 0 ¬ M = K K 1
103 102 com24 M 0 K 0 M K M 0 ¬ M = K K 1
104 103 3imp M 0 K 0 M K M 0 ¬ M = K K 1
105 104 com3l M 0 ¬ M = K M 0 K 0 M K K 1
106 14 105 sylbir ¬ M = 0 ¬ M = K M 0 K 0 M K K 1
107 106 imp ¬ M = 0 ¬ M = K M 0 K 0 M K K 1
108 26 107 sylbi ¬ M = 0 M = K M 0 K 0 M K K 1
109 108 com12 M 0 K 0 M K ¬ M = 0 M = K K 1
110 109 con1d M 0 K 0 M K ¬ K 1 M = 0 M = K
111 110 com12 ¬ K 1 M 0 K 0 M K M = 0 M = K
112 30 adantr M 0 K 0 M
113 32 adantl M 0 K 0 K
114 1red M 0 K 0 1
115 112 113 114 3jca M 0 K 0 M K 1
116 115 3adant3 M 0 K 0 M K M K 1
117 ltsub1 M K 1 M < K M 1 < K 1
118 116 117 syl M 0 K 0 M K M < K M 1 < K 1
119 118 bicomd M 0 K 0 M K M 1 < K 1 M < K
120 119 notbid M 0 K 0 M K ¬ M 1 < K 1 ¬ M < K
121 eqlelt M K M = K M K ¬ M < K
122 30 32 121 syl2an M 0 K 0 M = K M K ¬ M < K
123 122 biimpar M 0 K 0 M K ¬ M < K M = K
124 123 olcd M 0 K 0 M K ¬ M < K M = 0 M = K
125 124 exp43 M 0 K 0 M K ¬ M < K M = 0 M = K
126 125 3imp M 0 K 0 M K ¬ M < K M = 0 M = K
127 120 126 sylbid M 0 K 0 M K ¬ M 1 < K 1 M = 0 M = K
128 127 com12 ¬ M 1 < K 1 M 0 K 0 M K M = 0 M = K
129 25 111 128 3jaoi ¬ M 1 0 ¬ K 1 ¬ M 1 < K 1 M 0 K 0 M K M = 0 M = K
130 12 129 sylbi ¬ M 1 0 K 1 M 1 < K 1 M 0 K 0 M K M = 0 M = K
131 130 com12 M 0 K 0 M K ¬ M 1 0 K 1 M 1 < K 1 M = 0 M = K
132 11 131 sylbid M 0 K 0 M K ¬ M 1 0 ..^ K 1 M = 0 M = K
133 8 132 sylbid M 0 K 0 M K ¬ M 1 ..^ K M = 0 M = K
134 1 133 sylbi M 0 K ¬ M 1 ..^ K M = 0 M = K
135 134 imp M 0 K ¬ M 1 ..^ K M = 0 M = K