Metamath Proof Explorer


Theorem pythagtriplem12

Description: Lemma for pythagtrip . Calculate the square of M . (Contributed by Scott Fenton, 17-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Hypothesis pythagtriplem11.1 M=C+B+CB2
Assertion pythagtriplem12 ABCA2+B2=C2AgcdB=1¬2AM2=C+A2

Proof

Step Hyp Ref Expression
1 pythagtriplem11.1 M=C+B+CB2
2 1 oveq1i M2=C+B+CB22
3 nncn CC
4 nncn BB
5 addcl CBC+B
6 3 4 5 syl2anr BCC+B
7 6 3adant1 ABCC+B
8 7 sqrtcld ABCC+B
9 subcl CBCB
10 3 4 9 syl2anr BCCB
11 10 3adant1 ABCCB
12 11 sqrtcld ABCCB
13 8 12 addcld ABCC+B+CB
14 13 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AC+B+CB
15 2cn 2
16 2ne0 20
17 sqdiv C+B+CB220C+B+CB22=C+B+CB222
18 15 16 17 mp3an23 C+B+CBC+B+CB22=C+B+CB222
19 15 sqvali 22=22
20 19 oveq2i C+B+CB222=C+B+CB222
21 18 20 eqtrdi C+B+CBC+B+CB22=C+B+CB222
22 14 21 syl ABCA2+B2=C2AgcdB=1¬2AC+B+CB22=C+B+CB222
23 8 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AC+B
24 12 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2ACB
25 binom2 C+BCBC+B+CB2=C+B2+2C+BCB+CB2
26 23 24 25 syl2anc ABCA2+B2=C2AgcdB=1¬2AC+B+CB2=C+B2+2C+BCB+CB2
27 nnre CC
28 nnre BB
29 readdcl CBC+B
30 27 28 29 syl2anr BCC+B
31 30 3adant1 ABCC+B
32 31 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AC+B
33 27 3ad2ant3 ABCC
34 28 3ad2ant2 ABCB
35 nngt0 C0<C
36 35 3ad2ant3 ABC0<C
37 nngt0 B0<B
38 37 3ad2ant2 ABC0<B
39 33 34 36 38 addgt0d ABC0<C+B
40 39 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2A0<C+B
41 0re 0
42 ltle 0C+B0<C+B0C+B
43 41 42 mpan C+B0<C+B0C+B
44 32 40 43 sylc ABCA2+B2=C2AgcdB=1¬2A0C+B
45 resqrtth C+B0C+BC+B2=C+B
46 32 44 45 syl2anc ABCA2+B2=C2AgcdB=1¬2AC+B2=C+B
47 46 oveq1d ABCA2+B2=C2AgcdB=1¬2AC+B2+2C+BCB=C+B+2C+BCB
48 resubcl CBCB
49 27 28 48 syl2anr BCCB
50 49 3adant1 ABCCB
51 50 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2ACB
52 pythagtriplem10 ABCA2+B2=C20<CB
53 52 3adant3 ABCA2+B2=C2AgcdB=1¬2A0<CB
54 ltle 0CB0<CB0CB
55 41 54 mpan CB0<CB0CB
56 51 53 55 sylc ABCA2+B2=C2AgcdB=1¬2A0CB
57 resqrtth CB0CBCB2=CB
58 51 56 57 syl2anc ABCA2+B2=C2AgcdB=1¬2ACB2=CB
59 47 58 oveq12d ABCA2+B2=C2AgcdB=1¬2AC+B2+2C+BCB+CB2=C+B+2C+BCB+CB
60 7 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AC+B
61 8 12 mulcld ABCC+BCB
62 mulcl 2C+BCB2C+BCB
63 15 61 62 sylancr ABC2C+BCB
64 63 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2A2C+BCB
65 11 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2ACB
66 60 64 65 add32d ABCA2+B2=C2AgcdB=1¬2AC+B+2C+BCB+CB=C+B+CB+2C+BCB
67 3 3ad2ant3 ABCC
68 67 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AC
69 nncn AA
70 69 3ad2ant1 ABCA
71 70 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AA
72 adddi 2CA2C+A=2C+2A
73 15 68 71 72 mp3an2i ABCA2+B2=C2AgcdB=1¬2A2C+A=2C+2A
74 4 3ad2ant2 ABCB
75 74 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AB
76 68 75 68 ppncand ABCA2+B2=C2AgcdB=1¬2AC+B+CB=C+C
77 68 2timesd ABCA2+B2=C2AgcdB=1¬2A2C=C+C
78 76 77 eqtr4d ABCA2+B2=C2AgcdB=1¬2AC+B+CB=2C
79 oveq1 A2+B2=C2A2+B2-B2=C2B2
80 79 3ad2ant2 ABCA2+B2=C2AgcdB=1¬2AA2+B2-B2=C2B2
81 71 sqcld ABCA2+B2=C2AgcdB=1¬2AA2
82 75 sqcld ABCA2+B2=C2AgcdB=1¬2AB2
83 81 82 pncand ABCA2+B2=C2AgcdB=1¬2AA2+B2-B2=A2
84 subsq CBC2B2=C+BCB
85 68 75 84 syl2anc ABCA2+B2=C2AgcdB=1¬2AC2B2=C+BCB
86 80 83 85 3eqtr3rd ABCA2+B2=C2AgcdB=1¬2AC+BCB=A2
87 86 fveq2d ABCA2+B2=C2AgcdB=1¬2AC+BCB=A2
88 32 44 51 56 sqrtmuld ABCA2+B2=C2AgcdB=1¬2AC+BCB=C+BCB
89 nnre AA
90 89 3ad2ant1 ABCA
91 90 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AA
92 nnnn0 AA0
93 92 nn0ge0d A0A
94 93 3ad2ant1 ABC0A
95 94 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2A0A
96 91 95 sqrtsqd ABCA2+B2=C2AgcdB=1¬2AA2=A
97 87 88 96 3eqtr3d ABCA2+B2=C2AgcdB=1¬2AC+BCB=A
98 97 oveq2d ABCA2+B2=C2AgcdB=1¬2A2C+BCB=2A
99 78 98 oveq12d ABCA2+B2=C2AgcdB=1¬2AC+B+CB+2C+BCB=2C+2A
100 73 99 eqtr4d ABCA2+B2=C2AgcdB=1¬2A2C+A=C+B+CB+2C+BCB
101 66 100 eqtr4d ABCA2+B2=C2AgcdB=1¬2AC+B+2C+BCB+CB=2C+A
102 26 59 101 3eqtrd ABCA2+B2=C2AgcdB=1¬2AC+B+CB2=2C+A
103 102 oveq1d ABCA2+B2=C2AgcdB=1¬2AC+B+CB222=2C+A22
104 addcl CAC+A
105 3 69 104 syl2anr ACC+A
106 105 3adant2 ABCC+A
107 106 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2AC+A
108 mulcl 2C+A2C+A
109 15 107 108 sylancr ABCA2+B2=C2AgcdB=1¬2A2C+A
110 2cnne0 220
111 divdiv1 2C+A2202202C+A22=2C+A22
112 110 110 111 mp3an23 2C+A2C+A22=2C+A22
113 109 112 syl ABCA2+B2=C2AgcdB=1¬2A2C+A22=2C+A22
114 103 113 eqtr4d ABCA2+B2=C2AgcdB=1¬2AC+B+CB222=2C+A22
115 divcan3 C+A2202C+A2=C+A
116 15 16 115 mp3an23 C+A2C+A2=C+A
117 107 116 syl ABCA2+B2=C2AgcdB=1¬2A2C+A2=C+A
118 117 oveq1d ABCA2+B2=C2AgcdB=1¬2A2C+A22=C+A2
119 22 114 118 3eqtrd ABCA2+B2=C2AgcdB=1¬2AC+B+CB22=C+A2
120 2 119 eqtrid ABCA2+B2=C2AgcdB=1¬2AM2=C+A2