1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
;;; Copyright (c) 2026 Nicholas Vermeulen
;;; SPDX-License-Identifier: AGPL-3.0-or-later
;; robot-test.lisp — golden test for robot.lisp (Phase 4.4).
;; A 1-D corridor robot: position 0..20 (walls outside), velocity -2..2,
;; action = acceleration in {-1,0,1}. Everything integer → exact, and the
;; whole state space is small enough to check exhaustively. Deterministic.
;; ── World ─────────────────────────────────────────────────────────────────
;; Safety: inside the corridor AND stoppable before a wall. Braking from
;; |vel|=2 travels one more cell (vel passes through 1) — that overshoot
;; is the brake-travel term; anything less stops in place.
;; ── Controller: head for the target, brake guard wins over ambition ─────
; can't have that: brake toward 0
;; ── The robot drives, deterministically, within its tick budget ─────────
;; full trajectory of a fixed 12-tick run from the far wall
;; ── Safety, exhaustively verified over the WHOLE state space ────────────
;; actuator bounds: |action| <= 1 from EVERY state, safe or not
;; the inductive step: safe stays safe, one tick at a time
;; ...and as a REGISTERED THEOREM via the 4.3 prover
;; initial state safe + inductive step = never leaves the safe set
;; ── The verifier is not a rubber stamp: a reckless controller fails ──────
; full throttle, always