Home | Intuitionistic Logic Explorer Theorem List (p. 121 of 144) | < Previous Next > |
Bad symbols? Try the
GIF version. |
||
Mirrors > Metamath Home Page > ILE Home Page > Theorem List Contents > Recent Proofs This page: Page List |
Type | Label | Description |
---|---|---|
Statement | ||
Theorem | nnmindc 12001* | An inhabited decidable subset of the natural numbers has a minimum. (Contributed by Jim Kingdon, 23-Sep-2024.) |
β’ ((π΄ β β β§ βπ₯ β β DECID π₯ β π΄ β§ βπ¦ π¦ β π΄) β inf(π΄, β, < ) β π΄) | ||
Theorem | nnminle 12002* | 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 12001. (Contributed by Jim Kingdon, 26-Sep-2024.) |
β’ ((π΄ β β β§ βπ₯ β β DECID π₯ β π΄ β§ π΅ β π΄) β inf(π΄, β, < ) β€ π΅) | ||
Theorem | nnwodc 12003* | 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.) |
β’ ((π΄ β β β§ βπ€ π€ β π΄ β§ βπ β β DECID π β π΄) β βπ₯ β π΄ βπ¦ β π΄ π₯ β€ π¦) | ||
Theorem | uzwodc 12004* | 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.) |
β’ ((π β (β€β₯βπ) β§ βπ₯ π₯ β π β§ βπ₯ β (β€β₯βπ)DECID π₯ β π) β βπ β π βπ β π π β€ π) | ||
Theorem | nnwofdc 12005* | Well-ordering principle: any inhabited decidable set of positive integers has a least element. This version allows π₯ and π¦ to be present in π΄ as long as they are effectively not free. (Contributed by NM, 17-Aug-2001.) (Revised by Mario Carneiro, 15-Oct-2016.) |
β’ β²π₯π΄ & β’ β²π¦π΄ β β’ ((π΄ β β β§ βπ§ π§ β π΄ β§ βπ β β DECID π β π΄) β βπ₯ β π΄ βπ¦ β π΄ π₯ β€ π¦) | ||
Theorem | nnwosdc 12006* | 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.) |
β’ (π₯ = π¦ β (π β π)) β β’ ((βπ₯ β β π β§ βπ₯ β β DECID π) β βπ₯ β β (π β§ βπ¦ β β (π β π₯ β€ π¦))) | ||
Theorem | nn0seqcvgd 12007* | A strictly-decreasing nonnegative integer sequence with initial term π reaches zero by the π th term. Deduction version. (Contributed by Paul Chapman, 31-Mar-2011.) |
β’ (π β πΉ:β0βΆβ0) & β’ (π β π = (πΉβ0)) & β’ ((π β§ π β β0) β ((πΉβ(π + 1)) β 0 β (πΉβ(π + 1)) < (πΉβπ))) β β’ (π β (πΉβπ) = 0) | ||
Theorem | ialgrlem1st 12008 | Lemma for ialgr0 12010. Expressing algrflemg 6221 in a form suitable for theorems such as seq3-1 10428 or seqf 10429. (Contributed by Jim Kingdon, 22-Jul-2021.) |
β’ (π β πΉ:πβΆπ) β β’ ((π β§ (π₯ β π β§ π¦ β π)) β (π₯(πΉ β 1st )π¦) β π) | ||
Theorem | ialgrlemconst 12009 | Lemma for ialgr0 12010. Closure of a constant function, in a form suitable for theorems such as seq3-1 10428 or seqf 10429. (Contributed by Jim Kingdon, 22-Jul-2021.) |
β’ π = (β€β₯βπ) & β’ (π β π΄ β π) β β’ ((π β§ π₯ β (β€β₯βπ)) β ((π Γ {π΄})βπ₯) β π) | ||
Theorem | ialgr0 12010 | The value of the algorithm iterator π at 0 is the initial state π΄. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Jim Kingdon, 12-Mar-2023.) |
β’ π = (β€β₯βπ) & β’ π = seqπ((πΉ β 1st ), (π Γ {π΄})) & β’ (π β π β β€) & β’ (π β π΄ β π) & β’ (π β πΉ:πβΆπ) β β’ (π β (π βπ) = π΄) | ||
Theorem | algrf 12011 |
An algorithm is a step function πΉ:πβΆπ on a state space π.
An algorithm acts on an initial state π΄ β π by iteratively applying
πΉ to give π΄, (πΉβπ΄), (πΉβ(πΉβπ΄)) and so
on. An algorithm is said to halt if a fixed point of πΉ is
reached
after a finite number of iterations.
The algorithm iterator π :β0βΆπ "runs" the algorithm πΉ so that (π βπ) is the state after π iterations of πΉ on the initial state π΄. Domain and codomain of the algorithm iterator π . (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.) |
β’ π = (β€β₯βπ) & β’ π = seqπ((πΉ β 1st ), (π Γ {π΄})) & β’ (π β π β β€) & β’ (π β π΄ β π) & β’ (π β πΉ:πβΆπ) β β’ (π β π :πβΆπ) | ||
Theorem | algrp1 12012 | The value of the algorithm iterator π at (πΎ + 1). (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Jim Kingdon, 12-Mar-2023.) |
β’ π = (β€β₯βπ) & β’ π = seqπ((πΉ β 1st ), (π Γ {π΄})) & β’ (π β π β β€) & β’ (π β π΄ β π) & β’ (π β πΉ:πβΆπ) β β’ ((π β§ πΎ β π) β (π β(πΎ + 1)) = (πΉβ(π βπΎ))) | ||
Theorem | alginv 12013* | If πΌ is an invariant of πΉ, then its value is unchanged after any number of iterations of πΉ. (Contributed by Paul Chapman, 31-Mar-2011.) |
β’ π = seq0((πΉ β 1st ), (β0 Γ {π΄})) & β’ πΉ:πβΆπ & β’ (π₯ β π β (πΌβ(πΉβπ₯)) = (πΌβπ₯)) β β’ ((π΄ β π β§ πΎ β β0) β (πΌβ(π βπΎ)) = (πΌβ(π β0))) | ||
Theorem | algcvg 12014* |
One way to prove that an algorithm halts is to construct a countdown
function πΆ:πβΆβ0 whose
value is guaranteed to decrease for
each iteration of πΉ until it reaches 0. That is, if π β π
is not a fixed point of πΉ, then
(πΆβ(πΉβπ)) < (πΆβπ).
If πΆ is a countdown function for algorithm πΉ, the sequence (πΆβ(π βπ)) reaches 0 after at most π steps, where π is the value of πΆ for the initial state π΄. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ πΉ:πβΆπ & β’ π = seq0((πΉ β 1st ), (β0 Γ {π΄})) & β’ πΆ:πβΆβ0 & β’ (π§ β π β ((πΆβ(πΉβπ§)) β 0 β (πΆβ(πΉβπ§)) < (πΆβπ§))) & β’ π = (πΆβπ΄) β β’ (π΄ β π β (πΆβ(π βπ)) = 0) | ||
Theorem | algcvgblem 12015 | Lemma for algcvgb 12016. (Contributed by Paul Chapman, 31-Mar-2011.) |
β’ ((π β β0 β§ π β β0) β ((π β 0 β π < π) β ((π β 0 β π < π) β§ (π = 0 β π = 0)))) | ||
Theorem | algcvgb 12016 | Two ways of expressing that πΆ is a countdown function for algorithm πΉ. 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.) |
β’ πΉ:πβΆπ & β’ πΆ:πβΆβ0 β β’ (π β π β (((πΆβ(πΉβπ)) β 0 β (πΆβ(πΉβπ)) < (πΆβπ)) β (((πΆβπ) β 0 β (πΆβ(πΉβπ)) < (πΆβπ)) β§ ((πΆβπ) = 0 β (πΆβ(πΉβπ)) = 0)))) | ||
Theorem | algcvga 12017* | The countdown function πΆ remains 0 after π steps. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ πΉ:πβΆπ & β’ π = seq0((πΉ β 1st ), (β0 Γ {π΄})) & β’ πΆ:πβΆβ0 & β’ (π§ β π β ((πΆβ(πΉβπ§)) β 0 β (πΆβ(πΉβπ§)) < (πΆβπ§))) & β’ π = (πΆβπ΄) β β’ (π΄ β π β (πΎ β (β€β₯βπ) β (πΆβ(π βπΎ)) = 0)) | ||
Theorem | algfx 12018* | If πΉ reaches a fixed point when the countdown function πΆ reaches 0, πΉ remains fixed after π steps. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ πΉ:πβΆπ & β’ π = seq0((πΉ β 1st ), (β0 Γ {π΄})) & β’ πΆ:πβΆβ0 & β’ (π§ β π β ((πΆβ(πΉβπ§)) β 0 β (πΆβ(πΉβπ§)) < (πΆβπ§))) & β’ π = (πΆβπ΄) & β’ (π§ β π β ((πΆβπ§) = 0 β (πΉβπ§) = π§)) β β’ (π΄ β π β (πΎ β (β€β₯βπ) β (π βπΎ) = (π βπ))) | ||
Theorem | eucalgval2 12019* | The value of the step function πΈ for Euclid's Algorithm on an ordered pair. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.) |
β’ πΈ = (π₯ β β0, π¦ β β0 β¦ if(π¦ = 0, β¨π₯, π¦β©, β¨π¦, (π₯ mod π¦)β©)) β β’ ((π β β0 β§ π β β0) β (ππΈπ) = if(π = 0, β¨π, πβ©, β¨π, (π mod π)β©)) | ||
Theorem | eucalgval 12020* |
Euclid's Algorithm eucalg 12025 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 πΈ for Euclid's Algorithm. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.) |
β’ πΈ = (π₯ β β0, π¦ β β0 β¦ if(π¦ = 0, β¨π₯, π¦β©, β¨π¦, (π₯ mod π¦)β©)) β β’ (π β (β0 Γ β0) β (πΈβπ) = if((2nd βπ) = 0, π, β¨(2nd βπ), ( mod βπ)β©)) | ||
Theorem | eucalgf 12021* | Domain and codomain of the step function πΈ for Euclid's Algorithm. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 28-May-2014.) |
β’ πΈ = (π₯ β β0, π¦ β β0 β¦ if(π¦ = 0, β¨π₯, π¦β©, β¨π¦, (π₯ mod π¦)β©)) β β’ πΈ:(β0 Γ β0)βΆ(β0 Γ β0) | ||
Theorem | eucalginv 12022* | The invariant of the step function πΈ 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.) |
β’ πΈ = (π₯ β β0, π¦ β β0 β¦ if(π¦ = 0, β¨π₯, π¦β©, β¨π¦, (π₯ mod π¦)β©)) β β’ (π β (β0 Γ β0) β ( gcd β(πΈβπ)) = ( gcd βπ)) | ||
Theorem | eucalglt 12023* | The second member of the state decreases with each iteration of the step function πΈ for Euclid's Algorithm. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 29-May-2014.) |
β’ πΈ = (π₯ β β0, π¦ β β0 β¦ if(π¦ = 0, β¨π₯, π¦β©, β¨π¦, (π₯ mod π¦)β©)) β β’ (π β (β0 Γ β0) β ((2nd β(πΈβπ)) β 0 β (2nd β(πΈβπ)) < (2nd βπ))) | ||
Theorem | eucalgcvga 12024* | Once Euclid's Algorithm halts after π steps, the second element of the state remains 0 . (Contributed by Paul Chapman, 22-Jun-2011.) (Revised by Mario Carneiro, 29-May-2014.) |
β’ πΈ = (π₯ β β0, π¦ β β0 β¦ if(π¦ = 0, β¨π₯, π¦β©, β¨π¦, (π₯ mod π¦)β©)) & β’ π = seq0((πΈ β 1st ), (β0 Γ {π΄})) & β’ π = (2nd βπ΄) β β’ (π΄ β (β0 Γ β0) β (πΎ β (β€β₯βπ) β (2nd β(π βπΎ)) = 0)) | ||
Theorem | eucalg 12025* |
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 (π βπ) is equal to the gcd of the values comprising the input state β¨π, πβ©. 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.) |
β’ πΈ = (π₯ β β0, π¦ β β0 β¦ if(π¦ = 0, β¨π₯, π¦β©, β¨π¦, (π₯ mod π¦)β©)) & β’ π = seq0((πΈ β 1st ), (β0 Γ {π΄})) & β’ π΄ = β¨π, πβ© β β’ ((π β β0 β§ π β β0) β (1st β(π βπ)) = (π gcd π)) | ||
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 12027). The definition is valid for all integers, including negative integers and 0, obeying the above mentioned convention. | ||
Syntax | clcm 12026 | Extend the definition of a class to include the least common multiple operator. |
class lcm | ||
Definition | df-lcm 12027* | Define the lcm operator. For example, (6 lcm 9) = 18. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Revised by AV, 16-Sep-2020.) |
β’ lcm = (π₯ β β€, π¦ β β€ β¦ if((π₯ = 0 β¨ π¦ = 0), 0, inf({π β β β£ (π₯ β₯ π β§ π¦ β₯ π)}, β, < ))) | ||
Theorem | lcmmndc 12028 | Decidablity lemma used in various proofs related to lcm. (Contributed by Jim Kingdon, 21-Jan-2022.) |
β’ ((π β β€ β§ π β β€) β DECID (π = 0 β¨ π = 0)) | ||
Theorem | lcmval 12029* | Value of the lcm operator. (π lcm π) is the least common multiple of π and π. If either π or π is 0, the result is defined conventionally as 0. Contrast with df-gcd 11910 and gcdval 11926. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Revised by AV, 16-Sep-2020.) |
β’ ((π β β€ β§ π β β€) β (π lcm π) = if((π = 0 β¨ π = 0), 0, inf({π β β β£ (π β₯ π β§ π β₯ π)}, β, < ))) | ||
Theorem | lcmcom 12030 | The lcm operator is commutative. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.) |
β’ ((π β β€ β§ π β β€) β (π lcm π) = (π lcm π)) | ||
Theorem | lcm0val 12031 | The value, by convention, of the lcm operator when either operand is 0. (Use lcmcom 12030 for a left-hand 0.) (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.) |
β’ (π β β€ β (π lcm 0) = 0) | ||
Theorem | lcmn0val 12032* | The value of the lcm operator when both operands are nonzero. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Revised by AV, 16-Sep-2020.) |
β’ (((π β β€ β§ π β β€) β§ Β¬ (π = 0 β¨ π = 0)) β (π lcm π) = inf({π β β β£ (π β₯ π β§ π β₯ π)}, β, < )) | ||
Theorem | lcmcllem 12033* | Lemma for lcmn0cl 12034 and dvdslcm 12035. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.) |
β’ (((π β β€ β§ π β β€) β§ Β¬ (π = 0 β¨ π = 0)) β (π lcm π) β {π β β β£ (π β₯ π β§ π β₯ π)}) | ||
Theorem | lcmn0cl 12034 | Closure of the lcm operator. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ (((π β β€ β§ π β β€) β§ Β¬ (π = 0 β¨ π = 0)) β (π lcm π) β β) | ||
Theorem | dvdslcm 12035 | The lcm of two integers is divisible by each of them. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β (π β₯ (π lcm π) β§ π β₯ (π lcm π))) | ||
Theorem | lcmledvds 12036 | 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.) |
β’ (((πΎ β β β§ π β β€ β§ π β β€) β§ Β¬ (π = 0 β¨ π = 0)) β ((π β₯ πΎ β§ π β₯ πΎ) β (π lcm π) β€ πΎ)) | ||
Theorem | lcmeq0 12037 | The lcm of two integers is zero iff either is zero. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β ((π lcm π) = 0 β (π = 0 β¨ π = 0))) | ||
Theorem | lcmcl 12038 | Closure of the lcm operator. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β (π lcm π) β β0) | ||
Theorem | gcddvdslcm 12039 | The greatest common divisor of two numbers divides their least common multiple. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β (π gcd π) β₯ (π lcm π)) | ||
Theorem | lcmneg 12040 | Negating one operand of the lcm operator does not alter the result. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β (π lcm -π) = (π lcm π)) | ||
Theorem | neglcm 12041 | Negating one operand of the lcm operator does not alter the result. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β (-π lcm π) = (π lcm π)) | ||
Theorem | lcmabs 12042 | The lcm of two integers is the same as that of their absolute values. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β ((absβπ) lcm (absβπ)) = (π lcm π)) | ||
Theorem | lcmgcdlem 12043 | Lemma for lcmgcd 12044 and lcmdvds 12045. Prove them for positive π, π, and πΎ. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.) |
β’ ((π β β β§ π β β) β (((π lcm π) Β· (π gcd π)) = (absβ(π Β· π)) β§ ((πΎ β β β§ (π β₯ πΎ β§ π β₯ πΎ)) β (π lcm π) β₯ πΎ))) | ||
Theorem | lcmgcd 12044 |
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 (π gcd π) = 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 11978; see, e.g., https://proofwiki.org/wiki/Product_of_GCD_and_LCM 11978 and https://math.stackexchange.com/a/470827 11978. This proof uses the latter to first confirm it for positive integers π and π (the "Second Proof" in the above Stack Exchange page), then shows that implies it for all nonzero integer inputs, then finally uses lcm0val 12031 to show it applies when either or both inputs are zero. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β ((π lcm π) Β· (π gcd π)) = (absβ(π Β· π))) | ||
Theorem | lcmdvds 12045 | The lcm of two integers divides any integer the two divide. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((πΎ β β€ β§ π β β€ β§ π β β€) β ((π β₯ πΎ β§ π β₯ πΎ) β (π lcm π) β₯ πΎ)) | ||
Theorem | lcmid 12046 | The lcm of an integer and itself is its absolute value. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ (π β β€ β (π lcm π) = (absβπ)) | ||
Theorem | lcm1 12047 | The lcm of an integer and 1 is the absolute value of the integer. (Contributed by AV, 23-Aug-2020.) |
β’ (π β β€ β (π lcm 1) = (absβπ)) | ||
Theorem | lcmgcdnn 12048 | 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.) |
β’ ((π β β β§ π β β) β ((π lcm π) Β· (π gcd π)) = (π Β· π)) | ||
Theorem | lcmgcdeq 12049 | Two integers' absolute values are equal iff their least common multiple and greatest common divisor are equal. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((π β β€ β§ π β β€) β ((π lcm π) = (π gcd π) β (absβπ) = (absβπ))) | ||
Theorem | lcmdvdsb 12050 | Biconditional form of lcmdvds 12045. (Contributed by Steve Rodriguez, 20-Jan-2020.) |
β’ ((πΎ β β€ β§ π β β€ β§ π β β€) β ((π β₯ πΎ β§ π β₯ πΎ) β (π lcm π) β₯ πΎ)) | ||
Theorem | lcmass 12051 | Associative law for lcm operator. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Proof shortened by AV, 16-Sep-2020.) |
β’ ((π β β€ β§ π β β€ β§ π β β€) β ((π lcm π) lcm π) = (π lcm (π lcm π))) | ||
Theorem | 3lcm2e6woprm 12052 | The least common multiple of three and two is six. This proof does not use the property of 2 and 3 being prime. (Contributed by Steve Rodriguez, 20-Jan-2020.) (Revised by AV, 27-Aug-2020.) |
β’ (3 lcm 2) = 6 | ||
Theorem | 6lcm4e12 12053 | The least common multiple of six and four is twelve. (Contributed by AV, 27-Aug-2020.) |
β’ (6 lcm 4) = ;12 | ||
According to Wikipedia "Coprime integers", see https://en.wikipedia.org/wiki/Coprime_integers (16-Aug-2020) "[...] two integers a and b are said to be relatively prime, mutually prime, or coprime [...] if the only positive integer (factor) that divides both of them is 1. Consequently, any prime number that divides one does not divide the other. This is equivalent to their greatest common divisor (gcd) being 1.". In the following, we use this equivalent characterization to say that π΄ β β€ and π΅ β β€ are coprime (or relatively prime) if (π΄ gcd π΅) = 1. The equivalence of the definitions is shown by coprmgcdb 12054. The negation, i.e. two integers are not coprime, can be expressed either by (π΄ gcd π΅) β 1, see ncoprmgcdne1b 12055, or equivalently by 1 < (π΄ gcd π΅), see ncoprmgcdgt1b 12056. A proof of Euclid's lemma based on coprimality is provided in coprmdvds 12058 (as opposed to Euclid's lemma for primes). | ||
Theorem | coprmgcdb 12054* | Two positive integers are coprime, i.e. the only positive integer that divides both of them is 1, iff their greatest common divisor is 1. (Contributed by AV, 9-Aug-2020.) |
β’ ((π΄ β β β§ π΅ β β) β (βπ β β ((π β₯ π΄ β§ π β₯ π΅) β π = 1) β (π΄ gcd π΅) = 1)) | ||
Theorem | ncoprmgcdne1b 12055* | Two positive integers are not coprime, i.e. there is an integer greater than 1 which divides both integers, iff their greatest common divisor is not 1. (Contributed by AV, 9-Aug-2020.) |
β’ ((π΄ β β β§ π΅ β β) β (βπ β (β€β₯β2)(π β₯ π΄ β§ π β₯ π΅) β (π΄ gcd π΅) β 1)) | ||
Theorem | ncoprmgcdgt1b 12056* | Two positive integers are not coprime, i.e. there is an integer greater than 1 which divides both integers, iff their greatest common divisor is greater than 1. (Contributed by AV, 9-Aug-2020.) |
β’ ((π΄ β β β§ π΅ β β) β (βπ β (β€β₯β2)(π β₯ π΄ β§ π β₯ π΅) β 1 < (π΄ gcd π΅))) | ||
Theorem | coprmdvds1 12057 | If two positive integers are coprime, i.e. their greatest common divisor is 1, the only positive integer that divides both of them is 1. (Contributed by AV, 4-Aug-2021.) |
β’ ((πΉ β β β§ πΊ β β β§ (πΉ gcd πΊ) = 1) β ((πΌ β β β§ πΌ β₯ πΉ β§ πΌ β₯ πΊ) β πΌ = 1)) | ||
Theorem | coprmdvds 12058 | Euclid's Lemma (see ProofWiki "Euclid's Lemma", 10-Jul-2021, https://proofwiki.org/wiki/Euclid's_Lemma): If an integer divides the product of two integers and is coprime to one of them, then it divides the other. See also theorem 1.5 in [ApostolNT] p. 16. (Contributed by Paul Chapman, 22-Jun-2011.) (Proof shortened by AV, 10-Jul-2021.) |
β’ ((πΎ β β€ β§ π β β€ β§ π β β€) β ((πΎ β₯ (π Β· π) β§ (πΎ gcd π) = 1) β πΎ β₯ π)) | ||
Theorem | coprmdvds2 12059 | If an integer is divisible by two coprime integers, then it is divisible by their product. (Contributed by Mario Carneiro, 24-Feb-2014.) |
β’ (((π β β€ β§ π β β€ β§ πΎ β β€) β§ (π gcd π) = 1) β ((π β₯ πΎ β§ π β₯ πΎ) β (π Β· π) β₯ πΎ)) | ||
Theorem | mulgcddvds 12060 | One half of rpmulgcd2 12061, which does not need the coprimality assumption. (Contributed by Mario Carneiro, 2-Jul-2015.) |
β’ ((πΎ β β€ β§ π β β€ β§ π β β€) β (πΎ gcd (π Β· π)) β₯ ((πΎ gcd π) Β· (πΎ gcd π))) | ||
Theorem | rpmulgcd2 12061 | If π is relatively prime to π, then the GCD of πΎ with π Β· π is the product of the GCDs with π and π respectively. (Contributed by Mario Carneiro, 2-Jul-2015.) |
β’ (((πΎ β β€ β§ π β β€ β§ π β β€) β§ (π gcd π) = 1) β (πΎ gcd (π Β· π)) = ((πΎ gcd π) Β· (πΎ gcd π))) | ||
Theorem | qredeq 12062 | Two equal reduced fractions have the same numerator and denominator. (Contributed by Jeff Hankins, 29-Sep-2013.) |
β’ (((π β β€ β§ π β β β§ (π gcd π) = 1) β§ (π β β€ β§ π β β β§ (π gcd π) = 1) β§ (π / π) = (π / π)) β (π = π β§ π = π)) | ||
Theorem | qredeu 12063* | Every rational number has a unique reduced form. (Contributed by Jeff Hankins, 29-Sep-2013.) |
β’ (π΄ β β β β!π₯ β (β€ Γ β)(((1st βπ₯) gcd (2nd βπ₯)) = 1 β§ π΄ = ((1st βπ₯) / (2nd βπ₯)))) | ||
Theorem | rpmul 12064 | If πΎ is relatively prime to π and to π, it is also relatively prime to their product. (Contributed by Mario Carneiro, 24-Feb-2014.) (Proof shortened by Mario Carneiro, 2-Jul-2015.) |
β’ ((πΎ β β€ β§ π β β€ β§ π β β€) β (((πΎ gcd π) = 1 β§ (πΎ gcd π) = 1) β (πΎ gcd (π Β· π)) = 1)) | ||
Theorem | rpdvds 12065 | If πΎ is relatively prime to π then it is also relatively prime to any divisor π of π. (Contributed by Mario Carneiro, 19-Jun-2015.) |
β’ (((πΎ β β€ β§ π β β€ β§ π β β€) β§ ((πΎ gcd π) = 1 β§ π β₯ π)) β (πΎ gcd π) = 1) | ||
Theorem | congr 12066* | Definition of congruence by integer multiple (see ProofWiki "Congruence (Number Theory)", 11-Jul-2021, https://proofwiki.org/wiki/Definition:Congruence_(Number_Theory)): An integer π΄ is congruent to an integer π΅ modulo π if their difference is a multiple of π. See also the definition in [ApostolNT] p. 104: "... π is congruent to π modulo π, and we write πβ‘π (mod π) if π divides the difference π β π", or Wikipedia "Modular arithmetic - Congruence", https://en.wikipedia.org/wiki/Modular_arithmetic#Congruence, 11-Jul-2021,: "Given an integer n > 1, called a modulus, two integers are said to be congruent modulo n, if n is a divisor of their difference (i.e., if there is an integer k such that a-b = kn)". (Contributed by AV, 11-Jul-2021.) |
β’ ((π΄ β β€ β§ π΅ β β€ β§ π β β) β ((π΄ mod π) = (π΅ mod π) β βπ β β€ (π Β· π) = (π΄ β π΅))) | ||
Theorem | divgcdcoprm0 12067 | Integers divided by gcd are coprime. (Contributed by AV, 12-Jul-2021.) |
β’ ((π΄ β β€ β§ π΅ β β€ β§ π΅ β 0) β ((π΄ / (π΄ gcd π΅)) gcd (π΅ / (π΄ gcd π΅))) = 1) | ||
Theorem | divgcdcoprmex 12068* | Integers divided by gcd are coprime (see ProofWiki "Integers Divided by GCD are Coprime", 11-Jul-2021, https://proofwiki.org/wiki/Integers_Divided_by_GCD_are_Coprime): Any pair of integers, not both zero, can be reduced to a pair of coprime ones by dividing them by their gcd. (Contributed by AV, 12-Jul-2021.) |
β’ ((π΄ β β€ β§ (π΅ β β€ β§ π΅ β 0) β§ π = (π΄ gcd π΅)) β βπ β β€ βπ β β€ (π΄ = (π Β· π) β§ π΅ = (π Β· π) β§ (π gcd π) = 1)) | ||
Theorem | cncongr1 12069 | One direction of the bicondition in cncongr 12071. Theorem 5.4 in [ApostolNT] p. 109. (Contributed by AV, 13-Jul-2021.) |
β’ (((π΄ β β€ β§ π΅ β β€ β§ πΆ β β€) β§ (π β β β§ π = (π / (πΆ gcd π)))) β (((π΄ Β· πΆ) mod π) = ((π΅ Β· πΆ) mod π) β (π΄ mod π) = (π΅ mod π))) | ||
Theorem | cncongr2 12070 | The other direction of the bicondition in cncongr 12071. (Contributed by AV, 11-Jul-2021.) |
β’ (((π΄ β β€ β§ π΅ β β€ β§ πΆ β β€) β§ (π β β β§ π = (π / (πΆ gcd π)))) β ((π΄ mod π) = (π΅ mod π) β ((π΄ Β· πΆ) mod π) = ((π΅ Β· πΆ) mod π))) | ||
Theorem | cncongr 12071 | Cancellability of Congruences (see ProofWiki "Cancellability of Congruences, https://proofwiki.org/wiki/Cancellability_of_Congruences, 10-Jul-2021): Two products with a common factor are congruent modulo a positive integer iff the other factors are congruent modulo the integer divided by the greates common divisor of the integer and the common factor. See also Theorem 5.4 "Cancellation law" in [ApostolNT] p. 109. (Contributed by AV, 13-Jul-2021.) |
β’ (((π΄ β β€ β§ π΅ β β€ β§ πΆ β β€) β§ (π β β β§ π = (π / (πΆ gcd π)))) β (((π΄ Β· πΆ) mod π) = ((π΅ Β· πΆ) mod π) β (π΄ mod π) = (π΅ mod π))) | ||
Theorem | cncongrcoprm 12072 | Corollary 1 of Cancellability of Congruences: Two products with a common factor are congruent modulo an integer being coprime to the common factor iff the other factors are congruent modulo the integer. (Contributed by AV, 13-Jul-2021.) |
β’ (((π΄ β β€ β§ π΅ β β€ β§ πΆ β β€) β§ (π β β β§ (πΆ gcd π) = 1)) β (((π΄ Β· πΆ) mod π) = ((π΅ Β· πΆ) mod π) β (π΄ mod π) = (π΅ mod π))) | ||
Remark: to represent odd prime numbers, i.e., all prime numbers except 2, the idiom π β (β β {2}) is used. It is a little bit shorter than (π β β β§ π β 2). Both representations can be converted into each other by eldifsn 3716. | ||
Syntax | cprime 12073 | Extend the definition of a class to include the set of prime numbers. |
class β | ||
Definition | df-prm 12074* | Define the set of prime numbers. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ β = {π β β β£ {π β β β£ π β₯ π} β 2o} | ||
Theorem | isprm 12075* | The predicate "is a prime number". A prime number is a positive integer with exactly two positive divisors. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ (π β β β (π β β β§ {π β β β£ π β₯ π} β 2o)) | ||
Theorem | prmnn 12076 | A prime number is a positive integer. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ (π β β β π β β) | ||
Theorem | prmz 12077 | A prime number is an integer. (Contributed by Paul Chapman, 22-Jun-2011.) (Proof shortened by Jonathan Yan, 16-Jul-2017.) |
β’ (π β β β π β β€) | ||
Theorem | prmssnn 12078 | The prime numbers are a subset of the positive integers. (Contributed by AV, 22-Jul-2020.) |
β’ β β β | ||
Theorem | prmex 12079 | The set of prime numbers exists. (Contributed by AV, 22-Jul-2020.) |
β’ β β V | ||
Theorem | 1nprm 12080 | 1 is not a prime number. (Contributed by Paul Chapman, 22-Jun-2011.) (Proof shortened by Fan Zheng, 3-Jul-2016.) |
β’ Β¬ 1 β β | ||
Theorem | 1idssfct 12081* | The positive divisors of a positive integer include 1 and itself. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ (π β β β {1, π} β {π β β β£ π β₯ π}) | ||
Theorem | isprm2lem 12082* | Lemma for isprm2 12083. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ ((π β β β§ π β 1) β ({π β β β£ π β₯ π} β 2o β {π β β β£ π β₯ π} = {1, π})) | ||
Theorem | isprm2 12083* | The predicate "is a prime number". A prime number is an integer greater than or equal to 2 whose only positive divisors are 1 and itself. Definition in [ApostolNT] p. 16. (Contributed by Paul Chapman, 26-Oct-2012.) |
β’ (π β β β (π β (β€β₯β2) β§ βπ§ β β (π§ β₯ π β (π§ = 1 β¨ π§ = π)))) | ||
Theorem | isprm3 12084* | The predicate "is a prime number". A prime number is an integer greater than or equal to 2 with no divisors strictly between 1 and itself. (Contributed by Paul Chapman, 26-Oct-2012.) |
β’ (π β β β (π β (β€β₯β2) β§ βπ§ β (2...(π β 1)) Β¬ π§ β₯ π)) | ||
Theorem | isprm4 12085* | The predicate "is a prime number". A prime number is an integer greater than or equal to 2 whose only divisor greater than or equal to 2 is itself. (Contributed by Paul Chapman, 26-Oct-2012.) |
β’ (π β β β (π β (β€β₯β2) β§ βπ§ β (β€β₯β2)(π§ β₯ π β π§ = π))) | ||
Theorem | prmind2 12086* | A variation on prmind 12087 assuming complete induction for primes. (Contributed by Mario Carneiro, 20-Jun-2015.) |
β’ (π₯ = 1 β (π β π)) & β’ (π₯ = π¦ β (π β π)) & β’ (π₯ = π§ β (π β π)) & β’ (π₯ = (π¦ Β· π§) β (π β π)) & β’ (π₯ = π΄ β (π β π)) & β’ π & β’ ((π₯ β β β§ βπ¦ β (1...(π₯ β 1))π) β π) & β’ ((π¦ β (β€β₯β2) β§ π§ β (β€β₯β2)) β ((π β§ π) β π)) β β’ (π΄ β β β π) | ||
Theorem | prmind 12087* | Perform induction over the multiplicative structure of β. If a property π(π₯) holds for the primes and 1 and is preserved under multiplication, then it holds for every positive integer. (Contributed by Mario Carneiro, 20-Jun-2015.) |
β’ (π₯ = 1 β (π β π)) & β’ (π₯ = π¦ β (π β π)) & β’ (π₯ = π§ β (π β π)) & β’ (π₯ = (π¦ Β· π§) β (π β π)) & β’ (π₯ = π΄ β (π β π)) & β’ π & β’ (π₯ β β β π) & β’ ((π¦ β (β€β₯β2) β§ π§ β (β€β₯β2)) β ((π β§ π) β π)) β β’ (π΄ β β β π) | ||
Theorem | dvdsprime 12088 | If π divides a prime, then π is either the prime or one. (Contributed by Scott Fenton, 8-Apr-2014.) |
β’ ((π β β β§ π β β) β (π β₯ π β (π = π β¨ π = 1))) | ||
Theorem | nprm 12089 | A product of two integers greater than one is composite. (Contributed by Mario Carneiro, 20-Jun-2015.) |
β’ ((π΄ β (β€β₯β2) β§ π΅ β (β€β₯β2)) β Β¬ (π΄ Β· π΅) β β) | ||
Theorem | nprmi 12090 | An inference for compositeness. (Contributed by Mario Carneiro, 18-Feb-2014.) (Revised by Mario Carneiro, 20-Jun-2015.) |
β’ π΄ β β & β’ π΅ β β & β’ 1 < π΄ & β’ 1 < π΅ & β’ (π΄ Β· π΅) = π β β’ Β¬ π β β | ||
Theorem | dvdsnprmd 12091 | If a number is divisible by an integer greater than 1 and less then the number, the number is not prime. (Contributed by AV, 24-Jul-2021.) |
β’ (π β 1 < π΄) & β’ (π β π΄ < π) & β’ (π β π΄ β₯ π) β β’ (π β Β¬ π β β) | ||
Theorem | prm2orodd 12092 | A prime number is either 2 or odd. (Contributed by AV, 19-Jun-2021.) |
β’ (π β β β (π = 2 β¨ Β¬ 2 β₯ π)) | ||
Theorem | 2prm 12093 | 2 is a prime number. (Contributed by Paul Chapman, 22-Jun-2011.) (Proof shortened by Fan Zheng, 16-Jun-2016.) |
β’ 2 β β | ||
Theorem | 3prm 12094 | 3 is a prime number. (Contributed by Paul Chapman, 22-Jun-2011.) |
β’ 3 β β | ||
Theorem | 4nprm 12095 | 4 is not a prime number. (Contributed by Paul Chapman, 22-Jun-2011.) (Proof shortened by Mario Carneiro, 18-Feb-2014.) |
β’ Β¬ 4 β β | ||
Theorem | prmdc 12096 | Primality is decidable. (Contributed by Jim Kingdon, 30-Sep-2024.) |
β’ (π β β β DECID π β β) | ||
Theorem | prmuz2 12097 | A prime number is an integer greater than or equal to 2. (Contributed by Paul Chapman, 17-Nov-2012.) |
β’ (π β β β π β (β€β₯β2)) | ||
Theorem | prmgt1 12098 | A prime number is an integer greater than 1. (Contributed by Alexander van der Vekens, 17-May-2018.) |
β’ (π β β β 1 < π) | ||
Theorem | prmm2nn0 12099 | Subtracting 2 from a prime number results in a nonnegative integer. (Contributed by Alexander van der Vekens, 30-Aug-2018.) |
β’ (π β β β (π β 2) β β0) | ||
Theorem | oddprmgt2 12100 | An odd prime is greater than 2. (Contributed by AV, 20-Aug-2021.) |
β’ (π β (β β {2}) β 2 < π) |
< Previous Next > |
Copyright terms: Public domain | < Previous Next > |