Metamath Proof Explorer


Theorem subfzo0

Description: The difference between two elements in a half-open range of nonnegative integers is greater than the negation of the upper bound and less than the upper bound of the range. (Contributed by AV, 20-Mar-2021)

Ref Expression
Assertion subfzo0 I 0 ..^ N J 0 ..^ N N < I J I J < N

Proof

Step Hyp Ref Expression
1 elfzo0 I 0 ..^ N I 0 N I < N
2 elfzo0 J 0 ..^ N J 0 N J < N
3 nn0re I 0 I
4 3 adantr I 0 I < N I
5 nnre N N
6 nn0re J 0 J
7 resubcl N J N J
8 5 6 7 syl2an N J 0 N J
9 8 ancoms J 0 N N J
10 9 3adant3 J 0 N J < N N J
11 4 10 anim12i I 0 I < N J 0 N J < N I N J
12 nn0ge0 I 0 0 I
13 12 adantr I 0 I < N 0 I
14 posdif J N J < N 0 < N J
15 6 5 14 syl2an J 0 N J < N 0 < N J
16 15 biimp3a J 0 N J < N 0 < N J
17 13 16 anim12i I 0 I < N J 0 N J < N 0 I 0 < N J
18 addgegt0 I N J 0 I 0 < N J 0 < I + N - J
19 11 17 18 syl2anc I 0 I < N J 0 N J < N 0 < I + N - J
20 nn0cn I 0 I
21 20 adantr I 0 I < N I
22 21 adantr I 0 I < N J 0 N J < N I
23 nn0cn J 0 J
24 23 3ad2ant1 J 0 N J < N J
25 24 adantl I 0 I < N J 0 N J < N J
26 nncn N N
27 26 3ad2ant2 J 0 N J < N N
28 27 adantl I 0 I < N J 0 N J < N N
29 22 25 28 subadd23d I 0 I < N J 0 N J < N I - J + N = I + N - J
30 19 29 breqtrrd I 0 I < N J 0 N J < N 0 < I - J + N
31 6 3ad2ant1 J 0 N J < N J
32 resubcl I J I J
33 4 31 32 syl2an I 0 I < N J 0 N J < N I J
34 5 3ad2ant2 J 0 N J < N N
35 34 adantl I 0 I < N J 0 N J < N N
36 33 35 possumd I 0 I < N J 0 N J < N 0 < I - J + N N < I J
37 30 36 mpbid I 0 I < N J 0 N J < N N < I J
38 3 adantr I 0 J 0 N J < N I
39 34 adantl I 0 J 0 N J < N N
40 readdcl J N J + N
41 6 5 40 syl2an J 0 N J + N
42 41 3adant3 J 0 N J < N J + N
43 42 adantl I 0 J 0 N J < N J + N
44 38 39 43 3jca I 0 J 0 N J < N I N J + N
45 nn0ge0 J 0 0 J
46 45 3ad2ant1 J 0 N J < N 0 J
47 46 adantl I 0 J 0 N J < N 0 J
48 5 6 anim12i N J 0 N J
49 48 ancoms J 0 N N J
50 49 3adant3 J 0 N J < N N J
51 50 adantl I 0 J 0 N J < N N J
52 addge02 N J 0 J N J + N
53 51 52 syl I 0 J 0 N J < N 0 J N J + N
54 47 53 mpbid I 0 J 0 N J < N N J + N
55 44 54 lelttrdi I 0 J 0 N J < N I < N I < J + N
56 55 impancom I 0 I < N J 0 N J < N I < J + N
57 56 imp I 0 I < N J 0 N J < N I < J + N
58 4 adantr I 0 I < N J 0 N J < N I
59 31 adantl I 0 I < N J 0 N J < N J
60 58 59 35 ltsubadd2d I 0 I < N J 0 N J < N I J < N I < J + N
61 57 60 mpbird I 0 I < N J 0 N J < N I J < N
62 37 61 jca I 0 I < N J 0 N J < N N < I J I J < N
63 62 ex I 0 I < N J 0 N J < N N < I J I J < N
64 2 63 syl5bi I 0 I < N J 0 ..^ N N < I J I J < N
65 64 3adant2 I 0 N I < N J 0 ..^ N N < I J I J < N
66 1 65 sylbi I 0 ..^ N J 0 ..^ N N < I J I J < N
67 66 imp I 0 ..^ N J 0 ..^ N N < I J I J < N