Binary digit access in linear work space #
A bit of a binary natural is obtained by iterating the tail of its binary encoding and reading its head, with a missing bit read as false. Every intermediate word is a suffix of the input word. The iteration count is binary; its value is not charged as work space.
This proof was extracted unchanged from Christian Reitwiessner's tree-evaluation reader so that numeric algorithms can reuse it without depending on tree evaluation.
Main results #
Turing.MultiTapeTM.ComputableInSpace.natTestBit: binary digit access in work space linear in the binary encodings of both the value and the index.