Documentation

LeanPool.OddPrimeValuationDistribution.CarryPolynomial

Carry polynomials in an arbitrary odd base #

The coefficient of X ^ r in the length-k polynomial counts odd-base digit words whose doubling creates exactly r carries. Splitting the digit set at the carry threshold gives a two-state transfer matrix and its scalar second-order recurrence.

Convert an odd-base word to natural digits.

Equations
Instances For

    Odd-base carry-count enumerator from an arbitrary incoming carry.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Odd-base carry-count enumerator from incoming carry zero.

      Equations
      Instances For
        def OddPrimeValuationDistribution.oddCarryWordsSuccEquiv (half length : ) :
        List.Vector (Fin (oddBase half)) (length + 1) (_ : Fin (oddBase half)) × List.Vector (Fin (oddBase half)) length

        Peeling the least significant digit from an odd-base word.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem OddPrimeValuationDistribution.oddCarryPolynomialFrom_succ (half carry length : ) :
          oddCarryPolynomialFrom half carry (length + 1) = digit : Fin (oddBase half), Polynomial.X ^ oddDoubleCarryStep half carry digit * oddCarryPolynomialFrom half (oddDoubleCarryStep half carry digit) length

          Split digits into the half + 1 no-carry choices and half carry choices when the incoming carry is zero.

          Equations
          Instances For

            Split digits into the half no-carry choices and half + 1 carry choices when the incoming carry is one.

            Equations
            Instances For
              @[simp]
              @[simp]
              theorem OddPrimeValuationDistribution.oddOneCarryDigitSplitEquiv_symm_inr_val (half : ) (digit : Fin (half + 1)) :
              ((oddOneCarryDigitSplitEquiv half).symm (Sum.inr digit)) = half + digit
              theorem OddPrimeValuationDistribution.oddCarryPolynomial_recurrence (half length : ) :
              oddCarryPolynomial half (length + 2) + (oddBase half) * Polynomial.X * oddCarryPolynomial half length = ↑(half + 1) * (1 + Polynomial.X) * oddCarryPolynomial half (length + 1)

              Headline recurrence for the full carry distribution in odd base 2 * half + 1.