Metamath Proof Explorer


Theorem pythagtriplem7

Description: Lemma for pythagtrip . Calculate ( sqrt( C + B ) ) . (Contributed by Scott Fenton, 18-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

Ref Expression
Assertion pythagtriplem7 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B = C + B gcd A

Proof

Step Hyp Ref Expression
1 simp3 A B C C
2 1 nnzd A B C C
3 simp2 A B C B
4 3 nnzd A B C B
5 2 4 zsubcld A B C C B
6 5 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B
7 1 3 nnaddcld A B C C + B
8 7 nnnn0d A B C C + B 0
9 8 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B 0
10 nnnn0 A A 0
11 10 3ad2ant1 A B C A 0
12 11 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A 0
13 6 9 12 3jca A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B C + B 0 A 0
14 pythagtriplem4 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B gcd C + B = 1
15 14 oveq1d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B gcd C + B gcd A = 1 gcd A
16 nnz A A
17 16 3ad2ant1 A B C A
18 17 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A
19 1gcd A 1 gcd A = 1
20 18 19 syl A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 1 gcd A = 1
21 15 20 eqtrd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B gcd C + B gcd A = 1
22 13 21 jca A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C B C + B 0 A 0 C B gcd C + B gcd A = 1
23 oveq1 A 2 + B 2 = C 2 A 2 + B 2 - B 2 = C 2 B 2
24 23 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
25 nncn A A
26 25 3ad2ant1 A B C A
27 26 sqcld A B C A 2
28 3 nncnd A B C B
29 28 sqcld A B C B 2
30 27 29 pncand A B C A 2 + B 2 - B 2 = A 2
31 30 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A 2 + B 2 - B 2 = A 2
32 1 nncnd A B C C
33 subsq C B C 2 B 2 = C + B C B
34 32 28 33 syl2anc A B C C 2 B 2 = C + B C B
35 7 nncnd A B C C + B
36 5 zcnd A B C C B
37 35 36 mulcomd A B C C + B C B = C B C + B
38 34 37 eqtrd A B C C 2 B 2 = C B C + B
39 38 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C 2 B 2 = C B C + B
40 24 31 39 3eqtr3d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A 2 = C B C + B
41 coprimeprodsq2 C B C + B 0 A 0 C B gcd C + B gcd A = 1 A 2 = C B C + B C + B = C + B gcd A 2
42 22 40 41 sylc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B = C + B gcd A 2
43 42 fveq2d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B = C + B gcd A 2
44 7 nnzd A B C C + B
45 44 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B
46 45 18 gcdcld A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B gcd A 0
47 46 nn0red A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B gcd A
48 46 nn0ge0d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 0 C + B gcd A
49 47 48 sqrtsqd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B gcd A 2 = C + B gcd A
50 43 49 eqtrd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A C + B = C + B gcd A