Metamath Proof Explorer


Theorem fzmaxdif

Description: Bound on the difference between two integers constrained to two possibly overlapping finite ranges. (Contributed by Stefan O'Rear, 4-Oct-2014)

Ref Expression
Assertion fzmaxdif C A B C F D E F C E F B A D F B

Proof

Step Hyp Ref Expression
1 simp2r C A B C F D E F C E F B D E F
2 1 elfzelzd C A B C F D E F C E F B D
3 2 zred C A B C F D E F C E F B D
4 simp2l C A B C F D E F C E F B F
5 4 zred C A B C F D E F C E F B F
6 simp1r C A B C F D E F C E F B A B C
7 elfzel1 A B C B
8 6 7 syl C A B C F D E F C E F B B
9 8 zred C A B C F D E F C E F B B
10 5 9 resubcld C A B C F D E F C E F B F B
11 3 10 resubcld C A B C F D E F C E F B D F B
12 6 elfzelzd C A B C F D E F C E F B A
13 12 zred C A B C F D E F C E F B A
14 elfzle2 D E F D F
15 1 14 syl C A B C F D E F C E F B D F
16 3 5 10 15 lesub1dd C A B C F D E F C E F B D F B F F B
17 5 recnd C A B C F D E F C E F B F
18 9 recnd C A B C F D E F C E F B B
19 17 18 nncand C A B C F D E F C E F B F F B = B
20 16 19 breqtrd C A B C F D E F C E F B D F B B
21 elfzle1 A B C B A
22 6 21 syl C A B C F D E F C E F B B A
23 11 9 13 20 22 letrd C A B C F D E F C E F B D F B A
24 simp1l C A B C F D E F C E F B C
25 24 zred C A B C F D E F C E F B C
26 3 10 readdcld C A B C F D E F C E F B D + F - B
27 elfzle2 A B C A C
28 6 27 syl C A B C F D E F C E F B A C
29 25 3 resubcld C A B C F D E F C E F B C D
30 elfzel1 D E F E
31 1 30 syl C A B C F D E F C E F B E
32 31 zred C A B C F D E F C E F B E
33 25 32 resubcld C A B C F D E F C E F B C E
34 elfzle1 D E F E D
35 1 34 syl C A B C F D E F C E F B E D
36 32 3 25 35 lesub2dd C A B C F D E F C E F B C D C E
37 simp3 C A B C F D E F C E F B C E F B
38 29 33 10 36 37 letrd C A B C F D E F C E F B C D F B
39 25 3 10 lesubaddd C A B C F D E F C E F B C D F B C F - B + D
40 38 39 mpbid C A B C F D E F C E F B C F - B + D
41 10 recnd C A B C F D E F C E F B F B
42 3 recnd C A B C F D E F C E F B D
43 41 42 addcomd C A B C F D E F C E F B F - B + D = D + F - B
44 40 43 breqtrd C A B C F D E F C E F B C D + F - B
45 13 25 26 28 44 letrd C A B C F D E F C E F B A D + F - B
46 13 3 10 absdifled C A B C F D E F C E F B A D F B D F B A A D + F - B
47 23 45 46 mpbir2and C A B C F D E F C E F B A D F B