File: Mathlib/Data/Nat/Prime/Basic.lean

full_name: Nat.Prime.five_le_of_ne_two_of_ne_three
code: theorem Prime.five_le_of_ne_two_of_ne_three {p : ℕ} (hp : p.Prime) (h_two : p ≠ 2)
    (h_three : p ≠ 3) : 5 ≤ p 
goal: 5 ≤ p

full_name: Nat.Prime.pred_pos
code: theorem Prime.pred_pos {p : ℕ} (pp : Prime p) : 0 < pred p 
goal: 0 < p.pred

full_name: Nat.succ_pred_prime
code: theorem succ_pred_prime {p : ℕ} (pp : Prime p) : succ (pred p) = p 
goal: p.pred.succ = p

full_name: Nat.exists_dvd_of_not_prime
code: theorem exists_dvd_of_not_prime {n : ℕ} (n2 : 2 ≤ n) (np : ¬Prime n) : ∃ m, m ∣ n ∧ m ≠ 1 ∧ m ≠ n 
goal: ∃ m, m ∣ n ∧ m ≠ 1 ∧ m ≠ n

full_name: Nat.exists_dvd_of_not_prime2
code: theorem exists_dvd_of_not_prime2 {n : ℕ} (n2 : 2 ≤ n) (np : ¬Prime n) :
    ∃ m, m ∣ n ∧ 2 ≤ m ∧ m < n 
goal: ∃ m, m ∣ n ∧ 2 ≤ m ∧ m < n

full_name: Nat.not_prime_of_dvd_of_ne
code: theorem not_prime_of_dvd_of_ne {m n : ℕ} (h1 : m ∣ n) (h2 : m ≠ 1) (h3 : m ≠ n) : ¬Prime n 
goal: ¬Nat.Prime n

full_name: Nat.not_prime_of_dvd_of_lt
code: theorem not_prime_of_dvd_of_lt {m n : ℕ} (h1 : m ∣ n) (h2 : 2 ≤ m) (h3 : m < n) : ¬Prime n 
goal: ¬Nat.Prime n

full_name: Nat.not_prime_iff_exists_dvd_ne
code: theorem not_prime_iff_exists_dvd_ne {n : ℕ} (h : 2 ≤ n) : (¬Prime n) ↔ ∃ m, m ∣ n ∧ m ≠ 1 ∧ m ≠ n 
goal: ¬Nat.Prime n ↔ ∃ m, m ∣ n ∧ m ≠ 1 ∧ m ≠ n

full_name: Nat.not_prime_iff_exists_dvd_lt
code: theorem not_prime_iff_exists_dvd_lt {n : ℕ} (h : 2 ≤ n) : (¬Prime n) ↔ ∃ m, m ∣ n ∧ 2 ≤ m ∧ m < n 
goal: ¬Nat.Prime n ↔ ∃ m, m ∣ n ∧ 2 ≤ m ∧ m < n

full_name: Nat.dvd_of_forall_prime_mul_dvd
code: theorem dvd_of_forall_prime_mul_dvd {a b : ℕ}
    (hdvd : ∀ p : ℕ, p.Prime → p ∣ a → p * a ∣ b) : a ∣ b 
goal: a ∣ b

full_name: Nat.exists_infinite_primes
code: /-- Euclid's theorem on the **infinitude of primes**.
Here given in the form: for every `n`, there exists a prime number `p ≥ n`. -/
theorem exists_infinite_primes (n : ℕ) : ∃ p, n ≤ p ∧ Prime p 
goal: ∃ p, n ≤ p ∧ Nat.Prime p

full_name: Nat.not_bddAbove_setOf_prime
code: /-- A version of `Nat.exists_infinite_primes` using the `BddAbove` predicate. -/
theorem not_bddAbove_setOf_prime : ¬BddAbove { p | Prime p } 
goal: ¬BddAbove {p | Nat.Prime p}

full_name: Nat.Prime.even_iff
code: theorem Prime.even_iff {p : ℕ} (hp : Prime p) : Even p ↔ p = 2 
goal: Even p ↔ p = 2

full_name: Nat.Prime.odd_of_ne_two
code: theorem Prime.odd_of_ne_two {p : ℕ} (hp : p.Prime) (h_two : p ≠ 2) : Odd p 
goal: Odd p

full_name: Nat.Prime.even_sub_one
code: theorem Prime.even_sub_one {p : ℕ} (hp : p.Prime) (h2 : p ≠ 2) : Even (p - 1) 
goal: Even (p - 1)

full_name: Nat.Prime.mod_two_eq_one_iff_ne_two
code: /-- A prime `p` satisfies `p % 2 = 1` if and only if `p ≠ 2`. -/
theorem Prime.mod_two_eq_one_iff_ne_two {p : ℕ} [Fact p.Prime] : p % 2 = 1 ↔ p ≠ 2 
goal: p % 2 = 1 ↔ p ≠ 2

full_name: Nat.coprime_of_dvd'
code: theorem coprime_of_dvd' {m n : ℕ} (H : ∀ k, Prime k → k ∣ m → k ∣ n → k ∣ 1) : Coprime m n 
goal: m.Coprime n

full_name: Nat.Prime.dvd_iff_not_coprime
code: theorem Prime.dvd_iff_not_coprime {p n : ℕ} (pp : Prime p) : p ∣ n ↔ ¬Coprime p n 
goal: p ∣ n ↔ ¬p.Coprime n

full_name: Nat.Prime.not_coprime_iff_dvd
code: theorem Prime.not_coprime_iff_dvd {m n : ℕ} : ¬Coprime m n ↔ ∃ p, Prime p ∧ p ∣ m ∧ p ∣ n 
goal: ¬m.Coprime n ↔ ∃ p, Nat.Prime p ∧ p ∣ m ∧ p ∣ n

full_name: Nat.Prime.not_dvd_mul
code: theorem Prime.not_dvd_mul {p m n : ℕ} (pp : Prime p) (Hm : ¬p ∣ m) (Hn : ¬p ∣ n) : ¬p ∣ m * n 
goal: ¬p ∣ m * n

full_name: Nat.coprime_two_left
code: @[simp] lemma coprime_two_left : Coprime 2 n ↔ Odd n 
goal: Nat.Coprime 2 n ↔ Odd n

full_name: Nat.coprime_two_right
code: @[simp] lemma coprime_two_right : n.Coprime 2 ↔ Odd n 
goal: n.Coprime 2 ↔ Odd n

full_name: Nat.Prime.dvd_of_dvd_pow
code: theorem Prime.dvd_of_dvd_pow {p m n : ℕ} (pp : Prime p) (h : p ∣ m ^ n) : p ∣ m 
goal: p ∣ m

full_name: Nat.Prime.not_prime_pow'
code: theorem Prime.not_prime_pow' {x n : ℕ} (hn : n ≠ 1) : ¬(x ^ n).Prime 
goal: ¬Nat.Prime (x ^ n)

full_name: Nat.Prime.not_prime_pow
code: theorem Prime.not_prime_pow {x n : ℕ} (hn : 2 ≤ n) : ¬(x ^ n).Prime 
goal: ¬Nat.Prime (x ^ n)

full_name: Nat.Prime.eq_one_of_pow
code: theorem Prime.eq_one_of_pow {x n : ℕ} (h : (x ^ n).Prime) : n = 1 
goal: n = 1

full_name: Nat.Prime.pow_eq_iff
code: theorem Prime.pow_eq_iff {p a k : ℕ} (hp : p.Prime) : a ^ k = p ↔ a = p ∧ k = 1 
goal: a ^ k = p ↔ a = p ∧ k = 1

full_name: Nat.pow_minFac
code: theorem pow_minFac {n k : ℕ} (hk : k ≠ 0) : (n ^ k).minFac = n.minFac 
goal: (n ^ k).minFac = n.minFac

full_name: Nat.Prime.pow_minFac
code: theorem Prime.pow_minFac {p k : ℕ} (hp : p.Prime) (hk : k ≠ 0) : (p ^ k).minFac = p 
goal: (p ^ k).minFac = p

full_name: Nat.Prime.mul_eq_prime_sq_iff
code: theorem Prime.mul_eq_prime_sq_iff {x y p : ℕ} (hp : p.Prime) (hx : x ≠ 1) (hy : y ≠ 1) :
    x * y = p ^ 2 ↔ x = p ∧ y = p 
goal: x * y = p ^ 2 ↔ x = p ∧ y = p

full_name: Nat.Prime.dvd_factorial
code: theorem Prime.dvd_factorial : ∀ {n p : ℕ} (_ : Prime p), p ∣ n ! ↔ p ≤ n
  
goal: Nat.Prime p → (p ∣ n ! ↔ p ≤ n)

full_name: Nat.Prime.coprime_pow_of_not_dvd
code: theorem Prime.coprime_pow_of_not_dvd {p m a : ℕ} (pp : Prime p) (h : ¬p ∣ a) : Coprime a (p ^ m) 
goal: a.Coprime (p ^ m)

full_name: Nat.coprime_primes
code: theorem coprime_primes {p q : ℕ} (pp : Prime p) (pq : Prime q) : Coprime p q ↔ p ≠ q 
goal: p.Coprime q ↔ p ≠ q

full_name: Nat.coprime_pow_primes
code: theorem coprime_pow_primes {p q : ℕ} (n m : ℕ) (pp : Prime p) (pq : Prime q) (h : p ≠ q) :
    Coprime (p ^ n) (q ^ m) 
goal: (p ^ n).Coprime (q ^ m)

full_name: Nat.coprime_or_dvd_of_prime
code: theorem coprime_or_dvd_of_prime {p} (pp : Prime p) (i : ℕ) : Coprime p i ∨ p ∣ i 
goal: p.Coprime i ∨ p ∣ i

full_name: Nat.coprime_of_lt_prime
code: theorem coprime_of_lt_prime {n p} (n_pos : 0 < n) (hlt : n < p) (pp : Prime p) : Coprime p n 
goal: p.Coprime n

full_name: Nat.eq_or_coprime_of_le_prime
code: theorem eq_or_coprime_of_le_prime {n p} (n_pos : 0 < n) (hle : n ≤ p) (pp : Prime p) :
    p = n ∨ Coprime p n 
goal: p = n ∨ p.Coprime n

full_name: Nat.dvd_prime_pow
code: theorem dvd_prime_pow {p : ℕ} (pp : Prime p) {m i : ℕ} : i ∣ p ^ m ↔ ∃ k ≤ m, i = p ^ k 
goal: i ∣ p ^ m ↔ ∃ k ≤ m, i = p ^ k

full_name: Nat.Prime.dvd_mul_of_dvd_ne
code: theorem Prime.dvd_mul_of_dvd_ne {p1 p2 n : ℕ} (h_neq : p1 ≠ p2) (pp1 : Prime p1) (pp2 : Prime p2)
    (h1 : p1 ∣ n) (h2 : p2 ∣ n) : p1 * p2 ∣ n 
goal: p1 * p2 ∣ n

full_name: Nat.eq_prime_pow_of_dvd_least_prime_pow
code: /-- If `p` is prime,
and `a` doesn't divide `p^k`, but `a` does divide `p^(k+1)`
then `a = p^(k+1)`.
-/
theorem eq_prime_pow_of_dvd_least_prime_pow {a p k : ℕ} (pp : Prime p) (h₁ : ¬a ∣ p ^ k)
    (h₂ : a ∣ p ^ (k + 1)) : a = p ^ (k + 1) 
goal: a = p ^ (k + 1)

full_name: Nat.ne_one_iff_exists_prime_dvd
code: theorem ne_one_iff_exists_prime_dvd : ∀ {n}, n ≠ 1 ↔ ∃ p : ℕ, p.Prime ∧ p ∣ n
  
goal: n ≠ 1 ↔ ∃ p, Nat.Prime p ∧ p ∣ n

full_name: Nat.eq_one_iff_not_exists_prime_dvd
code: theorem eq_one_iff_not_exists_prime_dvd {n : ℕ} : n = 1 ↔ ∀ p : ℕ, p.Prime → ¬p ∣ n 
goal: n = 1 ↔ ∀ (p : ℕ), Nat.Prime p → ¬p ∣ n

full_name: Nat.succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul
code: theorem succ_dvd_or_succ_dvd_of_succ_sum_dvd_mul {p : ℕ} (p_prime : Prime p) {m n k l : ℕ}
    (hpm : p ^ k ∣ m) (hpn : p ^ l ∣ n) (hpmn : p ^ (k + l + 1) ∣ m * n) :
    p ^ (k + 1) ∣ m ∨ p ^ (l + 1) ∣ n 
goal: p ^ (k + 1) ∣ m ∨ p ^ (l + 1) ∣ n

full_name: Nat.prime_iff_prime_int
code: theorem prime_iff_prime_int {p : ℕ} : p.Prime ↔ _root_.Prime (p : ℤ) 
goal: Nat.Prime p ↔ Prime ↑p

full_name: Nat.Prime.pow_inj
code: /-- Two prime powers with positive exponents are equal only when the primes and the
exponents are equal. -/
lemma Prime.pow_inj {p q m n : ℕ} (hp : p.Prime) (hq : q.Prime)
    (h : p ^ (m + 1) = q ^ (n + 1)) : p = q ∧ m = n 
goal: p = q ∧ m = n

full_name: Nat.exists_pow_lt_factorial
code: theorem exists_pow_lt_factorial (c : ℕ) : ∃ n0 > 1, ∀ n ≥ n0, c ^ n < (n - 1)! 
goal: ∃ n0 > 1, ∀ n ≥ n0, c ^ n < (n - 1)!

full_name: Nat.exists_mul_pow_lt_factorial
code: theorem exists_mul_pow_lt_factorial (a : ℕ) (c : ℕ) : ∃ n0, ∀ n ≥ n0, a * c ^ n < (n - 1)! 
goal: ∃ n0, ∀ n ≥ n0, a * c ^ n < (n - 1)!

full_name: Nat.exists_prime_mul_pow_lt_factorial
code: theorem exists_prime_mul_pow_lt_factorial (n a c : ℕ) : ∃ p > n, p.Prime ∧ a * c ^ p < (p - 1)! 
goal: ∃ p > n, Nat.Prime p ∧ a * c ^ p < (p - 1)!

full_name: Int.prime_two
code: theorem prime_two : Prime (2 : ℤ) 
goal: Prime 2

full_name: Int.prime_three
code: theorem prime_three : Prime (3 : ℤ) 
goal: Prime 3