MindFormal v1.0.0One Mind

MindFormal.Tools.A695LogicPaper.SelectionCircuit

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem MindFormal.A695LogicPaper.BooleanArithmetic.emitMux_correct (base : ℕ) (input : Fin 3 → ℕ) (hi : ∀ (i : Fin 3), input i < base) (mem : Memory) :
    run (emitMux base input) mem (base + 3) = if mem (input 2) = true then mem (input 1) else mem (input 0)
    theorem MindFormal.A695LogicPaper.BooleanArithmetic.emitMux_destinations (base : ℕ) (input : Fin 3 → ℕ) (g : Instruction) :
    g ∈ emitMux base input → base ≤ g.2.2
    theorem MindFormal.A695LogicPaper.BooleanArithmetic.emitMux_preserves (base : ℕ) (input : Fin 3 → ℕ) (mem : Memory) (i : ℕ) (hi : i < base) :
    run (emitMux base input) mem i = mem i
    def MindFormal.A695LogicPaper.BooleanArithmetic.selectWords (b base : ℕ) :
    (Fin b → ℕ) → (Fin b → ℕ) → ℕ → Mask b
    Equations
    Instances For
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.selectWords_count (b base : ℕ) (x y : Fin b → ℕ) (control : ℕ) :
      (selectWords b base x y control).code.length = 4 * b
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.selectWords_destinations (b base : ℕ) (x y : Fin b → ℕ) (control : ℕ) (g : Instruction) :
      g ∈ (selectWords b base x y control).code → base ≤ g.2.2
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.selectWords_preserves (b base : ℕ) (x y : Fin b → ℕ) (control : ℕ) (mem : Memory) (i : ℕ) (hi : i < base) :
      run (selectWords b base x y control).code mem i = mem i
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.selectWords_bound (b base : ℕ) (x y : Fin b → ℕ) (control : ℕ) (i : Fin b) :
      (selectWords b base x y control).word i < base + 4 * b
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.selectWords_correct (b base : ℕ) (x y : Fin b → ℕ) (control : ℕ) (hx : ∀ (i : Fin b), x i < base) (hy : ∀ (i : Fin b), y i < base) (hc : control < base) (mem : Memory) (i : Fin b) :
      run (selectWords b base x y control).code mem ((selectWords b base x y control).word i) = if mem control = true then mem (y i) else mem (x i)

      Conditional register selection is performed by four gates per bit. Both alternatives remain represented and the comparison is never pruned.