Metamath Proof Explorer


Theorem numltc

Description: Comparing two decimal integers (unequal higher places). (Contributed by Mario Carneiro, 18-Feb-2014)

Ref Expression
Hypotheses numlt.1 T
numlt.2 A 0
numlt.3 B 0
numltc.3 C 0
numltc.4 D 0
numltc.5 C < T
numltc.6 A < B
Assertion numltc T A + C < T B + D

Proof

Step Hyp Ref Expression
1 numlt.1 T
2 numlt.2 A 0
3 numlt.3 B 0
4 numltc.3 C 0
5 numltc.4 D 0
6 numltc.5 C < T
7 numltc.6 A < B
8 1 2 4 1 6 numlt T A + C < T A + T
9 1 nnrei T
10 9 recni T
11 2 nn0rei A
12 11 recni A
13 ax-1cn 1
14 10 12 13 adddii T A + 1 = T A + T 1
15 10 mulid1i T 1 = T
16 15 oveq2i T A + T 1 = T A + T
17 14 16 eqtri T A + 1 = T A + T
18 8 17 breqtrri T A + C < T A + 1
19 nn0ltp1le A 0 B 0 A < B A + 1 B
20 2 3 19 mp2an A < B A + 1 B
21 7 20 mpbi A + 1 B
22 1 nngt0i 0 < T
23 peano2re A A + 1
24 11 23 ax-mp A + 1
25 3 nn0rei B
26 24 25 9 lemul2i 0 < T A + 1 B T A + 1 T B
27 22 26 ax-mp A + 1 B T A + 1 T B
28 21 27 mpbi T A + 1 T B
29 9 11 remulcli T A
30 4 nn0rei C
31 29 30 readdcli T A + C
32 9 24 remulcli T A + 1
33 9 25 remulcli T B
34 31 32 33 ltletri T A + C < T A + 1 T A + 1 T B T A + C < T B
35 18 28 34 mp2an T A + C < T B
36 33 5 nn0addge1i T B T B + D
37 5 nn0rei D
38 33 37 readdcli T B + D
39 31 33 38 ltletri T A + C < T B T B T B + D T A + C < T B + D
40 35 36 39 mp2an T A + C < T B + D