MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  mul2sq Structured version   Unicode version

Theorem mul2sq 22679
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.)
Hypothesis
Ref Expression
2sq.1  |-  S  =  ran  ( w  e.  ZZ[_i]  |->  ( ( abs `  w
) ^ 2 ) )
Assertion
Ref Expression
mul2sq  |-  ( ( A  e.  S  /\  B  e.  S )  ->  ( A  x.  B
)  e.  S )

Proof of Theorem mul2sq
Dummy variables  x  y  z are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 2sq.1 . . 3  |-  S  =  ran  ( w  e.  ZZ[_i]  |->  ( ( abs `  w
) ^ 2 ) )
212sqlem1 22677 . 2  |-  ( A  e.  S  <->  E. x  e.  ZZ[_i]  A  =  ( ( abs `  x ) ^
2 ) )
312sqlem1 22677 . 2  |-  ( B  e.  S  <->  E. y  e.  ZZ[_i]  B  =  ( ( abs `  y ) ^
2 ) )
4 reeanv 2883 . . 3  |-  ( E. x  e.  ZZ[_i]  E. y  e.  ZZ[_i] 
( A  =  ( ( abs `  x
) ^ 2 )  /\  B  =  ( ( abs `  y
) ^ 2 ) )  <->  ( E. x  e.  ZZ[_i]  A  =  ( ( abs `  x ) ^
2 )  /\  E. y  e.  ZZ[_i]  B  =  ( ( abs `  y
) ^ 2 ) ) )
5 gzmulcl 13991 . . . . . . 7  |-  ( ( x  e.  ZZ[_i]  /\  y  e.  ZZ[_i]
)  ->  ( x  x.  y )  e.  ZZ[_i] )
6 gzcn 13985 . . . . . . . . . 10  |-  ( x  e.  ZZ[_i]  ->  x  e.  CC )
7 gzcn 13985 . . . . . . . . . 10  |-  ( y  e.  ZZ[_i]  ->  y  e.  CC )
8 absmul 12775 . . . . . . . . . 10  |-  ( ( x  e.  CC  /\  y  e.  CC )  ->  ( abs `  (
x  x.  y ) )  =  ( ( abs `  x )  x.  ( abs `  y
) ) )
96, 7, 8syl2an 477 . . . . . . . . 9  |-  ( ( x  e.  ZZ[_i]  /\  y  e.  ZZ[_i]
)  ->  ( abs `  ( x  x.  y
) )  =  ( ( abs `  x
)  x.  ( abs `  y ) ) )
109oveq1d 6101 . . . . . . . 8  |-  ( ( x  e.  ZZ[_i]  /\  y  e.  ZZ[_i]
)  ->  ( ( abs `  ( x  x.  y ) ) ^
2 )  =  ( ( ( abs `  x
)  x.  ( abs `  y ) ) ^
2 ) )
116abscld 12914 . . . . . . . . . 10  |-  ( x  e.  ZZ[_i]  ->  ( abs `  x )  e.  RR )
1211recnd 9404 . . . . . . . . 9  |-  ( x  e.  ZZ[_i]  ->  ( abs `  x )  e.  CC )
137abscld 12914 . . . . . . . . . 10  |-  ( y  e.  ZZ[_i]  ->  ( abs `  y )  e.  RR )
1413recnd 9404 . . . . . . . . 9  |-  ( y  e.  ZZ[_i]  ->  ( abs `  y )  e.  CC )
15 sqmul 11921 . . . . . . . . 9  |-  ( ( ( abs `  x
)  e.  CC  /\  ( abs `  y )  e.  CC )  -> 
( ( ( abs `  x )  x.  ( abs `  y ) ) ^ 2 )  =  ( ( ( abs `  x ) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) ) )
1612, 14, 15syl2an 477 . . . . . . . 8  |-  ( ( x  e.  ZZ[_i]  /\  y  e.  ZZ[_i]
)  ->  ( (
( abs `  x
)  x.  ( abs `  y ) ) ^
2 )  =  ( ( ( abs `  x
) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) ) )
1710, 16eqtr2d 2471 . . . . . . 7  |-  ( ( x  e.  ZZ[_i]  /\  y  e.  ZZ[_i]
)  ->  ( (
( abs `  x
) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  =  ( ( abs `  (
x  x.  y ) ) ^ 2 ) )
18 fveq2 5686 . . . . . . . . . 10  |-  ( z  =  ( x  x.  y )  ->  ( abs `  z )  =  ( abs `  (
x  x.  y ) ) )
1918oveq1d 6101 . . . . . . . . 9  |-  ( z  =  ( x  x.  y )  ->  (
( abs `  z
) ^ 2 )  =  ( ( abs `  ( x  x.  y
) ) ^ 2 ) )
2019eqeq2d 2449 . . . . . . . 8  |-  ( z  =  ( x  x.  y )  ->  (
( ( ( abs `  x ) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  =  ( ( abs `  z ) ^ 2 )  <->  ( ( ( abs `  x ) ^ 2 )  x.  ( ( abs `  y
) ^ 2 ) )  =  ( ( abs `  ( x  x.  y ) ) ^ 2 ) ) )
2120rspcev 3068 . . . . . . 7  |-  ( ( ( x  x.  y
)  e.  ZZ[_i]  /\  (
( ( abs `  x
) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  =  ( ( abs `  (
x  x.  y ) ) ^ 2 ) )  ->  E. z  e.  ZZ[_i] 
( ( ( abs `  x ) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  =  ( ( abs `  z ) ^ 2 ) )
225, 17, 21syl2anc 661 . . . . . 6  |-  ( ( x  e.  ZZ[_i]  /\  y  e.  ZZ[_i]
)  ->  E. z  e.  ZZ[_i] 
( ( ( abs `  x ) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  =  ( ( abs `  z ) ^ 2 ) )
2312sqlem1 22677 . . . . . 6  |-  ( ( ( ( abs `  x
) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  e.  S  <->  E. z  e.  ZZ[_i]  ( (
( abs `  x
) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  =  ( ( abs `  z
) ^ 2 ) )
2422, 23sylibr 212 . . . . 5  |-  ( ( x  e.  ZZ[_i]  /\  y  e.  ZZ[_i]
)  ->  ( (
( abs `  x
) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  e.  S
)
25 oveq12 6095 . . . . . 6  |-  ( ( A  =  ( ( abs `  x ) ^ 2 )  /\  B  =  ( ( abs `  y ) ^
2 ) )  -> 
( A  x.  B
)  =  ( ( ( abs `  x
) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) ) )
2625eleq1d 2504 . . . . 5  |-  ( ( A  =  ( ( abs `  x ) ^ 2 )  /\  B  =  ( ( abs `  y ) ^
2 ) )  -> 
( ( A  x.  B )  e.  S  <->  ( ( ( abs `  x
) ^ 2 )  x.  ( ( abs `  y ) ^ 2 ) )  e.  S
) )
2724, 26syl5ibrcom 222 . . . 4  |-  ( ( x  e.  ZZ[_i]  /\  y  e.  ZZ[_i]
)  ->  ( ( A  =  ( ( abs `  x ) ^
2 )  /\  B  =  ( ( abs `  y ) ^ 2 ) )  ->  ( A  x.  B )  e.  S ) )
2827rexlimivv 2841 . . 3  |-  ( E. x  e.  ZZ[_i]  E. y  e.  ZZ[_i] 
( A  =  ( ( abs `  x
) ^ 2 )  /\  B  =  ( ( abs `  y
) ^ 2 ) )  ->  ( A  x.  B )  e.  S
)
294, 28sylbir 213 . 2  |-  ( ( E. x  e.  ZZ[_i]  A  =  ( ( abs `  x ) ^ 2 )  /\  E. y  e.  ZZ[_i]  B  =  ( ( abs `  y ) ^
2 ) )  -> 
( A  x.  B
)  e.  S )
302, 3, 29syl2anb 479 1  |-  ( ( A  e.  S  /\  B  e.  S )  ->  ( A  x.  B
)  e.  S )
Colors of variables: wff setvar class
Syntax hints:    -> wi 4    /\ wa 369    = wceq 1369    e. wcel 1756   E.wrex 2711    e. cmpt 4345   ran crn 4836   ` cfv 5413  (class class class)co 6086   CCcc 9272    x. cmul 9279   2c2 10363   ^cexp 11857   abscabs 12715   ZZ[_i]cgz 13982
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2419  ax-sep 4408  ax-nul 4416  ax-pow 4465  ax-pr 4526  ax-un 6367  ax-cnex 9330  ax-resscn 9331  ax-1cn 9332  ax-icn 9333  ax-addcl 9334  ax-addrcl 9335  ax-mulcl 9336  ax-mulrcl 9337  ax-mulcom 9338  ax-addass 9339  ax-mulass 9340  ax-distr 9341  ax-i2m1 9342  ax-1ne0 9343  ax-1rid 9344  ax-rnegex 9345  ax-rrecex 9346  ax-cnre 9347  ax-pre-lttri 9348  ax-pre-lttrn 9349  ax-pre-ltadd 9350  ax-pre-mulgt0 9351  ax-pre-sup 9352
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2256  df-mo 2257  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2715  df-rex 2716  df-reu 2717  df-rmo 2718  df-rab 2719  df-v 2969  df-sbc 3182  df-csb 3284  df-dif 3326  df-un 3328  df-in 3330  df-ss 3337  df-pss 3339  df-nul 3633  df-if 3787  df-pw 3857  df-sn 3873  df-pr 3875  df-tp 3877  df-op 3879  df-uni 4087  df-iun 4168  df-br 4288  df-opab 4346  df-mpt 4347  df-tr 4381  df-eprel 4627  df-id 4631  df-po 4636  df-so 4637  df-fr 4674  df-we 4676  df-ord 4717  df-on 4718  df-lim 4719  df-suc 4720  df-xp 4841  df-rel 4842  df-cnv 4843  df-co 4844  df-dm 4845  df-rn 4846  df-res 4847  df-ima 4848  df-iota 5376  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-riota 6047  df-ov 6089  df-oprab 6090  df-mpt2 6091  df-om 6472  df-2nd 6573  df-recs 6824  df-rdg 6858  df-er 7093  df-en 7303  df-dom 7304  df-sdom 7305  df-sup 7683  df-pnf 9412  df-mnf 9413  df-xr 9414  df-ltxr 9415  df-le 9416  df-sub 9589  df-neg 9590  df-div 9986  df-nn 10315  df-2 10372  df-3 10373  df-n0 10572  df-z 10639  df-uz 10854  df-rp 10984  df-seq 11799  df-exp 11858  df-cj 12580  df-re 12581  df-im 12582  df-sqr 12716  df-abs 12717  df-gz 13983
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator