Documentation

Complexity.Computability.Circuit.Boolean.Iteration.ModulusCounter

The modular-counter permutation: exponential lower bounds and typical powers #

Complexity/Computability/Circuit/Boolean/Iteration/ModulusCounter/Basic.lean defines the single-step modular-counter permutation counterStep k on 2 k bits (ModulusCounter.power 1), constructs its linear-size De Morgan circuit of size at most 50 * k + 20, and proves that its powers below ModulusCounter.period k = lcm(1, …, 2 ^ k - 1) are pairwise distinct. Complexity/Computability/Circuit/Boolean/Iteration/ModulusCounter/Remainders.lean relates counter powers to integer remainders and short-exponent circuits.

By Chebyshev's lower bound on lcmUpto (2 ^ k - 1) and the ordered-syntax circuit count from CircuitCounting.lean, this file proves that for every k ≥ 64:

Main definitions #

Main results #

References #

Worst-case and typical-power lower bounds #

The De Morgan description budget for lowerBudget k gates is strictly smaller than ModulusCounter.period k for k ≥ 64.

For every k ≥ 64, some exponent T < ModulusCounter.period k requires more than lowerBudget k gates.

theorem Cslib.Circuits.Boolean.Iteration.counter_power_lower_bound (k : ℕ) (hk : 64 ≤ k) :
∃ (c : Circuit signature (k + k) (k + k)), c.size ≤ 50 * (k + 1) ∧ Function.Bijective (c.eval interpretation) ∧ ∃ T < ModulusCounter.period k, ∀ (out : Circuit signature (k + k) (k + k)), out.Computes interpretation (c.eval interpretation)^[T] → 2 ^ k / (1024 * (k + 1)) < out.size

Matching exponential lower bound. For every k ≥ 64, there is a bijective circuit c on 2 k bits of size at most 50 * (k + 1) with a power c^[T] (T < ModulusCounter.period k) requiring more than 2 ^ k / (1024 * (k + 1)) gates.

Exponents below ModulusCounter.period k whose power has a circuit of size at most q.

Instances For

    Exponents below ModulusCounter.period k whose power requires more than q gates.

    Instances For
      theorem Cslib.Circuits.Boolean.Iteration.lowerBudget_description_margin (k : ℕ) (hk : 64 ≤ k) :
      have q := lowerBudget k; 3 * q + (k + 2) * (2 * q + (k + k) + 1) + k + 2 ^ (k - 1) ≤ 2 ^ k - 1

      The description budget at lowerBudget k leaves an additive margin of 2 ^ (k - 1) in the binary exponent.

      Almost every counter power is hard. At most a 2 ^ (-2 ^ (k - 1)) fraction of exponents below ModulusCounter.period k have circuits of size at most lowerBudget k.

      For k ≥ 64, more than half of the exponents below ModulusCounter.period k lie in hardCounterPowers k (lowerBudget k).

      All powers ModulusCounter.power T for T < M with M ≤ ModulusCounter.period k are pairwise distinct.

      theorem Cslib.Circuits.Boolean.Iteration.exists_hard_counter_power_up_to {k M q : ℕ} (hM : M ≤ ModulusCounter.period k) (large : signature.orderedBudget (k + k) (k + k) q < M) :
      ∃ T < M, ∀ (out : Circuit signature (k + k) (k + k)), out.Computes interpretation (ModulusCounter.power T) → q < out.size

      If signature.orderedBudget (k + k) (k + k) q < M and M ≤ ModulusCounter.period k, some exponent T < M requires more than q gates.