Metamath Proof Explorer


Theorem hvnegdi

Description: Distribution of negative over subtraction. (Contributed by NM, 2-Apr-2000) (New usage is discouraged.)

Ref Expression
Assertion hvnegdi ⊢ A ∈ ℋ ∧ B ∈ ℋ → -1 ⋅ ℎ A - ℎ B = B - ℎ A

Proof

Step Hyp Ref Expression
1 oveq1 ⊢ A = if A ∈ ℋ A 0 ℎ → A - ℎ B = if A ∈ ℋ A 0 ℎ - ℎ B
2 1 oveq2d ⊢ A = if A ∈ ℋ A 0 ℎ → -1 ⋅ ℎ A - ℎ B = -1 ⋅ ℎ if A ∈ ℋ A 0 ℎ - ℎ B
3 oveq2 ⊢ A = if A ∈ ℋ A 0 ℎ → B - ℎ A = B - ℎ if A ∈ ℋ A 0 ℎ
4 2 3 eqeq12d ⊢ A = if A ∈ ℋ A 0 ℎ → -1 ⋅ ℎ A - ℎ B = B - ℎ A ↔ -1 ⋅ ℎ if A ∈ ℋ A 0 ℎ - ℎ B = B - ℎ if A ∈ ℋ A 0 ℎ
5 oveq2 ⊢ B = if B ∈ ℋ B 0 ℎ → if A ∈ ℋ A 0 ℎ - ℎ B = if A ∈ ℋ A 0 ℎ - ℎ if B ∈ ℋ B 0 ℎ
6 5 oveq2d ⊢ B = if B ∈ ℋ B 0 ℎ → -1 ⋅ ℎ if A ∈ ℋ A 0 ℎ - ℎ B = -1 ⋅ ℎ if A ∈ ℋ A 0 ℎ - ℎ if B ∈ ℋ B 0 ℎ
7 oveq1 ⊢ B = if B ∈ ℋ B 0 ℎ → B - ℎ if A ∈ ℋ A 0 ℎ = if B ∈ ℋ B 0 ℎ - ℎ if A ∈ ℋ A 0 ℎ
8 6 7 eqeq12d ⊢ B = if B ∈ ℋ B 0 ℎ → -1 ⋅ ℎ if A ∈ ℋ A 0 ℎ - ℎ B = B - ℎ if A ∈ ℋ A 0 ℎ ↔ -1 ⋅ ℎ if A ∈ ℋ A 0 ℎ - ℎ if B ∈ ℋ B 0 ℎ = if B ∈ ℋ B 0 ℎ - ℎ if A ∈ ℋ A 0 ℎ
9 ifhvhv0 ⊢ if A ∈ ℋ A 0 ℎ ∈ ℋ
10 ifhvhv0 ⊢ if B ∈ ℋ B 0 ℎ ∈ ℋ
11 9 10 hvnegdii ⊢ -1 ⋅ ℎ if A ∈ ℋ A 0 ℎ - ℎ if B ∈ ℋ B 0 ℎ = if B ∈ ℋ B 0 ℎ - ℎ if A ∈ ℋ A 0 ℎ
12 4 8 11 dedth2h ⊢ A ∈ ℋ ∧ B ∈ ℋ → -1 ⋅ ℎ A - ℎ B = B - ℎ A