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 ) ) |
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 ) ) |