Metamath Proof Explorer


Theorem pythagtriplem6

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