Transcript of adaptive Boolean seed reads
DefinitionKServer_binary_read_traceLet index Boolean seed coordinates, let be a seed assignment, and let a selection rule choose a coordinate from the current time and transcript. The transcript starts with all entries false. At time , the rule chooses a coordinate using the previous transcript, reads its seed bit, and records that bit at transcript position :
This definition records an adaptive sampling program without assuming a probability distribution on the seeds. It can represent a finite prelude followed by the left/right choices of the BCR race. Unwritten transcript positions remain at their initial values.
Formalization Note The transcript is a total function on natural indices. The recursion performs one update per step; causality with respect to a grading of seed coordinates is established by a separate theorem.
import Mathlib.Data.Bool.Basic
import Mathlib.Data.Nat.Basic
import Mathlib.Logic.Function.Basic
namespace KServer
/-- The transcript of an adaptive sequence of Boolean seed reads. At time
`n`, the program chooses a coordinate using the previous transcript, reads
that seed bit, and records it at transcript position `n`. -/
def binaryReadTrace {ι : Type*} (choose : ℕ → (ℕ → Bool) → ι)
(seed : ι → Bool) : ℕ → (ℕ → Bool)
| 0 => fun _ => false
| n + 1 => Function.update (binaryReadTrace choose seed n) n
(seed (choose n (binaryReadTrace choose seed n)))
end KServer