Metamath Proof Explorer


Theorem ltsubnn0

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 ( ( 𝐴 ∈ ℕ0𝐵 ∈ ℕ0 ) → ( 𝐵 < 𝐴 → ( 𝐴𝐵 ) ∈ ℕ0 ) )

Proof

Step Hyp Ref Expression
1 nn0re ( 𝐵 ∈ ℕ0𝐵 ∈ ℝ )
2 nn0re ( 𝐴 ∈ ℕ0𝐴 ∈ ℝ )
3 ltle ( ( 𝐵 ∈ ℝ ∧ 𝐴 ∈ ℝ ) → ( 𝐵 < 𝐴𝐵𝐴 ) )
4 1 2 3 syl2anr ( ( 𝐴 ∈ ℕ0𝐵 ∈ ℕ0 ) → ( 𝐵 < 𝐴𝐵𝐴 ) )
5 nn0sub ( ( 𝐵 ∈ ℕ0𝐴 ∈ ℕ0 ) → ( 𝐵𝐴 ↔ ( 𝐴𝐵 ) ∈ ℕ0 ) )
6 5 ancoms ( ( 𝐴 ∈ ℕ0𝐵 ∈ ℕ0 ) → ( 𝐵𝐴 ↔ ( 𝐴𝐵 ) ∈ ℕ0 ) )
7 4 6 sylibd ( ( 𝐴 ∈ ℕ0𝐵 ∈ ℕ0 ) → ( 𝐵 < 𝐴 → ( 𝐴𝐵 ) ∈ ℕ0 ) )