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

Theorem bezoutlemsup 11272
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 8725 . . 3  |-  ( ph  ->  D  e.  RR )
3 elrabi 2768 . . . . . . 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 8866 . . . . 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 3848 . . . . . . . . . 10  |-  ( z  =  w  ->  (
z  ||  A  <->  w  ||  A
) )
8 breq1 3848 . . . . . . . . . 10  |-  ( z  =  w  ->  (
z  ||  B  <->  w  ||  B
) )
97, 8anbi12d 457 . . . . . . . . 9  |-  ( z  =  w  ->  (
( z  ||  A  /\  z  ||  B )  <-> 
( w  ||  A  /\  w  ||  B ) ) )
109elrab 2771 . . . . . . . 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 3848 . . . . . . . . 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 11271 . . . . . . . . 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 2727 . . . . . . 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 7603 . . . 4  |-  ( (
ph  /\  w  e.  { z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) } )  ->  -.  D  <  w )
2625ralrimiva 2446 . . 3  |-  ( ph  ->  A. w  e.  {
z  e.  ZZ  | 
( z  ||  A  /\  z  ||  B ) }  -.  D  < 
w )
271nn0zd 8864 . . . . . . . . . 10  |-  ( ph  ->  D  e.  ZZ )
28 iddvds 11083 . . . . . . . . . 10  |-  ( D  e.  ZZ  ->  D  ||  D )
2927, 28syl 14 . . . . . . . . 9  |-  ( ph  ->  D  ||  D )
30 breq1 3848 . . . . . . . . . . 11  |-  ( z  =  D  ->  (
z  ||  D  <->  D  ||  D
) )
31 breq1 3848 . . . . . . . . . . . 12  |-  ( z  =  D  ->  (
z  ||  A  <->  D  ||  A
) )
32 breq1 3848 . . . . . . . . . . . 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 2727 . . . . . . . . 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 8864 . . . . . . . 8  |-  ( ( ( ph  /\  w  e.  RR )  /\  w  <  D )  ->  D  e.  ZZ )
4033elrab3 2772 . . . . . . . 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 3849 . . . . . . 7  |-  ( u  =  D  ->  (
w  <  u  <->  w  <  D ) )
4443rspcev 2722 . . . . . 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 2446 . . 3  |-  ( ph  ->  A. w  e.  RR  ( w  <  D  ->  E. u  e.  { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B ) } w  <  u ) )
48 lttri3 7563 . . . . 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 6689 . . 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 1276 . 2  |-  ( ph  ->  sup ( { z  e.  ZZ  |  ( z  ||  A  /\  z  ||  B ) } ,  RR ,  <  )  =  D )
5251eqcomd 2093 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 1289    e. wcel 1438   A.wral 2359   E.wrex 2360   {crab 2363   class class class wbr 3845   supcsup 6675   RRcr 7347   0cc0 7348    < clt 7520    <_ cle 7521   NN0cn0 8671   ZZcz 8748    || cdvds 11070
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 579  ax-in2 580  ax-io 665  ax-5 1381  ax-7 1382  ax-gen 1383  ax-ie1 1427  ax-ie2 1428  ax-8 1440  ax-10 1441  ax-11 1442  ax-i12 1443  ax-bndl 1444  ax-4 1445  ax-13 1449  ax-14 1450  ax-17 1464  ax-i9 1468  ax-ial 1472  ax-i5r 1473  ax-ext 2070  ax-sep 3957  ax-pow 4009  ax-pr 4036  ax-un 4260  ax-setind 4353  ax-cnex 7434  ax-resscn 7435  ax-1cn 7436  ax-1re 7437  ax-icn 7438  ax-addcl 7439  ax-addrcl 7440  ax-mulcl 7441  ax-mulrcl 7442  ax-addcom 7443  ax-mulcom 7444  ax-addass 7445  ax-mulass 7446  ax-distr 7447  ax-i2m1 7448  ax-0lt1 7449  ax-1rid 7450  ax-0id 7451  ax-rnegex 7452  ax-precex 7453  ax-cnre 7454  ax-pre-ltirr 7455  ax-pre-ltwlin 7456  ax-pre-lttrn 7457  ax-pre-apti 7458  ax-pre-ltadd 7459  ax-pre-mulgt0 7460  ax-pre-mulext 7461
This theorem depends on definitions:  df-bi 115  df-3or 925  df-3an 926  df-tru 1292  df-fal 1295  df-nf 1395  df-sb 1693  df-eu 1951  df-mo 1952  df-clab 2075  df-cleq 2081  df-clel 2084  df-nfc 2217  df-ne 2256  df-nel 2351  df-ral 2364  df-rex 2365  df-reu 2366  df-rmo 2367  df-rab 2368  df-v 2621  df-sbc 2841  df-csb 2934  df-dif 3001  df-un 3003  df-in 3005  df-ss 3012  df-nul 3287  df-pw 3431  df-sn 3452  df-pr 3453  df-op 3455  df-uni 3654  df-int 3689  df-iun 3732  df-br 3846  df-opab 3900  df-mpt 3901  df-id 4120  df-po 4123  df-iso 4124  df-xp 4444  df-rel 4445  df-cnv 4446  df-co 4447  df-dm 4448  df-rn 4449  df-res 4450  df-ima 4451  df-iota 4980  df-fun 5017  df-fn 5018  df-f 5019  df-fv 5023  df-riota 5608  df-ov 5655  df-oprab 5656  df-mpt2 5657  df-1st 5911  df-2nd 5912  df-sup 6677  df-pnf 7522  df-mnf 7523  df-xr 7524  df-ltxr 7525  df-le 7526  df-sub 7653  df-neg 7654  df-reap 8050  df-ap 8057  df-div 8138  df-inn 8421  df-n0 8672  df-z 8749  df-q 9103  df-dvds 11071
This theorem is referenced by:  dfgcd3  11273
  Copyright terms: Public domain W3C validator