MindFormal v1.0.0One Mind

MindFormal.Tools.A695LogicPaper.Comparison

Equations
Instances For
    theorem MindFormal.A695LogicPaper.BooleanArithmetic.invert_destinations (b base : ℕ) (y : Fin b → ℕ) (g : Instruction) :
    g ∈ (invert b base y).code → base ≤ g.2.2
    theorem MindFormal.A695LogicPaper.BooleanArithmetic.invert_preserves (b base : ℕ) (y : Fin b → ℕ) (mem : Memory) (i : ℕ) (hi : i < base) :
    run (invert b base y).code mem i = mem i
    theorem MindFormal.A695LogicPaper.BooleanArithmetic.invert_bound (b base : ℕ) (y : Fin b → ℕ) (i : Fin b) :
    (invert b base y).word i < base + b
    theorem MindFormal.A695LogicPaper.BooleanArithmetic.invert_correct (b base : ℕ) (y : Fin b → ℕ) (hy : ∀ (i : Fin b), y i < base) (mem : Memory) (i : Fin b) :
    run (invert b base y).code mem ((invert b base y).word i) = !mem (y i)
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.compare_count (b base : ℕ) (x y : Fin b → ℕ) (one : ℕ) :
      (compare b base x y one).code.length = 18 * b
      theorem MindFormal.A695LogicPaper.BooleanArithmetic.compare_correct (b base : ℕ) (x y : Fin b → ℕ) (one : ℕ) (hx : ∀ (i : Fin b), x i < base) (hy : ∀ (i : Fin b), y i < base) (ho : one < base) (mem : Memory) (hone : mem one = true) :
      run (compare b base x y one).code mem (compare b base x y one).ge = true ↔ (wordValue fun (i : Fin b) => mem (y i)) ≤ wordValue fun (i : Fin b) => mem (x i)

      The comparison is the actual retained subtraction carry. Equal inputs are handled by the same circuit and fixed tie convention.