Metamath Proof Explorer


Theorem hvsubadd

Description: Relationship between vector subtraction and addition. (Contributed by NM, 30-Oct-1999) (New usage is discouraged.)

Ref Expression
Assertion hvsubadd ( ( 𝐴 ∈ ℋ ∧ 𝐵 ∈ ℋ ∧ 𝐶 ∈ ℋ ) → ( ( 𝐴 𝐵 ) = 𝐶 ↔ ( 𝐵 + 𝐶 ) = 𝐴 ) )

Proof

Step Hyp Ref Expression
1 oveq1 ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( 𝐴 𝐵 ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) )
2 1 eqeq1d ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( ( 𝐴 𝐵 ) = 𝐶 ↔ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) = 𝐶 ) )
3 eqeq2 ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( ( 𝐵 + 𝐶 ) = 𝐴 ↔ ( 𝐵 + 𝐶 ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ) )
4 2 3 bibi12d ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( ( ( 𝐴 𝐵 ) = 𝐶 ↔ ( 𝐵 + 𝐶 ) = 𝐴 ) ↔ ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) = 𝐶 ↔ ( 𝐵 + 𝐶 ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ) ) )
5 oveq2 ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) )
6 5 eqeq1d ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) = 𝐶 ↔ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = 𝐶 ) )
7 oveq1 ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( 𝐵 + 𝐶 ) = ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + 𝐶 ) )
8 7 eqeq1d ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( ( 𝐵 + 𝐶 ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ↔ ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + 𝐶 ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ) )
9 6 8 bibi12d ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) = 𝐶 ↔ ( 𝐵 + 𝐶 ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ) ↔ ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = 𝐶 ↔ ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + 𝐶 ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ) ) )
10 eqeq2 ( 𝐶 = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) → ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = 𝐶 ↔ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) )
11 oveq2 ( 𝐶 = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) → ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + 𝐶 ) = ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) )
12 11 eqeq1d ( 𝐶 = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) → ( ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + 𝐶 ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ↔ ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ) )
13 10 12 bibi12d ( 𝐶 = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) → ( ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = 𝐶 ↔ ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + 𝐶 ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ) ↔ ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ↔ ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ) ) )
14 ifhvhv0 if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ∈ ℋ
15 ifhvhv0 if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ∈ ℋ
16 ifhvhv0 if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ∈ ℋ
17 14 15 16 hvsubaddi ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ↔ ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) + if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) )
18 4 9 13 17 dedth3h ( ( 𝐴 ∈ ℋ ∧ 𝐵 ∈ ℋ ∧ 𝐶 ∈ ℋ ) → ( ( 𝐴 𝐵 ) = 𝐶 ↔ ( 𝐵 + 𝐶 ) = 𝐴 ) )