HomeHome Intuitionistic Logic Explorer
Theorem List (p. 121 of 153)
< Previous  Next >
Browser slow? Try the
Unicode version.

Mirrors  >  Metamath Home Page  >  ILE Home Page  >  Theorem List Contents  >  Recent Proofs       This page: Page List

Theorem List for Intuitionistic Logic Explorer - 12001-12100   *Has distinct variable group(s)
TypeLabelDescription
Statement
 
Theoremneggcd 12001 Negating one operand of the  gcd operator does not alter the result. (Contributed by Paul Chapman, 22-Jun-2011.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u M  gcd  N )  =  ( M  gcd  N ) )
 
Theoremgcdaddm 12002 Adding a multiple of one operand of the  gcd operator to the other does not alter the result. (Contributed by Paul Chapman, 31-Mar-2011.)
 |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  =  ( M  gcd  ( N  +  ( K  x.  M ) ) ) )
 
Theoremgcdadd 12003 The GCD of two numbers is the same as the GCD of the left and their sum. (Contributed by Scott Fenton, 20-Apr-2014.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  =  ( M 
 gcd  ( N  +  M ) ) )
 
Theoremgcdid 12004 The gcd of a number and itself is its absolute value. (Contributed by Paul Chapman, 31-Mar-2011.)
 |-  ( N  e.  ZZ  ->  ( N  gcd  N )  =  ( abs `  N ) )
 
Theoremgcd1 12005 The gcd of a number with 1 is 1. Theorem 1.4(d)1 in [ApostolNT] p. 16. (Contributed by Mario Carneiro, 19-Feb-2014.)
 |-  ( M  e.  ZZ  ->  ( M  gcd  1
 )  =  1 )
 
Theoremgcdabs 12006 The gcd of two integers is the same as that of their absolute values. (Contributed by Paul Chapman, 31-Mar-2011.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( abs `  M )  gcd  ( abs `  N ) )  =  ( M  gcd  N ) )
 
Theoremgcdabs1 12007  gcd of the absolute value of the first operator. (Contributed by Scott Fenton, 2-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( N  e.  ZZ  /\  M  e.  ZZ )  ->  ( ( abs `  N )  gcd  M )  =  ( N  gcd  M ) )
 
Theoremgcdabs2 12008  gcd of the absolute value of the second operator. (Contributed by Scott Fenton, 2-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( N  e.  ZZ  /\  M  e.  ZZ )  ->  ( N  gcd  ( abs `  M )
 )  =  ( N 
 gcd  M ) )
 
Theoremmodgcd 12009 The gcd remains unchanged if one operand is replaced with its remainder modulo the other. (Contributed by Paul Chapman, 31-Mar-2011.)
 |-  ( ( M  e.  ZZ  /\  N  e.  NN )  ->  ( ( M 
 mod  N )  gcd  N )  =  ( M  gcd  N ) )
 
Theorem1gcd 12010 The GCD of one and an integer is one. (Contributed by Scott Fenton, 17-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( M  e.  ZZ  ->  ( 1  gcd  M )  =  1 )
 
Theoremgcdmultipled 12011 The greatest common divisor of a nonnegative integer  M and a multiple of it is  M itself. (Contributed by Rohan Ridenour, 3-Aug-2023.)
 |-  ( ph  ->  M  e.  NN0 )   &    |-  ( ph  ->  N  e.  ZZ )   =>    |-  ( ph  ->  ( M  gcd  ( N  x.  M ) )  =  M )
 
Theoremdvdsgcdidd 12012 The greatest common divisor of a positive integer and another integer it divides is itself. (Contributed by Rohan Ridenour, 3-Aug-2023.)
 |-  ( ph  ->  M  e.  NN )   &    |-  ( ph  ->  N  e.  ZZ )   &    |-  ( ph  ->  M  ||  N )   =>    |-  ( ph  ->  ( M  gcd  N )  =  M )
 
Theorem6gcd4e2 12013 The greatest common divisor of six and four is two. To calculate this gcd, a simple form of Euclid's algorithm is used:  ( 6  gcd  4 )  =  ( ( 4  +  2 )  gcd  4 )  =  ( 2  gcd  4 ) and  ( 2  gcd  4 )  =  ( 2  gcd  ( 2  +  2 ) )  =  ( 2  gcd  2 )  =  2. (Contributed by AV, 27-Aug-2020.)
 |-  ( 6  gcd  4
 )  =  2
 
5.1.5  Bézout's identity
 
Theorembezoutlemnewy 12014* Lemma for Bézout's identity. The is-bezout predicate holds for  ( y  mod 
W ). (Contributed by Jim Kingdon, 6-Jan-2022.)
 |-  ( ph  <->  E. s  e.  ZZ  E. t  e.  ZZ  r  =  ( ( A  x.  s )  +  ( B  x.  t ) ) )   &    |-  ( th  ->  A  e.  NN0 )   &    |-  ( th  ->  B  e.  NN0 )   &    |-  ( th  ->  W  e.  NN )   &    |-  ( th  ->  [ y  /  r ] ph )   &    |-  ( th  ->  y  e.  NN0 )   &    |-  ( th  ->  [. W  /  r ]. ph )   =>    |-  ( th  ->  [. ( y  mod  W )  /  r ]. ph )
 
Theorembezoutlemstep 12015* Lemma for Bézout's identity. This is the induction step for the proof by induction. (Contributed by Jim Kingdon, 3-Jan-2022.)
 |-  ( ph  <->  E. s  e.  ZZ  E. t  e.  ZZ  r  =  ( ( A  x.  s )  +  ( B  x.  t ) ) )   &    |-  ( th  ->  A  e.  NN0 )   &    |-  ( th  ->  B  e.  NN0 )   &    |-  ( th  ->  W  e.  NN )   &    |-  ( th  ->  [ y  /  r ] ph )   &    |-  ( th  ->  y  e.  NN0 )   &    |-  ( th  ->  [. W  /  r ]. ph )   &    |-  ( ps 
 <-> 
 A. z  e.  NN0  ( z  ||  r  ->  ( z  ||  x  /\  z  ||  y ) ) )   &    |-  ( ( th  /\  [. ( y  mod  W )  /  r ]. ph )  ->  E. r  e.  NN0  ( [. ( y  mod  W )  /  x ]. [. W  /  y ]. ps  /\  ph ) )   &    |-  F/ x th   &    |-  F/ r th   =>    |-  ( th  ->  E. r  e.  NN0  ( [. W  /  x ].
 ps  /\  ph ) )
 
Theorembezoutlemmain 12016* Lemma for Bézout's identity. This is the main result which we prove by induction and which represents the application of the Extended Euclidean algorithm. (Contributed by Jim Kingdon, 30-Dec-2021.)
 |-  ( ph  <->  E. s  e.  ZZ  E. t  e.  ZZ  r  =  ( ( A  x.  s )  +  ( B  x.  t ) ) )   &    |-  ( ps  <->  A. z  e.  NN0  ( z  ||  r  ->  ( z  ||  x  /\  z  ||  y ) ) )   &    |-  ( th  ->  A  e.  NN0 )   &    |-  ( th  ->  B  e.  NN0 )   =>    |-  ( th  ->  A. x  e.  NN0  ( [ x  /  r ] ph  ->  A. y  e.  NN0  ( [ y  /  r ] ph  ->  E. r  e.  NN0  ( ps  /\  ph ) ) ) )
 
Theorembezoutlema 12017* Lemma for Bézout's identity. The is-bezout condition is satisfied by  A. (Contributed by Jim Kingdon, 30-Dec-2021.)
 |-  ( ph  <->  E. s  e.  ZZ  E. t  e.  ZZ  r  =  ( ( A  x.  s )  +  ( B  x.  t ) ) )   &    |-  ( th  ->  A  e.  NN0 )   &    |-  ( th  ->  B  e.  NN0 )   =>    |-  ( th  ->  [. A  /  r ]. ph )
 
Theorembezoutlemb 12018* Lemma for Bézout's identity. The is-bezout condition is satisfied by  B. (Contributed by Jim Kingdon, 30-Dec-2021.)
 |-  ( ph  <->  E. s  e.  ZZ  E. t  e.  ZZ  r  =  ( ( A  x.  s )  +  ( B  x.  t ) ) )   &    |-  ( th  ->  A  e.  NN0 )   &    |-  ( th  ->  B  e.  NN0 )   =>    |-  ( th  ->  [. B  /  r ]. ph )
 
Theorembezoutlemex 12019* Lemma for Bézout's identity. Existence of a number which we will later show to be the greater common divisor and its decomposition into cofactors. (Contributed by Mario Carneiro and Jim Kingdon, 3-Jan-2022.)
 |-  ( ( A  e.  NN0  /\  B  e.  NN0 )  ->  E. d  e.  NN0  ( A. z  e.  NN0  ( z  ||  d  ->  ( z  ||  A  /\  z  ||  B ) ) 
 /\  E. x  e.  ZZ  E. y  e.  ZZ  d  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
 
Theorembezoutlemzz 12020* Lemma for Bézout's identity. Like bezoutlemex 12019 but where ' z ' is any integer, not just a nonnegative one. (Contributed by Mario Carneiro and Jim Kingdon, 8-Jan-2022.)
 |-  ( ( A  e.  NN0  /\  B  e.  NN0 )  ->  E. d  e.  NN0  ( A. z  e.  ZZ  ( z  ||  d  ->  ( z  ||  A  /\  z  ||  B ) ) 
 /\  E. x  e.  ZZ  E. y  e.  ZZ  d  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
 
Theorembezoutlemaz 12021* Lemma for Bézout's identity. Like bezoutlemzz 12020 but where ' A ' can be any integer, not just a nonnegative one. (Contributed by Mario Carneiro and Jim Kingdon, 8-Jan-2022.)
 |-  ( ( A  e.  ZZ  /\  B  e.  NN0 )  ->  E. d  e.  NN0  ( A. z  e.  ZZ  ( z  ||  d  ->  ( z  ||  A  /\  z  ||  B ) ) 
 /\  E. x  e.  ZZ  E. y  e.  ZZ  d  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
 
Theorembezoutlembz 12022* Lemma for Bézout's identity. Like bezoutlemaz 12021 but where ' B ' can be any integer, not just a nonnegative one. (Contributed by Mario Carneiro and Jim Kingdon, 8-Jan-2022.)
 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  E. d  e.  NN0  ( A. z  e.  ZZ  ( z  ||  d  ->  ( z  ||  A  /\  z  ||  B ) ) 
 /\  E. x  e.  ZZ  E. y  e.  ZZ  d  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
 
Theorembezoutlembi 12023* Lemma for Bézout's identity. Like bezoutlembz 12022 but the greatest common divisor condition is a biconditional, not just an implication. (Contributed by Mario Carneiro and Jim Kingdon, 8-Jan-2022.)
 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  E. d  e.  NN0  ( A. z  e.  ZZ  ( z  ||  d  <->  ( z  ||  A  /\  z  ||  B ) )  /\  E. x  e.  ZZ  E. y  e. 
 ZZ  d  =  ( ( A  x.  x )  +  ( B  x.  y ) ) ) )
 
Theorembezoutlemmo 12024* Lemma for Bézout's identity. There is at most one nonnegative integer meeting the greatest common divisor condition. (Contributed by Mario Carneiro and Jim Kingdon, 9-Jan-2022.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  B  e.  ZZ )   &    |-  ( ph  ->  D  e.  NN0 )   &    |-  ( ph  ->  A. z  e.  ZZ  ( z  ||  D 
 <->  ( z  ||  A  /\  z  ||  B ) ) )   &    |-  ( ph  ->  E  e.  NN0 )   &    |-  ( ph  ->  A. z  e.  ZZ  (
 z  ||  E  <->  ( z  ||  A  /\  z  ||  B ) ) )   =>    |-  ( ph  ->  D  =  E )
 
Theorembezoutlemeu 12025* Lemma for Bézout's identity. There is exactly one nonnegative integer meeting the greatest common divisor condition. (Contributed by Mario Carneiro and Jim Kingdon, 9-Jan-2022.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  B  e.  ZZ )   &    |-  ( ph  ->  D  e.  NN0 )   &    |-  ( ph  ->  A. z  e.  ZZ  ( z  ||  D 
 <->  ( z  ||  A  /\  z  ||  B ) ) )   =>    |-  ( ph  ->  E! d  e.  NN0  A. z  e.  ZZ  ( z  ||  d 
 <->  ( z  ||  A  /\  z  ||  B ) ) )
 
Theorembezoutlemle 12026* Lemma for Bézout's identity. The number satisfying the greatest common divisor condition is the largest number which divides both  A and  B. (Contributed by Mario Carneiro and Jim Kingdon, 9-Jan-2022.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  B  e.  ZZ )   &    |-  ( ph  ->  D  e.  NN0 )   &    |-  ( ph  ->  A. z  e.  ZZ  ( z  ||  D 
 <->  ( z  ||  A  /\  z  ||  B ) ) )   &    |-  ( ph  ->  -.  ( A  =  0 
 /\  B  =  0 ) )   =>    |-  ( ph  ->  A. z  e.  ZZ  ( ( z 
 ||  A  /\  z  ||  B )  ->  z  <_  D ) )
 
Theorembezoutlemsup 12027* 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.)
 |-  ( ph  ->  A  e.  ZZ )   &    |-  ( ph  ->  B  e.  ZZ )   &    |-  ( ph  ->  D  e.  NN0 )   &    |-  ( ph  ->  A. z  e.  ZZ  ( z  ||  D 
 <->  ( z  ||  A  /\  z  ||  B ) ) )   &    |-  ( ph  ->  -.  ( A  =  0 
 /\  B  =  0 ) )   =>    |-  ( ph  ->  D  =  sup ( { z  e.  ZZ  |  ( z 
 ||  A  /\  z  ||  B ) } ,  RR ,  <  ) )
 
Theoremdfgcd3 12028* Alternate definition of the  gcd operator. (Contributed by Jim Kingdon, 31-Dec-2021.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  =  ( iota_ d  e.  NN0  A. z  e. 
 ZZ  ( z  ||  d 
 <->  ( z  ||  M  /\  z  ||  N ) ) ) )
 
Theorembezout 12029* 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. This is Metamath 100 proof #60.

The proof is constructive, in the sense that it applies the Extended Euclidian Algorithm to constuct a number which can be shown to be  ( A  gcd  B ) and which satisfies the rest of the theorem. In the presence of excluded middle, it is common to prove Bézout's identity by taking the smallest number which satisfies the Bézout condition, and showing it is the greatest common divisor. But we do not have the ability to show that number exists other than by providing a way to determine it. (Contributed by Mario Carneiro, 22-Feb-2014.)

 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  E. x  e.  ZZ  E. y  e.  ZZ  ( A  gcd  B )  =  ( ( A  x.  x )  +  ( B  x.  y ) ) )
 
Theoremdvdsgcd 12030 An integer which divides each of two others also divides their gcd. (Contributed by Paul Chapman, 22-Jun-2011.) (Revised by Mario Carneiro, 30-May-2014.)
 |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( K  ||  M  /\  K  ||  N )  ->  K  ||  ( M  gcd  N ) ) )
 
Theoremdvdsgcdb 12031 Biconditional form of dvdsgcd 12030. (Contributed by Scott Fenton, 2-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( K  ||  M  /\  K  ||  N ) 
 <->  K  ||  ( M  gcd  N ) ) )
 
Theoremdfgcd2 12032* Alternate definition of the  gcd operator, see definition in [ApostolNT] p. 15. (Contributed by AV, 8-Aug-2021.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( D  =  ( M  gcd  N )  <-> 
 ( 0  <_  D  /\  ( D  ||  M  /\  D  ||  N )  /\  A. e  e.  ZZ  ( ( e  ||  M  /\  e  ||  N )  ->  e  ||  D ) ) ) )
 
Theoremgcdass 12033 Associative law for  gcd operator. Theorem 1.4(b) in [ApostolNT] p. 16. (Contributed by Scott Fenton, 2-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( N  e.  ZZ  /\  M  e.  ZZ  /\  P  e.  ZZ )  ->  ( ( N  gcd  M )  gcd  P )  =  ( N  gcd  ( M  gcd  P ) ) )
 
Theoremmulgcd 12034 Distribute multiplication by a nonnegative integer over gcd. (Contributed by Paul Chapman, 22-Jun-2011.) (Proof shortened by Mario Carneiro, 30-May-2014.)
 |-  ( ( K  e.  NN0  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( K  x.  M )  gcd  ( K  x.  N ) )  =  ( K  x.  ( M  gcd  N ) ) )
 
Theoremabsmulgcd 12035 Distribute absolute value of multiplication over gcd. Theorem 1.4(c) in [ApostolNT] p. 16. (Contributed by Paul Chapman, 22-Jun-2011.)
 |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( K  x.  M )  gcd  ( K  x.  N ) )  =  ( abs `  ( K  x.  ( M  gcd  N ) ) ) )
 
Theoremmulgcdr 12036 Reverse distribution law for the 
gcd operator. (Contributed by Scott Fenton, 2-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN0 )  ->  ( ( A  x.  C )  gcd  ( B  x.  C ) )  =  ( ( A 
 gcd  B )  x.  C ) )
 
Theoremgcddiv 12037 Division law for GCD. (Contributed by Scott Fenton, 18-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  C  e.  NN )  /\  ( C 
 ||  A  /\  C  ||  B ) )  ->  ( ( A  gcd  B )  /  C )  =  ( ( A 
 /  C )  gcd  ( B  /  C ) ) )
 
Theoremgcdmultiple 12038 The GCD of a multiple of a number is the number itself. (Contributed by Scott Fenton, 12-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  gcd  ( M  x.  N ) )  =  M )
 
Theoremgcdmultiplez 12039 Extend gcdmultiple 12038 so  N can be an integer. (Contributed by Scott Fenton, 18-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( M  e.  NN  /\  N  e.  ZZ )  ->  ( M  gcd  ( M  x.  N ) )  =  M )
 
Theoremgcdzeq 12040 A positive integer  A is equal to its gcd with an integer  B if and only if  A divides  B. Generalization of gcdeq 12041. (Contributed by AV, 1-Jul-2020.)
 |-  ( ( A  e.  NN  /\  B  e.  ZZ )  ->  ( ( A 
 gcd  B )  =  A  <->  A 
 ||  B ) )
 
Theoremgcdeq 12041  A is equal to its gcd with  B if and only if  A divides  B. (Contributed by Mario Carneiro, 23-Feb-2014.) (Proof shortened by AV, 8-Aug-2021.)
 |-  ( ( A  e.  NN  /\  B  e.  NN )  ->  ( ( A 
 gcd  B )  =  A  <->  A 
 ||  B ) )
 
Theoremdvdssqim 12042 Unidirectional form of dvdssq 12049. (Contributed by Scott Fenton, 19-Apr-2014.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  ||  N  ->  ( M ^
 2 )  ||  ( N ^ 2 ) ) )
 
Theoremdvdsmulgcd 12043 Relationship between the order of an element and that of a multiple. (a divisibility equivalent). (Contributed by Stefan O'Rear, 6-Sep-2015.)
 |-  ( ( B  e.  ZZ  /\  C  e.  ZZ )  ->  ( A  ||  ( B  x.  C ) 
 <->  A  ||  ( B  x.  ( C  gcd  A ) ) ) )
 
Theoremrpmulgcd 12044 If  K and  M are relatively prime, then the GCD of  K and  M  x.  N is the GCD of  K and  N. (Contributed by Scott Fenton, 12-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( ( K  e.  NN  /\  M  e.  NN  /\  N  e.  NN )  /\  ( K 
 gcd  M )  =  1 )  ->  ( K  gcd  ( M  x.  N ) )  =  ( K  gcd  N ) )
 
Theoremrplpwr 12045 If  A and  B are relatively prime, then so are  A ^ N and  B. (Contributed by Scott Fenton, 12-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( A  e.  NN  /\  B  e.  NN  /\  N  e.  NN )  ->  ( ( A  gcd  B )  =  1  ->  ( ( A ^ N )  gcd  B )  =  1 ) )
 
Theoremrppwr 12046 If  A and  B are relatively prime, then so are  A ^ N and  B ^ N. (Contributed by Scott Fenton, 12-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( A  e.  NN  /\  B  e.  NN  /\  N  e.  NN )  ->  ( ( A  gcd  B )  =  1  ->  ( ( A ^ N )  gcd  ( B ^ N ) )  =  1 ) )
 
Theoremsqgcd 12047 Square distributes over gcd. (Contributed by Scott Fenton, 18-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( ( M 
 gcd  N ) ^ 2
 )  =  ( ( M ^ 2 ) 
 gcd  ( N ^
 2 ) ) )
 
Theoremdvdssqlem 12048 Lemma for dvdssq 12049. (Contributed by Scott Fenton, 18-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( M  ||  N 
 <->  ( M ^ 2
 )  ||  ( N ^ 2 ) ) )
 
Theoremdvdssq 12049 Two numbers are divisible iff their squares are. (Contributed by Scott Fenton, 18-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  ||  N 
 <->  ( M ^ 2
 )  ||  ( N ^ 2 ) ) )
 
Theorembezoutr 12050 Partial converse to bezout 12029. Existence of a linear combination does not set the GCD, but it does upper bound it. (Contributed by Stefan O'Rear, 23-Sep-2014.)
 |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( X  e.  ZZ  /\  Y  e.  ZZ ) )  ->  ( A  gcd  B ) 
 ||  ( ( A  x.  X )  +  ( B  x.  Y ) ) )
 
Theorembezoutr1 12051 Converse of bezout 12029 for when the greater common divisor is one (sufficient condition for relative primality). (Contributed by Stefan O'Rear, 23-Sep-2014.)
 |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( X  e.  ZZ  /\  Y  e.  ZZ ) )  ->  ( ( ( A  x.  X )  +  ( B  x.  Y ) )  =  1  ->  ( A  gcd  B )  =  1 )
 )
 
5.1.6  Decidable sets of integers
 
Theoremnnmindc 12052* An inhabited decidable subset of the natural numbers has a minimum. (Contributed by Jim Kingdon, 23-Sep-2024.)
 |-  ( ( A  C_  NN  /\  A. x  e. 
 NN DECID  x  e.  A  /\  E. y  y  e.  A )  -> inf ( A ,  RR ,  <  )  e.  A )
 
Theoremnnminle 12053* The infimum of a decidable subset of the natural numbers is less than an element of the set. The infimum is also a minimum as shown at nnmindc 12052. (Contributed by Jim Kingdon, 26-Sep-2024.)
 |-  ( ( A  C_  NN  /\  A. x  e. 
 NN DECID  x  e.  A  /\  B  e.  A )  -> inf ( A ,  RR ,  <  )  <_  B )
 
Theoremnnwodc 12054* Well-ordering principle: any inhabited decidable set of positive integers has a least element. Theorem I.37 (well-ordering principle) of [Apostol] p. 34. (Contributed by NM, 17-Aug-2001.) (Revised by Jim Kingdon, 23-Oct-2024.)
 |-  ( ( A  C_  NN  /\  E. w  w  e.  A  /\  A. j  e.  NN DECID  j  e.  A )  ->  E. x  e.  A  A. y  e.  A  x  <_  y )
 
Theoremuzwodc 12055* Well-ordering principle: any inhabited decidable subset of an upper set of integers has a least element. (Contributed by NM, 8-Oct-2005.) (Revised by Jim Kingdon, 22-Oct-2024.)
 |-  ( ( S  C_  ( ZZ>= `  M )  /\  E. x  x  e.  S  /\  A. x  e.  ( ZZ>= `  M )DECID  x  e.  S )  ->  E. j  e.  S  A. k  e.  S  j  <_  k
 )
 
Theoremnnwofdc 12056* Well-ordering principle: any inhabited decidable set of positive integers has a least element. This version allows  x and  y to be present in  A as long as they are effectively not free. (Contributed by NM, 17-Aug-2001.) (Revised by Mario Carneiro, 15-Oct-2016.)
 |-  F/_ x A   &    |-  F/_ y A   =>    |-  ( ( A 
 C_  NN  /\  E. z  z  e.  A  /\  A. j  e.  NN DECID  j  e.  A )  ->  E. x  e.  A  A. y  e.  A  x  <_  y
 )
 
Theoremnnwosdc 12057* Well-ordering principle: any inhabited decidable set of positive integers has a least element (schema form). (Contributed by NM, 17-Aug-2001.) (Revised by Jim Kingdon, 25-Oct-2024.)
 |-  ( x  =  y 
 ->  ( ph  <->  ps ) )   =>    |-  ( ( E. x  e.  NN  ph  /\  A. x  e.  NN DECID  ph )  ->  E. x  e.  NN  ( ph  /\  A. y  e.  NN  ( ps  ->  x  <_  y
 ) ) )
 
5.1.7  Algorithms
 
Theoremnn0seqcvgd 12058* A strictly-decreasing nonnegative integer sequence with initial term  N reaches zero by the  N th term. Deduction version. (Contributed by Paul Chapman, 31-Mar-2011.)
 |-  ( ph  ->  F : NN0 --> NN0 )   &    |-  ( ph  ->  N  =  ( F `  0 ) )   &    |-  (
 ( ph  /\  k  e. 
 NN0 )  ->  (
 ( F `  (
 k  +  1 ) )  =/=  0  ->  ( F `  ( k  +  1 ) )  <  ( F `  k ) ) )   =>    |-  ( ph  ->  ( F `  N )  =  0 )
 
Theoremialgrlem1st 12059 Lemma for ialgr0 12061. Expressing algrflemg 6248 in a form suitable for theorems such as seq3-1 10477 or seqf 10478. (Contributed by Jim Kingdon, 22-Jul-2021.)
 |-  ( ph  ->  F : S --> S )   =>    |-  ( ( ph  /\  ( x  e.  S  /\  y  e.  S ) )  ->  ( x ( F  o.  1st ) y )  e.  S )
 
Theoremialgrlemconst 12060 Lemma for ialgr0 12061. Closure of a constant function, in a form suitable for theorems such as seq3-1 10477 or seqf 10478. (Contributed by Jim Kingdon, 22-Jul-2021.)
 |-  Z  =  ( ZZ>= `  M )   &    |-  ( ph  ->  A  e.  S )   =>    |-  ( ( ph  /\  x  e.  ( ZZ>= `  M ) )  ->  ( ( Z  X.  { A } ) `  x )  e.  S )
 
Theoremialgr0 12061 The value of the algorithm iterator 
R at  0 is the initial state  A. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Jim Kingdon, 12-Mar-2023.)
 |-  Z  =  ( ZZ>= `  M )   &    |-  R  =  seq M ( ( F  o.  1st ) ,  ( Z  X.  { A }
 ) )   &    |-  ( ph  ->  M  e.  ZZ )   &    |-  ( ph  ->  A  e.  S )   &    |-  ( ph  ->  F : S --> S )   =>    |-  ( ph  ->  ( R `  M )  =  A )
 
Theoremalgrf 12062 An algorithm is a step function  F : S --> S on a state space  S. An algorithm acts on an initial state  A  e.  S by iteratively applying  F to give  A,  ( F `  A ),  ( F `  ( F `  A )
) and so on. An algorithm is said to halt if a fixed point of  F is reached after a finite number of iterations.

The algorithm iterator  R : NN0 --> S "runs" the algorithm  F so that  ( R `  k ) is the state after  k iterations of  F on the initial state  A.

Domain and codomain of the algorithm iterator  R. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.)

 |-  Z  =  ( ZZ>= `  M )   &    |-  R  =  seq M ( ( F  o.  1st ) ,  ( Z  X.  { A }
 ) )   &    |-  ( ph  ->  M  e.  ZZ )   &    |-  ( ph  ->  A  e.  S )   &    |-  ( ph  ->  F : S --> S )   =>    |-  ( ph  ->  R : Z --> S )
 
Theoremalgrp1 12063 The value of the algorithm iterator 
R at  ( K  + 
1 ). (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Jim Kingdon, 12-Mar-2023.)
 |-  Z  =  ( ZZ>= `  M )   &    |-  R  =  seq M ( ( F  o.  1st ) ,  ( Z  X.  { A }
 ) )   &    |-  ( ph  ->  M  e.  ZZ )   &    |-  ( ph  ->  A  e.  S )   &    |-  ( ph  ->  F : S --> S )   =>    |-  ( ( ph  /\  K  e.  Z ) 
 ->  ( R `  ( K  +  1 )
 )  =  ( F `
  ( R `  K ) ) )
 
Theoremalginv 12064* If  I is an invariant of  F, then its value is unchanged after any number of iterations of 
F. (Contributed by Paul Chapman, 31-Mar-2011.)
 |-  R  =  seq 0
 ( ( F  o.  1st ) ,  ( NN0  X. 
 { A } )
 )   &    |-  F : S --> S   &    |-  ( x  e.  S  ->  ( I `  ( F `
  x ) )  =  ( I `  x ) )   =>    |-  ( ( A  e.  S  /\  K  e.  NN0 )  ->  ( I `  ( R `  K ) )  =  ( I `  ( R `  0 ) ) )
 
Theoremalgcvg 12065* One way to prove that an algorithm halts is to construct a countdown function  C : S --> NN0 whose value is guaranteed to decrease for each iteration of  F until it reaches  0. That is, if  X  e.  S is not a fixed point of  F, then  ( C `  ( F `  X ) )  <  ( C `
 X ).

If  C is a countdown function for algorithm  F, the sequence  ( C `  ( R `  k ) ) reaches  0 after at most  N steps, where  N is the value of  C for the initial state  A. (Contributed by Paul Chapman, 22-Jun-2011.)

 |-  F : S --> S   &    |-  R  =  seq 0 ( ( F  o.  1st ) ,  ( NN0  X.  { A } ) )   &    |-  C : S --> NN0   &    |-  ( z  e.  S  ->  ( ( C `  ( F `  z ) )  =/=  0  ->  ( C `  ( F `
  z ) )  <  ( C `  z ) ) )   &    |-  N  =  ( C `  A )   =>    |-  ( A  e.  S  ->  ( C `  ( R `  N ) )  =  0 )
 
Theoremalgcvgblem 12066 Lemma for algcvgb 12067. (Contributed by Paul Chapman, 31-Mar-2011.)
 |-  ( ( M  e.  NN0  /\  N  e.  NN0 )  ->  ( ( N  =/=  0  ->  N  <  M ) 
 <->  ( ( M  =/=  0  ->  N  <  M )  /\  ( M  =  0  ->  N  =  0 ) ) ) )
 
Theoremalgcvgb 12067 Two ways of expressing that  C is a countdown function for algorithm  F. The first is used in these theorems. The second states the condition more intuitively as a conjunction: if the countdown function's value is currently nonzero, it must decrease at the next step; if it has reached zero, it must remain zero at the next step. (Contributed by Paul Chapman, 31-Mar-2011.)
 |-  F : S --> S   &    |-  C : S --> NN0   =>    |-  ( X  e.  S  ->  ( ( ( C `
  ( F `  X ) )  =/=  0  ->  ( C `  ( F `  X ) )  <  ( C `
  X ) )  <-> 
 ( ( ( C `
  X )  =/=  0  ->  ( C `  ( F `  X ) )  <  ( C `
  X ) ) 
 /\  ( ( C `
  X )  =  0  ->  ( C `  ( F `  X ) )  =  0
 ) ) ) )
 
Theoremalgcvga 12068* The countdown function  C remains  0 after  N steps. (Contributed by Paul Chapman, 22-Jun-2011.)
 |-  F : S --> S   &    |-  R  =  seq 0 ( ( F  o.  1st ) ,  ( NN0  X.  { A } ) )   &    |-  C : S --> NN0   &    |-  ( z  e.  S  ->  ( ( C `  ( F `  z ) )  =/=  0  ->  ( C `  ( F `
  z ) )  <  ( C `  z ) ) )   &    |-  N  =  ( C `  A )   =>    |-  ( A  e.  S  ->  ( K  e.  ( ZZ>=
 `  N )  ->  ( C `  ( R `
  K ) )  =  0 ) )
 
Theoremalgfx 12069* If  F reaches a fixed point when the countdown function 
C reaches  0,  F remains fixed after  N steps. (Contributed by Paul Chapman, 22-Jun-2011.)
 |-  F : S --> S   &    |-  R  =  seq 0 ( ( F  o.  1st ) ,  ( NN0  X.  { A } ) )   &    |-  C : S --> NN0   &    |-  ( z  e.  S  ->  ( ( C `  ( F `  z ) )  =/=  0  ->  ( C `  ( F `
  z ) )  <  ( C `  z ) ) )   &    |-  N  =  ( C `  A )   &    |-  ( z  e.  S  ->  ( ( C `  z )  =  0  ->  ( F `  z )  =  z ) )   =>    |-  ( A  e.  S  ->  ( K  e.  ( ZZ>=
 `  N )  ->  ( R `  K )  =  ( R `  N ) ) )
 
5.1.8  Euclid's Algorithm
 
Theoremeucalgval2 12070* The value of the step function  E for Euclid's Algorithm on an ordered pair. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.)
 |-  E  =  ( x  e.  NN0 ,  y  e. 
 NN0  |->  if ( y  =  0 ,  <. x ,  y >. ,  <. y ,  ( x  mod  y
 ) >. ) )   =>    |-  ( ( M  e.  NN0  /\  N  e.  NN0 )  ->  ( M E N )  =  if ( N  =  0 ,  <. M ,  N >. ,  <. N ,  ( M  mod  N ) >. ) )
 
Theoremeucalgval 12071* Euclid's Algorithm eucalg 12076 computes the greatest common divisor of two nonnegative integers by repeatedly replacing the larger of them with its remainder modulo the smaller until the remainder is 0.

The value of the step function  E for Euclid's Algorithm. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.)

 |-  E  =  ( x  e.  NN0 ,  y  e. 
 NN0  |->  if ( y  =  0 ,  <. x ,  y >. ,  <. y ,  ( x  mod  y
 ) >. ) )   =>    |-  ( X  e.  ( NN0  X.  NN0 )  ->  ( E `  X )  =  if (
 ( 2nd `  X )  =  0 ,  X ,  <. ( 2nd `  X ) ,  (  mod  `  X ) >. ) )
 
Theoremeucalgf 12072* Domain and codomain of the step function  E for Euclid's Algorithm. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.)
 |-  E  =  ( x  e.  NN0 ,  y  e. 
 NN0  |->  if ( y  =  0 ,  <. x ,  y >. ,  <. y ,  ( x  mod  y
 ) >. ) )   =>    |-  E : (
 NN0  X.  NN0 ) --> ( NN0  X. 
 NN0 )
 
Theoremeucalginv 12073* The invariant of the step function 
E for Euclid's Algorithm is the  gcd operator applied to the state. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 29-May-2014.)
 |-  E  =  ( x  e.  NN0 ,  y  e. 
 NN0  |->  if ( y  =  0 ,  <. x ,  y >. ,  <. y ,  ( x  mod  y
 ) >. ) )   =>    |-  ( X  e.  ( NN0  X.  NN0 )  ->  (  gcd  `  ( E `  X ) )  =  (  gcd  `  X ) )
 
Theoremeucalglt 12074* The second member of the state decreases with each iteration of the step function  E for Euclid's Algorithm. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 29-May-2014.)
 |-  E  =  ( x  e.  NN0 ,  y  e. 
 NN0  |->  if ( y  =  0 ,  <. x ,  y >. ,  <. y ,  ( x  mod  y
 ) >. ) )   =>    |-  ( X  e.  ( NN0  X.  NN0 )  ->  ( ( 2nd `  ( E `  X ) )  =/=  0  ->  ( 2nd `  ( E `  X ) )  < 
 ( 2nd `  X )
 ) )
 
Theoremeucalgcvga 12075* Once Euclid's Algorithm halts after 
N steps, the second element of the state remains 0 . (Contributed by Paul Chapman, 22-Jun-2011.) (Revised by Mario Carneiro, 29-May-2014.)
 |-  E  =  ( x  e.  NN0 ,  y  e. 
 NN0  |->  if ( y  =  0 ,  <. x ,  y >. ,  <. y ,  ( x  mod  y
 ) >. ) )   &    |-  R  =  seq 0 ( ( E  o.  1st ) ,  ( NN0  X.  { A } ) )   &    |-  N  =  ( 2nd `  A )   =>    |-  ( A  e.  ( NN0  X.  NN0 )  ->  ( K  e.  ( ZZ>= `  N )  ->  ( 2nd `  ( R `  K ) )  =  0
 ) )
 
Theoremeucalg 12076* Euclid's Algorithm computes the greatest common divisor of two nonnegative integers by repeatedly replacing the larger of them with its remainder modulo the smaller until the remainder is 0. Theorem 1.15 in [ApostolNT] p. 20.

Upon halting, the 1st member of the final state  ( R `  N ) is equal to the gcd of the values comprising the input state  <. M ,  N >.. This is Metamath 100 proof #69 (greatest common divisor algorithm). (Contributed by Paul Chapman, 31-Mar-2011.) (Proof shortened by Mario Carneiro, 29-May-2014.)

 |-  E  =  ( x  e.  NN0 ,  y  e. 
 NN0  |->  if ( y  =  0 ,  <. x ,  y >. ,  <. y ,  ( x  mod  y
 ) >. ) )   &    |-  R  =  seq 0 ( ( E  o.  1st ) ,  ( NN0  X.  { A } ) )   &    |-  A  =  <. M ,  N >.   =>    |-  ( ( M  e.  NN0  /\  N  e.  NN0 )  ->  ( 1st `  ( R `  N ) )  =  ( M  gcd  N ) )
 
5.1.9  The least common multiple

According to Wikipedia ("Least common multiple", 27-Aug-2020, https://en.wikipedia.org/wiki/Least_common_multiple): "In arithmetic and number theory, the least common multiple, lowest common multiple, or smallest common multiple of two integers a and b, usually denoted by lcm(a, b), is the smallest positive integer that is divisible by both a and b. Since division of integers by zero is undefined, this definition has meaning only if a and b are both different from zero. However, some authors define lcm(a,0) as 0 for all a, which is the result of taking the lcm to be the least upper bound in the lattice of divisibility."

In this section, an operation calculating the least common multiple of two integers (df-lcm 12078). The definition is valid for all integers, including negative integers and 0, obeying the above mentioned convention.

 
Syntaxclcm 12077 Extend the definition of a class to include the least common multiple operator.
 class lcm
 
Definitiondf-lcm 12078* Define the lcm operator. For example,  ( 6 lcm  9 )  =  1 8. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Revised by AV, 16-Sep-2020.)
 |- lcm 
 =  ( x  e. 
 ZZ ,  y  e. 
 ZZ  |->  if ( ( x  =  0  \/  y  =  0 ) ,  0 , inf ( { n  e.  NN  |  ( x  ||  n  /\  y  ||  n ) } ,  RR ,  <  )
 ) )
 
Theoremlcmmndc 12079 Decidablity lemma used in various proofs related to lcm. (Contributed by Jim Kingdon, 21-Jan-2022.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  -> DECID 
 ( M  =  0  \/  N  =  0 ) )
 
Theoremlcmval 12080* Value of the lcm operator.  ( M lcm  N ) is the least common multiple of  M and  N. If either  M or  N is  0, the result is defined conventionally as  0. Contrast with df-gcd 11961 and gcdval 11977. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Revised by AV, 16-Sep-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M lcm  N )  =  if (
 ( M  =  0  \/  N  =  0 ) ,  0 , inf ( { n  e. 
 NN  |  ( M 
 ||  n  /\  N  ||  n ) } ,  RR ,  <  ) ) )
 
Theoremlcmcom 12081 The lcm operator is commutative. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M lcm  N )  =  ( N lcm  M ) )
 
Theoremlcm0val 12082 The value, by convention, of the lcm operator when either operand is 0. (Use lcmcom 12081 for a left-hand 0.) (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.)
 |-  ( M  e.  ZZ  ->  ( M lcm  0 )  =  0 )
 
Theoremlcmn0val 12083* The value of the lcm operator when both operands are nonzero. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Revised by AV, 16-Sep-2020.)
 |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 ) )  ->  ( M lcm  N )  = inf ( { n  e.  NN  |  ( M  ||  n  /\  N  ||  n ) } ,  RR ,  <  )
 )
 
Theoremlcmcllem 12084* Lemma for lcmn0cl 12085 and dvdslcm 12086. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.)
 |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 ) )  ->  ( M lcm  N )  e.  { n  e.  NN  |  ( M 
 ||  n  /\  N  ||  n ) } )
 
Theoremlcmn0cl 12085 Closure of the lcm operator. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( ( M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 ) )  ->  ( M lcm  N )  e.  NN )
 
Theoremdvdslcm 12086 The lcm of two integers is divisible by each of them. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  ||  ( M lcm  N )  /\  N  ||  ( M lcm  N ) ) )
 
Theoremlcmledvds 12087 A positive integer which both operands of the lcm operator divide bounds it. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.)
 |-  ( ( ( K  e.  NN  /\  M  e.  ZZ  /\  N  e.  ZZ )  /\  -.  ( M  =  0  \/  N  =  0 )
 )  ->  ( ( M  ||  K  /\  N  ||  K )  ->  ( M lcm  N )  <_  K ) )
 
Theoremlcmeq0 12088 The lcm of two integers is zero iff either is zero. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M lcm 
 N )  =  0  <-> 
 ( M  =  0  \/  N  =  0 ) ) )
 
Theoremlcmcl 12089 Closure of the lcm operator. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M lcm  N )  e.  NN0 )
 
Theoremgcddvdslcm 12090 The greatest common divisor of two numbers divides their least common multiple. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M  gcd  N )  ||  ( M lcm  N ) )
 
Theoremlcmneg 12091 Negating one operand of the lcm operator does not alter the result. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( M lcm  -u N )  =  ( M lcm  N ) )
 
Theoremneglcm 12092 Negating one operand of the lcm operator does not alter the result. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u M lcm  N )  =  ( M lcm 
 N ) )
 
Theoremlcmabs 12093 The lcm of two integers is the same as that of their absolute values. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( abs `  M ) lcm  ( abs `  N ) )  =  ( M lcm  N ) )
 
Theoremlcmgcdlem 12094 Lemma for lcmgcd 12095 and lcmdvds 12096. Prove them for positive  M,  N, and  K. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.)
 |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( ( ( M lcm  N )  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  N ) )  /\  ( ( K  e.  NN  /\  ( M  ||  K  /\  N  ||  K ) )  ->  ( M lcm 
 N )  ||  K ) ) )
 
Theoremlcmgcd 12095 The product of two numbers' least common multiple and greatest common divisor is the absolute value of the product of the two numbers. In particular, that absolute value is the least common multiple of two coprime numbers, for which  ( M  gcd  N
)  =  1.

Multiple methods exist for proving this, and it is often proven either as a consequence of the fundamental theorem of arithmetic or of Bézout's identity bezout 12029; see, e.g., https://proofwiki.org/wiki/Product_of_GCD_and_LCM 12029 and https://math.stackexchange.com/a/470827 12029. This proof uses the latter to first confirm it for positive integers  M and 
N (the "Second Proof" in the above Stack Exchange page), then shows that implies it for all nonzero integer inputs, then finally uses lcm0val 12082 to show it applies when either or both inputs are zero. (Contributed by Steve Rodriguez, 20-Jan-2020.)

 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M lcm 
 N )  x.  ( M  gcd  N ) )  =  ( abs `  ( M  x.  N ) ) )
 
Theoremlcmdvds 12096 The lcm of two integers divides any integer the two divide. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( K  e.  ZZ  /\  M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M  ||  K  /\  N  ||  K )  ->  ( M lcm  N )  ||  K ) )
 
Theoremlcmid 12097 The lcm of an integer and itself is its absolute value. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( M  e.  ZZ  ->  ( M lcm  M )  =  ( abs `  M ) )
 
Theoremlcm1 12098 The lcm of an integer and 1 is the absolute value of the integer. (Contributed by AV, 23-Aug-2020.)
 |-  ( M  e.  ZZ  ->  ( M lcm  1 )  =  ( abs `  M ) )
 
Theoremlcmgcdnn 12099 The product of two positive integers' least common multiple and greatest common divisor is the product of the two integers. (Contributed by AV, 27-Aug-2020.)
 |-  ( ( M  e.  NN  /\  N  e.  NN )  ->  ( ( M lcm 
 N )  x.  ( M  gcd  N ) )  =  ( M  x.  N ) )
 
Theoremlcmgcdeq 12100 Two integers' absolute values are equal iff their least common multiple and greatest common divisor are equal. (Contributed by Steve Rodriguez, 20-Jan-2020.)
 |-  ( ( M  e.  ZZ  /\  N  e.  ZZ )  ->  ( ( M lcm 
 N )  =  ( M  gcd  N )  <-> 
 ( abs `  M )  =  ( abs `  N ) ) )
    < Previous  Next >

Page List
Jump to page: Contents  1 1-100 2 101-200 3 201-300 4 301-400 5 401-500 6 501-600 7 601-700 8 701-800 9 801-900 10 901-1000 11 1001-1100 12 1101-1200 13 1201-1300 14 1301-1400 15 1401-1500 16 1501-1600 17 1601-1700 18 1701-1800 19 1801-1900 20 1901-2000 21 2001-2100 22 2101-2200 23 2201-2300 24 2301-2400 25 2401-2500 26 2501-2600 27 2601-2700 28 2701-2800 29 2801-2900 30 2901-3000 31 3001-3100 32 3101-3200 33 3201-3300 34 3301-3400 35 3401-3500 36 3501-3600 37 3601-3700 38 3701-3800 39 3801-3900 40 3901-4000 41 4001-4100 42 4101-4200 43 4201-4300 44 4301-4400 45 4401-4500 46 4501-4600 47 4601-4700 48 4701-4800 49 4801-4900 50 4901-5000 51 5001-5100 52 5101-5200 53 5201-5300 54 5301-5400 55 5401-5500 56 5501-5600 57 5601-5700 58 5701-5800 59 5801-5900 60 5901-6000 61 6001-6100 62 6101-6200 63 6201-6300 64 6301-6400 65 6401-6500 66 6501-6600 67 6601-6700 68 6701-6800 69 6801-6900 70 6901-7000 71 7001-7100 72 7101-7200 73 7201-7300 74 7301-7400 75 7401-7500 76 7501-7600 77 7601-7700 78 7701-7800 79 7801-7900 80 7901-8000 81 8001-8100 82 8101-8200 83 8201-8300 84 8301-8400 85 8401-8500 86 8501-8600 87 8601-8700 88 8701-8800 89 8801-8900 90 8901-9000 91 9001-9100 92 9101-9200 93 9201-9300 94 9301-9400 95 9401-9500 96 9501-9600 97 9601-9700 98 9701-9800 99 9801-9900 100 9901-10000 101 10001-10100 102 10101-10200 103 10201-10300 104 10301-10400 105 10401-10500 106 10501-10600 107 10601-10700 108 10701-10800 109 10801-10900 110 10901-11000 111 11001-11100 112 11101-11200 113 11201-11300 114 11301-11400 115 11401-11500 116 11501-11600 117 11601-11700 118 11701-11800 119 11801-11900 120 11901-12000 121 12001-12100 122 12101-12200 123 12201-12300 124 12301-12400 125 12401-12500 126 12501-12600 127 12601-12700 128 12701-12800 129 12801-12900 130 12901-13000 131 13001-13100 132 13101-13200 133 13201-13300 134 13301-13400 135 13401-13500 136 13501-13600 137 13601-13700 138 13701-13800 139 13801-13900 140 13901-14000 141 14001-14100 142 14101-14200 143 14201-14300 144 14301-14400 145 14401-14500 146 14501-14600 147 14601-14700 148 14701-14800 149 14801-14900 150 14901-15000 151 15001-15100 152 15101-15200 153 15201-15216
  Copyright terms: Public domain < Previous  Next >