Metamath Proof Explorer


Theorem pythagtriplem17

Description: Lemma for pythagtrip . Show the relationship between M , N , and C . (Contributed by Scott Fenton, 17-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Hypotheses pythagtriplem15.1 M = C + B + C B 2
pythagtriplem15.2 N = C + B C B 2
Assertion pythagtriplem17 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C = M 2 + N 2

Proof

Step Hyp Ref Expression
1 pythagtriplem15.1 M = C + B + C B 2
2 pythagtriplem15.2 N = C + B C B 2
3 1 pythagtriplem12 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A M 2 = C + A 2
4 2 pythagtriplem14 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A N 2 = C A 2
5 3 4 oveq12d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A M 2 + N 2 = C + A 2 + C A 2
6 nncn C C
7 6 3ad2ant3 A B C C
8 7 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C
9 nncn A A
10 9 3ad2ant1 A B C A
11 10 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A
12 8 11 addcld A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A
13 8 11 subcld A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C A
14 2cnne0 2 2 0
15 divdir C + A C A 2 2 0 C + A + C A 2 = C + A 2 + C A 2
16 14 15 mp3an3 C + A C A C + A + C A 2 = C + A 2 + C A 2
17 12 13 16 syl2anc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A + C A 2 = C + A 2 + C A 2
18 5 17 eqtr4d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A M 2 + N 2 = C + A + C A 2
19 8 11 8 ppncand A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A + C A = C + C
20 8 2timesd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C = C + C
21 19 20 eqtr4d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A + C A = 2 C
22 21 oveq1d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A + C A 2 = 2 C 2
23 2cn 2
24 2ne0 2 0
25 divcan3 C 2 2 0 2 C 2 = C
26 23 24 25 mp3an23 C 2 C 2 = C
27 8 26 syl A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 C 2 = C
28 18 22 27 3eqtrrd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C = M 2 + N 2