Metamath Proof Explorer


Theorem pythagtriplem15

Description: Lemma for pythagtrip . Show the relationship between M , N , and A . (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 pythagtriplem15 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A = 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 simp3 A B C C
7 simp1 A B C A
8 6 7 nnaddcld A B C C + A
9 8 nncnd A B C C + A
10 9 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A
11 nnz C C
12 11 3ad2ant3 A B C C
13 nnz A A
14 13 3ad2ant1 A B C A
15 12 14 zsubcld A B C C A
16 15 zcnd A B C C A
17 16 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C A
18 2cnne0 2 2 0
19 divsubdir C + A C A 2 2 0 C + A - C A 2 = C + A 2 C A 2
20 18 19 mp3an3 C + A C A C + A - C A 2 = C + A 2 C A 2
21 10 17 20 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
22 5 21 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
23 nncn C C
24 23 3ad2ant3 A B C C
25 24 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C
26 nncn A A
27 26 3ad2ant1 A B C A
28 27 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A
29 25 28 28 pnncand A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A - C A = A + A
30 28 2timesd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 A = A + A
31 29 30 eqtr4d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A - C A = 2 A
32 31 oveq1d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + A - C A 2 = 2 A 2
33 2cn 2
34 2ne0 2 0
35 divcan3 A 2 2 0 2 A 2 = A
36 33 34 35 mp3an23 A 2 A 2 = A
37 28 36 syl A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 2 A 2 = A
38 22 32 37 3eqtrrd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A = M 2 N 2