Metamath Proof Explorer


Theorem mul2sq

Description: Fibonacci's identity (actually due to Diophantus). The product of two sums of two squares is also a sum of two squares. We can take advantage of Gaussian integers here to trivialize the proof. (Contributed by Mario Carneiro, 19-Jun-2015)

Ref Expression
Hypothesis 2sq.1 S=ranwiw2
Assertion mul2sq ASBSABS

Proof

Step Hyp Ref Expression
1 2sq.1 S=ranwiw2
2 1 2sqlem1 ASxiA=x2
3 1 2sqlem1 BSyiB=y2
4 reeanv xiyiA=x2B=y2xiA=x2yiB=y2
5 gzmulcl xiyixyi
6 gzcn xix
7 gzcn yiy
8 absmul xyxy=xy
9 6 7 8 syl2an xiyixy=xy
10 9 oveq1d xiyixy2=xy2
11 6 abscld xix
12 11 recnd xix
13 7 abscld yiy
14 13 recnd yiy
15 sqmul xyxy2=x2y2
16 12 14 15 syl2an xiyixy2=x2y2
17 10 16 eqtr2d xiyix2y2=xy2
18 fveq2 z=xyz=xy
19 18 oveq1d z=xyz2=xy2
20 19 rspceeqv xyix2y2=xy2zix2y2=z2
21 5 17 20 syl2anc xiyizix2y2=z2
22 1 2sqlem1 x2y2Szix2y2=z2
23 21 22 sylibr xiyix2y2S
24 oveq12 A=x2B=y2AB=x2y2
25 24 eleq1d A=x2B=y2ABSx2y2S
26 23 25 syl5ibrcom xiyiA=x2B=y2ABS
27 26 rexlimivv xiyiA=x2B=y2ABS
28 4 27 sylbir xiA=x2yiB=y2ABS
29 2 3 28 syl2anb ASBSABS