File: Mathlib/Data/Nat/Squarefree.lean

full_name: Nat.squarefree_iff_nodup_primeFactorsList
code: theorem squarefree_iff_nodup_primeFactorsList {n : ℕ} (h0 : n ≠ 0) :
    Squarefree n ↔ n.primeFactorsList.Nodup 
goal: Squarefree n ↔ n.primeFactorsList.Nodup

full_name: Squarefree.nodup_primeFactorsList
code: theorem Squarefree.nodup_primeFactorsList {n : ℕ} (hn : Squarefree n) : n.primeFactorsList.Nodup 
goal: n.primeFactorsList.Nodup

full_name: Nat.squarefree_iff_prime_squarefree
code: theorem squarefree_iff_prime_squarefree {n : ℕ} : Squarefree n ↔ ∀ x, Prime x → ¬x * x ∣ n 
goal: Squarefree n ↔ ∀ (x : ℕ), Nat.Prime x → ¬x * x ∣ n

full_name: Squarefree.natFactorization_le_one
code: theorem _root_.Squarefree.natFactorization_le_one {n : ℕ} (p : ℕ) (hn : Squarefree n) :
    n.factorization p ≤ 1 
goal: n.factorization p ≤ 1

full_name: Nat.factorization_eq_one_of_squarefree
code: lemma factorization_eq_one_of_squarefree (hn : Squarefree n) (hp : p.Prime) (hpn : p ∣ n) :
    factorization n p = 1 
goal: n.factorization p = 1

full_name: Nat.squarefree_of_factorization_le_one
code: theorem squarefree_of_factorization_le_one {n : ℕ} (hn : n ≠ 0) (hn' : ∀ p, n.factorization p ≤ 1) :
    Squarefree n 
goal: Squarefree n

full_name: Nat.squarefree_iff_factorization_le_one
code: theorem squarefree_iff_factorization_le_one {n : ℕ} (hn : n ≠ 0) :
    Squarefree n ↔ ∀ p, n.factorization p ≤ 1 
goal: Squarefree n ↔ ∀ (p : ℕ), n.factorization p ≤ 1

full_name: Nat.Squarefree.ext_iff
code: theorem Squarefree.ext_iff {n m : ℕ} (hn : Squarefree n) (hm : Squarefree m) :
    n = m ↔ ∀ p, Prime p → (p ∣ n ↔ p ∣ m) 
goal: n = m ↔ ∀ (p : ℕ), Nat.Prime p → (p ∣ n ↔ p ∣ m)

full_name: Nat.squarefree_pow_iff
code: theorem squarefree_pow_iff {n k : ℕ} (hn : n ≠ 1) (hk : k ≠ 0) :
    Squarefree (n ^ k) ↔ Squarefree n ∧ k = 1 
goal: Squarefree (n ^ k) ↔ Squarefree n ∧ k = 1

full_name: Nat.squarefree_and_prime_pow_iff_prime
code: theorem squarefree_and_prime_pow_iff_prime {n : ℕ} : Squarefree n ∧ IsPrimePow n ↔ Prime n 
goal: Squarefree n ∧ IsPrimePow n ↔ Nat.Prime n

full_name: Nat.minSqFacAux
code: /-- Assuming that `n` has no factors less than `k`, returns the smallest prime `p` such that
  `p^2 ∣ n`. -/
def minSqFacAux : ℕ → ℕ → Option ℕ
  
goal: ℕ → ℕ → Option ℕ

full_name: Nat.minSqFac
code: /-- 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 `Nat.squarefree_iff_minSqFac`. -/
def minSqFac (n : ℕ) : Option ℕ 
goal: Option ℕ

full_name: Nat.MinSqFacProp
code: /-- The correctness property of the return value of `minSqFac`.
  * If `none`, then `n` is squarefree;
  * If `some d`, then `d` is a minimal square factor of `n` -/
def MinSqFacProp (n : ℕ) : Option ℕ → Prop
  
goal: Option ℕ → Prop

full_name: Nat.minSqFacProp_div
code: theorem minSqFacProp_div (n) {k} (pk : Prime k) (dk : k ∣ n) (dkk : ¬k * k ∣ n) {o}
    (H : MinSqFacProp (n / k) o) : MinSqFacProp n o 
goal: n.MinSqFacProp o

full_name: Nat.minSqFacAux_has_prop
code: theorem minSqFacAux_has_prop {n : ℕ} (k) (n0 : 0 < n) (i) (e : k = 2 * i + 3)
    (ih : ∀ m, Prime m → m ∣ n → k ≤ m) : MinSqFacProp n (minSqFacAux n k) 
goal: n.MinSqFacProp (n.minSqFacAux k)

full_name: Nat.minSqFac_has_prop
code: theorem minSqFac_has_prop (n : ℕ) : MinSqFacProp n (minSqFac n) 
goal: n.MinSqFacProp n.minSqFac

full_name: Nat.minSqFac_prime
code: theorem minSqFac_prime {n d : ℕ} (h : n.minSqFac = some d) : Prime d 
goal: Nat.Prime d

full_name: Nat.minSqFac_dvd
code: theorem minSqFac_dvd {n d : ℕ} (h : n.minSqFac = some d) : d * d ∣ n 
goal: d * d ∣ n

full_name: Nat.minSqFac_le_of_dvd
code: theorem minSqFac_le_of_dvd {n d : ℕ} (h : n.minSqFac = some d) {m} (m2 : 2 ≤ m) (md : m * m ∣ n) :
    d ≤ m 
goal: d ≤ m

full_name: Nat.squarefree_iff_minSqFac
code: theorem squarefree_iff_minSqFac {n : ℕ} : Squarefree n ↔ n.minSqFac = none 
goal: Squarefree n ↔ n.minSqFac = none

full_name: Nat.instDecidablePredSquarefree
code: instance : DecidablePred (Squarefree : ℕ → Prop) 
goal: DecidablePred Squarefree

full_name: Nat.squarefree_two
code: theorem squarefree_two : Squarefree 2 
goal: Squarefree 2

full_name: Nat.divisors_filter_squarefree_of_squarefree
code: theorem divisors_filter_squarefree_of_squarefree {n : ℕ} (hn : Squarefree n) :
    n.divisors.filter Squarefree = n.divisors 
goal: Finset.filter Squarefree n.divisors = n.divisors

full_name: Nat.divisors_filter_squarefree
code: theorem divisors_filter_squarefree {n : ℕ} (h0 : n ≠ 0) :
    (n.divisors.filter Squarefree).val =
      (UniqueFactorizationMonoid.normalizedFactors n).toFinset.powerset.val.map fun x =>
        x.val.prod 
goal: (Finset.filter Squarefree n.divisors).val =
  Multiset.map (fun x => x.val.prod) (UniqueFactorizationMonoid.normalizedFactors n).toFinset.powerset.val

full_name: Nat.sum_divisors_filter_squarefree
code: theorem sum_divisors_filter_squarefree {n : ℕ} (h0 : n ≠ 0) {α : Type*} [AddCommMonoid α]
    {f : ℕ → α} :
    ∑ i ∈ n.divisors.filter Squarefree, f i =
      ∑ i ∈ (UniqueFactorizationMonoid.normalizedFactors n).toFinset.powerset, f i.val.prod 
goal: ∑ i ∈ Finset.filter Squarefree n.divisors, f i =
  ∑ i ∈ (UniqueFactorizationMonoid.normalizedFactors n).toFinset.powerset, f i.val.prod

full_name: Nat.sq_mul_squarefree_of_pos
code: theorem sq_mul_squarefree_of_pos {n : ℕ} (hn : 0 < n) :
    ∃ a b : ℕ, 0 < a ∧ 0 < b ∧ b ^ 2 * a = n ∧ Squarefree a 
goal: ∃ a b, 0 < a ∧ 0 < b ∧ b ^ 2 * a = n ∧ Squarefree a

full_name: Nat.sq_mul_squarefree_of_pos'
code: theorem sq_mul_squarefree_of_pos' {n : ℕ} (h : 0 < n) :
    ∃ a b : ℕ, (b + 1) ^ 2 * (a + 1) = n ∧ Squarefree (a + 1) 
goal: ∃ a b, (b + 1) ^ 2 * (a + 1) = n ∧ Squarefree (a + 1)

full_name: Nat.sq_mul_squarefree
code: theorem sq_mul_squarefree (n : ℕ) : ∃ a b : ℕ, b ^ 2 * a = n ∧ Squarefree a 
goal: ∃ a b, b ^ 2 * a = n ∧ Squarefree a

full_name: Nat.squarefree_mul
code: /-- `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. -/
theorem squarefree_mul {m n : ℕ} (hmn : m.Coprime n) :
    Squarefree (m * n) ↔ Squarefree m ∧ Squarefree n 
goal: Squarefree (m * n) ↔ Squarefree m ∧ Squarefree n

full_name: Nat.coprime_of_squarefree_mul
code: theorem coprime_of_squarefree_mul {m n : ℕ} (h : Squarefree (m * n)) : m.Coprime n 
goal: m.Coprime n

full_name: Nat.squarefree_mul_iff
code: theorem squarefree_mul_iff {m n : ℕ} :
    Squarefree (m * n) ↔ m.Coprime n ∧ Squarefree m ∧ Squarefree n 
goal: Squarefree (m * n) ↔ m.Coprime n ∧ Squarefree m ∧ Squarefree n

full_name: Nat.coprime_div_gcd_of_squarefree
code: lemma coprime_div_gcd_of_squarefree (hm : Squarefree m) (hn : n ≠ 0) : Coprime (m / gcd m n) n 
goal: (m / m.gcd n).Coprime n

full_name: Nat.prod_primeFactors_of_squarefree
code: lemma prod_primeFactors_of_squarefree (hn : Squarefree n) : ∏ p ∈ n.primeFactors, p = n 
goal: ∏ p ∈ n.primeFactors, p = n

full_name: Nat.primeFactors_prod
code: lemma primeFactors_prod (hs : ∀ p ∈ s, p.Prime) : primeFactors (∏ p ∈ s, p) = s 
goal: (∏ p ∈ s, p).primeFactors = s

full_name: Nat.primeFactors_div_gcd
code: lemma primeFactors_div_gcd (hm : Squarefree m) (hn : n ≠ 0) :
    primeFactors (m / m.gcd n) = primeFactors m \ primeFactors n 
goal: (m / m.gcd n).primeFactors = m.primeFactors \ n.primeFactors

full_name: Nat.prod_primeFactors_invOn_squarefree
code: lemma prod_primeFactors_invOn_squarefree :
    Set.InvOn (fun n : ℕ ↦ (factorization n).support) (fun s ↦ ∏ p ∈ s, p)
      {s | ∀ p ∈ s, p.Prime} {n | Squarefree n} 
goal: Set.InvOn (fun n => n.factorization.support) (fun s => ∏ p ∈ s, p) {s | ∀ p ∈ s, Nat.Prime p} {n | Squarefree n}

full_name: Nat.prod_primeFactors_sdiff_of_squarefree
code: theorem prod_primeFactors_sdiff_of_squarefree {n : ℕ} (hn : Squarefree n) {t : Finset ℕ}
    (ht : t ⊆ n.primeFactors) :
    ∏ a ∈ (n.primeFactors \ t), a = n / ∏ a ∈ t, a 
goal: ∏ a ∈ n.primeFactors \ t, a = n / ∏ a ∈ t, a