MindFormal v1.0.0One Mind

MindFormal.Tools.A595Paper.NorInstruction

structure MindFormal.A595Paper.InstructionFields (data : ℤ → Atom) (pos : ℕ → ℤ) (R L : ℕ) (fieldPos : Fin 3 → ℤ) (address : Fin 3 → ℕ) :

Three unary fields in one instruction record, in operand/operand/ destination order. All hypotheses describe the literal paper encoding.

  • field (j : Fin 3) : UnaryField data (fieldPos j) (address j)
  • tag (j : Fin 3) : data (fieldPos j) = Atom.field
  • address_bound (j : Fin 3) : address j < R
  • separated (j : Fin 3) (r : ℕ) : r < R → pos r + ↑r + 1 < fieldPos j
  • span (j : Fin 3) : fieldPos j + ↑(address j) + 2 ≤ ↑L
  • order01 : fieldPos 0 + 1 ≤ fieldPos 1
  • order12 : fieldPos 1 + 1 ≤ fieldPos 2
  • gap01 (z : ℤ) : fieldPos 0 + 1 ≤ z → z < fieldPos 1 → data z ≠ Atom.field
  • gap12 (z : ℤ) : fieldPos 1 + 1 ≤ z → z < fieldPos 2 → data z ≠ Atom.field
Instances For
    theorem MindFormal.A595Paper.execute_instruction {data : ℤ → Atom} {pos : ℕ → ℤ} {R L : ℕ} {fieldPos : Fin 3 → ℤ} {address : Fin 3 → ℕ} (bank : RegisterChain data pos R) (fields : InstructionFields data pos R L fieldPos address) (current : Option ℤ) (hR : R ≤ L) (hpos : pos 0 = 4) (hbank : ∀ (z : ℤ), data z = Atom.bank ↔ z = 3) (left right : Bool) (hleft : data (pos (address 0) + ↑(address 0) + 1) = Atom.bit left) (hright : data (pos (address 1) + ↑(address 1) + 1) = Atom.bit right) :
    ∃ n ≤ 60 * (L + 1) ^ 3, MachineRun norTable (norConfig data current none none (fieldPos 0) NorState.activateFirst) n (norConfig (Function.update data (pos (address 2) + ↑(address 2) + 1) (Atom.bit !(left || right))) current none none (fieldPos 2 - 1) NorState.clearInstruction)

    A complete NOR instruction performs its two actual unary searches, retains the operand bits in finite control, performs the destination search and literal write, and returns to instruction-marker maintenance.