mathlib3 documentation

data.nat.squarefree

Lemmas about squarefreeness of natural numbers #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4. A number is squarefree when it is not divisible by any squares except the squares of units.

Main Results #

Tags #

squarefree, multiplicity

theorem nat.squarefree_of_factorization_le_one {n : ℕ} (hn : n ≠ 0) (hn' : ∀ (p : ℕ), ⇑(n.factorization) p ≤ 1) :
theorem nat.squarefree.ext_iff {n m : ℕ} (hn : squarefree n) (hm : squarefree m) :
n = m ↔ ∀ (p : ℕ), nat.prime p → (p ∣ n ↔ p ∣ m)
theorem nat.squarefree_pow_iff {n k : ℕ} (hn : n ≠ 1) (hk : k ≠ 0) :

Assuming that n has no factors less than k, returns the smallest prime p such that p^2 ∣ n.

Equations
def nat.min_sq_fac (n : ℕ) :

Returns the smallest prime factor p of n such that p^2 ∣ n, or none if there is no such p (that is, n is squarefree). See also squarefree_iff_min_sq_fac.

Equations
def nat.min_sq_fac_prop (n : ℕ) :

The correctness property of the return value of min_sq_fac.

  • If none, then n is squarefree;
  • If some d, then d is a minimal square factor of n
Equations
theorem nat.min_sq_fac_prop_div (n : ℕ) {k : ℕ} (pk : nat.prime k) (dk : k ∣ n) (dkk : ¬k * k ∣ n) {o : option ℕ} (H : (n / k).min_sq_fac_prop o) :
theorem nat.min_sq_fac_aux_has_prop {n : ℕ} (k : ℕ) :
0 < n → ∀ (i : ℕ), k = 2 * i + 3 → (∀ (m : ℕ), nat.prime m → m ∣ n → k ≤ m) → n.min_sq_fac_prop (n.min_sq_fac_aux k)
theorem nat.min_sq_fac_dvd {n d : ℕ} (h : n.min_sq_fac = option.some d) :
d * d ∣ n
theorem nat.min_sq_fac_le_of_dvd {n d : ℕ} (h : n.min_sq_fac = option.some d) {m : ℕ} (m2 : 2 ≤ m) (md : m * m ∣ n) :
d ≤ m
theorem nat.sq_mul_squarefree_of_pos {n : ℕ} (hn : 0 < n) :
∃ (a b : ℕ), 0 < a ∧ 0 < b ∧ b ^ 2 * a = n ∧ squarefree a
theorem nat.sq_mul_squarefree_of_pos' {n : ℕ} (h : 0 < n) :
∃ (a b : ℕ), (b + 1) ^ 2 * (a + 1) = n ∧ squarefree (a + 1)
theorem nat.sq_mul_squarefree (n : ℕ) :
∃ (a b : ℕ), b ^ 2 * a = n ∧ squarefree a
theorem nat.squarefree_mul {m n : ℕ} (hmn : m.coprime n) :

squarefree is multiplicative. Note that the → direction does not require hmn and generalizes to arbitrary commutative monoids. See squarefree.of_mul_left and squarefree.of_mul_right above for auxiliary lemmas.

Square-free prover #

A predicate representing partial progress in a proof of squarefree.

Equations
theorem tactic.norm_num.squarefree_helper_0 {k : ℕ} (k0 : 0 < k) {p : ℕ} (pp : nat.prime p) (h : bit1 k ≤ p) :
bit1 (k + 1) ≤ p ∨ bit1 k = p
theorem tactic.norm_num.squarefree_helper_2 (n k k' c : ℕ) (e : k + 1 = k') (hc : bit1 n % bit1 k = c) (c0 : 0 < c) (h : tactic.norm_num.squarefree_helper n k') :
theorem tactic.norm_num.squarefree_helper_3 (n n' k k' c : ℕ) (e : k + 1 = k') (hn' : bit1 n' * bit1 k = bit1 n) (hc : bit1 n' % bit1 k = c) (c0 : 0 < c) (H : tactic.norm_num.squarefree_helper n' k') :
theorem tactic.norm_num.squarefree_helper_4 (n k k' : ℕ) (e : bit1 k * bit1 k = k') (hd : bit1 n < k') :
theorem tactic.norm_num.not_squarefree_mul (a aa b n : ℕ) (ha : a * a = aa) (hb : aa * b = n) (h₁ : 1 < a) :

Given e a natural numeral and a : nat with a^2 ∣ n, return ⊢ ¬ squarefree e.

meta def tactic.norm_num.prove_squarefree_aux (ic : tactic.instance_cache) (en en1 : expr) (n1 : ℕ) (ek : expr) (k : ℕ) :

Given en,en1 := bit1 en, n1 the value of en1, ek, returns ⊢ squarefree_helper en ek.

Given n > 0 a squarefree natural numeral, returns ⊢ squarefree n.

Evaluates the squarefree predicate on naturals.