Projection lemmas for streaming evaluator actions #
These narrowly oriented rewrites expose the named code, wire, and counter
actions behind the finite-index projections used by TM.δ. They keep later
one-step proofs independent of the implementation's nested index tests.
@[simp]
theorem
Complexity.CircuitCode.Machine.Internal.workWrite_codeIdx
{wHeads : Fin workTapeCount → Γ}
{oHead : Γ}
(action : CoreAction wHeads oHead)
:
Projecting the code-tape write exposes the named code action.
@[simp]
theorem
Complexity.CircuitCode.Machine.Internal.workWrite_wiresIdx
{wHeads : Fin workTapeCount → Γ}
{oHead : Γ}
(action : CoreAction wHeads oHead)
:
Projecting the wire-tape write exposes the named wire action.
@[simp]
theorem
Complexity.CircuitCode.Machine.Internal.workWrite_counterIdx
{wHeads : Fin workTapeCount → Γ}
{oHead : Γ}
(action : CoreAction wHeads oHead)
:
Projecting the counter-tape write exposes the named counter action.
@[simp]
theorem
Complexity.CircuitCode.Machine.Internal.workDir_codeIdx
{wHeads : Fin workTapeCount → Γ}
{oHead : Γ}
(action : CoreAction wHeads oHead)
:
Projecting the code-tape direction exposes the named code action.
@[simp]
theorem
Complexity.CircuitCode.Machine.Internal.workDir_wiresIdx
{wHeads : Fin workTapeCount → Γ}
{oHead : Γ}
(action : CoreAction wHeads oHead)
:
Projecting the wire-tape direction exposes the named wire action.
@[simp]
theorem
Complexity.CircuitCode.Machine.Internal.workDir_counterIdx
{wHeads : Fin workTapeCount → Γ}
{oHead : Γ}
(action : CoreAction wHeads oHead)
:
Projecting the counter-tape direction exposes the named counter action.
theorem
Complexity.CircuitCode.Machine.Internal.evalFamilyCoreTM_step
(c : Cfg workTapeCount evalFamilyCoreTM.Q)
(hstate : c.state ≠ CorePhase.done)
:
evalFamilyCoreTM.step c = have action := coreAction c.state (fun (i : Fin workTapeCount) => (c.work i).read) c.output.read;
some
{ state := action.next, input := c.input.move (TM.idleDir c.input.read),
work := fun (i : Fin workTapeCount) => (c.work i).writeAndMove (action.workWrite i).toΓ (action.workDir i),
output := c.output.writeAndMove action.output.write.toΓ action.output.dir }
Unfold one nonhalting evaluator step through its named CoreAction.