Metamath Proof Explorer


Theorem normpyth

Description: Analogy to Pythagorean theorem for orthogonal vectors. Remark 3.4(C) of Beran p. 98. (Contributed by NM, 17-Oct-1999) (New usage is discouraged.)

Ref Expression
Assertion normpyth A B A ih B = 0 norm A + B 2 = norm A 2 + norm B 2

Proof

Step Hyp Ref Expression
1 oveq1 A = if A A 0 A ih B = if A A 0 ih B
2 1 eqeq1d A = if A A 0 A ih B = 0 if A A 0 ih B = 0
3 fvoveq1 A = if A A 0 norm A + B = norm if A A 0 + B
4 3 oveq1d A = if A A 0 norm A + B 2 = norm if A A 0 + B 2
5 fveq2 A = if A A 0 norm A = norm if A A 0
6 5 oveq1d A = if A A 0 norm A 2 = norm if A A 0 2
7 6 oveq1d A = if A A 0 norm A 2 + norm B 2 = norm if A A 0 2 + norm B 2
8 4 7 eqeq12d A = if A A 0 norm A + B 2 = norm A 2 + norm B 2 norm if A A 0 + B 2 = norm if A A 0 2 + norm B 2
9 2 8 imbi12d A = if A A 0 A ih B = 0 norm A + B 2 = norm A 2 + norm B 2 if A A 0 ih B = 0 norm if A A 0 + B 2 = norm if A A 0 2 + norm B 2
10 oveq2 B = if B B 0 if A A 0 ih B = if A A 0 ih if B B 0
11 10 eqeq1d B = if B B 0 if A A 0 ih B = 0 if A A 0 ih if B B 0 = 0
12 oveq2 B = if B B 0 if A A 0 + B = if A A 0 + if B B 0
13 12 fveq2d B = if B B 0 norm if A A 0 + B = norm if A A 0 + if B B 0
14 13 oveq1d B = if B B 0 norm if A A 0 + B 2 = norm if A A 0 + if B B 0 2
15 fveq2 B = if B B 0 norm B = norm if B B 0
16 15 oveq1d B = if B B 0 norm B 2 = norm if B B 0 2
17 16 oveq2d B = if B B 0 norm if A A 0 2 + norm B 2 = norm if A A 0 2 + norm if B B 0 2
18 14 17 eqeq12d B = if B B 0 norm if A A 0 + B 2 = norm if A A 0 2 + norm B 2 norm if A A 0 + if B B 0 2 = norm if A A 0 2 + norm if B B 0 2
19 11 18 imbi12d B = if B B 0 if A A 0 ih B = 0 norm if A A 0 + B 2 = norm if A A 0 2 + norm B 2 if A A 0 ih if B B 0 = 0 norm if A A 0 + if B B 0 2 = norm if A A 0 2 + norm if B B 0 2
20 ifhvhv0 if A A 0
21 ifhvhv0 if B B 0
22 20 21 normpythi if A A 0 ih if B B 0 = 0 norm if A A 0 + if B B 0 2 = norm if A A 0 2 + norm if B B 0 2
23 9 19 22 dedth2h A B A ih B = 0 norm A + B 2 = norm A 2 + norm B 2