Theorem List for Intuitionistic Logic Explorer - 12101-12200 *Has distinct variable
group(s)
| Type | Label | Description |
| Statement |
| |
| Theorem | divalglemqt 12101 |
Lemma for divalg 12106. The 𝑄 = 𝑇 case involved in showing uniqueness.
(Contributed by Jim Kingdon, 5-Dec-2021.)
|
| ⊢ (𝜑 → 𝐷 ∈ ℤ) & ⊢ (𝜑 → 𝑅 ∈ ℤ) & ⊢ (𝜑 → 𝑆 ∈ ℤ) & ⊢ (𝜑 → 𝑄 ∈ ℤ) & ⊢ (𝜑 → 𝑇 ∈ ℤ) & ⊢ (𝜑 → 𝑄 = 𝑇)
& ⊢ (𝜑 → ((𝑄 · 𝐷) + 𝑅) = ((𝑇 · 𝐷) + 𝑆)) ⇒ ⊢ (𝜑 → 𝑅 = 𝑆) |
| |
| Theorem | divalglemnqt 12102 |
Lemma for divalg 12106. The 𝑄 < 𝑇 case involved in showing uniqueness.
(Contributed by Jim Kingdon, 4-Dec-2021.)
|
| ⊢ (𝜑 → 𝐷 ∈ ℕ) & ⊢ (𝜑 → 𝑅 ∈ ℤ) & ⊢ (𝜑 → 𝑆 ∈ ℤ) & ⊢ (𝜑 → 𝑄 ∈ ℤ) & ⊢ (𝜑 → 𝑇 ∈ ℤ) & ⊢ (𝜑 → 0 ≤ 𝑆)
& ⊢ (𝜑 → 𝑅 < 𝐷)
& ⊢ (𝜑 → ((𝑄 · 𝐷) + 𝑅) = ((𝑇 · 𝐷) + 𝑆)) ⇒ ⊢ (𝜑 → ¬ 𝑄 < 𝑇) |
| |
| Theorem | divalglemeunn 12103* |
Lemma for divalg 12106. Uniqueness for a positive denominator.
(Contributed by Jim Kingdon, 4-Dec-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
| |
| Theorem | divalglemex 12104* |
Lemma for divalg 12106. The quotient and remainder exist.
(Contributed by
Jim Kingdon, 30-Nov-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → ∃𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
| |
| Theorem | divalglemeuneg 12105* |
Lemma for divalg 12106. Uniqueness for a negative denominator.
(Contributed by Jim Kingdon, 4-Dec-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 < 0) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
| |
| Theorem | divalg 12106* |
The division algorithm (theorem). Dividing an integer 𝑁 by a
nonzero integer 𝐷 produces a (unique) quotient 𝑞 and a
unique
remainder 0 ≤ 𝑟 < (abs‘𝐷). Theorem 1.14 in [ApostolNT]
p. 19. (Contributed by Paul Chapman, 21-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
| |
| Theorem | divalgb 12107* |
Express the division algorithm as stated in divalg 12106 in terms of
∥. (Contributed by Paul Chapman,
31-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → (∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃!𝑟 ∈ ℕ0 (𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟)))) |
| |
| Theorem | divalg2 12108* |
The division algorithm (theorem) for a positive divisor. (Contributed
by Paul Chapman, 21-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ∃!𝑟 ∈ ℕ0
(𝑟 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑟))) |
| |
| Theorem | divalgmod 12109 |
The result of the mod operator satisfies the
requirements for the
remainder 𝑅 in the division algorithm for a
positive divisor
(compare divalg2 12108 and divalgb 12107). This demonstration theorem
justifies the use of mod to yield an explicit
remainder from this
point forward. (Contributed by Paul Chapman, 31-Mar-2011.) (Revised by
AV, 21-Aug-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → (𝑅 = (𝑁 mod 𝐷) ↔ (𝑅 ∈ ℕ0 ∧ (𝑅 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑅))))) |
| |
| Theorem | divalgmodcl 12110 |
The result of the mod operator satisfies the
requirements for the
remainder 𝑅 in the division algorithm for a
positive divisor. Variant
of divalgmod 12109. (Contributed by Stefan O'Rear,
17-Oct-2014.) (Proof
shortened by AV, 21-Aug-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ 𝑅 ∈ ℕ0) → (𝑅 = (𝑁 mod 𝐷) ↔ (𝑅 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑅)))) |
| |
| Theorem | modremain 12111* |
The result of the modulo operation is the remainder of the division
algorithm. (Contributed by AV, 19-Aug-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ (𝑅 ∈ ℕ0 ∧ 𝑅 < 𝐷)) → ((𝑁 mod 𝐷) = 𝑅 ↔ ∃𝑧 ∈ ℤ ((𝑧 · 𝐷) + 𝑅) = 𝑁)) |
| |
| Theorem | ndvdssub 12112 |
Corollary of the division algorithm. If an integer 𝐷 greater than
1 divides 𝑁, then it does not divide any of
𝑁 −
1,
𝑁
− 2... 𝑁 − (𝐷 − 1). (Contributed by Paul
Chapman,
31-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ (𝐾 ∈ ℕ ∧ 𝐾 < 𝐷)) → (𝐷 ∥ 𝑁 → ¬ 𝐷 ∥ (𝑁 − 𝐾))) |
| |
| Theorem | ndvdsadd 12113 |
Corollary of the division algorithm. If an integer 𝐷 greater than
1 divides 𝑁, then it does not divide any of
𝑁 +
1,
𝑁 +
2... 𝑁 + (𝐷 − 1). (Contributed by Paul
Chapman,
31-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ (𝐾 ∈ ℕ ∧ 𝐾 < 𝐷)) → (𝐷 ∥ 𝑁 → ¬ 𝐷 ∥ (𝑁 + 𝐾))) |
| |
| Theorem | ndvdsp1 12114 |
Special case of ndvdsadd 12113. If an integer 𝐷 greater than 1
divides 𝑁, it does not divide 𝑁 + 1.
(Contributed by Paul
Chapman, 31-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ 1 < 𝐷) → (𝐷 ∥ 𝑁 → ¬ 𝐷 ∥ (𝑁 + 1))) |
| |
| Theorem | ndvdsi 12115 |
A quick test for non-divisibility. (Contributed by Mario Carneiro,
18-Feb-2014.)
|
| ⊢ 𝐴 ∈ ℕ & ⊢ 𝑄 ∈
ℕ0
& ⊢ 𝑅 ∈ ℕ & ⊢ ((𝐴 · 𝑄) + 𝑅) = 𝐵
& ⊢ 𝑅 < 𝐴 ⇒ ⊢ ¬ 𝐴 ∥ 𝐵 |
| |
| Theorem | 5ndvds3 12116 |
5 does not divide 3. (Contributed by AV, 8-Sep-2025.)
|
| ⊢ ¬ 5 ∥ 3 |
| |
| Theorem | 5ndvds6 12117 |
5 does not divide 6. (Contributed by AV, 8-Sep-2025.)
|
| ⊢ ¬ 5 ∥ 6 |
| |
| Theorem | flodddiv4 12118 |
The floor of an odd integer divided by 4. (Contributed by AV,
17-Jun-2021.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 = ((2 · 𝑀) + 1)) → (⌊‘(𝑁 / 4)) = if(2 ∥ 𝑀, (𝑀 / 2), ((𝑀 − 1) / 2))) |
| |
| Theorem | fldivndvdslt 12119 |
The floor of an integer divided by a nonzero integer not dividing the
first integer is less than the integer divided by the positive integer.
(Contributed by AV, 4-Jul-2021.)
|
| ⊢ ((𝐾 ∈ ℤ ∧ (𝐿 ∈ ℤ ∧ 𝐿 ≠ 0) ∧ ¬ 𝐿 ∥ 𝐾) → (⌊‘(𝐾 / 𝐿)) < (𝐾 / 𝐿)) |
| |
| Theorem | flodddiv4lt 12120 |
The floor of an odd number divided by 4 is less than the odd number
divided by 4. (Contributed by AV, 4-Jul-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁) → (⌊‘(𝑁 / 4)) < (𝑁 / 4)) |
| |
| Theorem | flodddiv4t2lthalf 12121 |
The floor of an odd number divided by 4, multiplied by 2 is less than the
half of the odd number. (Contributed by AV, 4-Jul-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁) → ((⌊‘(𝑁 / 4)) · 2) < (𝑁 / 2)) |
| |
| 5.1.4 Bit sequences
|
| |
| Syntax | cbits 12122 |
Define the binary bits of an integer.
|
| class bits |
| |
| Definition | df-bits 12123* |
Define the binary bits of an integer. The expression
𝑀
∈ (bits‘𝑁) means that the 𝑀-th bit
of 𝑁 is 1 (and
its negation means the bit is 0). (Contributed by Mario Carneiro,
4-Sep-2016.)
|
| ⊢ bits = (𝑛 ∈ ℤ ↦ {𝑚 ∈ ℕ0 ∣ ¬ 2
∥ (⌊‘(𝑛
/ (2↑𝑚)))}) |
| |
| Theorem | bitsfval 12124* |
Expand the definition of the bits of an integer. (Contributed by Mario
Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → (bits‘𝑁) = {𝑚 ∈ ℕ0 ∣ ¬ 2
∥ (⌊‘(𝑁
/ (2↑𝑚)))}) |
| |
| Theorem | bitsval 12125 |
Expand the definition of the bits of an integer. (Contributed by Mario
Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑀 ∈ (bits‘𝑁) ↔ (𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0 ∧ ¬ 2
∥ (⌊‘(𝑁
/ (2↑𝑀))))) |
| |
| Theorem | bitsval2 12126 |
Expand the definition of the bits of an integer. (Contributed by Mario
Carneiro, 5-Sep-2016.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) → (𝑀 ∈ (bits‘𝑁) ↔ ¬ 2 ∥
(⌊‘(𝑁 /
(2↑𝑀))))) |
| |
| Theorem | bitsss 12127 |
The set of bits of an integer is a subset of ℕ0. (Contributed by
Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (bits‘𝑁) ⊆
ℕ0 |
| |
| Theorem | bitsf 12128 |
The bits function is a function from integers to
subsets of
nonnegative integers. (Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ bits:ℤ⟶𝒫
ℕ0 |
| |
| Theorem | bitsdc 12129 |
Whether a bit is set is decidable. (Contributed by Jim Kingdon,
31-Oct-2025.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) →
DECID 𝑀
∈ (bits‘𝑁)) |
| |
| Theorem | bits0 12130 |
Value of the zeroth bit. (Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → (0 ∈
(bits‘𝑁) ↔
¬ 2 ∥ 𝑁)) |
| |
| Theorem | bits0e 12131 |
The zeroth bit of an even number is zero. (Contributed by Mario Carneiro,
5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → ¬ 0 ∈
(bits‘(2 · 𝑁))) |
| |
| Theorem | bits0o 12132 |
The zeroth bit of an odd number is one. (Contributed by Mario Carneiro,
5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → 0 ∈
(bits‘((2 · 𝑁) + 1))) |
| |
| Theorem | bitsp1 12133 |
The 𝑀 +
1-th bit of 𝑁 is the 𝑀-th bit of ⌊(𝑁 /
2).
(Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) → ((𝑀 + 1) ∈ (bits‘𝑁) ↔ 𝑀 ∈ (bits‘(⌊‘(𝑁 / 2))))) |
| |
| Theorem | bitsp1e 12134 |
The 𝑀 +
1-th bit of 2𝑁 is the 𝑀-th bit of 𝑁.
(Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) → ((𝑀 + 1) ∈ (bits‘(2
· 𝑁)) ↔ 𝑀 ∈ (bits‘𝑁))) |
| |
| Theorem | bitsp1o 12135 |
The 𝑀 +
1-th bit of 2𝑁 + 1 is the 𝑀-th bit of 𝑁.
(Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) → ((𝑀 + 1) ∈ (bits‘((2
· 𝑁) + 1)) ↔
𝑀 ∈ (bits‘𝑁))) |
| |
| Theorem | bitsfzolem 12136* |
Lemma for bitsfzo 12137. (Contributed by Mario Carneiro,
5-Sep-2016.)
(Revised by AV, 1-Oct-2020.)
|
| ⊢ (𝜑 → 𝑁 ∈ ℕ0) & ⊢ (𝜑 → 𝑀 ∈ ℕ0) & ⊢ (𝜑 → (bits‘𝑁) ⊆ (0..^𝑀)) & ⊢ 𝑆 = inf({𝑛 ∈ ℕ0 ∣ 𝑁 < (2↑𝑛)}, ℝ, <
) ⇒ ⊢ (𝜑 → 𝑁 ∈ (0..^(2↑𝑀))) |
| |
| Theorem | bitsfzo 12137 |
The bits of a number are all at positions less than 𝑀 iff the number
is nonnegative and less than 2↑𝑀. (Contributed by Mario
Carneiro, 5-Sep-2016.) (Proof shortened by AV, 1-Oct-2020.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) → (𝑁 ∈ (0..^(2↑𝑀)) ↔ (bits‘𝑁) ⊆ (0..^𝑀))) |
| |
| Theorem | bitsmod 12138 |
Truncating the bit sequence after some 𝑀 is equivalent to reducing
the argument mod 2↑𝑀. (Contributed by Mario Carneiro,
6-Sep-2016.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) →
(bits‘(𝑁 mod
(2↑𝑀))) =
((bits‘𝑁) ∩
(0..^𝑀))) |
| |
| Theorem | bitsfi 12139 |
Every number is associated with a finite set of bits. (Contributed by
Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℕ0 →
(bits‘𝑁) ∈
Fin) |
| |
| Theorem | bitscmp 12140 |
The bit complement of 𝑁 is -𝑁 − 1. (Thus, by bitsfi 12139, all
negative numbers have cofinite bits
representations.) (Contributed
by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → (ℕ0
∖ (bits‘𝑁)) =
(bits‘(-𝑁 −
1))) |
| |
| Theorem | 0bits 12141 |
The bits of zero. (Contributed by Mario Carneiro, 6-Sep-2016.)
|
| ⊢ (bits‘0) = ∅ |
| |
| Theorem | m1bits 12142 |
The bits of negative one. (Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (bits‘-1) =
ℕ0 |
| |
| Theorem | bitsinv1lem 12143 |
Lemma for bitsinv1 12144. (Contributed by Mario Carneiro,
22-Sep-2016.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) → (𝑁 mod (2↑(𝑀 + 1))) = ((𝑁 mod (2↑𝑀)) + if(𝑀 ∈ (bits‘𝑁), (2↑𝑀), 0))) |
| |
| Theorem | bitsinv1 12144* |
There is an explicit inverse to the bits function for
nonnegative
integers (which can be extended to negative integers using bitscmp 12140),
part 1. (Contributed by Mario Carneiro, 7-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℕ0 →
Σ𝑛 ∈
(bits‘𝑁)(2↑𝑛) = 𝑁) |
| |
| 5.1.5 The greatest common divisor
operator
|
| |
| Syntax | cgcd 12145 |
Extend the definition of a class to include the greatest common divisor
operator.
|
| class gcd |
| |
| Definition | df-gcd 12146* |
Define the gcd operator. For example, (-6 gcd 9) = 3
(ex-gcd 15461). (Contributed by Paul Chapman,
21-Mar-2011.)
|
| ⊢ gcd = (𝑥 ∈ ℤ, 𝑦 ∈ ℤ ↦ if((𝑥 = 0 ∧ 𝑦 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑥 ∧ 𝑛 ∥ 𝑦)}, ℝ, < ))) |
| |
| Theorem | gcdmndc 12147 |
Decidablity lemma used in various proofs related to gcd.
(Contributed by Jim Kingdon, 12-Dec-2021.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) →
DECID (𝑀 =
0 ∧ 𝑁 =
0)) |
| |
| Theorem | dvdsbnd 12148* |
There is an upper bound to the divisors of a nonzero integer.
(Contributed by Jim Kingdon, 11-Dec-2021.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐴 ≠ 0) → ∃𝑛 ∈ ℕ ∀𝑚 ∈ (ℤ≥‘𝑛) ¬ 𝑚 ∥ 𝐴) |
| |
| Theorem | gcdsupex 12149* |
Existence of the supremum used in defining gcd.
(Contributed by
Jim Kingdon, 12-Dec-2021.)
|
| ⊢ (((𝑋 ∈ ℤ ∧ 𝑌 ∈ ℤ) ∧ ¬ (𝑋 = 0 ∧ 𝑌 = 0)) → ∃𝑥 ∈ ℤ (∀𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑋 ∧ 𝑛 ∥ 𝑌)} ¬ 𝑥 < 𝑦 ∧ ∀𝑦 ∈ ℝ (𝑦 < 𝑥 → ∃𝑧 ∈ {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑋 ∧ 𝑛 ∥ 𝑌)}𝑦 < 𝑧))) |
| |
| Theorem | gcdsupcl 12150* |
Closure of the supremum used in defining gcd. A lemma
for gcdval 12151
and gcdn0cl 12154. (Contributed by Jim Kingdon, 11-Dec-2021.)
|
| ⊢ (((𝑋 ∈ ℤ ∧ 𝑌 ∈ ℤ) ∧ ¬ (𝑋 = 0 ∧ 𝑌 = 0)) → sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑋 ∧ 𝑛 ∥ 𝑌)}, ℝ, < ) ∈
ℕ) |
| |
| Theorem | gcdval 12151* |
The value of the gcd operator. (𝑀 gcd 𝑁) is the greatest
common divisor of 𝑀 and 𝑁. If 𝑀 and
𝑁
are both 0,
the result is defined conventionally as 0.
(Contributed by Paul
Chapman, 21-Mar-2011.) (Revised by Mario Carneiro, 10-Nov-2013.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = if((𝑀 = 0 ∧ 𝑁 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < ))) |
| |
| Theorem | gcd0val 12152 |
The value, by convention, of the gcd operator when both
operands are
0. (Contributed by Paul Chapman, 21-Mar-2011.)
|
| ⊢ (0 gcd 0) = 0 |
| |
| Theorem | gcdn0val 12153* |
The value of the gcd operator when at least one operand
is nonzero.
(Contributed by Paul Chapman, 21-Mar-2011.)
|
| ⊢ (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (𝑀 gcd 𝑁) = sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑀 ∧ 𝑛 ∥ 𝑁)}, ℝ, < )) |
| |
| Theorem | gcdn0cl 12154 |
Closure of the gcd operator. (Contributed by Paul
Chapman,
21-Mar-2011.)
|
| ⊢ (((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → (𝑀 gcd 𝑁) ∈ ℕ) |
| |
| Theorem | gcddvds 12155 |
The gcd of two integers divides each of them. (Contributed by Paul
Chapman, 21-Mar-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) ∥ 𝑀 ∧ (𝑀 gcd 𝑁) ∥ 𝑁)) |
| |
| Theorem | dvdslegcd 12156 |
An integer which divides both operands of the gcd
operator is
bounded by it. (Contributed by Paul Chapman, 21-Mar-2011.)
|
| ⊢ (((𝐾 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬ (𝑀 = 0 ∧ 𝑁 = 0)) → ((𝐾 ∥ 𝑀 ∧ 𝐾 ∥ 𝑁) → 𝐾 ≤ (𝑀 gcd 𝑁))) |
| |
| Theorem | nndvdslegcd 12157 |
A positive integer which divides both positive operands of the gcd
operator is bounded by it. (Contributed by AV, 9-Aug-2020.)
|
| ⊢ ((𝐾 ∈ ℕ ∧ 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → ((𝐾 ∥ 𝑀 ∧ 𝐾 ∥ 𝑁) → 𝐾 ≤ (𝑀 gcd 𝑁))) |
| |
| Theorem | gcdcl 12158 |
Closure of the gcd operator. (Contributed by Paul
Chapman,
21-Mar-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) ∈
ℕ0) |
| |
| Theorem | gcdnncl 12159 |
Closure of the gcd operator. (Contributed by Thierry
Arnoux,
2-Feb-2020.)
|
| ⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 gcd 𝑁) ∈ ℕ) |
| |
| Theorem | gcdcld 12160 |
Closure of the gcd operator. (Contributed by Mario
Carneiro,
29-May-2016.)
|
| ⊢ (𝜑 → 𝑀 ∈ ℤ) & ⊢ (𝜑 → 𝑁 ∈ ℤ)
⇒ ⊢ (𝜑 → (𝑀 gcd 𝑁) ∈
ℕ0) |
| |
| Theorem | gcd2n0cl 12161 |
Closure of the gcd operator if the second operand is
not 0.
(Contributed by AV, 10-Jul-2021.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ 𝑁 ≠ 0) → (𝑀 gcd 𝑁) ∈ ℕ) |
| |
| Theorem | zeqzmulgcd 12162* |
An integer is the product of an integer and the gcd of it and another
integer. (Contributed by AV, 11-Jul-2021.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ∃𝑛 ∈ ℤ 𝐴 = (𝑛 · (𝐴 gcd 𝐵))) |
| |
| Theorem | divgcdz 12163 |
An integer divided by the gcd of it and a nonzero integer is an integer.
(Contributed by AV, 11-Jul-2021.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ ∧ 𝐵 ≠ 0) → (𝐴 / (𝐴 gcd 𝐵)) ∈ ℤ) |
| |
| Theorem | gcdf 12164 |
Domain and codomain of the gcd operator. (Contributed
by Paul
Chapman, 31-Mar-2011.) (Revised by Mario Carneiro, 16-Nov-2013.)
|
| ⊢ gcd :(ℤ ×
ℤ)⟶ℕ0 |
| |
| Theorem | gcdcom 12165 |
The gcd operator is commutative. Theorem 1.4(a) in [ApostolNT]
p. 16. (Contributed by Paul Chapman, 21-Mar-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = (𝑁 gcd 𝑀)) |
| |
| Theorem | gcdcomd 12166 |
The gcd operator is commutative, deduction version.
(Contributed by
SN, 24-Aug-2024.)
|
| ⊢ (𝜑 → 𝑀 ∈ ℤ) & ⊢ (𝜑 → 𝑁 ∈ ℤ)
⇒ ⊢ (𝜑 → (𝑀 gcd 𝑁) = (𝑁 gcd 𝑀)) |
| |
| Theorem | divgcdnn 12167 |
A positive integer divided by the gcd of it and another integer is a
positive integer. (Contributed by AV, 10-Jul-2021.)
|
| ⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℤ) → (𝐴 / (𝐴 gcd 𝐵)) ∈ ℕ) |
| |
| Theorem | divgcdnnr 12168 |
A positive integer divided by the gcd of it and another integer is a
positive integer. (Contributed by AV, 10-Jul-2021.)
|
| ⊢ ((𝐴 ∈ ℕ ∧ 𝐵 ∈ ℤ) → (𝐴 / (𝐵 gcd 𝐴)) ∈ ℕ) |
| |
| Theorem | gcdeq0 12169 |
The gcd of two integers is zero iff they are both zero. (Contributed by
Paul Chapman, 21-Mar-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑀 gcd 𝑁) = 0 ↔ (𝑀 = 0 ∧ 𝑁 = 0))) |
| |
| Theorem | gcdn0gt0 12170 |
The gcd of two integers is positive (nonzero) iff they are not both zero.
(Contributed by Paul Chapman, 22-Jun-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (¬ (𝑀 = 0 ∧ 𝑁 = 0) ↔ 0 < (𝑀 gcd 𝑁))) |
| |
| Theorem | gcd0id 12171 |
The gcd of 0 and an integer is the integer's absolute value. (Contributed
by Paul Chapman, 21-Mar-2011.)
|
| ⊢ (𝑁 ∈ ℤ → (0 gcd 𝑁) = (abs‘𝑁)) |
| |
| Theorem | gcdid0 12172 |
The gcd of an integer and 0 is the integer's absolute value. Theorem
1.4(d)2 in [ApostolNT] p. 16.
(Contributed by Paul Chapman,
31-Mar-2011.)
|
| ⊢ (𝑁 ∈ ℤ → (𝑁 gcd 0) = (abs‘𝑁)) |
| |
| Theorem | nn0gcdid0 12173 |
The gcd of a nonnegative integer with 0 is itself. (Contributed by Paul
Chapman, 31-Mar-2011.)
|
| ⊢ (𝑁 ∈ ℕ0 → (𝑁 gcd 0) = 𝑁) |
| |
| Theorem | gcdneg 12174 |
Negating one operand of the gcd operator does not alter
the result.
(Contributed by Paul Chapman, 21-Mar-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd -𝑁) = (𝑀 gcd 𝑁)) |
| |
| Theorem | neggcd 12175 |
Negating one operand of the gcd operator does not alter
the result.
(Contributed by Paul Chapman, 22-Jun-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (-𝑀 gcd 𝑁) = (𝑀 gcd 𝑁)) |
| |
| Theorem | gcdaddm 12176 |
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.)
|
| ⊢ ((𝐾 ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = (𝑀 gcd (𝑁 + (𝐾 · 𝑀)))) |
| |
| Theorem | gcdadd 12177 |
The GCD of two numbers is the same as the GCD of the left and their sum.
(Contributed by Scott Fenton, 20-Apr-2014.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 gcd 𝑁) = (𝑀 gcd (𝑁 + 𝑀))) |
| |
| Theorem | gcdid 12178 |
The gcd of a number and itself is its absolute value. (Contributed by
Paul Chapman, 31-Mar-2011.)
|
| ⊢ (𝑁 ∈ ℤ → (𝑁 gcd 𝑁) = (abs‘𝑁)) |
| |
| Theorem | gcd1 12179 |
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.)
|
| ⊢ (𝑀 ∈ ℤ → (𝑀 gcd 1) = 1) |
| |
| Theorem | gcdabs 12180 |
The gcd of two integers is the same as that of their absolute values.
(Contributed by Paul Chapman, 31-Mar-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((abs‘𝑀) gcd (abs‘𝑁)) = (𝑀 gcd 𝑁)) |
| |
| Theorem | gcdabs1 12181 |
gcd of the absolute value of the first operator.
(Contributed by
Scott Fenton, 2-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((abs‘𝑁) gcd 𝑀) = (𝑁 gcd 𝑀)) |
| |
| Theorem | gcdabs2 12182 |
gcd of the absolute value of the second operator.
(Contributed by
Scott Fenton, 2-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℤ) → (𝑁 gcd (abs‘𝑀)) = (𝑁 gcd 𝑀)) |
| |
| Theorem | modgcd 12183 |
The gcd remains unchanged if one operand is replaced with its remainder
modulo the other. (Contributed by Paul Chapman, 31-Mar-2011.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝑀 mod 𝑁) gcd 𝑁) = (𝑀 gcd 𝑁)) |
| |
| Theorem | 1gcd 12184 |
The GCD of one and an integer is one. (Contributed by Scott Fenton,
17-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
|
| ⊢ (𝑀 ∈ ℤ → (1 gcd 𝑀) = 1) |
| |
| Theorem | gcdmultipled 12185 |
The greatest common divisor of a nonnegative integer 𝑀 and a
multiple of it is 𝑀 itself. (Contributed by Rohan
Ridenour,
3-Aug-2023.)
|
| ⊢ (𝜑 → 𝑀 ∈ ℕ0) & ⊢ (𝜑 → 𝑁 ∈ ℤ)
⇒ ⊢ (𝜑 → (𝑀 gcd (𝑁 · 𝑀)) = 𝑀) |
| |
| Theorem | dvdsgcdidd 12186 |
The greatest common divisor of a positive integer and another integer it
divides is itself. (Contributed by Rohan Ridenour, 3-Aug-2023.)
|
| ⊢ (𝜑 → 𝑀 ∈ ℕ) & ⊢ (𝜑 → 𝑁 ∈ ℤ) & ⊢ (𝜑 → 𝑀 ∥ 𝑁) ⇒ ⊢ (𝜑 → (𝑀 gcd 𝑁) = 𝑀) |
| |
| Theorem | 6gcd4e2 12187 |
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.6 Bézout's identity
|
| |
| Theorem | bezoutlemnewy 12188* |
Lemma for Bézout's identity. The is-bezout predicate holds for
(𝑦 mod 𝑊). (Contributed by Jim Kingdon,
6-Jan-2022.)
|
| ⊢ (𝜑 ↔ ∃𝑠 ∈ ℤ ∃𝑡 ∈ ℤ 𝑟 = ((𝐴 · 𝑠) + (𝐵 · 𝑡))) & ⊢ (𝜃 → 𝐴 ∈ ℕ0) & ⊢ (𝜃 → 𝐵 ∈ ℕ0) & ⊢ (𝜃 → 𝑊 ∈ ℕ) & ⊢ (𝜃 → [𝑦 / 𝑟]𝜑)
& ⊢ (𝜃 → 𝑦 ∈ ℕ0) & ⊢ (𝜃 → [𝑊 / 𝑟]𝜑) ⇒ ⊢ (𝜃 → [(𝑦 mod 𝑊) / 𝑟]𝜑) |
| |
| Theorem | bezoutlemstep 12189* |
Lemma for Bézout's identity. This is the induction step for
the proof by induction. (Contributed by Jim Kingdon, 3-Jan-2022.)
|
| ⊢ (𝜑 ↔ ∃𝑠 ∈ ℤ ∃𝑡 ∈ ℤ 𝑟 = ((𝐴 · 𝑠) + (𝐵 · 𝑡))) & ⊢ (𝜃 → 𝐴 ∈ ℕ0) & ⊢ (𝜃 → 𝐵 ∈ ℕ0) & ⊢ (𝜃 → 𝑊 ∈ ℕ) & ⊢ (𝜃 → [𝑦 / 𝑟]𝜑)
& ⊢ (𝜃 → 𝑦 ∈ ℕ0) & ⊢ (𝜃 → [𝑊 / 𝑟]𝜑)
& ⊢ (𝜓 ↔ ∀𝑧 ∈ ℕ0 (𝑧 ∥ 𝑟 → (𝑧 ∥ 𝑥 ∧ 𝑧 ∥ 𝑦))) & ⊢ ((𝜃 ∧ [(𝑦 mod 𝑊) / 𝑟]𝜑) → ∃𝑟 ∈ ℕ0 ([(𝑦 mod 𝑊) / 𝑥][𝑊 / 𝑦]𝜓 ∧ 𝜑)) & ⊢ Ⅎ𝑥𝜃
& ⊢ Ⅎ𝑟𝜃 ⇒ ⊢ (𝜃 → ∃𝑟 ∈ ℕ0 ([𝑊 / 𝑥]𝜓 ∧ 𝜑)) |
| |
| Theorem | bezoutlemmain 12190* |
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.)
|
| ⊢ (𝜑 ↔ ∃𝑠 ∈ ℤ ∃𝑡 ∈ ℤ 𝑟 = ((𝐴 · 𝑠) + (𝐵 · 𝑡))) & ⊢ (𝜓 ↔ ∀𝑧 ∈ ℕ0
(𝑧 ∥ 𝑟 → (𝑧 ∥ 𝑥 ∧ 𝑧 ∥ 𝑦))) & ⊢ (𝜃 → 𝐴 ∈ ℕ0) & ⊢ (𝜃 → 𝐵 ∈
ℕ0) ⇒ ⊢ (𝜃 → ∀𝑥 ∈ ℕ0 ([𝑥 / 𝑟]𝜑 → ∀𝑦 ∈ ℕ0 ([𝑦 / 𝑟]𝜑 → ∃𝑟 ∈ ℕ0 (𝜓 ∧ 𝜑)))) |
| |
| Theorem | bezoutlema 12191* |
Lemma for Bézout's identity. The is-bezout condition is
satisfied by 𝐴. (Contributed by Jim Kingdon,
30-Dec-2021.)
|
| ⊢ (𝜑 ↔ ∃𝑠 ∈ ℤ ∃𝑡 ∈ ℤ 𝑟 = ((𝐴 · 𝑠) + (𝐵 · 𝑡))) & ⊢ (𝜃 → 𝐴 ∈ ℕ0) & ⊢ (𝜃 → 𝐵 ∈
ℕ0) ⇒ ⊢ (𝜃 → [𝐴 / 𝑟]𝜑) |
| |
| Theorem | bezoutlemb 12192* |
Lemma for Bézout's identity. The is-bezout condition is
satisfied by 𝐵. (Contributed by Jim Kingdon,
30-Dec-2021.)
|
| ⊢ (𝜑 ↔ ∃𝑠 ∈ ℤ ∃𝑡 ∈ ℤ 𝑟 = ((𝐴 · 𝑠) + (𝐵 · 𝑡))) & ⊢ (𝜃 → 𝐴 ∈ ℕ0) & ⊢ (𝜃 → 𝐵 ∈
ℕ0) ⇒ ⊢ (𝜃 → [𝐵 / 𝑟]𝜑) |
| |
| Theorem | bezoutlemex 12193* |
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.)
|
| ⊢ ((𝐴 ∈ ℕ0 ∧ 𝐵 ∈ ℕ0)
→ ∃𝑑 ∈
ℕ0 (∀𝑧 ∈ ℕ0 (𝑧 ∥ 𝑑 → (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵)) ∧ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑑 = ((𝐴 · 𝑥) + (𝐵 · 𝑦)))) |
| |
| Theorem | bezoutlemzz 12194* |
Lemma for Bézout's identity. Like bezoutlemex 12193 but
where ' z ' is any integer, not just a nonnegative one. (Contributed by
Mario Carneiro and Jim Kingdon, 8-Jan-2022.)
|
| ⊢ ((𝐴 ∈ ℕ0 ∧ 𝐵 ∈ ℕ0)
→ ∃𝑑 ∈
ℕ0 (∀𝑧 ∈ ℤ (𝑧 ∥ 𝑑 → (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵)) ∧ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑑 = ((𝐴 · 𝑥) + (𝐵 · 𝑦)))) |
| |
| Theorem | bezoutlemaz 12195* |
Lemma for Bézout's identity. Like bezoutlemzz 12194 but
where ' A ' can be any integer, not just a nonnegative one.
(Contributed by Mario Carneiro and Jim Kingdon, 8-Jan-2022.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℕ0) →
∃𝑑 ∈
ℕ0 (∀𝑧 ∈ ℤ (𝑧 ∥ 𝑑 → (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵)) ∧ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑑 = ((𝐴 · 𝑥) + (𝐵 · 𝑦)))) |
| |
| Theorem | bezoutlembz 12196* |
Lemma for Bézout's identity. Like bezoutlemaz 12195 but
where ' B ' can be any integer, not just a nonnegative one.
(Contributed by Mario Carneiro and Jim Kingdon, 8-Jan-2022.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ∃𝑑 ∈ ℕ0
(∀𝑧 ∈ ℤ
(𝑧 ∥ 𝑑 → (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵)) ∧ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑑 = ((𝐴 · 𝑥) + (𝐵 · 𝑦)))) |
| |
| Theorem | bezoutlembi 12197* |
Lemma for Bézout's identity. Like bezoutlembz 12196 but the greatest
common divisor condition is a biconditional, not just an implication.
(Contributed by Mario Carneiro and Jim Kingdon, 8-Jan-2022.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ∃𝑑 ∈ ℕ0
(∀𝑧 ∈ ℤ
(𝑧 ∥ 𝑑 ↔ (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵)) ∧ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑑 = ((𝐴 · 𝑥) + (𝐵 · 𝑦)))) |
| |
| Theorem | bezoutlemmo 12198* |
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.)
|
| ⊢ (𝜑 → 𝐴 ∈ ℤ) & ⊢ (𝜑 → 𝐵 ∈ ℤ) & ⊢ (𝜑 → 𝐷 ∈ ℕ0) & ⊢ (𝜑 → ∀𝑧 ∈ ℤ (𝑧 ∥ 𝐷 ↔ (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵))) & ⊢ (𝜑 → 𝐸 ∈ ℕ0) & ⊢ (𝜑 → ∀𝑧 ∈ ℤ (𝑧 ∥ 𝐸 ↔ (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵))) ⇒ ⊢ (𝜑 → 𝐷 = 𝐸) |
| |
| Theorem | bezoutlemeu 12199* |
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.)
|
| ⊢ (𝜑 → 𝐴 ∈ ℤ) & ⊢ (𝜑 → 𝐵 ∈ ℤ) & ⊢ (𝜑 → 𝐷 ∈ ℕ0) & ⊢ (𝜑 → ∀𝑧 ∈ ℤ (𝑧 ∥ 𝐷 ↔ (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵))) ⇒ ⊢ (𝜑 → ∃!𝑑 ∈ ℕ0 ∀𝑧 ∈ ℤ (𝑧 ∥ 𝑑 ↔ (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵))) |
| |
| Theorem | bezoutlemle 12200* |
Lemma for Bézout's identity. The number satisfying the
greatest common divisor condition is the largest number which
divides both 𝐴 and 𝐵. (Contributed by Mario
Carneiro and
Jim Kingdon, 9-Jan-2022.)
|
| ⊢ (𝜑 → 𝐴 ∈ ℤ) & ⊢ (𝜑 → 𝐵 ∈ ℤ) & ⊢ (𝜑 → 𝐷 ∈ ℕ0) & ⊢ (𝜑 → ∀𝑧 ∈ ℤ (𝑧 ∥ 𝐷 ↔ (𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵))) & ⊢ (𝜑 → ¬ (𝐴 = 0 ∧ 𝐵 = 0)) ⇒ ⊢ (𝜑 → ∀𝑧 ∈ ℤ ((𝑧 ∥ 𝐴 ∧ 𝑧 ∥ 𝐵) → 𝑧 ≤ 𝐷)) |