The peg apparatus acts on arrangements, after receiving commands. An attempted move remains a command even when its physical return is blocked. This module contains no claim about a native mind emitting that command.
Equations
Instances For
Equations
Instances For
Equations
Instances For
Stacks list disks from top to bottom, in increasing size.
Equations
- MindFormal.PegAttempt.Legal s = ∀ (p : MindFormal.PegAttempt.Peg), List.Pairwise (fun (x1 x2 : MindFormal.PegAttempt.Disk) => x1 < x2) (s p)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
An empty source, an identical destination, or a larger disk over a smaller one is physically blocked. No command label is removed.
Equations
- MindFormal.PegAttempt.Allowed s c = (c.source ≠ c.target ∧ ∃ (d : MindFormal.PegAttempt.Disk) (rest : List MindFormal.PegAttempt.Disk), s c.source = d :: rest ∧ ∀ e ∈ s c.target, d < e)
Instances For
Equations
- One or more equations did not get rendered due to their size.
The returned arrangement applies a legal top-disk move and otherwise returns the unchanged arrangement. The second component reports blocking.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Mechanical legality is preserved for every returned command, including all blocked ones. This is an apparatus invariant only.
Equations
- MindFormal.PegAttempt.forbidden = { source := 1, target := 0 }
Instances For
Equations
- MindFormal.PegAttempt.safe = { source := 0, target := 2 }
Instances For
Every finite sequence of attempts is processed; legality does not depend on the mind first excluding the forbidden command.
Equations
- MindFormal.PegAttempt.replay x✝ [] = x✝
- MindFormal.PegAttempt.replay x✝ (c :: cs) = MindFormal.PegAttempt.replay (MindFormal.PegAttempt.returned x✝ c).1 cs