Metamath Proof Explorer


Theorem hvaddcan

Description: Cancellation law for vector addition. (Contributed by NM, 18-May-2005) (New usage is discouraged.)

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

Proof

Step Hyp Ref Expression
1 oveq1 ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( 𝐴 + 𝐵 ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐵 ) )
2 oveq1 ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( 𝐴 + 𝐶 ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐶 ) )
3 1 2 eqeq12d ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( ( 𝐴 + 𝐵 ) = ( 𝐴 + 𝐶 ) ↔ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐵 ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐶 ) ) )
4 3 bibi1d ( 𝐴 = 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 ) + if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐶 ) ) )
7 eqeq1 ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( 𝐵 = 𝐶 ↔ if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) = 𝐶 ) )
8 6 7 bibi12d ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐵 ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐶 ) ↔ 𝐵 = 𝐶 ) ↔ ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐶 ) ↔ if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) = 𝐶 ) ) )
9 oveq2 ( 𝐶 = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) → ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐶 ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) )
10 9 eqeq2d ( 𝐶 = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) → ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐶 ) ↔ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) ) )
11 eqeq2 ( 𝐶 = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) → ( if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) = 𝐶 ↔ if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) )
12 10 11 bibi12d ( 𝐶 = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) → ( ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + 𝐶 ) ↔ if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) = 𝐶 ) ↔ ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) ↔ if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) ) )
13 ifhvhv0 if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ∈ ℋ
14 ifhvhv0 if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ∈ ℋ
15 ifhvhv0 if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ∈ ℋ
16 13 14 15 hvaddcani ( ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) + if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) ) ↔ if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) = if ( 𝐶 ∈ ℋ , 𝐶 , 0 ) )
17 4 8 12 16 dedth3h ( ( 𝐴 ∈ ℋ ∧ 𝐵 ∈ ℋ ∧ 𝐶 ∈ ℋ ) → ( ( 𝐴 + 𝐵 ) = ( 𝐴 + 𝐶 ) ↔ 𝐵 = 𝐶 ) )