Metamath Proof Explorer


Theorem dvdsabsmod0

Description: Divisibility in terms of modular reduction by the absolute value of the base. (Contributed by Stefan O'Rear, 24-Sep-2014) (Proof shortened by OpenAI, 3-Jul-2020)

Ref Expression
Assertion dvdsabsmod0 ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝑀 ≠ 0 ) → ( 𝑀𝑁 ↔ ( 𝑁 mod ( abs ‘ 𝑀 ) ) = 0 ) )

Proof

Step Hyp Ref Expression
1 absdvdsb ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) → ( 𝑀𝑁 ↔ ( abs ‘ 𝑀 ) ∥ 𝑁 ) )
2 1 adantlr ( ( ( 𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ) ∧ 𝑁 ∈ ℤ ) → ( 𝑀𝑁 ↔ ( abs ‘ 𝑀 ) ∥ 𝑁 ) )
3 nnabscl ( ( 𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ) → ( abs ‘ 𝑀 ) ∈ ℕ )
4 dvdsval3 ( ( ( abs ‘ 𝑀 ) ∈ ℕ ∧ 𝑁 ∈ ℤ ) → ( ( abs ‘ 𝑀 ) ∥ 𝑁 ↔ ( 𝑁 mod ( abs ‘ 𝑀 ) ) = 0 ) )
5 3 4 sylan ( ( ( 𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ) ∧ 𝑁 ∈ ℤ ) → ( ( abs ‘ 𝑀 ) ∥ 𝑁 ↔ ( 𝑁 mod ( abs ‘ 𝑀 ) ) = 0 ) )
6 2 5 bitrd ( ( ( 𝑀 ∈ ℤ ∧ 𝑀 ≠ 0 ) ∧ 𝑁 ∈ ℤ ) → ( 𝑀𝑁 ↔ ( 𝑁 mod ( abs ‘ 𝑀 ) ) = 0 ) )
7 6 an32s ( ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ) ∧ 𝑀 ≠ 0 ) → ( 𝑀𝑁 ↔ ( 𝑁 mod ( abs ‘ 𝑀 ) ) = 0 ) )
8 7 3impa ( ( 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝑀 ≠ 0 ) → ( 𝑀𝑁 ↔ ( 𝑁 mod ( abs ‘ 𝑀 ) ) = 0 ) )