Documentation

LeanPool.DeadEnds.Basic

Counting functions for joint conditions #

@[implicit_reducible]
noncomputable instance LeanPool.DeadEnds.decidablePredViolation (b : ) (T : Finset ) (S : Finset Nat.Primes) :
DecidablePred fun (N : ) => qS, q ^ 2 N dT, q ^ 2 b * N + d
Equations

A positive integer N is a base-b dead end: N is square-free, yet b * N + d fails to be square-free for every digit d ∈ {0, …, b - 1}.

Equations
Instances For

    The number of base-b dead ends in [1, X].

    Equations
    Instances For

      The asymptotic density of base-b dead ends equals D, i.e. countBaseBDeadEnds b X / XD as X → ∞.

      Equations
      Instances For
        noncomputable def LeanPool.DeadEnds.localDensityFactor (p b : ) (T : Finset ) :

        The local density factor μ_p(b, T): the fraction of residues r ∈ [0, p²) with p² ∤ r and p² ∤ b * r + d for every dT.

        Equations
        Instances For

          The joint square-free density α(b, T) = ∏_p μ_p(b, T), the infinite product over all primes.

          Equations
          Instances For

            The explicit inclusion-exclusion formula ∑_{T ⊆ {0,…,b-1}} (-1)^{|T|} α(b, T) for D_b.

            Equations
            Instances For

              Count N in [1,X] such that N is squarefree and bN+d is squarefree for all d in T

              Equations
              Instances For

                Helper lemmas for summability of local density deviations #

                The residues r ∈ [0, p²) divisible by (just r = 0).

                Equations
                Instances For
                  theorem LeanPool.DeadEnds.b_coprime_p_sq (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) :
                  b.Coprime (p ^ 2)
                  theorem LeanPool.DeadEnds.r_eq_inv_image (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) (r : ) (hr : r < p ^ 2) (d : ) (hd : p ^ 2 b * r + d) :
                  r = (-d * (↑b)⁻¹).val
                  theorem LeanPool.DeadEnds.filtered_subset_image (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) (T : Finset ) (_hT : T Finset.range b) :
                  {rFinset.range (p ^ 2) | dT, p ^ 2 b * r + d} Finset.image (fun (d : ) => (-d * (↑b)⁻¹).val) T
                  theorem LeanPool.DeadEnds.bad_residues_type_B_card_le (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) (T : Finset ) (hT : T Finset.range b) :
                  {rFinset.range (p ^ 2) | dT, p ^ 2 b * r + d}.card T.card

                  The residues r ∈ [0, p²) for which p² ∣ b * r + d for some dT.

                  Equations
                  Instances For
                    theorem LeanPool.DeadEnds.bad_residues_card_le (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) (T : Finset ) (hT : T Finset.range b) :
                    {rFinset.range (p ^ 2) | p ^ 2 r dT, p ^ 2 b * r + d}.card T.card + 1
                    theorem LeanPool.DeadEnds.valid_residues_card_ge (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) (T : Finset ) (hT : T Finset.range b) :
                    p ^ 2 - (T.card + 1) {rFinset.range (p ^ 2) | ¬p ^ 2 r dT, ¬p ^ 2 b * r + d}.card
                    theorem LeanPool.DeadEnds.localDensityFactor_ge_sub (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) (T : Finset ) (hT : T Finset.range b) :
                    1 - (T.card + 1) / p ^ 2 localDensityFactor p b T
                    theorem LeanPool.DeadEnds.localDensityFactor_near_one_large_prime (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) (T : Finset ) (hT : T Finset.range b) :
                    |localDensityFactor p b T - 1| (T.card + 1) / p ^ 2
                    theorem LeanPool.DeadEnds.bound_summable (b : ) (_hb : 2 b) (T : Finset ) (_hT : T Finset.range b) :
                    Summable fun (p : Nat.Primes) => (T.card + 1) / p ^ 2
                    theorem LeanPool.DeadEnds.deviation_bound_for_large_prime (p : ) (hp : Nat.Prime p) (b : ) (hb : 2 b) (hbp : b < p) (T : Finset ) (hT : T Finset.range b) :
                    |localDensityFactor p b T - 1| (T.card + 1) / p ^ 2

                    The sum ∑_p |μ_p(b,T) - 1| converges. By localDensityFactor_near_one, |μ_p - 1| ≤ (|T|+1)/p². Since ∑_p 1/p² converges (it's bounded by ∑_n 1/n² = π²/6), the sum converges.

                    theorem LeanPool.DeadEnds.multipliable_of_deviation_summable (b : ) (_hb : 2 b) (T : Finset ) (_hT : T Finset.range b) (h_sum : Summable fun (p : Nat.Primes) => |localDensityFactor (↑p) b T - 1|) :

                    Multipliability from summability of deviations. Write μ_p = 1 + (μ_p - 1). If ∑|μ_p - 1| converges, then ∏ μ_p converges. Mathlib's Multipliable.of_norm_bounded or related lemmas apply when the factors are close to 1, which follows from sum_localDensityFactor_deviation_summable.

                    theorem LeanPool.DeadEnds.multipliable_of_deviation_summable_subtype (b : ) (_hb : 2 b) (T : Finset ) (_hT : T Finset.range b) (U : Set Nat.Primes) (h_sum : Summable fun (p : U) => |localDensityFactor (↑p) b T - 1|) :
                    Multipliable fun (p : U) => localDensityFactor (↑p) b T
                    theorem LeanPool.DeadEnds.tprod_compl_le_one (b : ) (_hb : 2 b) (T : Finset ) (_hT : T Finset.range b) (S : Finset Nat.Primes) :
                    ∏' (x : { p : Nat.Primes // pS }), localDensityFactor (↑x) b T 1