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 + C B 2
Assertion pythagtriplem12 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A M 2 = C + A 2

Proof

Step Hyp Ref Expression
1 pythagtriplem11.1 M = C + B + C B 2
2 1 oveq1i M 2 = C + B + C B 2 2
3 nncn C C
4 nncn B B
5 addcl C B C + B
6 3 4 5 syl2anr B C C + B
7 6 3adant1 A B C C + B
8 7 sqrtcld A B C C + B
9 subcl C B C B
10 3 4 9 syl2anr B C C B
11 10 3adant1 A B C C B
12 11 sqrtcld A B C C B
13 8 12 addcld A B C C + B + C B
14 13 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B
15 2cn 2
16 2ne0 2 0
17 sqdiv C + B + C B 2 2 0 C + B + C B 2 2 = C + B + C B 2 2 2
18 15 16 17 mp3an23 C + B + C B C + B + C B 2 2 = C + B + C B 2 2 2
19 15 sqvali 2 2 = 2 2
20 19 oveq2i C + B + C B 2 2 2 = C + B + C B 2 2 2
21 18 20 eqtrdi C + B + C B C + B + C B 2 2 = C + B + C B 2 2 2
22 14 21 syl A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B 2 2 = C + B + C B 2 2 2
23 8 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B
24 12 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B
25 binom2 C + B C B C + B + C B 2 = C + B 2 + 2 C + B C B + C B 2
26 23 24 25 syl2anc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B 2 = C + B 2 + 2 C + B C B + C B 2
27 nnre C C
28 nnre B B
29 readdcl C B C + B
30 27 28 29 syl2anr B C C + B
31 30 3adant1 A B C C + B
32 31 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B
33 27 3ad2ant3 A B C C
34 28 3ad2ant2 A B C B
35 nngt0 C 0 < C
36 35 3ad2ant3 A B C 0 < C
37 nngt0 B 0 < B
38 37 3ad2ant2 A B C 0 < B
39 33 34 36 38 addgt0d A B C 0 < C + B
40 39 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 0 < C + B
41 0re 0
42 ltle 0 C + B 0 < C + B 0 C + B
43 41 42 mpan C + B 0 < C + B 0 C + B
44 32 40 43 sylc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 0 C + B
45 resqrtth C + B 0 C + B C + B 2 = C + B
46 32 44 45 syl2anc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B 2 = C + B
47 46 oveq1d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B 2 + 2 C + B C B = C + B + 2 C + B C B
48 resubcl C B C B
49 27 28 48 syl2anr B C C B
50 49 3adant1 A B C C B
51 50 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B
52 pythagtriplem10 A B C A 2 + B 2 = C 2 0 < C B
53 52 3adant3 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 0 < C B
54 ltle 0 C B 0 < C B 0 C B
55 41 54 mpan C B 0 < C B 0 C B
56 51 53 55 sylc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 0 C B
57 resqrtth C B 0 C B C B 2 = C B
58 51 56 57 syl2anc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B 2 = C B
59 47 58 oveq12d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B 2 + 2 C + B C B + C B 2 = C + B + 2 C + B C B + C B
60 7 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B
61 8 12 mulcld A B C C + B C B
62 mulcl 2 C + B C B 2 C + B C B
63 15 61 62 sylancr A B C 2 C + B C B
64 63 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C + B C B
65 11 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B
66 60 64 65 add32d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + 2 C + B C B + C B = C + B + C B + 2 C + B C B
67 3 3ad2ant3 A B C C
68 67 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C
69 nncn A A
70 69 3ad2ant1 A B C A
71 70 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A
72 adddi 2 C A 2 C + A = 2 C + 2 A
73 15 68 71 72 mp3an2i A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C + A = 2 C + 2 A
74 4 3ad2ant2 A B C B
75 74 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A B
76 68 75 68 ppncand A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B = C + C
77 68 2timesd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C = C + C
78 76 77 eqtr4d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B = 2 C
79 oveq1 A 2 + B 2 = C 2 A 2 + B 2 - B 2 = C 2 B 2
80 79 3ad2ant2 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A 2 + B 2 - B 2 = C 2 B 2
81 71 sqcld A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A 2
82 75 sqcld A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A B 2
83 81 82 pncand A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A 2 + B 2 - B 2 = A 2
84 subsq C B C 2 B 2 = C + B C B
85 68 75 84 syl2anc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C 2 B 2 = C + B C B
86 80 83 85 3eqtr3rd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B C B = A 2
87 86 fveq2d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B C B = A 2
88 32 44 51 56 sqrtmuld A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B C B = C + B C B
89 nnre A A
90 89 3ad2ant1 A B C A
91 90 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A
92 nnnn0 A A 0
93 92 nn0ge0d A 0 A
94 93 3ad2ant1 A B C 0 A
95 94 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 0 A
96 91 95 sqrtsqd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A 2 = A
97 87 88 96 3eqtr3d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B C B = A
98 97 oveq2d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C + B C B = 2 A
99 78 98 oveq12d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B + 2 C + B C B = 2 C + 2 A
100 73 99 eqtr4d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C + A = C + B + C B + 2 C + B C B
101 66 100 eqtr4d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + 2 C + B C B + C B = 2 C + A
102 26 59 101 3eqtrd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B 2 = 2 C + A
103 102 oveq1d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B 2 2 2 = 2 C + A 2 2
104 addcl C A C + A
105 3 69 104 syl2anr A C C + A
106 105 3adant2 A B C C + A
107 106 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A
108 mulcl 2 C + A 2 C + A
109 15 107 108 sylancr A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C + A
110 2cnne0 2 2 0
111 divdiv1 2 C + A 2 2 0 2 2 0 2 C + A 2 2 = 2 C + A 2 2
112 110 110 111 mp3an23 2 C + A 2 C + A 2 2 = 2 C + A 2 2
113 109 112 syl A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C + A 2 2 = 2 C + A 2 2
114 103 113 eqtr4d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B 2 2 2 = 2 C + A 2 2
115 divcan3 C + A 2 2 0 2 C + A 2 = C + A
116 15 16 115 mp3an23 C + A 2 C + A 2 = C + A
117 107 116 syl A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C + A 2 = C + A
118 117 oveq1d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C + A 2 2 = C + A 2
119 22 114 118 3eqtrd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B + C B 2 2 = C + A 2
120 2 119 eqtrid A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A M 2 = C + A 2