Metamath Proof Explorer


Theorem fzonmapblen

Description: The result of subtracting a nonnegative integer from a positive integer and adding another nonnegative integer which is less than the first one is less than the positive integer. (Contributed by Alexander van der Vekens, 19-May-2018)

Ref Expression
Assertion fzonmapblen A 0 ..^ N B 0 ..^ N B < A B + N - A < N

Proof

Step Hyp Ref Expression
1 elfzo0 A 0 ..^ N A 0 N A < N
2 nn0re A 0 A
3 nnre N N
4 2 3 anim12i A 0 N A N
5 4 3adant3 A 0 N A < N A N
6 1 5 sylbi A 0 ..^ N A N
7 elfzoelz B 0 ..^ N B
8 7 zred B 0 ..^ N B
9 simpr A N B B
10 simpll A N B A
11 resubcl N A N A
12 11 ancoms A N N A
13 12 adantr A N B N A
14 9 10 13 ltadd1d A N B B < A B + N - A < A + N - A
15 14 biimpa A N B B < A B + N - A < A + N - A
16 recn A A
17 recn N N
18 16 17 anim12i A N A N
19 18 adantr A N B A N
20 19 adantr A N B B < A A N
21 pncan3 A N A + N - A = N
22 20 21 syl A N B B < A A + N - A = N
23 15 22 breqtrd A N B B < A B + N - A < N
24 23 ex A N B B < A B + N - A < N
25 6 8 24 syl2an A 0 ..^ N B 0 ..^ N B < A B + N - A < N
26 25 3impia A 0 ..^ N B 0 ..^ N B < A B + N - A < N