Metamath Proof Explorer


Theorem difelfznle

Description: The difference of two integers from a finite set of sequential nonnegative integers increased by the upper bound is also element of this finite set of sequential integers. (Contributed by Alexander van der Vekens, 12-Jun-2018)

Ref Expression
Assertion difelfznle K0NM0N¬KMM+N-K0N

Proof

Step Hyp Ref Expression
1 elfz2nn0 M0NM0N0MN
2 nn0addcl M0N0M+N0
3 2 nn0zd M0N0M+N
4 3 3adant3 M0N0MNM+N
5 1 4 sylbi M0NM+N
6 elfzelz K0NK
7 zsubcl M+NKM+N-K
8 5 6 7 syl2anr K0NM0NM+N-K
9 8 3adant3 K0NM0N¬KMM+N-K
10 6 zred K0NK
11 10 adantr K0NM0NK
12 elfzel2 K0NN
13 12 zred K0NN
14 13 adantr K0NM0NN
15 nn0readdcl M0N0M+N
16 15 3adant3 M0N0MNM+N
17 1 16 sylbi M0NM+N
18 17 adantl K0NM0NM+N
19 elfzle2 K0NKN
20 elfzle1 M0N0M
21 nn0re M0M
22 nn0re N0N
23 21 22 anim12ci M0N0NM
24 23 3adant3 M0N0MNNM
25 1 24 sylbi M0NNM
26 addge02 NM0MNM+N
27 25 26 syl M0N0MNM+N
28 20 27 mpbid M0NNM+N
29 19 28 anim12i K0NM0NKNNM+N
30 letr KNM+NKNNM+NKM+N
31 30 imp KNM+NKNNM+NKM+N
32 11 14 18 29 31 syl31anc K0NM0NKM+N
33 32 3adant3 K0NM0N¬KMKM+N
34 zre KK
35 21 22 anim12i M0N0MN
36 35 3adant3 M0N0MNMN
37 1 36 sylbi M0NMN
38 readdcl MNM+N
39 37 38 syl M0NM+N
40 34 39 anim12ci KM0NM+NK
41 6 40 sylan K0NM0NM+NK
42 41 3adant3 K0NM0N¬KMM+NK
43 subge0 M+NK0M+N-KKM+N
44 42 43 syl K0NM0N¬KM0M+N-KKM+N
45 33 44 mpbird K0NM0N¬KM0M+N-K
46 elnn0z M+N-K0M+N-K0M+N-K
47 9 45 46 sylanbrc K0NM0N¬KMM+N-K0
48 elfz3nn0 K0NN0
49 48 3ad2ant1 K0NM0N¬KMN0
50 elfzelz M0NM
51 zre MM
52 ltnle MKM<K¬KM
53 52 ancoms KMM<K¬KM
54 ltle MKM<KMK
55 54 ancoms KMM<KMK
56 53 55 sylbird KM¬KMMK
57 34 51 56 syl2an KM¬KMMK
58 6 50 57 syl2an K0NM0N¬KMMK
59 58 3impia K0NM0N¬KMMK
60 50 zred M0NM
61 60 adantl K0NM0NM
62 61 11 14 leadd1d K0NM0NMKM+NK+N
63 62 3adant3 K0NM0N¬KMMKM+NK+N
64 59 63 mpbid K0NM0N¬KMM+NK+N
65 18 11 14 lesubadd2d K0NM0NM+N-KNM+NK+N
66 65 3adant3 K0NM0N¬KMM+N-KNM+NK+N
67 64 66 mpbird K0NM0N¬KMM+N-KN
68 elfz2nn0 M+N-K0NM+N-K0N0M+N-KN
69 47 49 67 68 syl3anbrc K0NM0N¬KMM+N-K0N