Metamath Proof Explorer


Theorem elfzodifsumelfzo

Description: If an integer is in a half-open range of nonnegative integers with a difference as upper bound, the sum of the integer with the subtrahend of the difference is in a half-open range of nonnegative integers containing the minuend of the difference. (Contributed by AV, 13-Nov-2018)

Ref Expression
Assertion elfzodifsumelfzo M 0 N N 0 P I 0 ..^ N M I + M 0 ..^ P

Proof

Step Hyp Ref Expression
1 elfz2nn0 M 0 N M 0 N 0 M N
2 elfz2nn0 N 0 P N 0 P 0 N P
3 elfzo0 I 0 ..^ N M I 0 N M I < N M
4 nn0z M 0 M
5 nn0z N 0 N
6 znnsub M N M < N N M
7 4 5 6 syl2an M 0 N 0 M < N N M
8 simpr I < N M I 0 I 0
9 simpll M 0 N 0 M < N M 0
10 nn0addcl I 0 M 0 I + M 0
11 8 9 10 syl2anr M 0 N 0 M < N I < N M I 0 I + M 0
12 11 adantr M 0 N 0 M < N I < N M I 0 P 0 N P I + M 0
13 0red M 0 N 0 0
14 nn0re M 0 M
15 14 adantr M 0 N 0 M
16 nn0re N 0 N
17 16 adantl M 0 N 0 N
18 13 15 17 3jca M 0 N 0 0 M N
19 18 adantr M 0 N 0 M < N 0 M N
20 nn0ge0 M 0 0 M
21 20 adantr M 0 N 0 0 M
22 21 anim1i M 0 N 0 M < N 0 M M < N
23 lelttr 0 M N 0 M M < N 0 < N
24 19 22 23 sylc M 0 N 0 M < N 0 < N
25 24 ex M 0 N 0 M < N 0 < N
26 0red P 0 N 0 0
27 16 adantl P 0 N 0 N
28 nn0re P 0 P
29 28 adantr P 0 N 0 P
30 ltletr 0 N P 0 < N N P 0 < P
31 26 27 29 30 syl3anc P 0 N 0 0 < N N P 0 < P
32 nn0z P 0 P
33 elnnz P P 0 < P
34 33 simplbi2 P 0 < P P
35 32 34 syl P 0 0 < P P
36 35 adantr P 0 N 0 0 < P P
37 31 36 syld P 0 N 0 0 < N N P P
38 37 exp4b P 0 N 0 0 < N N P P
39 38 com24 P 0 N P 0 < N N 0 P
40 39 imp P 0 N P 0 < N N 0 P
41 40 com13 N 0 0 < N P 0 N P P
42 41 adantl M 0 N 0 0 < N P 0 N P P
43 25 42 syld M 0 N 0 M < N P 0 N P P
44 43 imp M 0 N 0 M < N P 0 N P P
45 44 adantr M 0 N 0 M < N I < N M I 0 P 0 N P P
46 45 imp M 0 N 0 M < N I < N M I 0 P 0 N P P
47 nn0re I 0 I
48 47 adantl I < N M I 0 I
49 15 adantr M 0 N 0 M < N M
50 readdcl I M I + M
51 48 49 50 syl2anr M 0 N 0 M < N I < N M I 0 I + M
52 51 adantr M 0 N 0 M < N I < N M I 0 P 0 I + M
53 17 adantr M 0 N 0 M < N N
54 53 adantr M 0 N 0 M < N I < N M I 0 N
55 54 adantr M 0 N 0 M < N I < N M I 0 P 0 N
56 28 adantl M 0 N 0 M < N I < N M I 0 P 0 P
57 52 55 56 3jca M 0 N 0 M < N I < N M I 0 P 0 I + M N P
58 57 adantr M 0 N 0 M < N I < N M I 0 P 0 N P I + M N P
59 47 adantl M 0 N 0 I 0 I
60 15 adantr M 0 N 0 I 0 M
61 17 adantr M 0 N 0 I 0 N
62 59 60 61 ltaddsubd M 0 N 0 I 0 I + M < N I < N M
63 62 exbiri M 0 N 0 I 0 I < N M I + M < N
64 63 impcomd M 0 N 0 I < N M I 0 I + M < N
65 64 adantr M 0 N 0 M < N I < N M I 0 I + M < N
66 65 imp M 0 N 0 M < N I < N M I 0 I + M < N
67 66 adantr M 0 N 0 M < N I < N M I 0 P 0 I + M < N
68 67 anim1i M 0 N 0 M < N I < N M I 0 P 0 N P I + M < N N P
69 ltletr I + M N P I + M < N N P I + M < P
70 58 68 69 sylc M 0 N 0 M < N I < N M I 0 P 0 N P I + M < P
71 70 anasss M 0 N 0 M < N I < N M I 0 P 0 N P I + M < P
72 elfzo0 I + M 0 ..^ P I + M 0 P I + M < P
73 12 46 71 72 syl3anbrc M 0 N 0 M < N I < N M I 0 P 0 N P I + M 0 ..^ P
74 73 exp53 M 0 N 0 M < N I < N M I 0 P 0 N P I + M 0 ..^ P
75 7 74 sylbird M 0 N 0 N M I < N M I 0 P 0 N P I + M 0 ..^ P
76 75 3adant3 M 0 N 0 M N N M I < N M I 0 P 0 N P I + M 0 ..^ P
77 76 com14 I 0 N M I < N M M 0 N 0 M N P 0 N P I + M 0 ..^ P
78 77 3imp I 0 N M I < N M M 0 N 0 M N P 0 N P I + M 0 ..^ P
79 3 78 sylbi I 0 ..^ N M M 0 N 0 M N P 0 N P I + M 0 ..^ P
80 79 com13 P 0 N P M 0 N 0 M N I 0 ..^ N M I + M 0 ..^ P
81 80 3adant1 N 0 P 0 N P M 0 N 0 M N I 0 ..^ N M I + M 0 ..^ P
82 2 81 sylbi N 0 P M 0 N 0 M N I 0 ..^ N M I + M 0 ..^ P
83 82 com12 M 0 N 0 M N N 0 P I 0 ..^ N M I + M 0 ..^ P
84 1 83 sylbi M 0 N N 0 P I 0 ..^ N M I + M 0 ..^ P
85 84 imp M 0 N N 0 P I 0 ..^ N M I + M 0 ..^ P