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 AB0CB<CA+BC=A

Proof

Step Hyp Ref Expression
1 simp1 AB0CA
2 nn0nndivcl B0CBC
3 2 3adant1 AB0CBC
4 1 3 jca AB0CABC
5 flbi2 ABCA+BC=A0BCBC<1
6 4 5 syl AB0CA+BC=A0BCBC<1
7 nn0re B0B
8 nn0ge0 B00B
9 7 8 jca B0B0B
10 nnre CC
11 nngt0 C0<C
12 10 11 jca CC0<C
13 9 12 anim12i B0CB0BC0<C
14 13 3adant1 AB0CB0BC0<C
15 divge0 B0BC0<C0BC
16 14 15 syl AB0C0BC
17 16 biantrurd AB0CBC<10BCBC<1
18 nnrp CC+
19 7 18 anim12i B0CBC+
20 19 3adant1 AB0CBC+
21 divlt1lt BC+BC<1B<C
22 20 21 syl AB0CBC<1B<C
23 6 17 22 3bitr2rd AB0CB<CA+BC=A