A block containing exactly two adjacent true bits #
adjacentPair n accepts exactly the words whose two true positions are consecutive in the
linear order on Fin n. Overlapping choices are allowed: the middle pair of a four-bit word
is accepted. This is the local predicate in [AB07], Chapter 11 Exercise 2, printed
page 218 / PDF page 234. The global exercise takes an OR over disjoint blocks.
Main definitions #
Cslib.BitString.adjacentPair: the local adjacent-pair predicate.
Main results #
Cslib.BitString.weight_eq_two_of_adjacentPair: every accepted word has weight two.Cslib.BitString.sensitivityAt_adjacentPair_of_true: every bit is sensitive at acceptance.Cslib.BitString.sensitivityAt_adjacentPair_le_three: rejected-input sensitivity is at most three.
Exactly two positions are true, and they are adjacent without wraparound. The body is exposed so finite checked examples can evaluate the predicate.
An adjacent pair has two distinct endpoints, hence exactly two true bits.
The all-false word is not an adjacent pair, including lengths zero and one.
One true bit does not meet the two-bit acceptance condition.
Flipping one bit into an accepted word starts at weight one or weight three.
Changing any single bit of an accepted pair destroys acceptance.
Every coordinate is sensitive at an accepted adjacent pair.
At a rejected word, at most three single-bit changes can create an adjacent pair. A change into weight two starts at weight one or three. In the former case only the two neighbors of the sole true bit can work; in the latter only its three true bits can work.