MindFormal v1.0.0One Mind

MindFormal.Tools.A695LogicPaper.WordCuts

theorem MindFormal.A695LogicPaper.BooleanArithmetic.wordValue_split {a b : ℕ} (w : Fin (a + b) → Bool) :
wordValue w = (wordValue fun (i : Fin a) => w (Fin.castAdd b i)) + 2 ^ a * wordValue fun (i : Fin b) => w (Fin.natAdd a i)

Splitting a represented word keeps both its low and its high registers.

theorem MindFormal.A695LogicPaper.BooleanArithmetic.wordValue_low {a b : ℕ} (w : Fin (a + b) → Bool) :
(wordValue fun (i : Fin a) => w (Fin.castAdd b i)) = wordValue w % 2 ^ a
theorem MindFormal.A695LogicPaper.BooleanArithmetic.compare_destinations (b base : ℕ) (x y : Fin b → ℕ) (one : ℕ) (g : Instruction) :
g ∈ (compare b base x y one).code → base ≤ g.2.2
theorem MindFormal.A695LogicPaper.BooleanArithmetic.compare_preserves (b base : ℕ) (x y : Fin b → ℕ) (one : ℕ) (mem : Memory) (i : ℕ) (hi : i < base) :
run (compare b base x y one).code mem i = mem i
theorem MindFormal.A695LogicPaper.BooleanArithmetic.compare_bound (b base : ℕ) (x y : Fin b → ℕ) (one : ℕ) (ho : one < base) :
(compare b base x y one).ge < base + 18 * b