@[reducible, inline]
Instances For
@[reducible, inline]
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
- MindFormal.A695LogicPaper.BooleanArithmetic.run [] x✝ = x✝
Instances For
Equations
Instances For
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_destinations
(g : Instruction)
:
g ∈ fullAdderCode → 3 ≤ g.2.2
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MindFormal.A695LogicPaper.BooleanArithmetic.emitFullAdder_length
(base : ℕ)
(input : Fin 3 → ℕ)
:
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