Metamath Proof Explorer


Theorem submuladdmuld

Description: Transformation of a sum of a product of a difference and a product with the subtrahend of the difference. (Contributed by AV, 2-Feb-2023)

Ref Expression
Hypotheses submuladdmuld.a ⊢ ( 𝜑 → 𝐴 ∈ ℂ )
submuladdmuld.b ⊢ ( 𝜑 → 𝐵 ∈ ℂ )
submuladdmuld.c ⊢ ( 𝜑 → 𝐶 ∈ ℂ )
submuladdmuld.d ⊢ ( 𝜑 → 𝐷 ∈ ℂ )
Assertion submuladdmuld ( 𝜑 → ( ( ( 𝐴 − 𝐵 ) · 𝐶 ) + ( 𝐵 · 𝐷 ) ) = ( ( 𝐴 · 𝐶 ) + ( 𝐵 · ( 𝐷 − 𝐶 ) ) ) )

Proof

Step Hyp Ref Expression
1 submuladdmuld.a ⊢ ( 𝜑 → 𝐴 ∈ ℂ )
2 submuladdmuld.b ⊢ ( 𝜑 → 𝐵 ∈ ℂ )
3 submuladdmuld.c ⊢ ( 𝜑 → 𝐶 ∈ ℂ )
4 submuladdmuld.d ⊢ ( 𝜑 → 𝐷 ∈ ℂ )
5 1 2 3 subdird ⊢ ( 𝜑 → ( ( 𝐴 − 𝐵 ) · 𝐶 ) = ( ( 𝐴 · 𝐶 ) − ( 𝐵 · 𝐶 ) ) )
6 5 oveq1d ⊢ ( 𝜑 → ( ( ( 𝐴 − 𝐵 ) · 𝐶 ) + ( 𝐵 · 𝐷 ) ) = ( ( ( 𝐴 · 𝐶 ) − ( 𝐵 · 𝐶 ) ) + ( 𝐵 · 𝐷 ) ) )
7 1 3 mulcld ⊢ ( 𝜑 → ( 𝐴 · 𝐶 ) ∈ ℂ )
8 2 3 mulcld ⊢ ( 𝜑 → ( 𝐵 · 𝐶 ) ∈ ℂ )
9 2 4 mulcld ⊢ ( 𝜑 → ( 𝐵 · 𝐷 ) ∈ ℂ )
10 7 8 9 subadd23d ⊢ ( 𝜑 → ( ( ( 𝐴 · 𝐶 ) − ( 𝐵 · 𝐶 ) ) + ( 𝐵 · 𝐷 ) ) = ( ( 𝐴 · 𝐶 ) + ( ( 𝐵 · 𝐷 ) − ( 𝐵 · 𝐶 ) ) ) )
11 2 4 3 subdid ⊢ ( 𝜑 → ( 𝐵 · ( 𝐷 − 𝐶 ) ) = ( ( 𝐵 · 𝐷 ) − ( 𝐵 · 𝐶 ) ) )
12 11 eqcomd ⊢ ( 𝜑 → ( ( 𝐵 · 𝐷 ) − ( 𝐵 · 𝐶 ) ) = ( 𝐵 · ( 𝐷 − 𝐶 ) ) )
13 12 oveq2d ⊢ ( 𝜑 → ( ( 𝐴 · 𝐶 ) + ( ( 𝐵 · 𝐷 ) − ( 𝐵 · 𝐶 ) ) ) = ( ( 𝐴 · 𝐶 ) + ( 𝐵 · ( 𝐷 − 𝐶 ) ) ) )
14 6 10 13 3eqtrd ⊢ ( 𝜑 → ( ( ( 𝐴 − 𝐵 ) · 𝐶 ) + ( 𝐵 · 𝐷 ) ) = ( ( 𝐴 · 𝐶 ) + ( 𝐵 · ( 𝐷 − 𝐶 ) ) ) )