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 ABCA2+B2=C2AgcdB=1¬2ABgcdC=1

Proof

Step Hyp Ref Expression
1 oveq2 A2+B2=C2B2gcdA2+B2=B2gcdC2
2 1 adantl ABCA2+B2=C2B2gcdA2+B2=B2gcdC2
3 nnz BB
4 zsqcl BB2
5 3 4 syl BB2
6 5 3ad2ant2 ABCB2
7 nnz AA
8 zsqcl AA2
9 7 8 syl AA2
10 9 3ad2ant1 ABCA2
11 gcdadd B2A2B2gcdA2=B2gcdA2+B2
12 6 10 11 syl2anc ABCB2gcdA2=B2gcdA2+B2
13 6 10 gcdcomd ABCB2gcdA2=A2gcdB2
14 12 13 eqtr3d ABCB2gcdA2+B2=A2gcdB2
15 14 adantr ABCA2+B2=C2B2gcdA2+B2=A2gcdB2
16 2 15 eqtr3d ABCA2+B2=C2B2gcdC2=A2gcdB2
17 simpl2 ABCA2+B2=C2B
18 simpl3 ABCA2+B2=C2C
19 sqgcd BCBgcdC2=B2gcdC2
20 17 18 19 syl2anc ABCA2+B2=C2BgcdC2=B2gcdC2
21 simpl1 ABCA2+B2=C2A
22 sqgcd ABAgcdB2=A2gcdB2
23 21 17 22 syl2anc ABCA2+B2=C2AgcdB2=A2gcdB2
24 16 20 23 3eqtr4d ABCA2+B2=C2BgcdC2=AgcdB2
25 24 3adant3 ABCA2+B2=C2AgcdB=1¬2ABgcdC2=AgcdB2
26 simp3l ABCA2+B2=C2AgcdB=1¬2AAgcdB=1
27 26 oveq1d ABCA2+B2=C2AgcdB=1¬2AAgcdB2=12
28 25 27 eqtrd ABCA2+B2=C2AgcdB=1¬2ABgcdC2=12
29 3 3ad2ant2 ABCB
30 nnz CC
31 30 3ad2ant3 ABCC
32 29 31 gcdcld ABCBgcdC0
33 32 nn0red ABCBgcdC
34 33 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2ABgcdC
35 32 nn0ge0d ABC0BgcdC
36 35 3ad2ant1 ABCA2+B2=C2AgcdB=1¬2A0BgcdC
37 1re 1
38 0le1 01
39 sq11 BgcdC0BgcdC101BgcdC2=12BgcdC=1
40 37 38 39 mpanr12 BgcdC0BgcdCBgcdC2=12BgcdC=1
41 34 36 40 syl2anc ABCA2+B2=C2AgcdB=1¬2ABgcdC2=12BgcdC=1
42 28 41 mpbid ABCA2+B2=C2AgcdB=1¬2ABgcdC=1