Metamath Proof Explorer


Theorem dvdsmod0

Description: If a positive integer divides another integer, then the remainder upon division is zero. (Contributed by AV, 3-Mar-2022)

Ref Expression
Assertion dvdsmod0 ⊢ M ∈ ℕ ∧ M ∥ N → N mod M = 0

Proof

Step Hyp Ref Expression
1 dvdszrcl ⊢ M ∥ N → M ∈ ℤ ∧ N ∈ ℤ
2 1 adantl ⊢ M ∈ ℕ ∧ M ∥ N → M ∈ ℤ ∧ N ∈ ℤ
3 dvdsval3 ⊢ M ∈ ℕ ∧ N ∈ ℤ → M ∥ N ↔ N mod M = 0
4 3 biimpd ⊢ M ∈ ℕ ∧ N ∈ ℤ → M ∥ N → N mod M = 0
5 4 expcom ⊢ N ∈ ℤ → M ∈ ℕ → M ∥ N → N mod M = 0
6 5 impd ⊢ N ∈ ℤ → M ∈ ℕ ∧ M ∥ N → N mod M = 0
7 6 adantl ⊢ M ∈ ℤ ∧ N ∈ ℤ → M ∈ ℕ ∧ M ∥ N → N mod M = 0
8 2 7 mpcom ⊢ M ∈ ℕ ∧ M ∥ N → N mod M = 0