Documentation

Complexitylib.Classes.PCP.Internal.CoinEnum

Coin strings from their index #

A loop over the coin strings of a verifier receives its index in unary, since that is the form a polynomial-time loop counter takes. BinCounter turns such an index into a fixed-width binary counter; this module identifies that counter with the coin string SubsetNP names, and relates counting coin strings to counting their indices.

Main definitions #

Main results #

The counter is the coin string. SubsetNP indexes coin strings by their little-endian binary value, which is exactly what the counter holds.

The index of the coin string an index names.

The value of a coin string is its index.

noncomputable def Complexity.coinEquiv (T : ℕ) :
Fin (2 ^ T) ≃ (Fin T → Bool)

Coin strings and their indices are in bijection.

Equations
Instances For

    Counting coin strings is counting indices.