Skip to content

Repository files navigation

🤖 COMPRESSED MANIFOLD REACHABILITY 🤖

(CMR-FRAMEWORK)

Lean 4 License: AGPL v3.0 SystemVerilog C++

A Formally Proven, Polynomial-Scaling Safety Algorithm for High-Dimensional Robotic Systems ($d \ge 6$)


💊 Curing the Curse of Dimensionality

Real-time safety verification for high-dimensional robotic systems ($d \ge 6$) has historically hit an insurmountable brick wall: The Curse of Dimensionality. Traditional grid-based Hamilton-Jacobi reachability requires solving the terminal-value Hamilton-Jacobi-Bellman (HJB) partial differential equation across a uniform spatial grid, resulting in an explosive exponential memory and compute footprint of $\mathcal{O}(G^d)$.

The Compressed Manifold Reachability (CMR) framework resolves this exponential bottleneck. By introducing an architectural synthesis of tensor-train low-rank projections, local subspace solvers, and max-plus global envelopes, CMR achieves tractable polynomial scaling $\mathcal{O}(d \cdot r^2 \cdot G)$ while preserving absolute mathematical determinism.


🔱 The Three-Pronged Architecture

CMR bypasses grid expansion through three structural components sequenced into a unified iterative master equation:

Prong 1: Global Tensor-Train Representation ($\mathcal{P}_{\text{TT}}$)
Maintains the high-dimensional value function $V(x)$ as a contracted chain of low-rank core matrices $G_1(x_1)G_2(x_2)...G_d(x_d)$ via TT-Cross adaptive sampling. This strictly bounds memory complexity to polynomial limits: $\mathcal{O}(d \cdot r^2 \cdot G)$

Prong 2: Local Deterministic Base Kernel (Subspace Solver)
Restricts heavy numerical PDE updates strictly to low-dimensional sub-blocks ($d_k \le 3$) using localized Lax-Friedrichs Hamilton-Jacobi solvers, computing exact backward reachable subsets with zero floating-point solver latency.

Prong 3: Max-Plus Global Fabric Synthesizer ($\bigoplus$)
Recomposes solved local subspace updates into a unified global representation using pointwise algebraic max-plus/min-plus envelope operators, ensuring continuous safety boundaries without spatial gaps or under-conservative margins.

🔑 The Master (CMR) Algorithm 🔓

$$V^{(n+1)}(x) = \mathcal{P}_{\text{TT}} \left( \bigoplus_{k=1}^{M} \left( V_k^{(n)}(x_k) - \Delta t \cdot H_k(x_k, \nabla V_k^{(n)}(x_k)) \right) \right)$$


📂 Repository Contents & File Manifest

File Name Description & Functional Role
CompressedManifoldReachability.pdf Comprehensive foundational manuscript detailing the mathematical architecture, six Lean 4 formal proofs, C++ engine, and SystemVerilog AXI-Lite verification pipeline.
CompressedManifoldReachability.lean Complete Lean 4 formal verification file containing all six foundational mathematical proofs and structural definitions.
Challenge.lean Open challenge verification file establishing unproven lemma structures for interactive theorem provers.
Solution.lean Complete solution file providing machine-checked proofs for the Lean verification roadmap and comparator workflows.
CMR_engine.hpp Zero-dependency C++ header-only software library implementing all three prongs for high-level motion planning stacks.
test_bench.cpp Comprehensive C++ test suite validating polynomial scaling, subspace solvers, and master equation updates at $d = 6$.
cmr_axi_pipeline.sv Synthesizable AXI-Lite SystemVerilog hardware pipeline for edge FPGA coprocessors and microsecond safety overrides.
testbench.sv Comprehensive testbench validating AXI-Lite register writes, pulse triggering, and hardware execution across $d = 6$.

✅ Formal Verification in Lean 4 & Comparator

The entire CMR framework is rigorously machine-verified in Lean 4 (v4.33.0 with mathlib and cslib), bridging abstract mathematical design with logical certainty:

  1. Theorem 1 (Monotonicity of the Master Update Fabric): Proves that pointwise max-plus envelope operators preserve safety inclusions ($V_1 \le V_2 \implies \bigoplus V_1 \le \bigoplus V_2$), eliminating interpolation blind spots.
  2. Theorem 2 (Parameterized Tensor-Train Bounded Error Projection): Establishes that low-rank compression ($P_{TT}$) maintains bounded approximation error $| V - P_{TT}(V) | \le \epsilon(r)$, protecting critical zero-level safety contours.
  3. Theorem 3 (Tensor-Rank Polynomial Memory Bound): Formally proves that data footprints satisfy $\text{size}(\mathcal{P}_{\text{TT}}(V)) \le d \cdot r^2 \cdot G$, definitively defeating exponential grid expansion $\mathcal{O}(G^d)$ for $d \ge 6$.
  4. Theorem 4 (Master Operator Contraction & Convergence): Proves that the master update loop forms a contraction mapping under a metric norm, guaranteeing stable convergence to unique viscosity solutions.
  5. Theorem 5 (Discretization Consistency / Lax Equivalence): Links discrete Lax-Friedrichs subspace updates ($d_k \le 3$) to the continuous HJB PDE, ensuring physical fidelity.
  6. Theorem 6 (Computable Code Extraction & Verification): Bridges abstract type definitions directly to verified executable runtime code contracts.

🌐 Verify in Lean Web 💻 CompressedManifoldReachability.lean

🤝 Verify with Comparator Live: 💻 Challenge.lean/Solution.lean


🛡️ Software & Hardware Verification

C++ Software Validation (CMR_engine.hpp + test_bench.cpp)

Running Parameterized CMR Engine Test Bench (d >= 6)...
[PASS] Prong 2: Subspace Lax-Friedrichs Solver
[PASS] Prong 3: Max-Plus Monotonicity Fabric
[PASS] Master Equation Step (d = 6, rank = 4) Executed Successfully
All high-dimensional CMR verification tests passed with polynomial scaling.

Hardware RTL Simulation (cmr_axi_pipeline.sv + testbench.sv)

[2026-09-09 19:16:41 UTC] iverilog -Wall -g2012 design.sv testbench.sv && unbuffer vvp a.out
[INFO] Initializing CMR AXI-Lite Hardware Testbench...
[INFO] Writing test vectors across d = 6 dimensions...
[INFO] Triggering hardware execution pulse...
[INFO] Polling AXI-Lite bus for completion and safety result...
[RESULTS SUMMARY]
  - Hardware Done Status Flag : 1
  - Read Safety Result (0x38) : 50
[COMMERCIAL IP PASS] AXI-Lite Pipeline Verified Successfully.

🏢 Commercial Application

Multi-Axis Industrial Robotics & Advanced Manufacturing
Eliminates motion-planning bottlenecks for complex robotic systems with six or more degrees of freedom ($d \ge 6$). By replacing exponential grid expansion with polynomial scaling, multi-joint arms can execute real-time, collision-free path planning through dense, dynamic manufacturing cells without computational stalling.

Aerospace Guidance & Autonomous Flight Systems
Delivers real-time, mathematically certified safety envelopes for flight controllers and unmanned systems. The framework replaces heuristic trajectory adjustments with deterministic boundaries, ensuring strict compliance and safety validation for high-DOF airborne platforms operating in unpredictable airspace.

Defense-Grade Edge Hardware & Tactical Systems
Provides microsecond-level safety overrides tailored for resource-constrained embedded platforms and FPGA edge hardware. This capability ensures fail-safe reaction speeds and absolute operational reliability in high-stakes, adversarial environments where calculation latency translates to mission failure.


⚖️ License & Dual-Licensing Policy

This project is open-source software licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

📜 Commercial Exemption & Proprietary Integration

If your organization requires integrating the CMR Framework into proprietary commercial stacks, closed-source robotics firmware, or hardware products without the copyleft obligations of the AGPL-3.0, dual-licensing commercial exemptions are available.

💼 To secure a commercial exemption or license, please contact:

Licensing Agent - J.E. Randolph 📧 700josh.r@gmail.com


© 2026 Jonathan ƒ(n) Reed. All rights reserved.