Metamath Proof Explorer


Theorem dvdssubr

Description: An integer divides another iff it divides their difference. (Contributed by Paul Chapman, 31-Mar-2011)

Ref Expression
Assertion dvdssubr ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) → ( 𝑀𝑁𝑀 ∥ ( 𝑁𝑀 ) ) )

Proof

Step Hyp Ref Expression
1 zsubcl ( ( 𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ ) → ( 𝑁𝑀 ) ∈ ℤ )
2 1 ancoms ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) → ( 𝑁𝑀 ) ∈ ℤ )
3 dvdsadd ( ( 𝑀 ∈ ℤ ∧ ( 𝑁𝑀 ) ∈ ℤ ) → ( 𝑀 ∥ ( 𝑁𝑀 ) ↔ 𝑀 ∥ ( 𝑀 + ( 𝑁𝑀 ) ) ) )
4 2 3 syldan ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) → ( 𝑀 ∥ ( 𝑁𝑀 ) ↔ 𝑀 ∥ ( 𝑀 + ( 𝑁𝑀 ) ) ) )
5 zcn ( 𝑀 ∈ ℤ → 𝑀 ∈ ℂ )
6 zcn ( 𝑁 ∈ ℤ → 𝑁 ∈ ℂ )
7 pncan3 ( ( 𝑀 ∈ ℂ ∧ 𝑁 ∈ ℂ ) → ( 𝑀 + ( 𝑁𝑀 ) ) = 𝑁 )
8 5 6 7 syl2an ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) → ( 𝑀 + ( 𝑁𝑀 ) ) = 𝑁 )
9 8 breq2d ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) → ( 𝑀 ∥ ( 𝑀 + ( 𝑁𝑀 ) ) ↔ 𝑀𝑁 ) )
10 4 9 bitr2d ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) → ( 𝑀𝑁𝑀 ∥ ( 𝑁𝑀 ) ) )