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

Theorem bezout 12715
Description: Bézout's identity: For any integers  A and  B, there are integers  x ,  y such that  ( A  gcd  B )  =  A  x.  x  +  B  x.  y. (Contributed by Mario Carneiro, 22-Feb-2014.)
Assertion
Ref Expression
bezout  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) )
Distinct variable groups:    x, y, A    x, B, y
Dummy variables  t  u  v  z are mutually distinct and distinct from all other variables.

Proof of Theorem bezout
StepHypRef Expression
1 eqeq1 2290 . . . . . . . 8  |-  ( z  =  t  ->  (
z  =  ( ( A  x.  x )  +  ( B  x.  y ) )  <->  t  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
212rexbidv 2587 . . . . . . 7  |-  ( z  =  t  ->  ( E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x )  +  ( B  x.  y
) )  <->  E. x  e.  ZZ  E. y  e.  ZZ  t  =  ( ( A  x.  x
)  +  ( B  x.  y ) ) ) )
3 oveq2 5827 . . . . . . . . . 10  |-  ( x  =  u  ->  ( A  x.  x )  =  ( A  x.  u ) )
43oveq1d 5834 . . . . . . . . 9  |-  ( x  =  u  ->  (
( A  x.  x
)  +  ( B  x.  y ) )  =  ( ( A  x.  u )  +  ( B  x.  y
) ) )
54eqeq2d 2295 . . . . . . . 8  |-  ( x  =  u  ->  (
t  =  ( ( A  x.  x )  +  ( B  x.  y ) )  <->  t  =  ( ( A  x.  u )  +  ( B  x.  y ) ) ) )
6 oveq2 5827 . . . . . . . . . 10  |-  ( y  =  v  ->  ( B  x.  y )  =  ( B  x.  v ) )
76oveq2d 5835 . . . . . . . . 9  |-  ( y  =  v  ->  (
( A  x.  u
)  +  ( B  x.  y ) )  =  ( ( A  x.  u )  +  ( B  x.  v
) ) )
87eqeq2d 2295 . . . . . . . 8  |-  ( y  =  v  ->  (
t  =  ( ( A  x.  u )  +  ( B  x.  y ) )  <->  t  =  ( ( A  x.  u )  +  ( B  x.  v ) ) ) )
95, 8cbvrex2v 2774 . . . . . . 7  |-  ( E. x  e.  ZZ  E. y  e.  ZZ  t  =  ( ( A  x.  x )  +  ( B  x.  y
) )  <->  E. u  e.  ZZ  E. v  e.  ZZ  t  =  ( ( A  x.  u
)  +  ( B  x.  v ) ) )
102, 9syl6bb 254 . . . . . 6  |-  ( z  =  t  ->  ( E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x )  +  ( B  x.  y
) )  <->  E. u  e.  ZZ  E. v  e.  ZZ  t  =  ( ( A  x.  u
)  +  ( B  x.  v ) ) ) )
1110cbvrabv 2788 . . . . 5  |-  { z  e.  NN  |  E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x
)  +  ( B  x.  y ) ) }  =  { t  e.  NN  |  E. u  e.  ZZ  E. v  e.  ZZ  t  =  ( ( A  x.  u
)  +  ( B  x.  v ) ) }
12 simpll 732 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  -.  ( A  =  0  /\  B  =  0 ) )  ->  A  e.  ZZ )
13 simplr 733 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  -.  ( A  =  0  /\  B  =  0 ) )  ->  B  e.  ZZ )
14 eqid 2284 . . . . 5  |-  sup ( { z  e.  NN  |  E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x )  +  ( B  x.  y
) ) } ,  RR ,  `'  <  )  =  sup ( { z  e.  NN  |  E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x )  +  ( B  x.  y
) ) } ,  RR ,  `'  <  )
15 simpr 449 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  -.  ( A  =  0  /\  B  =  0 ) )  ->  -.  ( A  =  0  /\  B  =  0 ) )
1611, 12, 13, 14, 15bezoutlem4 12714 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  -.  ( A  =  0  /\  B  =  0 ) )  ->  ( A  gcd  B )  e.  { z  e.  NN  |  E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x
)  +  ( B  x.  y ) ) } )
17 eqeq1 2290 . . . . . . 7  |-  ( z  =  ( A  gcd  B )  ->  ( z  =  ( ( A  x.  x )  +  ( B  x.  y
) )  <->  ( A  gcd  B )  =  ( ( A  x.  x
)  +  ( B  x.  y ) ) ) )
18172rexbidv 2587 . . . . . 6  |-  ( z  =  ( A  gcd  B )  ->  ( E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x
)  +  ( B  x.  y ) )  <->  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
1918elrab 2924 . . . . 5  |-  ( ( A  gcd  B )  e.  { z  e.  NN  |  E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x
)  +  ( B  x.  y ) ) }  <->  ( ( A  gcd  B )  e.  NN  /\  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
2019simprbi 452 . . . 4  |-  ( ( A  gcd  B )  e.  { z  e.  NN  |  E. x  e.  ZZ  E. y  e.  ZZ  z  =  ( ( A  x.  x
)  +  ( B  x.  y ) ) }  ->  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) )
2116, 20syl 17 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  -.  ( A  =  0  /\  B  =  0 ) )  ->  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) )
2221ex 425 . 2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( -.  ( A  =  0  /\  B  =  0 )  ->  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
23 0z 10030 . . . 4  |-  0  e.  ZZ
24 00id 8982 . . . . 5  |-  ( 0  +  0 )  =  0
25 0cn 8826 . . . . . . 7  |-  0  e.  CC
2625mul01i 8997 . . . . . 6  |-  ( 0  x.  0 )  =  0
2726, 26oveq12i 5831 . . . . 5  |-  ( ( 0  x.  0 )  +  ( 0  x.  0 ) )  =  ( 0  +  0 )
28 gcd0val 12682 . . . . 5  |-  ( 0  gcd  0 )  =  0
2924, 27, 283eqtr4ri 2315 . . . 4  |-  ( 0  gcd  0 )  =  ( ( 0  x.  0 )  +  ( 0  x.  0 ) )
30 oveq2 5827 . . . . . . 7  |-  ( x  =  0  ->  (
0  x.  x )  =  ( 0  x.  0 ) )
3130oveq1d 5834 . . . . . 6  |-  ( x  =  0  ->  (
( 0  x.  x
)  +  ( 0  x.  y ) )  =  ( ( 0  x.  0 )  +  ( 0  x.  y
) ) )
3231eqeq2d 2295 . . . . 5  |-  ( x  =  0  ->  (
( 0  gcd  0
)  =  ( ( 0  x.  x )  +  ( 0  x.  y ) )  <->  ( 0  gcd  0 )  =  ( ( 0  x.  0 )  +  ( 0  x.  y ) ) ) )
33 oveq2 5827 . . . . . . 7  |-  ( y  =  0  ->  (
0  x.  y )  =  ( 0  x.  0 ) )
3433oveq2d 5835 . . . . . 6  |-  ( y  =  0  ->  (
( 0  x.  0 )  +  ( 0  x.  y ) )  =  ( ( 0  x.  0 )  +  ( 0  x.  0 ) ) )
3534eqeq2d 2295 . . . . 5  |-  ( y  =  0  ->  (
( 0  gcd  0
)  =  ( ( 0  x.  0 )  +  ( 0  x.  y ) )  <->  ( 0  gcd  0 )  =  ( ( 0  x.  0 )  +  ( 0  x.  0 ) ) ) )
3632, 35rspc2ev 2893 . . . 4  |-  ( ( 0  e.  ZZ  /\  0  e.  ZZ  /\  (
0  gcd  0 )  =  ( ( 0  x.  0 )  +  ( 0  x.  0 ) ) )  ->  E. x  e.  ZZ  E. y  e.  ZZ  (
0  gcd  0 )  =  ( ( 0  x.  x )  +  ( 0  x.  y
) ) )
3723, 23, 29, 36mp3an 1279 . . 3  |-  E. x  e.  ZZ  E. y  e.  ZZ  ( 0  gcd  0 )  =  ( ( 0  x.  x
)  +  ( 0  x.  y ) )
38 oveq12 5828 . . . . 5  |-  ( ( A  =  0  /\  B  =  0 )  ->  ( A  gcd  B )  =  ( 0  gcd  0 ) )
39 oveq1 5826 . . . . . 6  |-  ( A  =  0  ->  ( A  x.  x )  =  ( 0  x.  x ) )
40 oveq1 5826 . . . . . 6  |-  ( B  =  0  ->  ( B  x.  y )  =  ( 0  x.  y ) )
4139, 40oveqan12d 5838 . . . . 5  |-  ( ( A  =  0  /\  B  =  0 )  ->  ( ( A  x.  x )  +  ( B  x.  y
) )  =  ( ( 0  x.  x
)  +  ( 0  x.  y ) ) )
4238, 41eqeq12d 2298 . . . 4  |-  ( ( A  =  0  /\  B  =  0 )  ->  ( ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) )  <->  ( 0  gcd  0 )  =  ( ( 0  x.  x
)  +  ( 0  x.  y ) ) ) )
43422rexbidv 2587 . . 3  |-  ( ( A  =  0  /\  B  =  0 )  ->  ( E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) )  <->  E. x  e.  ZZ  E. y  e.  ZZ  ( 0  gcd  0 )  =  ( ( 0  x.  x
)  +  ( 0  x.  y ) ) ) )
4437, 43mpbiri 226 . 2  |-  ( ( A  =  0  /\  B  =  0 )  ->  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) )
4522, 44pm2.61d2 154 1  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 5    -> wi 6    /\ wa 360    = wceq 1624    e. wcel 1685   E.wrex 2545   {crab 2548   `'ccnv 4687  (class class class)co 5819   supcsup 7188   RRcr 8731   0cc0 8732    + caddc 8735    x. cmul 8737    < clt 8862   NNcn 9741   ZZcz 10019    gcd cgcd 12679
This theorem is referenced by:  dvdsgcd  12716  dvdsmulgcd  12727  odbezout  14865  ablfacrp  15295  pgpfac1lem3  15306  znunit  16511  2sqb  20611  ostth3  20781
This theorem was proved from axioms:  ax-1 7  ax-2 8  ax-3 9  ax-mp 10  ax-gen 1534  ax-5 1545  ax-17 1604  ax-9 1637  ax-8 1645  ax-13 1687  ax-14 1689  ax-6 1704  ax-7 1709  ax-11 1716  ax-12 1867  ax-ext 2265  ax-sep 4142  ax-nul 4150  ax-pow 4187  ax-pr 4213  ax-un 4511  ax-cnex 8788  ax-resscn 8789  ax-1cn 8790  ax-icn 8791  ax-addcl 8792  ax-addrcl 8793  ax-mulcl 8794  ax-mulrcl 8795  ax-mulcom 8796  ax-addass 8797  ax-mulass 8798  ax-distr 8799  ax-i2m1 8800  ax-1ne0 8801  ax-1rid 8802  ax-rnegex 8803  ax-rrecex 8804  ax-cnre 8805  ax-pre-lttri 8806  ax-pre-lttrn 8807  ax-pre-ltadd 8808  ax-pre-mulgt0 8809  ax-pre-sup 8810
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 937  df-3an 938  df-tru 1312  df-ex 1530  df-nf 1533  df-sb 1632  df-eu 2148  df-mo 2149  df-clab 2271  df-cleq 2277  df-clel 2280  df-nfc 2409  df-ne 2449  df-nel 2450  df-ral 2549  df-rex 2550  df-reu 2551  df-rmo 2552  df-rab 2553  df-v 2791  df-sbc 2993  df-csb 3083  df-dif 3156  df-un 3158  df-in 3160  df-ss 3167  df-pss 3169  df-nul 3457  df-if 3567  df-pw 3628  df-sn 3647  df-pr 3648  df-tp 3649  df-op 3650  df-uni 3829  df-iun 3908  df-br 4025  df-opab 4079  df-mpt 4080  df-tr 4115  df-eprel 4304  df-id 4308  df-po 4313  df-so 4314  df-fr 4351  df-we 4353  df-ord 4394  df-on 4395  df-lim 4396  df-suc 4397  df-om 4656  df-xp 4694  df-rel 4695  df-cnv 4696  df-co 4697  df-dm 4698  df-rn 4699  df-res 4700  df-ima 4701  df-fun 5223  df-fn 5224  df-f 5225  df-f1 5226  df-fo 5227  df-f1o 5228  df-fv 5229  df-ov 5822  df-oprab 5823  df-mpt2 5824  df-2nd 6084  df-iota 6252  df-riota 6299  df-recs 6383  df-rdg 6418  df-er 6655  df-en 6859  df-dom 6860  df-sdom 6861  df-sup 7189  df-pnf 8864  df-mnf 8865  df-xr 8866  df-ltxr 8867  df-le 8868  df-sub 9034  df-neg 9035  df-div 9419  df-nn 9742  df-2 9799  df-3 9800  df-n0 9961  df-z 10020  df-uz 10226  df-rp 10350  df-fl 10919  df-mod 10968  df-seq 11041  df-exp 11099  df-cj 11578  df-re 11579  df-im 11580  df-sqr 11714  df-abs 11715  df-dvds 12526  df-gcd 12680
  Copyright terms: Public domain W3C validator