Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.BlockComputation.QueryReplaySupplierChunkInit

Native initialization and bounds for packed local answers #

The requested chunk metadata accompanies the existing checked Boolean supplier. Initialization is native, every clock charges both retained metadata and actual replay storage, and stopping is inherited from the checked local call. The original input is never copied into this state.

@[reducible, inline]

Requested chunk metadata and actual checked-supplier initialization arguments.

Actual binary metadata and assignment-counter storage.

Prepare the checked replay while retaining the requested packed chunk.

Packed-answer preparation uses space linear in the actual binary argument storage.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.SupplierChunk.length_runFrom_prepare_le {k s : ℕ} {Q : Type} [Finite Q] (M : MultiTapeTM k Bool Q) (e : Q ≃ Fin s) (w : List Bool) (b : ℕ) [NeZero b] (σ i limit counter stride m chunk t : ℕ) :
match ScheduleRead.origin k 0 (σ, i) with | (positive, negative) => (encState ((machine M e).runFrom w (prepare e ((m, chunk), { inputLength := w.length, blockWidth := b, schedule := σ, interval := i, limit := limit, counter := counter, stride := stride })) t)).length ≤ 2 * (encContext (m, chunk)).length + 1 + (Encoding.width k s b + 1) + (2 * (Gate.encContext (positive, negative, ScheduleRead.fullrow k (σ, i))).length + 2 + 1024 * (k + 1) * (b + w.length.log2 + Nat.card (Option Q) + Nat.card MultiTapeNTM.ChoiceTable.OutputTrack + 1))

Every clock includes the requested chunk metadata and the complete checked replay state.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.SupplierChunk.halted_runFrom_prepare {k s : ℕ} {Q : Type} (M : MultiTapeTM k Bool Q) (e : Q ≃ Fin s) (w : List Bool) (N b σ i limit counter stride m chunk : ℕ) :
(machine M e).halted ((machine M e).runFrom w (prepare e ((m, chunk), { inputLength := N, blockWidth := b, schedule := σ, interval := i, limit := limit, counter := counter, stride := stride })) b) = true

Requested chunk metadata does not delay stopping of a checked local call.

theorem Turing.MultiTapePTM.BlockComputation.QueryReplay.SupplierChunk.exists_first_return {k s : ℕ} {Q : Type} (M : MultiTapeTM k Bool Q) (e : Q ≃ Fin s) (w : List Bool) (N b σ i limit counter stride m chunk : ℕ) :
have start := prepare e ((m, chunk), { inputLength := N, blockWidth := b, schedule := σ, interval := i, limit := limit, counter := counter, stride := stride }); ∃ T ≤ b, (machine M e).halted ((machine M e).runFrom w start T) = true ∧ (∀ t < T, (machine M e).halted ((machine M e).runFrom w start t) = false) ∧ (machine M e).runFrom w start T = (machine M e).runFrom w start b

A prepared numeric supplier has the exact first-return clock needed by the same-input call rules, and returns the state used by the packed-answer correctness theorem.