Description: Subtracting a nonnegative integer from a nonnegative integer which is greater than the first one results in a nonnegative integer. (Contributed by Alexander van der Vekens, 6-Apr-2018)
| Ref | Expression | ||
|---|---|---|---|
| Assertion | ltsubnn0 | |- ( ( A e. NN0 /\ B e. NN0 ) -> ( B < A -> ( A - B ) e. NN0 ) ) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | nn0re | |- ( B e. NN0 -> B e. RR ) |
|
| 2 | nn0re | |- ( A e. NN0 -> A e. RR ) |
|
| 3 | ltle | |- ( ( B e. RR /\ A e. RR ) -> ( B < A -> B <_ A ) ) |
|
| 4 | 1 2 3 | syl2anr | |- ( ( A e. NN0 /\ B e. NN0 ) -> ( B < A -> B <_ A ) ) |
| 5 | nn0sub | |- ( ( B e. NN0 /\ A e. NN0 ) -> ( B <_ A <-> ( A - B ) e. NN0 ) ) |
|
| 6 | 5 | ancoms | |- ( ( A e. NN0 /\ B e. NN0 ) -> ( B <_ A <-> ( A - B ) e. NN0 ) ) |
| 7 | 4 6 | sylibd | |- ( ( A e. NN0 /\ B e. NN0 ) -> ( B < A -> ( A - B ) e. NN0 ) ) |