MindFormal v1.0.0One Mind

MindFormal.Tools.A695LogicPaper.BooleanCircuits

Equations
Instances For
    Equations
    Instances For
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.renamed_output (n base : ℕ) (input : Fin n → ℕ) (hi : ∀ (i : Fin n), input i < base) (g : ℕ) (hg : n ≤ g) (i : ℕ) :
      renamedWire n base input i = renamedWire n base input g ↔ i = g
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.run_renamed (n base : ℕ) (input : Fin n → ℕ) (hi : ∀ (i : Fin n), input i < base) (gs : List Instruction) (hg : ∀ g ∈ gs, n ≤ g.2.2) (mem : Memory) (i : ℕ) :
      run (List.map (renamedInstruction (renamedWire n base input)) gs) mem (renamedWire n base input i) = run gs (fun (j : ℕ) => mem (renamedWire n base input j)) i

      Renaming permits shared input wires; only destination registers must be fresh. It therefore applies to ripple carries and partial products.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem MindFormal.A695LogicPaper.BooleanArithmetic.fullAdderCode_correct (mem : Memory) :
        run fullAdderCode mem 12 = (mem 0 ^^ mem 1 ^^ mem 2) ∧ run fullAdderCode mem 19 = (mem 0 && mem 1 || mem 2 && (mem 0 ^^ mem 1)) ∧ (run fullAdderCode mem 12).toNat + 2 * (run fullAdderCode mem 19).toNat = (mem 0).toNat + (mem 1).toNat + (mem 2).toNat
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem MindFormal.A695LogicPaper.BooleanArithmetic.emitFullAdder_correct (base : ℕ) (input : Fin 3 → ℕ) (hi : ∀ (i : Fin 3), input i < base) (mem : Memory) :
          run (emitFullAdder base input) mem (base + 9) = (mem (input 0) ^^ mem (input 1) ^^ mem (input 2)) ∧ run (emitFullAdder base input) mem (base + 16) = (mem (input 0) && mem (input 1) || mem (input 2) && (mem (input 0) ^^ mem (input 1))) ∧ (run (emitFullAdder base input) mem (base + 9)).toNat + 2 * (run (emitFullAdder base input) mem (base + 16)).toNat = (mem (input 0)).toNat + (mem (input 1)).toNat + (mem (input 2)).toNat