Prime numbers #
This file contains some results about prime numbers which depend on finiteness of sets.
A version of Nat.exists_infinite_primes
using the Set.Infinite
predicate.
The prime factors of a natural number as a finset.
Equations
- n.primeFactors = List.toFinset (Nat.factors n)
Instances For
theorem
Nat.mem_primeFactors_iff_mem_factors
{n : ℕ}
{p : ℕ}
:
p ∈ n.primeFactors ↔ p ∈ Nat.factors n
@[simp]
theorem
Nat.disjoint_primeFactors
{a : ℕ}
{b : ℕ}
(ha : a ≠ 0)
(hb : b ≠ 0)
:
Disjoint a.primeFactors b.primeFactors ↔ Nat.Coprime a b
theorem
Nat.Coprime.disjoint_primeFactors
{a : ℕ}
{b : ℕ}
(hab : Nat.Coprime a b)
:
Disjoint a.primeFactors b.primeFactors