Metamath Proof Explorer


Theorem 2sqlem2

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

Ref Expression
Hypothesis 2sq.1 S=ranwiw2
Assertion 2sqlem2 ASxyA=x2+y2

Proof

Step Hyp Ref Expression
1 2sq.1 S=ranwiw2
2 1 2sqlem1 ASziA=z2
3 elgz zizzz
4 3 simp2bi ziz
5 3 simp3bi ziz
6 gzcn ziz
7 6 absvalsq2d ziz2=z2+z2
8 oveq1 x=zx2=z2
9 8 oveq1d x=zx2+y2=z2+y2
10 9 eqeq2d x=zz2=x2+y2z2=z2+y2
11 oveq1 y=zy2=z2
12 11 oveq2d y=zz2+y2=z2+z2
13 12 eqeq2d y=zz2=z2+y2z2=z2+z2
14 10 13 rspc2ev zzz2=z2+z2xyz2=x2+y2
15 4 5 7 14 syl3anc zixyz2=x2+y2
16 eqeq1 A=z2A=x2+y2z2=x2+y2
17 16 2rexbidv A=z2xyA=x2+y2xyz2=x2+y2
18 15 17 syl5ibrcom ziA=z2xyA=x2+y2
19 18 rexlimiv ziA=z2xyA=x2+y2
20 2 19 sylbi ASxyA=x2+y2
21 gzreim xyx+iyi
22 zcn xx
23 ax-icn i
24 zcn yy
25 mulcl iyiy
26 23 24 25 sylancr yiy
27 addcl xiyx+iy
28 22 26 27 syl2an xyx+iy
29 28 absvalsq2d xyx+iy2=x+iy2+x+iy2
30 zre xx
31 zre yy
32 crre xyx+iy=x
33 30 31 32 syl2an xyx+iy=x
34 33 oveq1d xyx+iy2=x2
35 crim xyx+iy=y
36 30 31 35 syl2an xyx+iy=y
37 36 oveq1d xyx+iy2=y2
38 34 37 oveq12d xyx+iy2+x+iy2=x2+y2
39 29 38 eqtr2d xyx2+y2=x+iy2
40 fveq2 z=x+iyz=x+iy
41 40 oveq1d z=x+iyz2=x+iy2
42 41 rspceeqv x+iyix2+y2=x+iy2zix2+y2=z2
43 21 39 42 syl2anc xyzix2+y2=z2
44 1 2sqlem1 x2+y2Szix2+y2=z2
45 43 44 sylibr xyx2+y2S
46 eleq1 A=x2+y2ASx2+y2S
47 45 46 syl5ibrcom xyA=x2+y2AS
48 47 rexlimivv xyA=x2+y2AS
49 20 48 impbii ASxyA=x2+y2