Theorem List for Intuitionistic Logic Explorer - 12401-12500 *Has distinct variable
group(s)
| Type | Label | Description |
| Statement |
| |
| Theorem | zeoxor 12401 |
An integer is even or odd but not both. (Contributed by Jim Kingdon,
10-Nov-2021.)
|
| ⊢ (𝑁 ∈ ℤ → (2 ∥ 𝑁 ⊻ ¬ 2 ∥ 𝑁)) |
| |
| Theorem | zeo4 12402 |
An integer is even or odd but not both. (Contributed by AV,
17-Jun-2021.)
|
| ⊢ (𝑁 ∈ ℤ → (2 ∥ 𝑁 ↔ ¬ ¬ 2 ∥
𝑁)) |
| |
| Theorem | zeneo 12403 |
No even integer equals an odd integer (i.e. no integer can be both even
and odd). Exercise 10(a) of [Apostol] p.
28. This variant of zneo 9564
follows immediately from the fact that a contradiction implies anything,
see pm2.21i 649. (Contributed by AV, 22-Jun-2021.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → ((2 ∥ 𝐴 ∧ ¬ 2 ∥ 𝐵) → 𝐴 ≠ 𝐵)) |
| |
| Theorem | odd2np1lem 12404* |
Lemma for odd2np1 12405. (Contributed by Scott Fenton, 3-Apr-2014.)
(Revised by Mario Carneiro, 19-Apr-2014.)
|
| ⊢ (𝑁 ∈ ℕ0 →
(∃𝑛 ∈ ℤ
((2 · 𝑛) + 1) =
𝑁 ∨ ∃𝑘 ∈ ℤ (𝑘 · 2) = 𝑁)) |
| |
| Theorem | odd2np1 12405* |
An integer is odd iff it is one plus twice another integer.
(Contributed by Scott Fenton, 3-Apr-2014.) (Revised by Mario Carneiro,
19-Apr-2014.)
|
| ⊢ (𝑁 ∈ ℤ → (¬ 2 ∥
𝑁 ↔ ∃𝑛 ∈ ℤ ((2 ·
𝑛) + 1) = 𝑁)) |
| |
| Theorem | even2n 12406* |
An integer is even iff it is twice another integer. (Contributed by AV,
25-Jun-2020.)
|
| ⊢ (2 ∥ 𝑁 ↔ ∃𝑛 ∈ ℤ (2 · 𝑛) = 𝑁) |
| |
| Theorem | oddm1even 12407 |
An integer is odd iff its predecessor is even. (Contributed by Mario
Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → (¬ 2 ∥
𝑁 ↔ 2 ∥ (𝑁 − 1))) |
| |
| Theorem | oddp1even 12408 |
An integer is odd iff its successor is even. (Contributed by Mario
Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → (¬ 2 ∥
𝑁 ↔ 2 ∥ (𝑁 + 1))) |
| |
| Theorem | oexpneg 12409 |
The exponential of the negative of a number, when the exponent is odd.
(Contributed by Mario Carneiro, 25-Apr-2015.)
|
| ⊢ ((𝐴 ∈ ℂ ∧ 𝑁 ∈ ℕ ∧ ¬ 2 ∥ 𝑁) → (-𝐴↑𝑁) = -(𝐴↑𝑁)) |
| |
| Theorem | mod2eq0even 12410 |
An integer is 0 modulo 2 iff it is even (i.e. divisible by 2), see example
2 in [ApostolNT] p. 107. (Contributed
by AV, 21-Jul-2021.)
|
| ⊢ (𝑁 ∈ ℤ → ((𝑁 mod 2) = 0 ↔ 2 ∥ 𝑁)) |
| |
| Theorem | mod2eq1n2dvds 12411 |
An integer is 1 modulo 2 iff it is odd (i.e. not divisible by 2), see
example 3 in [ApostolNT] p. 107.
(Contributed by AV, 24-May-2020.)
|
| ⊢ (𝑁 ∈ ℤ → ((𝑁 mod 2) = 1 ↔ ¬ 2 ∥ 𝑁)) |
| |
| Theorem | oddnn02np1 12412* |
A nonnegative integer is odd iff it is one plus twice another
nonnegative integer. (Contributed by AV, 19-Jun-2021.)
|
| ⊢ (𝑁 ∈ ℕ0 → (¬ 2
∥ 𝑁 ↔
∃𝑛 ∈
ℕ0 ((2 · 𝑛) + 1) = 𝑁)) |
| |
| Theorem | oddge22np1 12413* |
An integer greater than one is odd iff it is one plus twice a positive
integer. (Contributed by AV, 16-Aug-2021.)
|
| ⊢ (𝑁 ∈ (ℤ≥‘2)
→ (¬ 2 ∥ 𝑁
↔ ∃𝑛 ∈
ℕ ((2 · 𝑛) +
1) = 𝑁)) |
| |
| Theorem | evennn02n 12414* |
A nonnegative integer is even iff it is twice another nonnegative
integer. (Contributed by AV, 12-Aug-2021.)
|
| ⊢ (𝑁 ∈ ℕ0 → (2
∥ 𝑁 ↔
∃𝑛 ∈
ℕ0 (2 · 𝑛) = 𝑁)) |
| |
| Theorem | evennn2n 12415* |
A positive integer is even iff it is twice another positive integer.
(Contributed by AV, 12-Aug-2021.)
|
| ⊢ (𝑁 ∈ ℕ → (2 ∥ 𝑁 ↔ ∃𝑛 ∈ ℕ (2 ·
𝑛) = 𝑁)) |
| |
| Theorem | 2tp1odd 12416 |
A number which is twice an integer increased by 1 is odd. (Contributed
by AV, 16-Jul-2021.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 = ((2 · 𝐴) + 1)) → ¬ 2 ∥ 𝐵) |
| |
| Theorem | mulsucdiv2z 12417 |
An integer multiplied with its successor divided by 2 yields an integer,
i.e. an integer multiplied with its successor is even. (Contributed by
AV, 19-Jul-2021.)
|
| ⊢ (𝑁 ∈ ℤ → ((𝑁 · (𝑁 + 1)) / 2) ∈
ℤ) |
| |
| Theorem | sqoddm1div8z 12418 |
A squared odd number minus 1 divided by 8 is an integer. (Contributed
by AV, 19-Jul-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁) → (((𝑁↑2) − 1) / 8) ∈
ℤ) |
| |
| Theorem | 2teven 12419 |
A number which is twice an integer is even. (Contributed by AV,
16-Jul-2021.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐵 = (2 · 𝐴)) → 2 ∥ 𝐵) |
| |
| Theorem | zeo5 12420 |
An integer is either even or odd, version of zeo3 12400
avoiding the negation
of the representation of an odd number. (Proposed by BJ, 21-Jun-2021.)
(Contributed by AV, 26-Jun-2020.)
|
| ⊢ (𝑁 ∈ ℤ → (2 ∥ 𝑁 ∨ 2 ∥ (𝑁 + 1))) |
| |
| Theorem | evend2 12421 |
An integer is even iff its quotient with 2 is an integer. This is a
representation of even numbers without using the divides relation, see
zeo 9568 and zeo2 9569. (Contributed by AV, 22-Jun-2021.)
|
| ⊢ (𝑁 ∈ ℤ → (2 ∥ 𝑁 ↔ (𝑁 / 2) ∈ ℤ)) |
| |
| Theorem | oddp1d2 12422 |
An integer is odd iff its successor divided by 2 is an integer. This is a
representation of odd numbers without using the divides relation, see
zeo 9568 and zeo2 9569. (Contributed by AV, 22-Jun-2021.)
|
| ⊢ (𝑁 ∈ ℤ → (¬ 2 ∥
𝑁 ↔ ((𝑁 + 1) / 2) ∈
ℤ)) |
| |
| Theorem | zob 12423 |
Alternate characterizations of an odd number. (Contributed by AV,
7-Jun-2020.)
|
| ⊢ (𝑁 ∈ ℤ → (((𝑁 + 1) / 2) ∈ ℤ ↔ ((𝑁 − 1) / 2) ∈
ℤ)) |
| |
| Theorem | oddm1d2 12424 |
An integer is odd iff its predecessor divided by 2 is an integer. This is
another representation of odd numbers without using the divides relation.
(Contributed by AV, 18-Jun-2021.) (Proof shortened by AV,
22-Jun-2021.)
|
| ⊢ (𝑁 ∈ ℤ → (¬ 2 ∥
𝑁 ↔ ((𝑁 − 1) / 2) ∈
ℤ)) |
| |
| Theorem | ltoddhalfle 12425 |
An integer is less than half of an odd number iff it is less than or
equal to the half of the predecessor of the odd number (which is an even
number). (Contributed by AV, 29-Jun-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ∧ 𝑀 ∈ ℤ) → (𝑀 < (𝑁 / 2) ↔ 𝑀 ≤ ((𝑁 − 1) / 2))) |
| |
| Theorem | halfleoddlt 12426 |
An integer is greater than half of an odd number iff it is greater than
or equal to the half of the odd number. (Contributed by AV,
1-Jul-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ∧ 𝑀 ∈ ℤ) → ((𝑁 / 2) ≤ 𝑀 ↔ (𝑁 / 2) < 𝑀)) |
| |
| Theorem | opoe 12427 |
The sum of two odds is even. (Contributed by Scott Fenton, 7-Apr-2014.)
(Revised by Mario Carneiro, 19-Apr-2014.)
|
| ⊢ (((𝐴 ∈ ℤ ∧ ¬ 2 ∥ 𝐴) ∧ (𝐵 ∈ ℤ ∧ ¬ 2 ∥ 𝐵)) → 2 ∥ (𝐴 + 𝐵)) |
| |
| Theorem | omoe 12428 |
The difference of two odds is even. (Contributed by Scott Fenton,
7-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
|
| ⊢ (((𝐴 ∈ ℤ ∧ ¬ 2 ∥ 𝐴) ∧ (𝐵 ∈ ℤ ∧ ¬ 2 ∥ 𝐵)) → 2 ∥ (𝐴 − 𝐵)) |
| |
| Theorem | opeo 12429 |
The sum of an odd and an even is odd. (Contributed by Scott Fenton,
7-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
|
| ⊢ (((𝐴 ∈ ℤ ∧ ¬ 2 ∥ 𝐴) ∧ (𝐵 ∈ ℤ ∧ 2 ∥ 𝐵)) → ¬ 2 ∥
(𝐴 + 𝐵)) |
| |
| Theorem | omeo 12430 |
The difference of an odd and an even is odd. (Contributed by Scott
Fenton, 7-Apr-2014.) (Revised by Mario Carneiro, 19-Apr-2014.)
|
| ⊢ (((𝐴 ∈ ℤ ∧ ¬ 2 ∥ 𝐴) ∧ (𝐵 ∈ ℤ ∧ 2 ∥ 𝐵)) → ¬ 2 ∥
(𝐴 − 𝐵)) |
| |
| Theorem | m1expe 12431 |
Exponentiation of -1 by an even power. Variant of m1expeven 10825.
(Contributed by AV, 25-Jun-2021.)
|
| ⊢ (2 ∥ 𝑁 → (-1↑𝑁) = 1) |
| |
| Theorem | m1expo 12432 |
Exponentiation of -1 by an odd power. (Contributed by AV,
26-Jun-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁) → (-1↑𝑁) = -1) |
| |
| Theorem | m1exp1 12433 |
Exponentiation of negative one is one iff the exponent is even.
(Contributed by AV, 20-Jun-2021.)
|
| ⊢ (𝑁 ∈ ℤ → ((-1↑𝑁) = 1 ↔ 2 ∥ 𝑁)) |
| |
| Theorem | nn0enne 12434 |
A positive integer is an even nonnegative integer iff it is an even
positive integer. (Contributed by AV, 30-May-2020.)
|
| ⊢ (𝑁 ∈ ℕ → ((𝑁 / 2) ∈ ℕ0 ↔
(𝑁 / 2) ∈
ℕ)) |
| |
| Theorem | nn0ehalf 12435 |
The half of an even nonnegative integer is a nonnegative integer.
(Contributed by AV, 22-Jun-2020.) (Revised by AV, 28-Jun-2021.)
|
| ⊢ ((𝑁 ∈ ℕ0 ∧ 2 ∥
𝑁) → (𝑁 / 2) ∈
ℕ0) |
| |
| Theorem | nnehalf 12436 |
The half of an even positive integer is a positive integer. (Contributed
by AV, 28-Jun-2021.)
|
| ⊢ ((𝑁 ∈ ℕ ∧ 2 ∥ 𝑁) → (𝑁 / 2) ∈ ℕ) |
| |
| Theorem | nn0o1gt2 12437 |
An odd nonnegative integer is either 1 or greater than 2. (Contributed by
AV, 2-Jun-2020.)
|
| ⊢ ((𝑁 ∈ ℕ0 ∧ ((𝑁 + 1) / 2) ∈
ℕ0) → (𝑁 = 1 ∨ 2 < 𝑁)) |
| |
| Theorem | nno 12438 |
An alternate characterization of an odd integer greater than 1.
(Contributed by AV, 2-Jun-2020.)
|
| ⊢ ((𝑁 ∈ (ℤ≥‘2)
∧ ((𝑁 + 1) / 2) ∈
ℕ0) → ((𝑁 − 1) / 2) ∈
ℕ) |
| |
| Theorem | nn0o 12439 |
An alternate characterization of an odd nonnegative integer. (Contributed
by AV, 28-May-2020.) (Proof shortened by AV, 2-Jun-2020.)
|
| ⊢ ((𝑁 ∈ ℕ0 ∧ ((𝑁 + 1) / 2) ∈
ℕ0) → ((𝑁 − 1) / 2) ∈
ℕ0) |
| |
| Theorem | nn0ob 12440 |
Alternate characterizations of an odd nonnegative integer. (Contributed
by AV, 4-Jun-2020.)
|
| ⊢ (𝑁 ∈ ℕ0 → (((𝑁 + 1) / 2) ∈
ℕ0 ↔ ((𝑁 − 1) / 2) ∈
ℕ0)) |
| |
| Theorem | nn0oddm1d2 12441 |
A positive integer is odd iff its predecessor divided by 2 is a positive
integer. (Contributed by AV, 28-Jun-2021.)
|
| ⊢ (𝑁 ∈ ℕ0 → (¬ 2
∥ 𝑁 ↔ ((𝑁 − 1) / 2) ∈
ℕ0)) |
| |
| Theorem | nnoddm1d2 12442 |
A positive integer is odd iff its successor divided by 2 is a positive
integer. (Contributed by AV, 28-Jun-2021.)
|
| ⊢ (𝑁 ∈ ℕ → (¬ 2 ∥
𝑁 ↔ ((𝑁 + 1) / 2) ∈
ℕ)) |
| |
| Theorem | z0even 12443 |
0 is even. (Contributed by AV, 11-Feb-2020.) (Revised by AV,
23-Jun-2021.)
|
| ⊢ 2 ∥ 0 |
| |
| Theorem | n2dvds1 12444 |
2 does not divide 1 (common case). That means 1 is odd. (Contributed by
David A. Wheeler, 8-Dec-2018.)
|
| ⊢ ¬ 2 ∥ 1 |
| |
| Theorem | n2dvdsm1 12445 |
2 does not divide -1. That means -1 is odd. (Contributed by AV,
15-Aug-2021.)
|
| ⊢ ¬ 2 ∥ -1 |
| |
| Theorem | z2even 12446 |
2 is even. (Contributed by AV, 12-Feb-2020.) (Revised by AV,
23-Jun-2021.)
|
| ⊢ 2 ∥ 2 |
| |
| Theorem | n2dvds3 12447 |
2 does not divide 3, i.e. 3 is an odd number. (Contributed by AV,
28-Feb-2021.)
|
| ⊢ ¬ 2 ∥ 3 |
| |
| Theorem | z4even 12448 |
4 is an even number. (Contributed by AV, 23-Jul-2020.) (Revised by AV,
4-Jul-2021.)
|
| ⊢ 2 ∥ 4 |
| |
| Theorem | 4dvdseven 12449 |
An integer which is divisible by 4 is an even integer. (Contributed by
AV, 4-Jul-2021.)
|
| ⊢ (4 ∥ 𝑁 → 2 ∥ 𝑁) |
| |
| 5.1.3 The division algorithm
|
| |
| Theorem | divalglemnn 12450* |
Lemma for divalg 12456. Existence for a positive denominator.
(Contributed by Jim Kingdon, 30-Nov-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ∃𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
| |
| Theorem | divalglemqt 12451 |
Lemma for divalg 12456. The 𝑄 = 𝑇 case involved in showing uniqueness.
(Contributed by Jim Kingdon, 5-Dec-2021.)
|
| ⊢ (𝜑 → 𝐷 ∈ ℤ) & ⊢ (𝜑 → 𝑅 ∈ ℤ) & ⊢ (𝜑 → 𝑆 ∈ ℤ) & ⊢ (𝜑 → 𝑄 ∈ ℤ) & ⊢ (𝜑 → 𝑇 ∈ ℤ) & ⊢ (𝜑 → 𝑄 = 𝑇)
& ⊢ (𝜑 → ((𝑄 · 𝐷) + 𝑅) = ((𝑇 · 𝐷) + 𝑆)) ⇒ ⊢ (𝜑 → 𝑅 = 𝑆) |
| |
| Theorem | divalglemnqt 12452 |
Lemma for divalg 12456. The 𝑄 < 𝑇 case involved in showing uniqueness.
(Contributed by Jim Kingdon, 4-Dec-2021.)
|
| ⊢ (𝜑 → 𝐷 ∈ ℕ) & ⊢ (𝜑 → 𝑅 ∈ ℤ) & ⊢ (𝜑 → 𝑆 ∈ ℤ) & ⊢ (𝜑 → 𝑄 ∈ ℤ) & ⊢ (𝜑 → 𝑇 ∈ ℤ) & ⊢ (𝜑 → 0 ≤ 𝑆)
& ⊢ (𝜑 → 𝑅 < 𝐷)
& ⊢ (𝜑 → ((𝑄 · 𝐷) + 𝑅) = ((𝑇 · 𝐷) + 𝑆)) ⇒ ⊢ (𝜑 → ¬ 𝑄 < 𝑇) |
| |
| Theorem | divalglemeunn 12453* |
Lemma for divalg 12456. Uniqueness for a positive denominator.
(Contributed by Jim Kingdon, 4-Dec-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
| |
| Theorem | divalglemex 12454* |
Lemma for divalg 12456. The quotient and remainder exist.
(Contributed by
Jim Kingdon, 30-Nov-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → ∃𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
| |
| Theorem | divalglemeuneg 12455* |
Lemma for divalg 12456. Uniqueness for a negative denominator.
(Contributed by Jim Kingdon, 4-Dec-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 < 0) → ∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟))) |
| |
| Theorem | divalg 12456* |
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 12457* |
Express the division algorithm as stated in divalg 12456 in terms of
∥. (Contributed by Paul Chapman,
31-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℤ ∧ 𝐷 ≠ 0) → (∃!𝑟 ∈ ℤ ∃𝑞 ∈ ℤ (0 ≤ 𝑟 ∧ 𝑟 < (abs‘𝐷) ∧ 𝑁 = ((𝑞 · 𝐷) + 𝑟)) ↔ ∃!𝑟 ∈ ℕ0 (𝑟 < (abs‘𝐷) ∧ 𝐷 ∥ (𝑁 − 𝑟)))) |
| |
| Theorem | divalg2 12458* |
The division algorithm (theorem) for a positive divisor. (Contributed
by Paul Chapman, 21-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ) → ∃!𝑟 ∈ ℕ0
(𝑟 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑟))) |
| |
| Theorem | divalgmod 12459 |
The result of the mod operator satisfies the
requirements for the
remainder 𝑅 in the division algorithm for a
positive divisor
(compare divalg2 12458 and divalgb 12457). 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 12460 |
The result of the mod operator satisfies the
requirements for the
remainder 𝑅 in the division algorithm for a
positive divisor. Variant
of divalgmod 12459. (Contributed by Stefan O'Rear,
17-Oct-2014.) (Proof
shortened by AV, 21-Aug-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ 𝑅 ∈ ℕ0) → (𝑅 = (𝑁 mod 𝐷) ↔ (𝑅 < 𝐷 ∧ 𝐷 ∥ (𝑁 − 𝑅)))) |
| |
| Theorem | modremain 12461* |
The result of the modulo operation is the remainder of the division
algorithm. (Contributed by AV, 19-Aug-2021.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ (𝑅 ∈ ℕ0 ∧ 𝑅 < 𝐷)) → ((𝑁 mod 𝐷) = 𝑅 ↔ ∃𝑧 ∈ ℤ ((𝑧 · 𝐷) + 𝑅) = 𝑁)) |
| |
| Theorem | ndvdssub 12462 |
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 12463 |
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 12464 |
Special case of ndvdsadd 12463. If an integer 𝐷 greater than 1
divides 𝑁, it does not divide 𝑁 + 1.
(Contributed by Paul
Chapman, 31-Mar-2011.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝐷 ∈ ℕ ∧ 1 < 𝐷) → (𝐷 ∥ 𝑁 → ¬ 𝐷 ∥ (𝑁 + 1))) |
| |
| Theorem | ndvdsi 12465 |
A quick test for non-divisibility. (Contributed by Mario Carneiro,
18-Feb-2014.)
|
| ⊢ 𝐴 ∈ ℕ & ⊢ 𝑄 ∈
ℕ0
& ⊢ 𝑅 ∈ ℕ & ⊢ ((𝐴 · 𝑄) + 𝑅) = 𝐵
& ⊢ 𝑅 < 𝐴 ⇒ ⊢ ¬ 𝐴 ∥ 𝐵 |
| |
| Theorem | 5ndvds3 12466 |
5 does not divide 3. (Contributed by AV, 8-Sep-2025.)
|
| ⊢ ¬ 5 ∥ 3 |
| |
| Theorem | 5ndvds6 12467 |
5 does not divide 6. (Contributed by AV, 8-Sep-2025.)
|
| ⊢ ¬ 5 ∥ 6 |
| |
| Theorem | flodddiv4 12468 |
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 12469 |
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 12470 |
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 12471 |
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 12472 |
Define the binary bits of an integer.
|
| class bits |
| |
| Definition | df-bits 12473* |
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 12474* |
Expand the definition of the bits of an integer. (Contributed by Mario
Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → (bits‘𝑁) = {𝑚 ∈ ℕ0 ∣ ¬ 2
∥ (⌊‘(𝑁
/ (2↑𝑚)))}) |
| |
| Theorem | bitsval 12475 |
Expand the definition of the bits of an integer. (Contributed by Mario
Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑀 ∈ (bits‘𝑁) ↔ (𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0 ∧ ¬ 2
∥ (⌊‘(𝑁
/ (2↑𝑀))))) |
| |
| Theorem | bitsval2 12476 |
Expand the definition of the bits of an integer. (Contributed by Mario
Carneiro, 5-Sep-2016.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) → (𝑀 ∈ (bits‘𝑁) ↔ ¬ 2 ∥
(⌊‘(𝑁 /
(2↑𝑀))))) |
| |
| Theorem | bitsss 12477 |
The set of bits of an integer is a subset of ℕ0. (Contributed by
Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (bits‘𝑁) ⊆
ℕ0 |
| |
| Theorem | bitsf 12478 |
The bits function is a function from integers to
subsets of
nonnegative integers. (Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ bits:ℤ⟶𝒫
ℕ0 |
| |
| Theorem | bitsdc 12479 |
Whether a bit is set is decidable. (Contributed by Jim Kingdon,
31-Oct-2025.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) →
DECID 𝑀
∈ (bits‘𝑁)) |
| |
| Theorem | bits0 12480 |
Value of the zeroth bit. (Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → (0 ∈
(bits‘𝑁) ↔
¬ 2 ∥ 𝑁)) |
| |
| Theorem | bits0e 12481 |
The zeroth bit of an even number is zero. (Contributed by Mario Carneiro,
5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → ¬ 0 ∈
(bits‘(2 · 𝑁))) |
| |
| Theorem | bits0o 12482 |
The zeroth bit of an odd number is one. (Contributed by Mario Carneiro,
5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → 0 ∈
(bits‘((2 · 𝑁) + 1))) |
| |
| Theorem | bitsp1 12483 |
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 12484 |
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 12485 |
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 12486* |
Lemma for bitsfzo 12487. (Contributed by Mario Carneiro,
5-Sep-2016.)
(Revised by AV, 1-Oct-2020.)
|
| ⊢ (𝜑 → 𝑁 ∈ ℕ0) & ⊢ (𝜑 → 𝑀 ∈ ℕ0) & ⊢ (𝜑 → (bits‘𝑁) ⊆ (0..^𝑀)) & ⊢ 𝑆 = inf({𝑛 ∈ ℕ0 ∣ 𝑁 < (2↑𝑛)}, ℝ, <
) ⇒ ⊢ (𝜑 → 𝑁 ∈ (0..^(2↑𝑀))) |
| |
| Theorem | bitsfzo 12487 |
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 12488 |
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 12489 |
Every number is associated with a finite set of bits. (Contributed by
Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℕ0 →
(bits‘𝑁) ∈
Fin) |
| |
| Theorem | bitscmp 12490 |
The bit complement of 𝑁 is -𝑁 − 1. (Thus, by bitsfi 12489, all
negative numbers have cofinite bits
representations.) (Contributed
by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℤ → (ℕ0
∖ (bits‘𝑁)) =
(bits‘(-𝑁 −
1))) |
| |
| Theorem | 0bits 12491 |
The bits of zero. (Contributed by Mario Carneiro, 6-Sep-2016.)
|
| ⊢ (bits‘0) = ∅ |
| |
| Theorem | m1bits 12492 |
The bits of negative one. (Contributed by Mario Carneiro, 5-Sep-2016.)
|
| ⊢ (bits‘-1) =
ℕ0 |
| |
| Theorem | bitsinv1lem 12493 |
Lemma for bitsinv1 12494. (Contributed by Mario Carneiro,
22-Sep-2016.)
|
| ⊢ ((𝑁 ∈ ℤ ∧ 𝑀 ∈ ℕ0) → (𝑁 mod (2↑(𝑀 + 1))) = ((𝑁 mod (2↑𝑀)) + if(𝑀 ∈ (bits‘𝑁), (2↑𝑀), 0))) |
| |
| Theorem | bitsinv1 12494* |
There is an explicit inverse to the bits function for
nonnegative
integers (which can be extended to negative integers using bitscmp 12490),
part 1. (Contributed by Mario Carneiro, 7-Sep-2016.)
|
| ⊢ (𝑁 ∈ ℕ0 →
Σ𝑛 ∈
(bits‘𝑁)(2↑𝑛) = 𝑁) |
| |
| 5.1.5 The greatest common divisor
operator
|
| |
| Syntax | cgcd 12495 |
Extend the definition of a class to include the greatest common divisor
operator.
|
| class gcd |
| |
| Definition | df-gcd 12496* |
Define the gcd operator. For example, (-6 gcd 9) = 3
(ex-gcd 16204). (Contributed by Paul Chapman,
21-Mar-2011.)
|
| ⊢ gcd = (𝑥 ∈ ℤ, 𝑦 ∈ ℤ ↦ if((𝑥 = 0 ∧ 𝑦 = 0), 0, sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑥 ∧ 𝑛 ∥ 𝑦)}, ℝ, < ))) |
| |
| Theorem | gcdmndc 12497 |
Decidablity lemma used in various proofs related to gcd.
(Contributed by Jim Kingdon, 12-Dec-2021.)
|
| ⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) →
DECID (𝑀 =
0 ∧ 𝑁 =
0)) |
| |
| Theorem | dvdsbnd 12498* |
There is an upper bound to the divisors of a nonzero integer.
(Contributed by Jim Kingdon, 11-Dec-2021.)
|
| ⊢ ((𝐴 ∈ ℤ ∧ 𝐴 ≠ 0) → ∃𝑛 ∈ ℕ ∀𝑚 ∈ (ℤ≥‘𝑛) ¬ 𝑚 ∥ 𝐴) |
| |
| Theorem | gcdsupex 12499* |
Existence of the supremum used in defining gcd.
(Contributed by
Jim Kingdon, 12-Dec-2021.)
|
| ⊢ (((𝑋 ∈ ℤ ∧ 𝑌 ∈ ℤ) ∧ ¬ (𝑋 = 0 ∧ 𝑌 = 0)) → ∃𝑥 ∈ ℤ (∀𝑦 ∈ {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑋 ∧ 𝑛 ∥ 𝑌)} ¬ 𝑥 < 𝑦 ∧ ∀𝑦 ∈ ℝ (𝑦 < 𝑥 → ∃𝑧 ∈ {𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑋 ∧ 𝑛 ∥ 𝑌)}𝑦 < 𝑧))) |
| |
| Theorem | gcdsupcl 12500* |
Closure of the supremum used in defining gcd. A lemma
for gcdval 12501
and gcdn0cl 12504. (Contributed by Jim Kingdon, 11-Dec-2021.)
|
| ⊢ (((𝑋 ∈ ℤ ∧ 𝑌 ∈ ℤ) ∧ ¬ (𝑋 = 0 ∧ 𝑌 = 0)) → sup({𝑛 ∈ ℤ ∣ (𝑛 ∥ 𝑋 ∧ 𝑛 ∥ 𝑌)}, ℝ, < ) ∈
ℕ) |