Implements a human-robot collaboration runtime safety monitor as executable Lean 4 definitions and proves policy soundness, determinism, and minimal intervention in Lean.
Abstract
Runtime safety monitors make safety-critical decisions during human-robot collaboration, yet their decision logic is typically implemented as conventional software and validated primarily through testing and simulation. We present LeanSafeHRC, a modular Lean 4 framework that formalizes runtime monitoring as an executable pipeline from runtime observations and safety configurations to qualitative risk assessment, verified policy evaluation, canonical action selection, and monitor execution. Machine-checked proofs establish policy soundness, deterministic and risk-responsive behaviour, prevention of unsafe continuation, and minimal intervention. A representative collaborative assembly case study demonstrates direct execution of the verified monitor across proximity, velocity, force, and emergency scenarios. The results show that executable runtime monitoring and interactive theorem proving can be integrated within a single Lean 4 development, providing rigorous correctness guarantees for safety-critical human-robot collaboration.
Problem
Runtime safety monitors for human-robot collaboration make safety-critical decisions, yet their logic is usually ordinary software validated only by testing and simulation. Existing theorem-proving work mostly verifies robotic models offline rather than executable monitors.
Approach
LeanSafeHRC is a modular Lean 4 framework. It encodes the monitoring pipeline as executable Lean functions over a generic runtime state and a safety configuration: priority-based qualitative risk assessment (safe, warning, danger, emergency), policy evaluation, canonical least-restrictive action selection, and monitor construction. Correctness theorems are proven directly over these executable definitions and are grouped into policy correctness, behavioural correctness, and minimal intervention.
Figure 1: Layered Architecture of LeanSafeHRCFigure 2: Executable monitoring workflow in LeanSafeHRC .
Results
Machine-checked proofs establish policy soundness, deterministic and risk-responsive behaviour, prevention of unsafe continuation, monotonic risk upgrading, and minimal intervention. A collaborative assembly case study with seven runtime states executes the verified monitor across proximity, velocity, force, and emergency scenarios. The monitor is not yet integrated with physical robots or live sensor streams.