Metamath Proof Explorer


Theorem dnibnd

Description: The "distance to nearest integer" function is 1-Lipschitz continuous, i.e., is a short map. (Contributed by Asger C. Ipsen, 4-Apr-2021)

Ref Expression
Hypotheses dnibnd.1 T = x x + 1 2 x
dnibnd.2 φ A
dnibnd.3 φ B
Assertion dnibnd φ T B T A B A

Proof

Step Hyp Ref Expression
1 dnibnd.1 T = x x + 1 2 x
2 dnibnd.2 φ A
3 dnibnd.3 φ B
4 2 adantr φ A + 1 2 B + 1 2 A
5 3 adantr φ A + 1 2 B + 1 2 B
6 simpr φ A + 1 2 B + 1 2 A + 1 2 B + 1 2
7 1 4 5 6 dnibndlem13 φ A + 1 2 B + 1 2 T B T A B A
8 1 3 dnicld2 φ T B
9 8 recnd φ T B
10 1 2 dnicld2 φ T A
11 10 recnd φ T A
12 9 11 abssubd φ T B T A = T A T B
13 12 adantr φ B + 1 2 A + 1 2 T B T A = T A T B
14 3 adantr φ B + 1 2 A + 1 2 B
15 2 adantr φ B + 1 2 A + 1 2 A
16 simpr φ B + 1 2 A + 1 2 B + 1 2 A + 1 2
17 1 14 15 16 dnibndlem13 φ B + 1 2 A + 1 2 T A T B A B
18 2 recnd φ A
19 3 recnd φ B
20 18 19 abssubd φ A B = B A
21 20 adantr φ B + 1 2 A + 1 2 A B = B A
22 17 21 breqtrd φ B + 1 2 A + 1 2 T A T B B A
23 13 22 eqbrtrd φ B + 1 2 A + 1 2 T B T A B A
24 halfre 1 2
25 24 a1i φ 1 2
26 2 25 readdcld φ A + 1 2
27 reflcl A + 1 2 A + 1 2
28 26 27 syl φ A + 1 2
29 3 25 readdcld φ B + 1 2
30 reflcl B + 1 2 B + 1 2
31 29 30 syl φ B + 1 2
32 28 31 letrid φ A + 1 2 B + 1 2 B + 1 2 A + 1 2
33 7 23 32 mpjaodan φ T B T A B A