Metamath Proof Explorer


Theorem adddivflid

Description: The floor of a sum of an integer and a fraction is equal to the integer iff the denominator of the fraction is less than the numerator. (Contributed by AV, 14-Jul-2021)

Ref Expression
Assertion adddivflid A B 0 C B < C A + B C = A

Proof

Step Hyp Ref Expression
1 simp1 A B 0 C A
2 nn0nndivcl B 0 C B C
3 2 3adant1 A B 0 C B C
4 1 3 jca A B 0 C A B C
5 flbi2 A B C A + B C = A 0 B C B C < 1
6 4 5 syl A B 0 C A + B C = A 0 B C B C < 1
7 nn0re B 0 B
8 nn0ge0 B 0 0 B
9 7 8 jca B 0 B 0 B
10 nnre C C
11 nngt0 C 0 < C
12 10 11 jca C C 0 < C
13 9 12 anim12i B 0 C B 0 B C 0 < C
14 13 3adant1 A B 0 C B 0 B C 0 < C
15 divge0 B 0 B C 0 < C 0 B C
16 14 15 syl A B 0 C 0 B C
17 16 biantrurd A B 0 C B C < 1 0 B C B C < 1
18 nnrp C C +
19 7 18 anim12i B 0 C B C +
20 19 3adant1 A B 0 C B C +
21 divlt1lt B C + B C < 1 B < C
22 20 21 syl A B 0 C B C < 1 B < C
23 6 17 22 3bitr2rd A B 0 C B < C A + B C = A