Documentation

Complexity.Computability.Machines.Turing.MultiTape.Encodings.NatPower

Powers of two in binary #

The binary digits of 2 ^ n, least significant first, are n zeros followed by a one (Turing.MultiTapeTM.encNat_two_pow). So an exponential clock 2 ^ n is written in linear time, by a transducer replacing every symbol of a word of length n by false and appending true, without ever writing 2 ^ n in unary.

Main results #

The binary digits of 2 ^ n, least significant first: n zeros followed by a one.

Replaces every symbol by false and appends true.

Instances For
    theorem Turing.MultiTapeTM.ComputableTidilyInDegree.two_pow_length {α : Type u_1} (encIn : α ↪ List Bool) :
    ComputableTidilyInDegree (fun (a : α) => 2 ^ (encIn a).length) encIn encNat 1 1

    An exponential clock in binary. 2 ^ (encIn a).length is tidily computable in linear time and space, for every encoding of the input.