MindFormal v1.0.0One Mind

MindFormal.Tools.A595Paper.CompareBound

A comparison of two unary address fields uses a fixed finite table, restores the entire paper, returns their actual equality, and takes at most 20 * (L + 1)^2 single-square tape transitions. No address is held by the control or interpreted by the physical world.

theorem MindFormal.A595Paper.CompareFields.round_bound {f : ℤ → Cell} {a b : ℤ} {na nb k L : ℕ} (hf : CompareFields f a b na nb) (hb : 0 ≤ b) (hL : a + ↑na + 2 ≤ ↑L) (ha : k < na) (hk : k < nb) :
k + 1 + (a + ↑k - b).toNat + 1 + k + 1 + (a - (b + ↑k + 2)).toNat + 1 ≤ 4 * (L + 1)
theorem MindFormal.A595Paper.CompareFields.rounds {f : ℤ → Cell} {a b : ℤ} {na nb L : ℕ} (hf : CompareFields f a b na nb) (hb : 0 ≤ b) (hL : a + ↑na + 2 ≤ ↑L) (k : ℕ) (ha : k ≤ na) (hk : k ≤ nb) :
∃ n ≤ k * (4 * (L + 1)), MachineRun compareTable (compareConfig f (a + 1) CompareState.scanA) n (compareConfig (progress f a b k k) (a + 1) CompareState.scanA)
theorem MindFormal.A595Paper.CompareFields.finish_bound {f : ℤ → Cell} {a b : ℤ} {na nb k L : ℕ} (hf : CompareFields f a b na nb) (hb : 0 ≤ b) (hL : a + ↑na + 2 ≤ ↑L) (hka : k ≤ na) (hkb : k ≤ nb) :
k + 1 + (a + ↑k - b).toNat + 1 + k + 1 + ((a - (b + ↑k + 2)).toNat + 1 + na + 1 + (a + ↑na - b).toNat + 1 + nb + 1) ≤ 8 * (L + 1)
theorem MindFormal.A595Paper.compare_correct {f : ℤ → Cell} {a b : ℤ} {na nb L : ℕ} (hf : CompareFields f a b na nb) (hb : 0 ≤ b) (hL : a + ↑na + 2 ≤ ↑L) :
∃ n ≤ 8 * (L + 1) ^ 2, MachineRun compareTable (compareConfig f (a + 1) CompareState.scanA) n (compareConfig f (b + ↑nb + 2) (CompareState.finish (decide (na = nb))))

The ordinary unary address comparator is an algorithm proved here, not an interpreter assumption handed to the physical template.