Metamath Proof Explorer


Theorem nnpcan

Description: Cancellation law for subtraction: ((a-b)-c)+b = a-c holds for complex numbers a,b,c. (Contributed by Alexander van der Vekens, 24-Mar-2018)

Ref Expression
Assertion nnpcan ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ ) → ( ( ( 𝐴𝐵 ) − 𝐶 ) + 𝐵 ) = ( 𝐴𝐶 ) )

Proof

Step Hyp Ref Expression
1 subcl ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ) → ( 𝐴𝐵 ) ∈ ℂ )
2 1 3adant3 ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ ) → ( 𝐴𝐵 ) ∈ ℂ )
3 addsub ( ( ( 𝐴𝐵 ) ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ ) → ( ( ( 𝐴𝐵 ) + 𝐵 ) − 𝐶 ) = ( ( ( 𝐴𝐵 ) − 𝐶 ) + 𝐵 ) )
4 3 eqcomd ( ( ( 𝐴𝐵 ) ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ ) → ( ( ( 𝐴𝐵 ) − 𝐶 ) + 𝐵 ) = ( ( ( 𝐴𝐵 ) + 𝐵 ) − 𝐶 ) )
5 2 4 syld3an1 ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ ) → ( ( ( 𝐴𝐵 ) − 𝐶 ) + 𝐵 ) = ( ( ( 𝐴𝐵 ) + 𝐵 ) − 𝐶 ) )
6 npcan ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ) → ( ( 𝐴𝐵 ) + 𝐵 ) = 𝐴 )
7 6 3adant3 ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ ) → ( ( 𝐴𝐵 ) + 𝐵 ) = 𝐴 )
8 7 oveq1d ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ ) → ( ( ( 𝐴𝐵 ) + 𝐵 ) − 𝐶 ) = ( 𝐴𝐶 ) )
9 5 8 eqtrd ( ( 𝐴 ∈ ℂ ∧ 𝐵 ∈ ℂ ∧ 𝐶 ∈ ℂ ) → ( ( ( 𝐴𝐵 ) − 𝐶 ) + 𝐵 ) = ( 𝐴𝐶 ) )