Metamath Proof Explorer


Theorem pythagtriplem3

Description: Lemma for pythagtrip . Show that C and B are relatively prime under some conditions. (Contributed by Scott Fenton, 8-Apr-2014) (Revised by Mario Carneiro, 19-Apr-2014)

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

Proof

Step Hyp Ref Expression
1 oveq2 A 2 + B 2 = C 2 B 2 gcd A 2 + B 2 = B 2 gcd C 2
2 1 adantl A B C A 2 + B 2 = C 2 B 2 gcd A 2 + B 2 = B 2 gcd C 2
3 nnz B B
4 zsqcl B B 2
5 3 4 syl B B 2
6 5 3ad2ant2 A B C B 2
7 nnz A A
8 zsqcl A A 2
9 7 8 syl A A 2
10 9 3ad2ant1 A B C A 2
11 gcdadd B 2 A 2 B 2 gcd A 2 = B 2 gcd A 2 + B 2
12 6 10 11 syl2anc A B C B 2 gcd A 2 = B 2 gcd A 2 + B 2
13 6 10 gcdcomd A B C B 2 gcd A 2 = A 2 gcd B 2
14 12 13 eqtr3d A B C B 2 gcd A 2 + B 2 = A 2 gcd B 2
15 14 adantr A B C A 2 + B 2 = C 2 B 2 gcd A 2 + B 2 = A 2 gcd B 2
16 2 15 eqtr3d A B C A 2 + B 2 = C 2 B 2 gcd C 2 = A 2 gcd B 2
17 simpl2 A B C A 2 + B 2 = C 2 B
18 simpl3 A B C A 2 + B 2 = C 2 C
19 sqgcd B C B gcd C 2 = B 2 gcd C 2
20 17 18 19 syl2anc A B C A 2 + B 2 = C 2 B gcd C 2 = B 2 gcd C 2
21 simpl1 A B C A 2 + B 2 = C 2 A
22 sqgcd A B A gcd B 2 = A 2 gcd B 2
23 21 17 22 syl2anc A B C A 2 + B 2 = C 2 A gcd B 2 = A 2 gcd B 2
24 16 20 23 3eqtr4d A B C A 2 + B 2 = C 2 B gcd C 2 = A gcd B 2
25 24 3adant3 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A B gcd C 2 = A gcd B 2
26 simp3l A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A gcd B = 1
27 26 oveq1d A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A A gcd B 2 = 1 2
28 25 27 eqtrd A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A B gcd C 2 = 1 2
29 3 3ad2ant2 A B C B
30 nnz C C
31 30 3ad2ant3 A B C C
32 29 31 gcdcld A B C B gcd C 0
33 32 nn0red A B C B gcd C
34 33 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A B gcd C
35 32 nn0ge0d A B C 0 B gcd C
36 35 3ad2ant1 A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A 0 B gcd C
37 1re 1
38 0le1 0 1
39 sq11 B gcd C 0 B gcd C 1 0 1 B gcd C 2 = 1 2 B gcd C = 1
40 37 38 39 mpanr12 B gcd C 0 B gcd C B gcd C 2 = 1 2 B gcd C = 1
41 34 36 40 syl2anc A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A B gcd C 2 = 1 2 B gcd C = 1
42 28 41 mpbid A B C A 2 + B 2 = C 2 A gcd B = 1 ¬ 2 A B gcd C = 1