Metamath Proof Explorer


Theorem normsub0

Description: Two vectors are equal iff the norm of their difference is zero. (Contributed by NM, 18-Aug-1999) (New usage is discouraged.)

Ref Expression
Assertion normsub0 ( ( 𝐴 ∈ ℋ ∧ 𝐵 ∈ ℋ ) → ( ( norm ‘ ( 𝐴 𝐵 ) ) = 0 ↔ 𝐴 = 𝐵 ) )

Proof

Step Hyp Ref Expression
1 fvoveq1 ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( norm ‘ ( 𝐴 𝐵 ) ) = ( norm ‘ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) ) )
2 1 eqeq1d ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( ( norm ‘ ( 𝐴 𝐵 ) ) = 0 ↔ ( norm ‘ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) ) = 0 ) )
3 eqeq1 ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( 𝐴 = 𝐵 ↔ if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) = 𝐵 ) )
4 2 3 bibi12d ( 𝐴 = if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) → ( ( ( norm ‘ ( 𝐴 𝐵 ) ) = 0 ↔ 𝐴 = 𝐵 ) ↔ ( ( norm ‘ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) ) = 0 ↔ if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) = 𝐵 ) ) )
5 oveq2 ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) = ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) )
6 5 fveqeq2d ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( ( norm ‘ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) ) = 0 ↔ ( norm ‘ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) ) = 0 ) )
7 eqeq2 ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) = 𝐵 ↔ if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) )
8 6 7 bibi12d ( 𝐵 = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) → ( ( ( norm ‘ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − 𝐵 ) ) = 0 ↔ if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) = 𝐵 ) ↔ ( ( norm ‘ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) ) = 0 ↔ if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) ) )
9 ifhvhv0 if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) ∈ ℋ
10 ifhvhv0 if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ∈ ℋ
11 9 10 normsub0i ( ( norm ‘ ( if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) − if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) ) ) = 0 ↔ if ( 𝐴 ∈ ℋ , 𝐴 , 0 ) = if ( 𝐵 ∈ ℋ , 𝐵 , 0 ) )
12 4 8 11 dedth2h ( ( 𝐴 ∈ ℋ ∧ 𝐵 ∈ ℋ ) → ( ( norm ‘ ( 𝐴 𝐵 ) ) = 0 ↔ 𝐴 = 𝐵 ) )