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 K 0 N M 0 N ¬ K M M + N - K 0 N

Proof

Step Hyp Ref Expression
1 elfz2nn0 M 0 N M 0 N 0 M N
2 nn0addcl M 0 N 0 M + N 0
3 2 nn0zd M 0 N 0 M + N
4 3 3adant3 M 0 N 0 M N M + N
5 1 4 sylbi M 0 N M + N
6 elfzelz K 0 N K
7 zsubcl M + N K M + N - K
8 5 6 7 syl2anr K 0 N M 0 N M + N - K
9 8 3adant3 K 0 N M 0 N ¬ K M M + N - K
10 6 zred K 0 N K
11 10 adantr K 0 N M 0 N K
12 elfzel2 K 0 N N
13 12 zred K 0 N N
14 13 adantr K 0 N M 0 N N
15 nn0readdcl M 0 N 0 M + N
16 15 3adant3 M 0 N 0 M N M + N
17 1 16 sylbi M 0 N M + N
18 17 adantl K 0 N M 0 N M + N
19 elfzle2 K 0 N K N
20 elfzle1 M 0 N 0 M
21 nn0re M 0 M
22 nn0re N 0 N
23 21 22 anim12ci M 0 N 0 N M
24 23 3adant3 M 0 N 0 M N N M
25 1 24 sylbi M 0 N N M
26 addge02 N M 0 M N M + N
27 25 26 syl M 0 N 0 M N M + N
28 20 27 mpbid M 0 N N M + N
29 19 28 anim12i K 0 N M 0 N K N N M + N
30 letr K N M + N K N N M + N K M + N
31 30 imp K N M + N K N N M + N K M + N
32 11 14 18 29 31 syl31anc K 0 N M 0 N K M + N
33 32 3adant3 K 0 N M 0 N ¬ K M K M + N
34 zre K K
35 21 22 anim12i M 0 N 0 M N
36 35 3adant3 M 0 N 0 M N M N
37 1 36 sylbi M 0 N M N
38 readdcl M N M + N
39 37 38 syl M 0 N M + N
40 34 39 anim12ci K M 0 N M + N K
41 6 40 sylan K 0 N M 0 N M + N K
42 41 3adant3 K 0 N M 0 N ¬ K M M + N K
43 subge0 M + N K 0 M + N - K K M + N
44 42 43 syl K 0 N M 0 N ¬ K M 0 M + N - K K M + N
45 33 44 mpbird K 0 N M 0 N ¬ K M 0 M + N - K
46 elnn0z M + N - K 0 M + N - K 0 M + N - K
47 9 45 46 sylanbrc K 0 N M 0 N ¬ K M M + N - K 0
48 elfz3nn0 K 0 N N 0
49 48 3ad2ant1 K 0 N M 0 N ¬ K M N 0
50 elfzelz M 0 N M
51 zre M M
52 ltnle M K M < K ¬ K M
53 52 ancoms K M M < K ¬ K M
54 ltle M K M < K M K
55 54 ancoms K M M < K M K
56 53 55 sylbird K M ¬ K M M K
57 34 51 56 syl2an K M ¬ K M M K
58 6 50 57 syl2an K 0 N M 0 N ¬ K M M K
59 58 3impia K 0 N M 0 N ¬ K M M K
60 50 zred M 0 N M
61 60 adantl K 0 N M 0 N M
62 61 11 14 leadd1d K 0 N M 0 N M K M + N K + N
63 62 3adant3 K 0 N M 0 N ¬ K M M K M + N K + N
64 59 63 mpbid K 0 N M 0 N ¬ K M M + N K + N
65 18 11 14 lesubadd2d K 0 N M 0 N M + N - K N M + N K + N
66 65 3adant3 K 0 N M 0 N ¬ K M M + N - K N M + N K + N
67 64 66 mpbird K 0 N M 0 N ¬ K M M + N - K N
68 elfz2nn0 M + N - K 0 N M + N - K 0 N 0 M + N - K N
69 47 49 67 68 syl3anbrc K 0 N M 0 N ¬ K M M + N - K 0 N