Concrete sparse-store arithmetic instruction kernel #
This layer joins the width-efficient arithmetic machines to encoded sparse update. The destination address and two looked-up operands are supplied on canonical work tapes; the arithmetic result is written directly to the update controller's replacement tape, so no value-sized bridge is hidden between the two phases.
Pure result of the selected arithmetic operation.
Equations
- Complexity.RAM.RegisterStore.Machine.BinaryInstrOp.add.eval x✝¹ x✝ = x✝¹ + x✝
- Complexity.RAM.RegisterStore.Machine.BinaryInstrOp.sub.eval x✝¹ x✝ = x✝¹ - x✝
- Complexity.RAM.RegisterStore.Machine.BinaryInstrOp.mul.eval x✝¹ x✝ = x✝¹ * x✝
Instances For
Concrete arithmetic phase selected in finite control.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.RAM.RegisterStore.Machine.binaryInstructionArithmeticTM tapes Complexity.RAM.RegisterStore.Machine.BinaryInstrOp.mul = Complexity.TM.binaryShiftMulTM tapes.mul
Instances For
Uniform endpoint of the selected arithmetic phase.
- lhsValue : (finalWork tapes.lhs).HasBinaryNat lhs
First operand is restored canonically.
- rhsValue : (finalWork tapes.rhs).HasBinaryNat rhs
Second operand is restored canonically.
- result : (finalWork tapes.update.replacement).HasBinaryNat (op.eval lhs rhs)
The update replacement tape contains the selected result.
- shift : (finalWork tapes.shift).HasBinaryNat 0
Multiplication scratch is reset.
- tmp : (finalWork tapes.tmp).HasBinaryNat 0
First alternating scratch is reset.
- dbl : (finalWork tapes.dbl).HasBinaryNat 0
Second alternating scratch is reset.
Every work head is parked at the phase boundary.
- frame (i : Fin n) : i ≠ tapes.lhs → i ≠ tapes.rhs → i ≠ tapes.update.replacement → i ≠ tapes.shift → i ≠ tapes.tmp → i ≠ tapes.dbl → finalWork i = initialWork i
Tapes outside the six arithmetic roles are literally preserved.
Instances For
Uniform endpoint of arithmetic followed by encoded sparse update.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Arithmetic followed immediately by the fixed sparse update controller.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Load two direct register operands, prepare the direct destination address, then run arithmetic and sparse update.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Load an address register, perform the loaded indirect read into the update replacement tape, synthesize the direct destination, and update the store.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Synthesize an immediate value and direct destination, then update the sparse store.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Load the indirect destination and direct source, copy both into the update ABI, and update the sparse store.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Replace the canonical binary program counter by a fixed literal.
Equations
- Complexity.RAM.RegisterStore.Machine.setProgramCounterTM pc target = (Complexity.TM.resetBinaryWorkTM pc).seqTM (Complexity.TM.binaryAddConstTM pc target)
Instances For
Conditional-zero control instruction. The fixed sparse read is cleared after branching so the reusable lookup ABI is restored at the endpoint.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Unconditional jump control instruction.
Equations
- Complexity.RAM.RegisterStore.Machine.jumpInstructionTM tapes target = Complexity.RAM.RegisterStore.Machine.setProgramCounterTM tapes.pc target
Instances For
Halt is represented by a one-step exact no-op instruction kernel. The outer run controller detects halt before beginning another iteration.
Instances For
Canonical entry boundary for a control instruction.
- lookup : EntryLookupStaticReady tapes.data.lhsLookup store work
The fixed sparse-lookup ABI is ready.
- pc : (work tapes.pc).HasBinaryNat pcValue
The program counter contains the represented value.
Instances For
Semantic endpoint shared by the three control-only instruction forms.
- ready : ControlInstructionReady tapes store pcValue finalWork
The clean control ABI is restored with the new program counter.
- sourceCells : (finalWork tapes.data.update.entry.source).cells = (initialWork tapes.data.update.entry.source).cells
The encoded source cells are read-only.
- frame (i : Fin n) : i ≠ tapes.pc → (∀ (slot : Fin 14), i ≠ tapes.data.lhsLookup.idx slot) → finalWork i = initialWork i
Every tape outside the lookup ABI and PC assignment is preserved.
Instances For
Runtime for replacing a canonical program counter by a literal.
Equations
- Complexity.RAM.RegisterStore.Machine.setProgramCounterTime pcValue target = Complexity.TM.resetBinaryWorkTime 1 pcValue.bits.length + 1 + Complexity.TM.binaryAddConstTime target 0
Instances For
Runtime for conditional-zero control, including lookup and operand reset.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Runtime for an unconditional jump.
Equations
- Complexity.RAM.RegisterStore.Machine.jumpInstructionTime pcValue target = Complexity.RAM.RegisterStore.Machine.setProgramCounterTime pcValue target
Instances For
Runtime for the exact halt no-op.
Instances For
Boundary after the two direct source-register lookups.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Boundary after the direct destination literal has been synthesized on the update query tape.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Exact update-controller ABI established by the lookup and address-loading prefix of a direct arithmetic instruction.
- scanner : EntryScanReady tapes.update.entry (List.flatMap Entry.encode store) destination.bits work work
- lhs : (work tapes.lhs).HasBinaryNat (read store source₀)
- rhs : (work tapes.rhs).HasBinaryNat (read store source₁)
- replacement : (work tapes.update.replacement).HasBinaryNat 0
- shift : (work tapes.shift).HasBinaryNat 0
- tmp : (work tapes.tmp).HasBinaryNat 0
- dbl : (work tapes.dbl).HasBinaryNat 0
- remaining : (work tapes.update.remaining).HasBinaryNat (List.length store)
- found : (work tapes.update.found).HasBinaryNat 0
- resultCount : (work tapes.update.resultCount).HasBinaryNat (List.length store)
Instances For
Semantic endpoint of a complete direct arithmetic instruction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Semantic endpoint of a complete indirect load.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Semantic endpoint of one immediate assignment.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Semantic endpoint of one indirect store.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Operation-specific arithmetic budget.
Equations
- Complexity.RAM.RegisterStore.Machine.binaryInstructionArithmeticTime Complexity.RAM.RegisterStore.Machine.BinaryInstrOp.add lhs rhs = Complexity.TM.binaryRippleAddTime lhs rhs
- Complexity.RAM.RegisterStore.Machine.binaryInstructionArithmeticTime Complexity.RAM.RegisterStore.Machine.BinaryInstrOp.sub lhs rhs = Complexity.TM.binaryRippleSubTime lhs rhs
- Complexity.RAM.RegisterStore.Machine.binaryInstructionArithmeticTime Complexity.RAM.RegisterStore.Machine.BinaryInstrOp.mul lhs rhs = Complexity.TM.binaryShiftMulTime lhs rhs
Instances For
Complete arithmetic-plus-update budget, including the composition seam.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Complete direct arithmetic-instruction budget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Complete indirect-load instruction budget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Complete immediate-assignment instruction budget.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Complete indirect-store instruction budget.
Equations
- One or more equations did not get rendered due to their size.