OAI/NumberTheory/JointDickman/Arithmetic/SieveCRT.lean

GitHub source file

4 declarations, 0 contain sorry, 0 declared as axioms

Exact Chinese remainder counts for the sieve

  1. theorem OAI.JointDickman.crt_period_sum line 13

    Source documentation

    Uniform residue sums factor over any finite pairwise coprime family.

    theorem crt_period_sum {ι : Type*} [Fintype ι] [DecidableEq ι]
        (m : ι → ℕ) [∀ i, NeZero (m i)] (hm : ∀ i, 0 < m i)
        (hcop : Pairwise (fun i j => (m i).Coprime (m j)))
        (f : ∀ i, ZMod (m i) → ℝ) :
        (∑ n ∈ range (∏ i, m i), ∏ i, f i (n : ZMod (m i))) =
          ∏ i, ∑ a : ZMod (m i), f i a := by
    …
  2. theorem OAI.JointDickman.crt_root_period_count line 39

    Source documentation

    The simultaneous prescribed-root count is exactly the product of the local root counts, including an empty family of moduli.

    theorem crt_root_period_count {ι : Type*} [Fintype ι] [DecidableEq ι]
        (m : ι → ℕ) (hm : ∀ i, 0 < m i)
        (hcop : Pairwise (fun i j => (m i).Coprime (m j)))
        (A : ∀ i, Finset (ZMod (m i))) :
        (∑ n ∈ range (∏ i, m i),
          if ∀ i, (n : ZMod (m i)) ∈ A i then (1 : ℝ) else 0) =
          ∏ i, ((A i).card : ℝ) := by
    …
  3. theorem OAI.JointDickman.crt_root_interval_error line 64

    Source documentation

    An interval intersection has at most two errors per simultaneous residue class, independent of the modulus and the interval location.

    theorem crt_root_interval_error {ι : Type*} [Fintype ι] [DecidableEq ι]
        (m : ι → ℕ) (hm : ∀ i, 0 < m i)
        (hcop : Pairwise (fun i j => (m i).Coprime (m j)))
        (A : ∀ i, Finset (ZMod (m i))) {a b : ℕ} (hab : a ≤ b) :
        |(∑ n ∈ Ico a b, if ∀ i, (n : ZMod (m i)) ∈ A i then (1 : ℝ) else 0) -
          ((b : ℝ) - a) * ∏ i, ((A i).card : ℝ) / (m i)| ≤
            2 * ∏ i, ((A i).card : ℝ) := by
    …
  4. theorem OAI.JointDickman.prime_root_interval_error line 93

    Source documentation

    Specialization to a finite set of distinct primes.

    theorem prime_root_interval_error (P : Finset ℕ) (hP : ∀ p ∈ P, p.Prime)
        (A : ∀ p : ℕ, Finset (ZMod p)) {a b : ℕ} (hab : a ≤ b) :
        |(∑ n ∈ Ico a b, if ∀ p ∈ P, (n : ZMod p) ∈ A p then (1 : ℝ) else 0) -
          ((b : ℝ) - a) * ∏ p ∈ P, ((A p).card : ℝ) / p| ≤
            2 * ∏ p ∈ P, ((A p).card : ℝ) := by
    …