Documentation

LeanPool.GKPCarry.InfiniteSieve

An exact all-depth modular sieve for GKP carries #

For every ternary prefix depth n + 3, powers of two have exact period 2 * 3 ^ (n + 2). In one period, precisely (n + 9) * 2 ^ n exponent classes have fewer than two visible doubling carries. Every other class is an infinite congruence class on which the central binomial coefficient is divisible by nine.

This is an exact infinite family of certified cases. The uncertified classes at each finite depth may acquire carries later; this theorem neither decides them nor proves the universal GKP conjecture.

noncomputable def GKPCarry.twoPowerTernaryUnitWordEquiv (length : ) :
Fin (2 * 3 ^ length) TernaryUnitWords length

One exponent period is equivalent to all fixed-length ternary unit words.

Equations
Instances For
    theorem GKPCarry.ternaryWordValue_twoPowerTernaryUnitWordEquiv_apply (length : ) (exponent : Fin (2 * 3 ^ length)) :
    ternaryWordValue ((twoPowerTernaryUnitWordEquiv length) exponent) = 2 ^ exponent % 3 ^ (length + 1)

    The word corresponding to an exponent is the fixed-length ternary expansion of its power-of-two residue.

    @[reducible, inline]

    Exponent classes not yet certified after reading n + 3 ternary digits. They are not counterexamples: later digits may supply the missing carries.

    Equations
    Instances For
      @[reducible, inline]

      Exponent classes certified after reading n + 3 ternary digits.

      Equations
      Instances For

        The uncertified exponent classes are exactly the deficient unit words counted by the carry automaton.

        Equations
        Instances For

          Exact residual count: after n + 3 digits, precisely (n + 9) * 2 ^ n exponent classes remain uncertified.

          The complementary certified set has the corresponding exact size.

          Asymptotic strength of the sieve #

          The proportion of exponent classes left uncertified at depth n + 3, written in a form that exposes its geometric decay.

          Equations
          Instances For

            The analytic proportion is exactly the ratio of the residual class count to the full exponent period.

            The proportion of exponent classes left unresolved by the finite-prefix sieve tends to zero as the prefix depth increases.

            noncomputable def GKPCarry.certifiedClassProportion (n : ) :

            The complementary proportion of exponent classes certified by the sieve tends to one.

            Equations
            Instances For

              A certificate for the reduced exponent class propagates to every exponent in that congruence class and proves divisibility by nine.

              theorem GKPCarry.nine_dvd_centralBinom_two_pow_of_certified_class (n k : ) (exponentClass : CertifiedExponentClasses n) (hk : k % (2 * 3 ^ (n + 2)) = exponentClass) :

              Every certified class denotes an infinite congruence class of GKP inputs whose central binomial coefficients are divisible by nine.

              theorem GKPCarry.badCarryLanguage_two_pow_eq_false_of_certified_class (n k : ) (exponentClass : CertifiedExponentClasses n) (hk : k % (2 * 3 ^ (n + 2)) = exponentClass) :

              The same certified classes avoid the deficient-carry language appearing in the exact GKP characterization.

              theorem GKPCarry.gkp_exact_modular_sieve (n : ) :
              Fintype.card (CertifiedExponentClasses n) = 2 * 3 ^ (n + 2) - (n + 9) * 2 ^ n ∀ (exponentClass : CertifiedExponentClasses n) (k : ), k % (2 * 3 ^ (n + 2)) = exponentClass9 (2 ^ k).centralBinom badCarryLanguage (Nat.digits 3 (2 ^ k)) = false

              Exact all-depth modular GKP sieve. At every depth, the theorem gives the exact number of certified exponent classes and proves the GKP divisibility conclusion on every exponent in each such class.