ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  bezoutlemsup Unicode version

Theorem bezoutlemsup 10623
Description: Lemma for Bézout's identity. The number satisfying the greatest common divisor condition is the supremum of divisors of both  A and  B. (Contributed by Mario Carneiro and Jim Kingdon, 9-Jan-2022.)
Hypotheses
Ref Expression
bezoutlemgcd.1  |-  ( ph  ->  A  e.  ZZ )
bezoutlemgcd.2  |-  ( ph  ->  B  e.  ZZ )
bezoutlemgcd.3  |-  ( ph  ->  D  e.  NN0 )
bezoutlemgcd.4  |-  ( ph  ->  A. z  e.  ZZ  ( z  ||  D  <->  ( z  ||  A  /\  z  ||  B ) ) )
bezoutlemgcd.5  |-  ( ph  ->  -.  ( A  =  0  /\  B  =  0 ) )
Assertion
Ref Expression
bezoutlemsup  |-  ( ph  ->  D  =  sup ( { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B
) } ,  RR ,  <  ) )
Distinct variable groups:    z, D    z, A    z, B    ph, z

Proof of Theorem bezoutlemsup
Dummy variables  w  f  g  u are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 bezoutlemgcd.3 . . . 4  |-  ( ph  ->  D  e.  NN0 )
21nn0red 8479 . . 3  |-  ( ph  ->  D  e.  RR )
3 elrabi 2754 . . . . . . 7  |-  ( w  e.  { z  e.  ZZ  |  ( z 
||  A  /\  z  ||  B ) }  ->  w  e.  ZZ )
43adantl 271 . . . . . 6  |-  ( (
ph  /\  w  e.  { z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) } )  ->  w  e.  ZZ )
54zred 8620 . . . . 5  |-  ( (
ph  /\  w  e.  { z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) } )  ->  w  e.  RR )
62adantr 270 . . . . 5  |-  ( (
ph  /\  w  e.  { z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) } )  ->  D  e.  RR )
7 breq1 3808 . . . . . . . . . 10  |-  ( z  =  w  ->  (
z  ||  A  <->  w  ||  A
) )
8 breq1 3808 . . . . . . . . . 10  |-  ( z  =  w  ->  (
z  ||  B  <->  w  ||  B
) )
97, 8anbi12d 457 . . . . . . . . 9  |-  ( z  =  w  ->  (
( z  ||  A  /\  z  ||  B )  <-> 
( w  ||  A  /\  w  ||  B ) ) )
109elrab 2757 . . . . . . . 8  |-  ( w  e.  { z  e.  ZZ  |  ( z 
||  A  /\  z  ||  B ) }  <->  ( w  e.  ZZ  /\  ( w 
||  A  /\  w  ||  B ) ) )
1110simprbi 269 . . . . . . 7  |-  ( w  e.  { z  e.  ZZ  |  ( z 
||  A  /\  z  ||  B ) }  ->  ( w  ||  A  /\  w  ||  B ) )
1211adantl 271 . . . . . 6  |-  ( (
ph  /\  w  e.  { z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) } )  ->  (
w  ||  A  /\  w  ||  B ) )
13 breq1 3808 . . . . . . . . 9  |-  ( z  =  w  ->  (
z  <_  D  <->  w  <_  D ) )
149, 13imbi12d 232 . . . . . . . 8  |-  ( z  =  w  ->  (
( ( z  ||  A  /\  z  ||  B
)  ->  z  <_  D )  <->  ( ( w 
||  A  /\  w  ||  B )  ->  w  <_  D ) ) )
15 bezoutlemgcd.1 . . . . . . . . . 10  |-  ( ph  ->  A  e.  ZZ )
16 bezoutlemgcd.2 . . . . . . . . . 10  |-  ( ph  ->  B  e.  ZZ )
17 bezoutlemgcd.4 . . . . . . . . . 10  |-  ( ph  ->  A. z  e.  ZZ  ( z  ||  D  <->  ( z  ||  A  /\  z  ||  B ) ) )
18 bezoutlemgcd.5 . . . . . . . . . 10  |-  ( ph  ->  -.  ( A  =  0  /\  B  =  0 ) )
1915, 16, 1, 17, 18bezoutlemle 10622 . . . . . . . . 9  |-  ( ph  ->  A. z  e.  ZZ  ( ( z  ||  A  /\  z  ||  B
)  ->  z  <_  D ) )
2019adantr 270 . . . . . . . 8  |-  ( (
ph  /\  w  e.  ZZ )  ->  A. z  e.  ZZ  ( ( z 
||  A  /\  z  ||  B )  ->  z  <_  D ) )
21 simpr 108 . . . . . . . 8  |-  ( (
ph  /\  w  e.  ZZ )  ->  w  e.  ZZ )
2214, 20, 21rspcdva 2715 . . . . . . 7  |-  ( (
ph  /\  w  e.  ZZ )  ->  ( ( w  ||  A  /\  w  ||  B )  ->  w  <_  D ) )
233, 22sylan2 280 . . . . . 6  |-  ( (
ph  /\  w  e.  { z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) } )  ->  (
( w  ||  A  /\  w  ||  B )  ->  w  <_  D
) )
2412, 23mpd 13 . . . . 5  |-  ( (
ph  /\  w  e.  { z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) } )  ->  w  <_  D )
255, 6, 24lensymd 7368 . . . 4  |-  ( (
ph  /\  w  e.  { z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) } )  ->  -.  D  <  w )
2625ralrimiva 2439 . . 3  |-  ( ph  ->  A. w  e.  {
z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) }  -.  D  < 
w )
271nn0zd 8618 . . . . . . . . . 10  |-  ( ph  ->  D  e.  ZZ )
28 iddvds 10434 . . . . . . . . . 10  |-  ( D  e.  ZZ  ->  D  ||  D )
2927, 28syl 14 . . . . . . . . 9  |-  ( ph  ->  D  ||  D )
30 breq1 3808 . . . . . . . . . . 11  |-  ( z  =  D  ->  (
z  ||  D  <->  D  ||  D
) )
31 breq1 3808 . . . . . . . . . . . 12  |-  ( z  =  D  ->  (
z  ||  A  <->  D  ||  A
) )
32 breq1 3808 . . . . . . . . . . . 12  |-  ( z  =  D  ->  (
z  ||  B  <->  D  ||  B
) )
3331, 32anbi12d 457 . . . . . . . . . . 11  |-  ( z  =  D  ->  (
( z  ||  A  /\  z  ||  B )  <-> 
( D  ||  A  /\  D  ||  B ) ) )
3430, 33bibi12d 233 . . . . . . . . . 10  |-  ( z  =  D  ->  (
( z  ||  D  <->  ( z  ||  A  /\  z  ||  B ) )  <-> 
( D  ||  D  <->  ( D  ||  A  /\  D  ||  B ) ) ) )
3534, 17, 27rspcdva 2715 . . . . . . . . 9  |-  ( ph  ->  ( D  ||  D  <->  ( D  ||  A  /\  D  ||  B ) ) )
3629, 35mpbid 145 . . . . . . . 8  |-  ( ph  ->  ( D  ||  A  /\  D  ||  B ) )
3736ad2antrr 472 . . . . . . 7  |-  ( ( ( ph  /\  w  e.  RR )  /\  w  <  D )  ->  ( D  ||  A  /\  D  ||  B ) )
381ad2antrr 472 . . . . . . . . 9  |-  ( ( ( ph  /\  w  e.  RR )  /\  w  <  D )  ->  D  e.  NN0 )
3938nn0zd 8618 . . . . . . . 8  |-  ( ( ( ph  /\  w  e.  RR )  /\  w  <  D )  ->  D  e.  ZZ )
4033elrab3 2758 . . . . . . . 8  |-  ( D  e.  ZZ  ->  ( D  e.  { z  e.  ZZ  |  ( z 
||  A  /\  z  ||  B ) }  <->  ( D  ||  A  /\  D  ||  B ) ) )
4139, 40syl 14 . . . . . . 7  |-  ( ( ( ph  /\  w  e.  RR )  /\  w  <  D )  ->  ( D  e.  { z  e.  ZZ  |  ( z 
||  A  /\  z  ||  B ) }  <->  ( D  ||  A  /\  D  ||  B ) ) )
4237, 41mpbird 165 . . . . . 6  |-  ( ( ( ph  /\  w  e.  RR )  /\  w  <  D )  ->  D  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B
) } )
43 breq2 3809 . . . . . . 7  |-  ( u  =  D  ->  (
w  <  u  <->  w  <  D ) )
4443rspcev 2710 . . . . . 6  |-  ( ( D  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B ) }  /\  w  <  D
)  ->  E. u  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B
) } w  < 
u )
4542, 44sylancom 411 . . . . 5  |-  ( ( ( ph  /\  w  e.  RR )  /\  w  <  D )  ->  E. u  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B
) } w  < 
u )
4645ex 113 . . . 4  |-  ( (
ph  /\  w  e.  RR )  ->  ( w  <  D  ->  E. u  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B
) } w  < 
u ) )
4746ralrimiva 2439 . . 3  |-  ( ph  ->  A. w  e.  RR  ( w  <  D  ->  E. u  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B ) } w  <  u ) )
48 lttri3 7328 . . . . 5  |-  ( ( f  e.  RR  /\  g  e.  RR )  ->  ( f  =  g  <-> 
( -.  f  < 
g  /\  -.  g  <  f ) ) )
4948adantl 271 . . . 4  |-  ( (
ph  /\  ( f  e.  RR  /\  g  e.  RR ) )  -> 
( f  =  g  <-> 
( -.  f  < 
g  /\  -.  g  <  f ) ) )
5049eqsupti 6504 . . 3  |-  ( ph  ->  ( ( D  e.  RR  /\  A. w  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B
) }  -.  D  <  w  /\  A. w  e.  RR  ( w  < 
D  ->  E. u  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B
) } w  < 
u ) )  ->  sup ( { z  e.  ZZ  |  ( z 
||  A  /\  z  ||  B ) } ,  RR ,  <  )  =  D ) )
512, 26, 47, 50mp3and 1272 . 2  |-  ( ph  ->  sup ( { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B ) } ,  RR ,  <  )  =  D )
5251eqcomd 2088 1  |-  ( ph  ->  D  =  sup ( { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B
) } ,  RR ,  <  ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 102    <-> wb 103    = wceq 1285    e. wcel 1434   A.wral 2353   E.wrex 2354   {crab 2357   class class class wbr 3805   supcsup 6490   RRcr 7112   0cc0 7113    < clt 7285    <_ cle 7286   NN0cn0 8425   ZZcz 8502    || cdvds 10421
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-sep 3916  ax-pow 3968  ax-pr 3992  ax-un 4216  ax-setind 4308  ax-cnex 7199  ax-resscn 7200  ax-1cn 7201  ax-1re 7202  ax-icn 7203  ax-addcl 7204  ax-addrcl 7205  ax-mulcl 7206  ax-mulrcl 7207  ax-addcom 7208  ax-mulcom 7209  ax-addass 7210  ax-mulass 7211  ax-distr 7212  ax-i2m1 7213  ax-0lt1 7214  ax-1rid 7215  ax-0id 7216  ax-rnegex 7217  ax-precex 7218  ax-cnre 7219  ax-pre-ltirr 7220  ax-pre-ltwlin 7221  ax-pre-lttrn 7222  ax-pre-apti 7223  ax-pre-ltadd 7224  ax-pre-mulgt0 7225  ax-pre-mulext 7226
This theorem depends on definitions:  df-bi 115  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1688  df-eu 1946  df-mo 1947  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-nel 2345  df-ral 2358  df-rex 2359  df-reu 2360  df-rmo 2361  df-rab 2362  df-v 2612  df-sbc 2825  df-csb 2918  df-dif 2984  df-un 2986  df-in 2988  df-ss 2995  df-nul 3268  df-pw 3402  df-sn 3422  df-pr 3423  df-op 3425  df-uni 3622  df-int 3657  df-iun 3700  df-br 3806  df-opab 3860  df-mpt 3861  df-id 4076  df-po 4079  df-iso 4080  df-xp 4397  df-rel 4398  df-cnv 4399  df-co 4400  df-dm 4401  df-rn 4402  df-res 4403  df-ima 4404  df-iota 4917  df-fun 4954  df-fn 4955  df-f 4956  df-fv 4960  df-riota 5520  df-ov 5567  df-oprab 5568  df-mpt2 5569  df-1st 5819  df-2nd 5820  df-sup 6492  df-pnf 7287  df-mnf 7288  df-xr 7289  df-ltxr 7290  df-le 7291  df-sub 7418  df-neg 7419  df-reap 7812  df-ap 7819  df-div 7898  df-inn 8177  df-n0 8426  df-z 8503  df-q 8856  df-dvds 10422
This theorem is referenced by:  dfgcd3  10624
  Copyright terms: Public domain W3C validator