Metamath Proof Explorer


Theorem 2sqlem7

Description: Lemma for 2sq . (Contributed by Mario Carneiro, 19-Jun-2015)

Ref Expression
Hypotheses 2sq.1 S=ranwiw2
2sqlem7.2 Y=z|xyxgcdy=1z=x2+y2
Assertion 2sqlem7 YS

Proof

Step Hyp Ref Expression
1 2sq.1 S=ranwiw2
2 2sqlem7.2 Y=z|xyxgcdy=1z=x2+y2
3 simpr xgcdy=1z=x2+y2z=x2+y2
4 3 reximi yxgcdy=1z=x2+y2yz=x2+y2
5 4 reximi xyxgcdy=1z=x2+y2xyz=x2+y2
6 1 2sqlem2 zSxyz=x2+y2
7 5 6 sylibr xyxgcdy=1z=x2+y2zS
8 ax-1ne0 10
9 gcdeq0 xyxgcdy=0x=0y=0
10 9 adantr xyxgcdy=1xgcdy=0x=0y=0
11 simpr xyxgcdy=1xgcdy=1
12 11 eqeq1d xyxgcdy=1xgcdy=01=0
13 10 12 bitr3d xyxgcdy=1x=0y=01=0
14 13 necon3bbid xyxgcdy=1¬x=0y=010
15 8 14 mpbiri xyxgcdy=1¬x=0y=0
16 zsqcl2 xx20
17 16 ad2antrr xyxgcdy=1x20
18 17 nn0red xyxgcdy=1x2
19 17 nn0ge0d xyxgcdy=10x2
20 zsqcl2 yy20
21 20 ad2antlr xyxgcdy=1y20
22 21 nn0red xyxgcdy=1y2
23 21 nn0ge0d xyxgcdy=10y2
24 add20 x20x2y20y2x2+y2=0x2=0y2=0
25 18 19 22 23 24 syl22anc xyxgcdy=1x2+y2=0x2=0y2=0
26 zcn xx
27 26 ad2antrr xyxgcdy=1x
28 zcn yy
29 28 ad2antlr xyxgcdy=1y
30 sqeq0 xx2=0x=0
31 sqeq0 yy2=0y=0
32 30 31 bi2anan9 xyx2=0y2=0x=0y=0
33 27 29 32 syl2anc xyxgcdy=1x2=0y2=0x=0y=0
34 25 33 bitrd xyxgcdy=1x2+y2=0x=0y=0
35 15 34 mtbird xyxgcdy=1¬x2+y2=0
36 nn0addcl x20y20x2+y20
37 16 20 36 syl2an xyx2+y20
38 37 adantr xyxgcdy=1x2+y20
39 elnn0 x2+y20x2+y2x2+y2=0
40 38 39 sylib xyxgcdy=1x2+y2x2+y2=0
41 40 ord xyxgcdy=1¬x2+y2x2+y2=0
42 35 41 mt3d xyxgcdy=1x2+y2
43 eleq1 z=x2+y2zx2+y2
44 42 43 syl5ibrcom xyxgcdy=1z=x2+y2z
45 44 expimpd xyxgcdy=1z=x2+y2z
46 45 rexlimivv xyxgcdy=1z=x2+y2z
47 7 46 elind xyxgcdy=1z=x2+y2zS
48 47 abssi z|xyxgcdy=1z=x2+y2S
49 2 48 eqsstri YS