Metamath Proof Explorer


Theorem trirn

Description: Triangle inequality in R^n. (Contributed by Jeff Madsen, 2-Sep-2009) (Revised by Mario Carneiro, 4-Jun-2014)

Ref Expression
Hypotheses csbrn.1 φ A Fin
csbrn.2 φ k A B
csbrn.3 φ k A C
Assertion trirn φ k A B + C 2 k A B 2 + k A C 2

Proof

Step Hyp Ref Expression
1 csbrn.1 φ A Fin
2 csbrn.2 φ k A B
3 csbrn.3 φ k A C
4 2 resqcld φ k A B 2
5 2re 2
6 2 3 remulcld φ k A B C
7 remulcl 2 B C 2 B C
8 5 6 7 sylancr φ k A 2 B C
9 4 8 readdcld φ k A B 2 + 2 B C
10 1 9 fsumrecl φ k A B 2 + 2 B C
11 1 4 fsumrecl φ k A B 2
12 3 resqcld φ k A C 2
13 1 12 fsumrecl φ k A C 2
14 11 13 remulcld φ k A B 2 k A C 2
15 2 sqge0d φ k A 0 B 2
16 1 4 15 fsumge0 φ 0 k A B 2
17 3 sqge0d φ k A 0 C 2
18 1 12 17 fsumge0 φ 0 k A C 2
19 11 13 16 18 mulge0d φ 0 k A B 2 k A C 2
20 14 19 resqrtcld φ k A B 2 k A C 2
21 remulcl 2 k A B 2 k A C 2 2 k A B 2 k A C 2
22 5 20 21 sylancr φ 2 k A B 2 k A C 2
23 11 22 readdcld φ k A B 2 + 2 k A B 2 k A C 2
24 4 recnd φ k A B 2
25 8 recnd φ k A 2 B C
26 1 24 25 fsumadd φ k A B 2 + 2 B C = k A B 2 + k A 2 B C
27 1 8 fsumrecl φ k A 2 B C
28 2cnd φ 2
29 6 recnd φ k A B C
30 1 28 29 fsummulc2 φ 2 k A B C = k A 2 B C
31 1 6 fsumrecl φ k A B C
32 31 recnd φ k A B C
33 32 abscld φ k A B C
34 31 leabsd φ k A B C k A B C
35 1 2 3 csbren φ k A B C 2 k A B 2 k A C 2
36 absresq k A B C k A B C 2 = k A B C 2
37 31 36 syl φ k A B C 2 = k A B C 2
38 resqrtth k A B 2 k A C 2 0 k A B 2 k A C 2 k A B 2 k A C 2 2 = k A B 2 k A C 2
39 14 19 38 syl2anc φ k A B 2 k A C 2 2 = k A B 2 k A C 2
40 35 37 39 3brtr4d φ k A B C 2 k A B 2 k A C 2 2
41 32 absge0d φ 0 k A B C
42 14 19 sqrtge0d φ 0 k A B 2 k A C 2
43 33 20 41 42 le2sqd φ k A B C k A B 2 k A C 2 k A B C 2 k A B 2 k A C 2 2
44 40 43 mpbird φ k A B C k A B 2 k A C 2
45 31 33 20 34 44 letrd φ k A B C k A B 2 k A C 2
46 5 a1i φ 2
47 2pos 0 < 2
48 47 a1i φ 0 < 2
49 lemul2 k A B C k A B 2 k A C 2 2 0 < 2 k A B C k A B 2 k A C 2 2 k A B C 2 k A B 2 k A C 2
50 31 20 46 48 49 syl112anc φ k A B C k A B 2 k A C 2 2 k A B C 2 k A B 2 k A C 2
51 45 50 mpbid φ 2 k A B C 2 k A B 2 k A C 2
52 30 51 eqbrtrrd φ k A 2 B C 2 k A B 2 k A C 2
53 27 22 11 52 leadd2dd φ k A B 2 + k A 2 B C k A B 2 + 2 k A B 2 k A C 2
54 26 53 eqbrtrd φ k A B 2 + 2 B C k A B 2 + 2 k A B 2 k A C 2
55 10 23 13 54 leadd1dd φ k A B 2 + 2 B C + k A C 2 k A B 2 + 2 k A B 2 k A C 2 + k A C 2
56 2 3 readdcld φ k A B + C
57 56 resqcld φ k A B + C 2
58 1 57 fsumrecl φ k A B + C 2
59 56 sqge0d φ k A 0 B + C 2
60 1 57 59 fsumge0 φ 0 k A B + C 2
61 resqrtth k A B + C 2 0 k A B + C 2 k A B + C 2 2 = k A B + C 2
62 58 60 61 syl2anc φ k A B + C 2 2 = k A B + C 2
63 2 recnd φ k A B
64 3 recnd φ k A C
65 binom2 B C B + C 2 = B 2 + 2 B C + C 2
66 63 64 65 syl2anc φ k A B + C 2 = B 2 + 2 B C + C 2
67 66 sumeq2dv φ k A B + C 2 = k A B 2 + 2 B C + C 2
68 9 recnd φ k A B 2 + 2 B C
69 12 recnd φ k A C 2
70 1 68 69 fsumadd φ k A B 2 + 2 B C + C 2 = k A B 2 + 2 B C + k A C 2
71 67 70 eqtrd φ k A B + C 2 = k A B 2 + 2 B C + k A C 2
72 62 71 eqtrd φ k A B + C 2 2 = k A B 2 + 2 B C + k A C 2
73 11 16 resqrtcld φ k A B 2
74 73 recnd φ k A B 2
75 13 18 resqrtcld φ k A C 2
76 75 recnd φ k A C 2
77 binom2 k A B 2 k A C 2 k A B 2 + k A C 2 2 = k A B 2 2 + 2 k A B 2 k A C 2 + k A C 2 2
78 74 76 77 syl2anc φ k A B 2 + k A C 2 2 = k A B 2 2 + 2 k A B 2 k A C 2 + k A C 2 2
79 resqrtth k A B 2 0 k A B 2 k A B 2 2 = k A B 2
80 11 16 79 syl2anc φ k A B 2 2 = k A B 2
81 11 16 13 18 sqrtmuld φ k A B 2 k A C 2 = k A B 2 k A C 2
82 81 eqcomd φ k A B 2 k A C 2 = k A B 2 k A C 2
83 82 oveq2d φ 2 k A B 2 k A C 2 = 2 k A B 2 k A C 2
84 80 83 oveq12d φ k A B 2 2 + 2 k A B 2 k A C 2 = k A B 2 + 2 k A B 2 k A C 2
85 resqrtth k A C 2 0 k A C 2 k A C 2 2 = k A C 2
86 13 18 85 syl2anc φ k A C 2 2 = k A C 2
87 84 86 oveq12d φ k A B 2 2 + 2 k A B 2 k A C 2 + k A C 2 2 = k A B 2 + 2 k A B 2 k A C 2 + k A C 2
88 78 87 eqtrd φ k A B 2 + k A C 2 2 = k A B 2 + 2 k A B 2 k A C 2 + k A C 2
89 55 72 88 3brtr4d φ k A B + C 2 2 k A B 2 + k A C 2 2
90 58 60 resqrtcld φ k A B + C 2
91 73 75 readdcld φ k A B 2 + k A C 2
92 58 60 sqrtge0d φ 0 k A B + C 2
93 11 16 sqrtge0d φ 0 k A B 2
94 13 18 sqrtge0d φ 0 k A C 2
95 73 75 93 94 addge0d φ 0 k A B 2 + k A C 2
96 90 91 92 95 le2sqd φ k A B + C 2 k A B 2 + k A C 2 k A B + C 2 2 k A B 2 + k A C 2 2
97 89 96 mpbird φ k A B + C 2 k A B 2 + k A C 2