Polynomial-time row replacement in bit lists #
Cslib.BitString.replaceRow replaces one fixed-width row in a count × width flat bit list,
padding missing bits of the surrounding rows with false.
Main results #
Turing.MultiTapeTM.ComputableInPolyTime.bitsReplaceRowWithInput: replacing a computed row in a computed raw word at unarywidth,count, and row indexjis polynomial time.
theorem Turing.MultiTapeTM.ComputableInPolyTime.bitsReplaceRowWithInput {α : Type} {encode : α ↪ List Bool} {width count j : α → ℕ} {x word : α → List Bool} (hwidth : ComputableInPolyTime width encode encUnary) (hcount : ComputableInPolyTime count encode encUnary) (hj : ComputableInPolyTime j encode encUnary) (hx : ComputableInPolyTime x encode encBits) (hword : ComputableInPolyTime word encode encBits) :
ComputableInPolyTime (fun (a : α) => Cslib.BitString.replaceRow (width a) (count a) (j a) (x a) (word a)) encode encBits
Replacing one fixed-width row of a flat list word is computable in polynomial time.