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.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.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.