HomeHome Intuitionistic Logic Explorer
Theorem List (p. 130 of 166)
< Previous  Next >
Bad symbols? Try the
GIF version.

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

Theorem List for Intuitionistic Logic Explorer - 12901-13000   *Has distinct variable group(s)
TypeLabelDescription
Statement
 
Theorempockthg 12901* The generalized Pocklington's theorem. If 𝑁 − 1 = 𝐴 · 𝐵 where 𝐵 < 𝐴, then 𝑁 is prime if and only if for every prime factor 𝑝 of 𝐴, there is an 𝑥 such that 𝑥↑(𝑁 − 1) = 1( mod 𝑁) and gcd (𝑥↑((𝑁 − 1) / 𝑝) − 1, 𝑁) = 1. (Contributed by Mario Carneiro, 2-Mar-2014.)
(𝜑𝐴 ∈ ℕ)    &   (𝜑𝐵 ∈ ℕ)    &   (𝜑𝐵 < 𝐴)    &   (𝜑𝑁 = ((𝐴 · 𝐵) + 1))    &   (𝜑 → ∀𝑝 ∈ ℙ (𝑝𝐴 → ∃𝑥 ∈ ℤ (((𝑥↑(𝑁 − 1)) mod 𝑁) = 1 ∧ (((𝑥↑((𝑁 − 1) / 𝑝)) − 1) gcd 𝑁) = 1)))       (𝜑𝑁 ∈ ℙ)
 
Theorempockthi 12902 Pocklington's theorem, which gives a sufficient criterion for a number 𝑁 to be prime. This is the preferred method for verifying large primes, being much more efficient to compute than trial division. This form has been optimized for application to specific large primes; see pockthg 12901 for a more general closed-form version. (Contributed by Mario Carneiro, 2-Mar-2014.)
𝑃 ∈ ℙ    &   𝐺 ∈ ℕ    &   𝑀 = (𝐺 · 𝑃)    &   𝑁 = (𝑀 + 1)    &   𝐷 ∈ ℕ    &   𝐸 ∈ ℕ    &   𝐴 ∈ ℕ    &   𝑀 = (𝐷 · (𝑃𝐸))    &   𝐷 < (𝑃𝐸)    &   ((𝐴𝑀) mod 𝑁) = (1 mod 𝑁)    &   (((𝐴𝐺) − 1) gcd 𝑁) = 1       𝑁 ∈ ℙ
 
5.2.10  Infinite primes theorem
 
Theoreminfpnlem1 12903* Lemma for infpn 12905. The smallest divisor (greater than 1) 𝑀 of 𝑁! + 1 is a prime greater than 𝑁. (Contributed by NM, 5-May-2005.)
𝐾 = ((!‘𝑁) + 1)       ((𝑁 ∈ ℕ ∧ 𝑀 ∈ ℕ) → (((1 < 𝑀 ∧ (𝐾 / 𝑀) ∈ ℕ) ∧ ∀𝑗 ∈ ℕ ((1 < 𝑗 ∧ (𝐾 / 𝑗) ∈ ℕ) → 𝑀𝑗)) → (𝑁 < 𝑀 ∧ ∀𝑗 ∈ ℕ ((𝑀 / 𝑗) ∈ ℕ → (𝑗 = 1 ∨ 𝑗 = 𝑀)))))
 
Theoreminfpnlem2 12904* Lemma for infpn 12905. For any positive integer 𝑁, there exists a prime number 𝑗 greater than 𝑁. (Contributed by NM, 5-May-2005.)
𝐾 = ((!‘𝑁) + 1)       (𝑁 ∈ ℕ → ∃𝑗 ∈ ℕ (𝑁 < 𝑗 ∧ ∀𝑘 ∈ ℕ ((𝑗 / 𝑘) ∈ ℕ → (𝑘 = 1 ∨ 𝑘 = 𝑗))))
 
Theoreminfpn 12905* There exist infinitely many prime numbers: for any positive integer 𝑁, there exists a prime number 𝑗 greater than 𝑁. (See infpn2 13048 for the equinumerosity version.) (Contributed by NM, 1-Jun-2006.)
(𝑁 ∈ ℕ → ∃𝑗 ∈ ℕ (𝑁 < 𝑗 ∧ ∀𝑘 ∈ ℕ ((𝑗 / 𝑘) ∈ ℕ → (𝑘 = 1 ∨ 𝑘 = 𝑗))))
 
Theoremprmunb 12906* The primes are unbounded. (Contributed by Paul Chapman, 28-Nov-2012.)
(𝑁 ∈ ℕ → ∃𝑝 ∈ ℙ 𝑁 < 𝑝)
 
5.2.11  Fundamental theorem of arithmetic
 
Theorem1arithlem1 12907* Lemma for 1arith 12911. (Contributed by Mario Carneiro, 30-May-2014.)
𝑀 = (𝑛 ∈ ℕ ↦ (𝑝 ∈ ℙ ↦ (𝑝 pCnt 𝑛)))       (𝑁 ∈ ℕ → (𝑀𝑁) = (𝑝 ∈ ℙ ↦ (𝑝 pCnt 𝑁)))
 
Theorem1arithlem2 12908* Lemma for 1arith 12911. (Contributed by Mario Carneiro, 30-May-2014.)
𝑀 = (𝑛 ∈ ℕ ↦ (𝑝 ∈ ℙ ↦ (𝑝 pCnt 𝑛)))       ((𝑁 ∈ ℕ ∧ 𝑃 ∈ ℙ) → ((𝑀𝑁)‘𝑃) = (𝑃 pCnt 𝑁))
 
Theorem1arithlem3 12909* Lemma for 1arith 12911. (Contributed by Mario Carneiro, 30-May-2014.)
𝑀 = (𝑛 ∈ ℕ ↦ (𝑝 ∈ ℙ ↦ (𝑝 pCnt 𝑛)))       (𝑁 ∈ ℕ → (𝑀𝑁):ℙ⟶ℕ0)
 
Theorem1arithlem4 12910* Lemma for 1arith 12911. (Contributed by Mario Carneiro, 30-May-2014.)
𝑀 = (𝑛 ∈ ℕ ↦ (𝑝 ∈ ℙ ↦ (𝑝 pCnt 𝑛)))    &   𝐺 = (𝑦 ∈ ℕ ↦ if(𝑦 ∈ ℙ, (𝑦↑(𝐹𝑦)), 1))    &   (𝜑𝐹:ℙ⟶ℕ0)    &   (𝜑𝑁 ∈ ℕ)    &   ((𝜑 ∧ (𝑞 ∈ ℙ ∧ 𝑁𝑞)) → (𝐹𝑞) = 0)       (𝜑 → ∃𝑥 ∈ ℕ 𝐹 = (𝑀𝑥))
 
Theorem1arith 12911* Fundamental theorem of arithmetic, where a prime factorization is represented as a sequence of prime exponents, for which only finitely many primes have nonzero exponent. The function 𝑀 maps the set of positive integers one-to-one onto the set of prime factorizations 𝑅. (Contributed by Paul Chapman, 17-Nov-2012.) (Proof shortened by Mario Carneiro, 30-May-2014.)
𝑀 = (𝑛 ∈ ℕ ↦ (𝑝 ∈ ℙ ↦ (𝑝 pCnt 𝑛)))    &   𝑅 = {𝑒 ∈ (ℕ0𝑚 ℙ) ∣ (𝑒 “ ℕ) ∈ Fin}       𝑀:ℕ–1-1-onto𝑅
 
Theorem1arith2 12912* Fundamental theorem of arithmetic, where a prime factorization is represented as a finite monotonic 1-based sequence of primes. Every positive integer has a unique prime factorization. Theorem 1.10 in [ApostolNT] p. 17. This is Metamath 100 proof #80. (Contributed by Paul Chapman, 17-Nov-2012.) (Revised by Mario Carneiro, 30-May-2014.)
𝑀 = (𝑛 ∈ ℕ ↦ (𝑝 ∈ ℙ ↦ (𝑝 pCnt 𝑛)))    &   𝑅 = {𝑒 ∈ (ℕ0𝑚 ℙ) ∣ (𝑒 “ ℕ) ∈ Fin}       𝑧 ∈ ℕ ∃!𝑔𝑅 (𝑀𝑧) = 𝑔
 
5.2.12  Lagrange's four-square theorem
 
Syntaxcgz 12913 Extend class notation with the set of gaussian integers.
class ℤ[i]
 
Definitiondf-gz 12914 Define the set of gaussian integers, which are complex numbers whose real and imaginary parts are integers. (Note that the [i] is actually part of the symbol token and has no independent meaning.) (Contributed by Mario Carneiro, 14-Jul-2014.)
ℤ[i] = {𝑥 ∈ ℂ ∣ ((ℜ‘𝑥) ∈ ℤ ∧ (ℑ‘𝑥) ∈ ℤ)}
 
Theoremelgz 12915 Elementhood in the gaussian integers. (Contributed by Mario Carneiro, 14-Jul-2014.)
(𝐴 ∈ ℤ[i] ↔ (𝐴 ∈ ℂ ∧ (ℜ‘𝐴) ∈ ℤ ∧ (ℑ‘𝐴) ∈ ℤ))
 
Theoremgzcn 12916 A gaussian integer is a complex number. (Contributed by Mario Carneiro, 14-Jul-2014.)
(𝐴 ∈ ℤ[i] → 𝐴 ∈ ℂ)
 
Theoremzgz 12917 An integer is a gaussian integer. (Contributed by Mario Carneiro, 14-Jul-2014.)
(𝐴 ∈ ℤ → 𝐴 ∈ ℤ[i])
 
Theoremigz 12918 i is a gaussian integer. (Contributed by Mario Carneiro, 14-Jul-2014.)
i ∈ ℤ[i]
 
Theoremgznegcl 12919 The gaussian integers are closed under negation. (Contributed by Mario Carneiro, 14-Jul-2014.)
(𝐴 ∈ ℤ[i] → -𝐴 ∈ ℤ[i])
 
Theoremgzcjcl 12920 The gaussian integers are closed under conjugation. (Contributed by Mario Carneiro, 14-Jul-2014.)
(𝐴 ∈ ℤ[i] → (∗‘𝐴) ∈ ℤ[i])
 
Theoremgzaddcl 12921 The gaussian integers are closed under addition. (Contributed by Mario Carneiro, 14-Jul-2014.)
((𝐴 ∈ ℤ[i] ∧ 𝐵 ∈ ℤ[i]) → (𝐴 + 𝐵) ∈ ℤ[i])
 
Theoremgzmulcl 12922 The gaussian integers are closed under multiplication. (Contributed by Mario Carneiro, 14-Jul-2014.)
((𝐴 ∈ ℤ[i] ∧ 𝐵 ∈ ℤ[i]) → (𝐴 · 𝐵) ∈ ℤ[i])
 
Theoremgzreim 12923 Construct a gaussian integer from real and imaginary parts. (Contributed by Mario Carneiro, 16-Jul-2014.)
((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) → (𝐴 + (i · 𝐵)) ∈ ℤ[i])
 
Theoremgzsubcl 12924 The gaussian integers are closed under subtraction. (Contributed by Mario Carneiro, 14-Jul-2014.)
((𝐴 ∈ ℤ[i] ∧ 𝐵 ∈ ℤ[i]) → (𝐴𝐵) ∈ ℤ[i])
 
Theoremgzabssqcl 12925 The squared norm of a gaussian integer is an integer. (Contributed by Mario Carneiro, 16-Jul-2014.)
(𝐴 ∈ ℤ[i] → ((abs‘𝐴)↑2) ∈ ℕ0)
 
Theorem4sqlem5 12926 Lemma for 4sq 12954. (Contributed by Mario Carneiro, 15-Jul-2014.)
(𝜑𝐴 ∈ ℤ)    &   (𝜑𝑀 ∈ ℕ)    &   𝐵 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))       (𝜑 → (𝐵 ∈ ℤ ∧ ((𝐴𝐵) / 𝑀) ∈ ℤ))
 
Theorem4sqlem6 12927 Lemma for 4sq 12954. (Contributed by Mario Carneiro, 15-Jul-2014.)
(𝜑𝐴 ∈ ℤ)    &   (𝜑𝑀 ∈ ℕ)    &   𝐵 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))       (𝜑 → (-(𝑀 / 2) ≤ 𝐵𝐵 < (𝑀 / 2)))
 
Theorem4sqlem7 12928 Lemma for 4sq 12954. (Contributed by Mario Carneiro, 15-Jul-2014.)
(𝜑𝐴 ∈ ℤ)    &   (𝜑𝑀 ∈ ℕ)    &   𝐵 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))       (𝜑 → (𝐵↑2) ≤ (((𝑀↑2) / 2) / 2))
 
Theorem4sqlem8 12929 Lemma for 4sq 12954. (Contributed by Mario Carneiro, 15-Jul-2014.)
(𝜑𝐴 ∈ ℤ)    &   (𝜑𝑀 ∈ ℕ)    &   𝐵 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))       (𝜑𝑀 ∥ ((𝐴↑2) − (𝐵↑2)))
 
Theorem4sqlem9 12930 Lemma for 4sq 12954. (Contributed by Mario Carneiro, 15-Jul-2014.)
(𝜑𝐴 ∈ ℤ)    &   (𝜑𝑀 ∈ ℕ)    &   𝐵 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   ((𝜑𝜓) → (𝐵↑2) = 0)       ((𝜑𝜓) → (𝑀↑2) ∥ (𝐴↑2))
 
Theorem4sqlem10 12931 Lemma for 4sq 12954. (Contributed by Mario Carneiro, 16-Jul-2014.)
(𝜑𝐴 ∈ ℤ)    &   (𝜑𝑀 ∈ ℕ)    &   𝐵 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   ((𝜑𝜓) → ((((𝑀↑2) / 2) / 2) − (𝐵↑2)) = 0)       ((𝜑𝜓) → (𝑀↑2) ∥ ((𝐴↑2) − (((𝑀↑2) / 2) / 2)))
 
Theorem4sqlem1 12932* Lemma for 4sq 12954. The set 𝑆 is the set of all numbers that are expressible as a sum of four squares. Our goal is to show that 𝑆 = ℕ0; here we show one subset direction. (Contributed by Mario Carneiro, 14-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}       𝑆 ⊆ ℕ0
 
Theorem4sqlem2 12933* Lemma for 4sq 12954. Change bound variables in 𝑆. (Contributed by Mario Carneiro, 14-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}       (𝐴𝑆 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
 
Theorem4sqlem3 12934* Lemma for 4sq 12954. Sufficient condition to be in 𝑆. (Contributed by Mario Carneiro, 14-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}       (((𝐴 ∈ ℤ ∧ 𝐵 ∈ ℤ) ∧ (𝐶 ∈ ℤ ∧ 𝐷 ∈ ℤ)) → (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))) ∈ 𝑆)
 
Theorem4sqlem4a 12935* Lemma for 4sqlem4 12936. (Contributed by Mario Carneiro, 14-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}       ((𝐴 ∈ ℤ[i] ∧ 𝐵 ∈ ℤ[i]) → (((abs‘𝐴)↑2) + ((abs‘𝐵)↑2)) ∈ 𝑆)
 
Theorem4sqlem4 12936* Lemma for 4sq 12954. We can express the four-square property more compactly in terms of gaussian integers, because the norms of gaussian integers are exactly sums of two squares. (Contributed by Mario Carneiro, 14-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}       (𝐴𝑆 ↔ ∃𝑢 ∈ ℤ[i] ∃𝑣 ∈ ℤ[i] 𝐴 = (((abs‘𝑢)↑2) + ((abs‘𝑣)↑2)))
 
Theoremmul4sqlem 12937* Lemma for mul4sq 12938: algebraic manipulations. The extra assumptions involving 𝑀 would let us know not just that the product is a sum of squares, but also that it preserves divisibility by 𝑀. (Contributed by Mario Carneiro, 14-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝐴 ∈ ℤ[i])    &   (𝜑𝐵 ∈ ℤ[i])    &   (𝜑𝐶 ∈ ℤ[i])    &   (𝜑𝐷 ∈ ℤ[i])    &   𝑋 = (((abs‘𝐴)↑2) + ((abs‘𝐵)↑2))    &   𝑌 = (((abs‘𝐶)↑2) + ((abs‘𝐷)↑2))    &   (𝜑𝑀 ∈ ℕ)    &   (𝜑 → ((𝐴𝐶) / 𝑀) ∈ ℤ[i])    &   (𝜑 → ((𝐵𝐷) / 𝑀) ∈ ℤ[i])    &   (𝜑 → (𝑋 / 𝑀) ∈ ℕ0)       (𝜑 → ((𝑋 / 𝑀) · (𝑌 / 𝑀)) ∈ 𝑆)
 
Theoremmul4sq 12938* Euler's four-square identity: The product of two sums of four squares is also a sum of four squares. This is usually quoted as an explicit formula involving eight real variables; we save some time by working with complex numbers (gaussian integers) instead, so that we only have to work with four variables, and also hiding the actual formula for the product in the proof of mul4sqlem 12937. (For the curious, the explicit formula that is used is ( ∣ 𝑎 ∣ ↑2 + ∣ 𝑏 ∣ ↑2)( ∣ 𝑐 ∣ ↑2 + ∣ 𝑑 ∣ ↑2) = 𝑎∗ · 𝑐 + 𝑏 · 𝑑∗ ∣ ↑2 + ∣ 𝑎∗ · 𝑑𝑏 · 𝑐∗ ∣ ↑2.) (Contributed by Mario Carneiro, 14-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}       ((𝐴𝑆𝐵𝑆) → (𝐴 · 𝐵) ∈ 𝑆)
 
Theorem4sqlemafi 12939* Lemma for 4sq 12954. 𝐴 is finite. (Contributed by Jim Kingdon, 24-May-2025.)
(𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 ∈ ℕ)    &   𝐴 = {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)}       (𝜑𝐴 ∈ Fin)
 
Theorem4sqlemffi 12940* Lemma for 4sq 12954. ran 𝐹 is finite. (Contributed by Jim Kingdon, 24-May-2025.)
(𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 ∈ ℕ)    &   𝐴 = {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)}    &   𝐹 = (𝑣𝐴 ↦ ((𝑃 − 1) − 𝑣))       (𝜑 → ran 𝐹 ∈ Fin)
 
Theorem4sqleminfi 12941* Lemma for 4sq 12954. 𝐴 ∩ ran 𝐹 is finite. (Contributed by Jim Kingdon, 24-May-2025.)
(𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 ∈ ℕ)    &   𝐴 = {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)}    &   𝐹 = (𝑣𝐴 ↦ ((𝑃 − 1) − 𝑣))       (𝜑 → (𝐴 ∩ ran 𝐹) ∈ Fin)
 
Theorem4sqexercise1 12942* Exercise which may help in understanding the proof of 4sqlemsdc 12944. (Contributed by Jim Kingdon, 25-May-2025.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ 𝑛 = (𝑥↑2)}       (𝐴 ∈ ℕ0DECID 𝐴𝑆)
 
Theorem4sqexercise2 12943* Exercise which may help in understanding the proof of 4sqlemsdc 12944. (Contributed by Jim Kingdon, 30-May-2025.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ 𝑛 = ((𝑥↑2) + (𝑦↑2))}       (𝐴 ∈ ℕ0DECID 𝐴𝑆)
 
Theorem4sqlemsdc 12944* Lemma for 4sq 12954. The property of being the sum of four squares is decidable.

The proof involves showing that (for a particular 𝐴) there are only a finite number of possible ways that it could be the sum of four squares, so checking each of those possibilities in turn decides whether the number is the sum of four squares. If this proof is hard to follow, especially because of its length, the simplified versions at 4sqexercise1 12942 and 4sqexercise2 12943 may help clarify, as they are using very much the same techniques on simplified versions of this lemma. (Contributed by Jim Kingdon, 25-May-2025.)

𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}       (𝐴 ∈ ℕ0DECID 𝐴𝑆)
 
Theorem4sqlem11 12945* Lemma for 4sq 12954. Use the pigeonhole principle to show that the sets {𝑚↑2 ∣ 𝑚 ∈ (0...𝑁)} and {-1 − 𝑛↑2 ∣ 𝑛 ∈ (0...𝑁)} have a common element, mod 𝑃. Note that although the conclusion is stated in terms of 𝐴 ∩ ran 𝐹 being nonempty, it is also inhabited by 4sqleminfi 12941 and fin0 7060. (Contributed by Mario Carneiro, 15-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 = ((2 · 𝑁) + 1))    &   (𝜑𝑃 ∈ ℙ)    &   𝐴 = {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)}    &   𝐹 = (𝑣𝐴 ↦ ((𝑃 − 1) − 𝑣))       (𝜑 → (𝐴 ∩ ran 𝐹) ≠ ∅)
 
Theorem4sqlem12 12946* Lemma for 4sq 12954. For any odd prime 𝑃, there is a 𝑘 < 𝑃 such that 𝑘𝑃 − 1 is a sum of two squares. (Contributed by Mario Carneiro, 15-Jul-2014.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 = ((2 · 𝑁) + 1))    &   (𝜑𝑃 ∈ ℙ)    &   𝐴 = {𝑢 ∣ ∃𝑚 ∈ (0...𝑁)𝑢 = ((𝑚↑2) mod 𝑃)}    &   𝐹 = (𝑣𝐴 ↦ ((𝑃 − 1) − 𝑣))       (𝜑 → ∃𝑘 ∈ (1...(𝑃 − 1))∃𝑢 ∈ ℤ[i] (((abs‘𝑢)↑2) + 1) = (𝑘 · 𝑃))
 
Theorem4sqlem13m 12947* Lemma for 4sq 12954. (Contributed by Mario Carneiro, 16-Jul-2014.) (Revised by AV, 14-Sep-2020.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 = ((2 · 𝑁) + 1))    &   (𝜑𝑃 ∈ ℙ)    &   (𝜑 → (0...(2 · 𝑁)) ⊆ 𝑆)    &   𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}    &   𝑀 = inf(𝑇, ℝ, < )       (𝜑 → (∃𝑗 𝑗𝑇𝑀 < 𝑃))
 
Theorem4sqlem14 12948* Lemma for 4sq 12954. (Contributed by Mario Carneiro, 16-Jul-2014.) (Revised by AV, 14-Sep-2020.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 = ((2 · 𝑁) + 1))    &   (𝜑𝑃 ∈ ℙ)    &   (𝜑 → (0...(2 · 𝑁)) ⊆ 𝑆)    &   𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}    &   𝑀 = inf(𝑇, ℝ, < )    &   (𝜑𝑀 ∈ (ℤ‘2))    &   (𝜑𝐴 ∈ ℤ)    &   (𝜑𝐵 ∈ ℤ)    &   (𝜑𝐶 ∈ ℤ)    &   (𝜑𝐷 ∈ ℤ)    &   𝐸 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐹 = (((𝐵 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐺 = (((𝐶 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐻 = (((𝐷 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝑅 = ((((𝐸↑2) + (𝐹↑2)) + ((𝐺↑2) + (𝐻↑2))) / 𝑀)    &   (𝜑 → (𝑀 · 𝑃) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))))       (𝜑𝑅 ∈ ℕ0)
 
Theorem4sqlem15 12949* Lemma for 4sq 12954. (Contributed by Mario Carneiro, 16-Jul-2014.) (Revised by AV, 14-Sep-2020.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 = ((2 · 𝑁) + 1))    &   (𝜑𝑃 ∈ ℙ)    &   (𝜑 → (0...(2 · 𝑁)) ⊆ 𝑆)    &   𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}    &   𝑀 = inf(𝑇, ℝ, < )    &   (𝜑𝑀 ∈ (ℤ‘2))    &   (𝜑𝐴 ∈ ℤ)    &   (𝜑𝐵 ∈ ℤ)    &   (𝜑𝐶 ∈ ℤ)    &   (𝜑𝐷 ∈ ℤ)    &   𝐸 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐹 = (((𝐵 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐺 = (((𝐶 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐻 = (((𝐷 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝑅 = ((((𝐸↑2) + (𝐹↑2)) + ((𝐺↑2) + (𝐻↑2))) / 𝑀)    &   (𝜑 → (𝑀 · 𝑃) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))))       ((𝜑𝑅 = 𝑀) → ((((((𝑀↑2) / 2) / 2) − (𝐸↑2)) = 0 ∧ ((((𝑀↑2) / 2) / 2) − (𝐹↑2)) = 0) ∧ (((((𝑀↑2) / 2) / 2) − (𝐺↑2)) = 0 ∧ ((((𝑀↑2) / 2) / 2) − (𝐻↑2)) = 0)))
 
Theorem4sqlem16 12950* Lemma for 4sq 12954. (Contributed by Mario Carneiro, 16-Jul-2014.) (Revised by AV, 14-Sep-2020.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 = ((2 · 𝑁) + 1))    &   (𝜑𝑃 ∈ ℙ)    &   (𝜑 → (0...(2 · 𝑁)) ⊆ 𝑆)    &   𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}    &   𝑀 = inf(𝑇, ℝ, < )    &   (𝜑𝑀 ∈ (ℤ‘2))    &   (𝜑𝐴 ∈ ℤ)    &   (𝜑𝐵 ∈ ℤ)    &   (𝜑𝐶 ∈ ℤ)    &   (𝜑𝐷 ∈ ℤ)    &   𝐸 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐹 = (((𝐵 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐺 = (((𝐶 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐻 = (((𝐷 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝑅 = ((((𝐸↑2) + (𝐹↑2)) + ((𝐺↑2) + (𝐻↑2))) / 𝑀)    &   (𝜑 → (𝑀 · 𝑃) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))))       (𝜑 → (𝑅𝑀 ∧ ((𝑅 = 0 ∨ 𝑅 = 𝑀) → (𝑀↑2) ∥ (𝑀 · 𝑃))))
 
Theorem4sqlem17 12951* Lemma for 4sq 12954. (Contributed by Mario Carneiro, 16-Jul-2014.) (Revised by AV, 14-Sep-2020.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 = ((2 · 𝑁) + 1))    &   (𝜑𝑃 ∈ ℙ)    &   (𝜑 → (0...(2 · 𝑁)) ⊆ 𝑆)    &   𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}    &   𝑀 = inf(𝑇, ℝ, < )    &   (𝜑𝑀 ∈ (ℤ‘2))    &   (𝜑𝐴 ∈ ℤ)    &   (𝜑𝐵 ∈ ℤ)    &   (𝜑𝐶 ∈ ℤ)    &   (𝜑𝐷 ∈ ℤ)    &   𝐸 = (((𝐴 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐹 = (((𝐵 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐺 = (((𝐶 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝐻 = (((𝐷 + (𝑀 / 2)) mod 𝑀) − (𝑀 / 2))    &   𝑅 = ((((𝐸↑2) + (𝐹↑2)) + ((𝐺↑2) + (𝐻↑2))) / 𝑀)    &   (𝜑 → (𝑀 · 𝑃) = (((𝐴↑2) + (𝐵↑2)) + ((𝐶↑2) + (𝐷↑2))))        ¬ 𝜑
 
Theorem4sqlem18 12952* Lemma for 4sq 12954. Inductive step, odd prime case. (Contributed by Mario Carneiro, 16-Jul-2014.) (Revised by AV, 14-Sep-2020.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}    &   (𝜑𝑁 ∈ ℕ)    &   (𝜑𝑃 = ((2 · 𝑁) + 1))    &   (𝜑𝑃 ∈ ℙ)    &   (𝜑 → (0...(2 · 𝑁)) ⊆ 𝑆)    &   𝑇 = {𝑖 ∈ ℕ ∣ (𝑖 · 𝑃) ∈ 𝑆}    &   𝑀 = inf(𝑇, ℝ, < )       (𝜑𝑃𝑆)
 
Theorem4sqlem19 12953* Lemma for 4sq 12954. The proof is by strong induction - we show that if all the integers less than 𝑘 are in 𝑆, then 𝑘 is as well. In this part of the proof we do the induction argument and dispense with all the cases except the odd prime case, which is sent to 4sqlem18 12952. If 𝑘 is 0, 1, 2, we show 𝑘𝑆 directly; otherwise if 𝑘 is composite, 𝑘 is the product of two numbers less than it (and hence in 𝑆 by assumption), so by mul4sq 12938 𝑘𝑆. (Contributed by Mario Carneiro, 14-Jul-2014.) (Revised by Mario Carneiro, 20-Jun-2015.)
𝑆 = {𝑛 ∣ ∃𝑥 ∈ ℤ ∃𝑦 ∈ ℤ ∃𝑧 ∈ ℤ ∃𝑤 ∈ ℤ 𝑛 = (((𝑥↑2) + (𝑦↑2)) + ((𝑧↑2) + (𝑤↑2)))}       0 = 𝑆
 
Theorem4sq 12954* Lagrange's four-square theorem, or Bachet's conjecture: every nonnegative integer is expressible as a sum of four squares. This is Metamath 100 proof #19. (Contributed by Mario Carneiro, 16-Jul-2014.)
(𝐴 ∈ ℕ0 ↔ ∃𝑎 ∈ ℤ ∃𝑏 ∈ ℤ ∃𝑐 ∈ ℤ ∃𝑑 ∈ ℤ 𝐴 = (((𝑎↑2) + (𝑏↑2)) + ((𝑐↑2) + (𝑑↑2))))
 
5.2.13  Decimal arithmetic (cont.)
 
Theoremdec2dvds 12955 Divisibility by two is obvious in base 10. (Contributed by Mario Carneiro, 19-Apr-2015.)
𝐴 ∈ ℕ0    &   𝐵 ∈ ℕ0    &   (𝐵 · 2) = 𝐶    &   𝐷 = (𝐶 + 1)        ¬ 2 ∥ 𝐴𝐷
 
Theoremdec5dvds 12956 Divisibility by five is obvious in base 10. (Contributed by Mario Carneiro, 19-Apr-2015.)
𝐴 ∈ ℕ0    &   𝐵 ∈ ℕ    &   𝐵 < 5        ¬ 5 ∥ 𝐴𝐵
 
Theoremdec5dvds2 12957 Divisibility by five is obvious in base 10. (Contributed by Mario Carneiro, 19-Apr-2015.)
𝐴 ∈ ℕ0    &   𝐵 ∈ ℕ    &   𝐵 < 5    &   (5 + 𝐵) = 𝐶        ¬ 5 ∥ 𝐴𝐶
 
Theoremdec5nprm 12958 A decimal number greater than 10 and ending with five is not a prime number. (Contributed by Mario Carneiro, 19-Apr-2015.)
𝐴 ∈ ℕ        ¬ 𝐴5 ∈ ℙ
 
Theoremdec2nprm 12959 A decimal number greater than 10 and ending with an even digit is not a prime number. (Contributed by Mario Carneiro, 19-Apr-2015.)
𝐴 ∈ ℕ    &   𝐵 ∈ ℕ0    &   (𝐵 · 2) = 𝐶        ¬ 𝐴𝐶 ∈ ℙ
 
Theoremmodxai 12960 Add exponents in a power mod calculation. (Contributed by Mario Carneiro, 21-Feb-2014.) (Revised by Mario Carneiro, 5-Feb-2015.)
𝑁 ∈ ℕ    &   𝐴 ∈ ℕ    &   𝐵 ∈ ℕ0    &   𝐷 ∈ ℤ    &   𝐾 ∈ ℕ0    &   𝑀 ∈ ℕ0    &   𝐶 ∈ ℕ0    &   𝐿 ∈ ℕ0    &   ((𝐴𝐵) mod 𝑁) = (𝐾 mod 𝑁)    &   ((𝐴𝐶) mod 𝑁) = (𝐿 mod 𝑁)    &   (𝐵 + 𝐶) = 𝐸    &   ((𝐷 · 𝑁) + 𝑀) = (𝐾 · 𝐿)       ((𝐴𝐸) mod 𝑁) = (𝑀 mod 𝑁)
 
Theoremmod2xi 12961 Double exponents in a power mod calculation. (Contributed by Mario Carneiro, 21-Feb-2014.)
𝑁 ∈ ℕ    &   𝐴 ∈ ℕ    &   𝐵 ∈ ℕ0    &   𝐷 ∈ ℤ    &   𝐾 ∈ ℕ0    &   𝑀 ∈ ℕ0    &   ((𝐴𝐵) mod 𝑁) = (𝐾 mod 𝑁)    &   (2 · 𝐵) = 𝐸    &   ((𝐷 · 𝑁) + 𝑀) = (𝐾 · 𝐾)       ((𝐴𝐸) mod 𝑁) = (𝑀 mod 𝑁)
 
Theoremmodxp1i 12962 Add one to an exponent in a power mod calculation. (Contributed by Mario Carneiro, 21-Feb-2014.)
𝑁 ∈ ℕ    &   𝐴 ∈ ℕ    &   𝐵 ∈ ℕ0    &   𝐷 ∈ ℤ    &   𝐾 ∈ ℕ0    &   𝑀 ∈ ℕ0    &   ((𝐴𝐵) mod 𝑁) = (𝐾 mod 𝑁)    &   (𝐵 + 1) = 𝐸    &   ((𝐷 · 𝑁) + 𝑀) = (𝐾 · 𝐴)       ((𝐴𝐸) mod 𝑁) = (𝑀 mod 𝑁)
 
Theoremmodsubi 12963 Subtract from within a mod calculation. (Contributed by Mario Carneiro, 18-Feb-2014.)
𝑁 ∈ ℕ    &   𝐴 ∈ ℕ    &   𝐵 ∈ ℕ0    &   𝑀 ∈ ℕ0    &   (𝐴 mod 𝑁) = (𝐾 mod 𝑁)    &   (𝑀 + 𝐵) = 𝐾       ((𝐴𝐵) mod 𝑁) = (𝑀 mod 𝑁)
 
Theoremgcdi 12964 Calculate a GCD via Euclid's algorithm. (Contributed by Mario Carneiro, 19-Feb-2014.)
𝐾 ∈ ℕ0    &   𝑅 ∈ ℕ0    &   𝑁 ∈ ℕ0    &   (𝑁 gcd 𝑅) = 𝐺    &   ((𝐾 · 𝑁) + 𝑅) = 𝑀       (𝑀 gcd 𝑁) = 𝐺
 
Theoremgcdmodi 12965 Calculate a GCD via Euclid's algorithm. Theorem 5.6 in [ApostolNT] p. 109. (Contributed by Mario Carneiro, 19-Feb-2014.)
𝐾 ∈ ℕ0    &   𝑅 ∈ ℕ0    &   𝑁 ∈ ℕ    &   (𝐾 mod 𝑁) = (𝑅 mod 𝑁)    &   (𝑁 gcd 𝑅) = 𝐺       (𝐾 gcd 𝑁) = 𝐺
 
Theoremnumexp0 12966 Calculate an integer power. (Contributed by Mario Carneiro, 17-Apr-2015.)
𝐴 ∈ ℕ0       (𝐴↑0) = 1
 
Theoremnumexp1 12967 Calculate an integer power. (Contributed by Mario Carneiro, 17-Apr-2015.)
𝐴 ∈ ℕ0       (𝐴↑1) = 𝐴
 
Theoremnumexpp1 12968 Calculate an integer power. (Contributed by Mario Carneiro, 17-Apr-2015.)
𝐴 ∈ ℕ0    &   𝑀 ∈ ℕ0    &   (𝑀 + 1) = 𝑁    &   ((𝐴𝑀) · 𝐴) = 𝐶       (𝐴𝑁) = 𝐶
 
Theoremnumexp2x 12969 Double an integer power. (Contributed by Mario Carneiro, 17-Apr-2015.)
𝐴 ∈ ℕ0    &   𝑀 ∈ ℕ0    &   (2 · 𝑀) = 𝑁    &   (𝐴𝑀) = 𝐷    &   (𝐷 · 𝐷) = 𝐶       (𝐴𝑁) = 𝐶
 
Theoremdecsplit0b 12970 Split a decimal number into two parts. Base case: 𝑁 = 0. (Contributed by Mario Carneiro, 16-Jul-2015.) (Revised by AV, 8-Sep-2021.)
𝐴 ∈ ℕ0       ((𝐴 · (10↑0)) + 𝐵) = (𝐴 + 𝐵)
 
Theoremdecsplit0 12971 Split a decimal number into two parts. Base case: 𝑁 = 0. (Contributed by Mario Carneiro, 16-Jul-2015.) (Revised by AV, 8-Sep-2021.)
𝐴 ∈ ℕ0       ((𝐴 · (10↑0)) + 0) = 𝐴
 
Theoremdecsplit1 12972 Split a decimal number into two parts. Base case: 𝑁 = 1. (Contributed by Mario Carneiro, 16-Jul-2015.) (Revised by AV, 8-Sep-2021.)
𝐴 ∈ ℕ0       ((𝐴 · (10↑1)) + 𝐵) = 𝐴𝐵
 
Theoremdecsplit 12973 Split a decimal number into two parts. Inductive step. (Contributed by Mario Carneiro, 16-Jul-2015.) (Revised by AV, 8-Sep-2021.)
𝐴 ∈ ℕ0    &   𝐵 ∈ ℕ0    &   𝐷 ∈ ℕ0    &   𝑀 ∈ ℕ0    &   (𝑀 + 1) = 𝑁    &   ((𝐴 · (10↑𝑀)) + 𝐵) = 𝐶       ((𝐴 · (10↑𝑁)) + 𝐵𝐷) = 𝐶𝐷
 
Theoremkaratsuba 12974 The Karatsuba multiplication algorithm. If 𝑋 and 𝑌 are decomposed into two groups of digits of length 𝑀 (only the lower group is known to be this size but the algorithm is most efficient when the partition is chosen near the middle of the digit string), then 𝑋𝑌 can be written in three groups of digits, where each group needs only one multiplication. Thus, we can halve both inputs with only three multiplications on the smaller operands, yielding an asymptotic improvement of n^(log2 3) instead of n^2 for the "naive" algorithm decmul1c 9658. (Contributed by Mario Carneiro, 16-Jul-2015.) (Revised by AV, 9-Sep-2021.)
𝐴 ∈ ℕ0    &   𝐵 ∈ ℕ0    &   𝐶 ∈ ℕ0    &   𝐷 ∈ ℕ0    &   𝑆 ∈ ℕ0    &   𝑀 ∈ ℕ0    &   (𝐴 · 𝐶) = 𝑅    &   (𝐵 · 𝐷) = 𝑇    &   ((𝐴 + 𝐵) · (𝐶 + 𝐷)) = ((𝑅 + 𝑆) + 𝑇)    &   ((𝐴 · (10↑𝑀)) + 𝐵) = 𝑋    &   ((𝐶 · (10↑𝑀)) + 𝐷) = 𝑌    &   ((𝑅 · (10↑𝑀)) + 𝑆) = 𝑊    &   ((𝑊 · (10↑𝑀)) + 𝑇) = 𝑍       (𝑋 · 𝑌) = 𝑍
 
Theorem2exp4 12975 Two to the fourth power is 16. (Contributed by Mario Carneiro, 20-Apr-2015.)
(2↑4) = 16
 
Theorem2exp5 12976 Two to the fifth power is 32. (Contributed by AV, 16-Aug-2021.)
(2↑5) = 32
 
Theorem2exp6 12977 Two to the sixth power is 64. (Contributed by Mario Carneiro, 20-Apr-2015.) (Proof shortened by OpenAI, 25-Mar-2020.)
(2↑6) = 64
 
Theorem2exp7 12978 Two to the seventh power is 128. (Contributed by AV, 16-Aug-2021.)
(2↑7) = 128
 
Theorem2exp8 12979 Two to the eighth power is 256. (Contributed by Mario Carneiro, 20-Apr-2015.)
(2↑8) = 256
 
Theorem2exp11 12980 Two to the eleventh power is 2048. (Contributed by AV, 16-Aug-2021.)
(2↑11) = 2048
 
Theorem2exp16 12981 Two to the sixteenth power is 65536. (Contributed by Mario Carneiro, 20-Apr-2015.)
(2↑16) = 65536
 
Theorem3exp3 12982 Three to the third power is 27. (Contributed by Mario Carneiro, 20-Apr-2015.)
(3↑3) = 27
 
Theorem2expltfac 12983 The factorial grows faster than two to the power 𝑁. (Contributed by Mario Carneiro, 15-Sep-2016.)
(𝑁 ∈ (ℤ‘4) → (2↑𝑁) < (!‘𝑁))
 
5.3  Cardinality of real and complex number subsets
 
5.3.1  Countability of integers and rationals
 
Theoremoddennn 12984 There are as many odd positive integers as there are positive integers. (Contributed by Jim Kingdon, 11-May-2022.)
{𝑧 ∈ ℕ ∣ ¬ 2 ∥ 𝑧} ≈ ℕ
 
Theoremevenennn 12985 There are as many even positive integers as there are positive integers. (Contributed by Jim Kingdon, 12-May-2022.)
{𝑧 ∈ ℕ ∣ 2 ∥ 𝑧} ≈ ℕ
 
Theoremxpnnen 12986 The Cartesian product of the set of positive integers with itself is equinumerous to the set of positive integers. (Contributed by NM, 1-Aug-2004.)
(ℕ × ℕ) ≈ ℕ
 
Theoremxpomen 12987 The Cartesian product of omega (the set of ordinal natural numbers) with itself is equinumerous to omega. Exercise 1 of [Enderton] p. 133. (Contributed by NM, 23-Jul-2004.)
(ω × ω) ≈ ω
 
Theoremxpct 12988 The cartesian product of two sets dominated by ω is dominated by ω. (Contributed by Thierry Arnoux, 24-Sep-2017.)
((𝐴 ≼ ω ∧ 𝐵 ≼ ω) → (𝐴 × 𝐵) ≼ ω)
 
Theoremunennn 12989 The union of two disjoint countably infinite sets is countably infinite. (Contributed by Jim Kingdon, 13-May-2022.)
((𝐴 ≈ ℕ ∧ 𝐵 ≈ ℕ ∧ (𝐴𝐵) = ∅) → (𝐴𝐵) ≈ ℕ)
 
Theoremznnen 12990 The set of integers and the set of positive integers are equinumerous. Corollary 8.1.23 of [AczelRathjen], p. 75. (Contributed by NM, 31-Jul-2004.)
ℤ ≈ ℕ
 
Theoremennnfonelemdc 12991* Lemma for ennnfone 13017. A direct consequence of fidcenumlemrk 7137. (Contributed by Jim Kingdon, 15-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑𝑃 ∈ ω)       (𝜑DECID (𝐹𝑃) ∈ (𝐹𝑃))
 
Theoremennnfonelemk 12992* Lemma for ennnfone 13017. (Contributed by Jim Kingdon, 15-Jul-2023.)
(𝜑𝐹:ω–onto𝐴)    &   (𝜑𝐾 ∈ ω)    &   (𝜑𝑁 ∈ ω)    &   (𝜑 → ∀𝑗 ∈ suc 𝑁(𝐹𝐾) ≠ (𝐹𝑗))       (𝜑𝑁𝐾)
 
Theoremennnfonelemj0 12993* Lemma for ennnfone 13017. Initial state for 𝐽. (Contributed by Jim Kingdon, 20-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑 → ∀𝑛 ∈ ω ∃𝑘 ∈ ω ∀𝑗 ∈ suc 𝑛(𝐹𝑘) ≠ (𝐹𝑗))    &   𝐺 = (𝑥 ∈ (𝐴pm ω), 𝑦 ∈ ω ↦ if((𝐹𝑦) ∈ (𝐹𝑦), 𝑥, (𝑥 ∪ {⟨dom 𝑥, (𝐹𝑦)⟩})))    &   𝑁 = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)    &   𝐽 = (𝑥 ∈ ℕ0 ↦ if(𝑥 = 0, ∅, (𝑁‘(𝑥 − 1))))    &   𝐻 = seq0(𝐺, 𝐽)       (𝜑 → (𝐽‘0) ∈ {𝑔 ∈ (𝐴pm ω) ∣ dom 𝑔 ∈ ω})
 
Theoremennnfonelemjn 12994* Lemma for ennnfone 13017. Non-initial state for 𝐽. (Contributed by Jim Kingdon, 20-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑 → ∀𝑛 ∈ ω ∃𝑘 ∈ ω ∀𝑗 ∈ suc 𝑛(𝐹𝑘) ≠ (𝐹𝑗))    &   𝐺 = (𝑥 ∈ (𝐴pm ω), 𝑦 ∈ ω ↦ if((𝐹𝑦) ∈ (𝐹𝑦), 𝑥, (𝑥 ∪ {⟨dom 𝑥, (𝐹𝑦)⟩})))    &   𝑁 = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)    &   𝐽 = (𝑥 ∈ ℕ0 ↦ if(𝑥 = 0, ∅, (𝑁‘(𝑥 − 1))))    &   𝐻 = seq0(𝐺, 𝐽)       ((𝜑𝑓 ∈ (ℤ‘(0 + 1))) → (𝐽𝑓) ∈ ω)
 
Theoremennnfonelemg 12995* Lemma for ennnfone 13017. Closure for 𝐺. (Contributed by Jim Kingdon, 20-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑 → ∀𝑛 ∈ ω ∃𝑘 ∈ ω ∀𝑗 ∈ suc 𝑛(𝐹𝑘) ≠ (𝐹𝑗))    &   𝐺 = (𝑥 ∈ (𝐴pm ω), 𝑦 ∈ ω ↦ if((𝐹𝑦) ∈ (𝐹𝑦), 𝑥, (𝑥 ∪ {⟨dom 𝑥, (𝐹𝑦)⟩})))    &   𝑁 = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)    &   𝐽 = (𝑥 ∈ ℕ0 ↦ if(𝑥 = 0, ∅, (𝑁‘(𝑥 − 1))))    &   𝐻 = seq0(𝐺, 𝐽)       ((𝜑 ∧ (𝑓 ∈ {𝑔 ∈ (𝐴pm ω) ∣ dom 𝑔 ∈ ω} ∧ 𝑗 ∈ ω)) → (𝑓𝐺𝑗) ∈ {𝑔 ∈ (𝐴pm ω) ∣ dom 𝑔 ∈ ω})
 
Theoremennnfonelemh 12996* Lemma for ennnfone 13017. (Contributed by Jim Kingdon, 8-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑 → ∀𝑛 ∈ ω ∃𝑘 ∈ ω ∀𝑗 ∈ suc 𝑛(𝐹𝑘) ≠ (𝐹𝑗))    &   𝐺 = (𝑥 ∈ (𝐴pm ω), 𝑦 ∈ ω ↦ if((𝐹𝑦) ∈ (𝐹𝑦), 𝑥, (𝑥 ∪ {⟨dom 𝑥, (𝐹𝑦)⟩})))    &   𝑁 = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)    &   𝐽 = (𝑥 ∈ ℕ0 ↦ if(𝑥 = 0, ∅, (𝑁‘(𝑥 − 1))))    &   𝐻 = seq0(𝐺, 𝐽)       (𝜑𝐻:ℕ0⟶(𝐴pm ω))
 
Theoremennnfonelem0 12997* Lemma for ennnfone 13017. Initial value. (Contributed by Jim Kingdon, 15-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑 → ∀𝑛 ∈ ω ∃𝑘 ∈ ω ∀𝑗 ∈ suc 𝑛(𝐹𝑘) ≠ (𝐹𝑗))    &   𝐺 = (𝑥 ∈ (𝐴pm ω), 𝑦 ∈ ω ↦ if((𝐹𝑦) ∈ (𝐹𝑦), 𝑥, (𝑥 ∪ {⟨dom 𝑥, (𝐹𝑦)⟩})))    &   𝑁 = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)    &   𝐽 = (𝑥 ∈ ℕ0 ↦ if(𝑥 = 0, ∅, (𝑁‘(𝑥 − 1))))    &   𝐻 = seq0(𝐺, 𝐽)       (𝜑 → (𝐻‘0) = ∅)
 
Theoremennnfonelemp1 12998* Lemma for ennnfone 13017. Value of 𝐻 at a successor. (Contributed by Jim Kingdon, 23-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑 → ∀𝑛 ∈ ω ∃𝑘 ∈ ω ∀𝑗 ∈ suc 𝑛(𝐹𝑘) ≠ (𝐹𝑗))    &   𝐺 = (𝑥 ∈ (𝐴pm ω), 𝑦 ∈ ω ↦ if((𝐹𝑦) ∈ (𝐹𝑦), 𝑥, (𝑥 ∪ {⟨dom 𝑥, (𝐹𝑦)⟩})))    &   𝑁 = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)    &   𝐽 = (𝑥 ∈ ℕ0 ↦ if(𝑥 = 0, ∅, (𝑁‘(𝑥 − 1))))    &   𝐻 = seq0(𝐺, 𝐽)    &   (𝜑𝑃 ∈ ℕ0)       (𝜑 → (𝐻‘(𝑃 + 1)) = if((𝐹‘(𝑁𝑃)) ∈ (𝐹 “ (𝑁𝑃)), (𝐻𝑃), ((𝐻𝑃) ∪ {⟨dom (𝐻𝑃), (𝐹‘(𝑁𝑃))⟩})))
 
Theoremennnfonelem1 12999* Lemma for ennnfone 13017. Second value. (Contributed by Jim Kingdon, 19-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑 → ∀𝑛 ∈ ω ∃𝑘 ∈ ω ∀𝑗 ∈ suc 𝑛(𝐹𝑘) ≠ (𝐹𝑗))    &   𝐺 = (𝑥 ∈ (𝐴pm ω), 𝑦 ∈ ω ↦ if((𝐹𝑦) ∈ (𝐹𝑦), 𝑥, (𝑥 ∪ {⟨dom 𝑥, (𝐹𝑦)⟩})))    &   𝑁 = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)    &   𝐽 = (𝑥 ∈ ℕ0 ↦ if(𝑥 = 0, ∅, (𝑁‘(𝑥 − 1))))    &   𝐻 = seq0(𝐺, 𝐽)       (𝜑 → (𝐻‘1) = {⟨∅, (𝐹‘∅)⟩})
 
Theoremennnfonelemom 13000* Lemma for ennnfone 13017. 𝐻 yields finite sequences. (Contributed by Jim Kingdon, 19-Jul-2023.)
(𝜑 → ∀𝑥𝐴𝑦𝐴 DECID 𝑥 = 𝑦)    &   (𝜑𝐹:ω–onto𝐴)    &   (𝜑 → ∀𝑛 ∈ ω ∃𝑘 ∈ ω ∀𝑗 ∈ suc 𝑛(𝐹𝑘) ≠ (𝐹𝑗))    &   𝐺 = (𝑥 ∈ (𝐴pm ω), 𝑦 ∈ ω ↦ if((𝐹𝑦) ∈ (𝐹𝑦), 𝑥, (𝑥 ∪ {⟨dom 𝑥, (𝐹𝑦)⟩})))    &   𝑁 = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)    &   𝐽 = (𝑥 ∈ ℕ0 ↦ if(𝑥 = 0, ∅, (𝑁‘(𝑥 − 1))))    &   𝐻 = seq0(𝐺, 𝐽)    &   (𝜑𝑃 ∈ ℕ0)       (𝜑 → dom (𝐻𝑃) ∈ ω)
    < 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-15300 154 15301-15400 155 15401-15500 156 15501-15600 157 15601-15700 158 15701-15800 159 15801-15900 160 15901-16000 161 16001-16100 162 16101-16200 163 16201-16300 164 16301-16400 165 16401-16500 166 16501-16566
  Copyright terms: Public domain < Previous  Next >