Metamath Proof Explorer


Theorem zdivadd

Description: Property of divisibility: if D divides A and B then it divides A + B . (Contributed by NM, 3-Oct-2008)

Ref Expression
Assertion zdivadd ( ( ( 𝐷 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ) ∧ ( ( 𝐴 / 𝐷 ) ∈ ℤ ∧ ( 𝐵 / 𝐷 ) ∈ ℤ ) ) → ( ( 𝐴 + 𝐵 ) / 𝐷 ) ∈ ℤ )

Proof

Step Hyp Ref Expression
1 zcn ( 𝐴 ∈ ℤ → 𝐴 ∈ ℂ )
2 zcn ( 𝐵 ∈ ℤ → 𝐵 ∈ ℂ )
3 nncn ( 𝐷 ∈ ℕ → 𝐷 ∈ ℂ )
4 nnne0 ( 𝐷 ∈ ℕ → 𝐷 ≠ 0 )
5 3 4 jca ( 𝐷 ∈ ℕ → ( 𝐷 ∈ ℂ ∧ 𝐷 ≠ 0 ) )
6 divdir ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ ( 𝐷 ∈ ℂ ∧ 𝐷 ≠ 0 ) ) → ( ( 𝐴 + 𝐵 ) / 𝐷 ) = ( ( 𝐴 / 𝐷 ) + ( 𝐵 / 𝐷 ) ) )
7 1 2 5 6 syl3an ( ( 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝐷 ∈ ℕ ) → ( ( 𝐴 + 𝐵 ) / 𝐷 ) = ( ( 𝐴 / 𝐷 ) + ( 𝐵 / 𝐷 ) ) )
8 7 3comr ( ( 𝐷 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ) → ( ( 𝐴 + 𝐵 ) / 𝐷 ) = ( ( 𝐴 / 𝐷 ) + ( 𝐵 / 𝐷 ) ) )
9 8 adantr ( ( ( 𝐷 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ) ∧ ( ( 𝐴 / 𝐷 ) ∈ ℤ ∧ ( 𝐵 / 𝐷 ) ∈ ℤ ) ) → ( ( 𝐴 + 𝐵 ) / 𝐷 ) = ( ( 𝐴 / 𝐷 ) + ( 𝐵 / 𝐷 ) ) )
10 zaddcl ( ( ( 𝐴 / 𝐷 ) ∈ ℤ ∧ ( 𝐵 / 𝐷 ) ∈ ℤ ) → ( ( 𝐴 / 𝐷 ) + ( 𝐵 / 𝐷 ) ) ∈ ℤ )
11 10 adantl ( ( ( 𝐷 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ) ∧ ( ( 𝐴 / 𝐷 ) ∈ ℤ ∧ ( 𝐵 / 𝐷 ) ∈ ℤ ) ) → ( ( 𝐴 / 𝐷 ) + ( 𝐵 / 𝐷 ) ) ∈ ℤ )
12 9 11 eqeltrd ( ( ( 𝐷 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ) ∧ ( ( 𝐴 / 𝐷 ) ∈ ℤ ∧ ( 𝐵 / 𝐷 ) ∈ ℤ ) ) → ( ( 𝐴 + 𝐵 ) / 𝐷 ) ∈ ℤ )