Contractive Recurrence.
Certified Convergence.
PIRTM is a Python library for prime-indexed recursive tensor mathematics with provable stability bounds, adaptive governance, and ethical gating.
Precision for High-Stakes Recursion
PIRTM is not a general-purpose numerical solver. It is a specialized engine for prime-indexed recursive systems where stability is non-negotiable. Unlike standard solvers that drift, PIRTM enforces contractive dynamics at every step.
Designed for applied mathematicians and numerical engineers, it provides a rigorous framework for running recursive tensor operations with mathematically guaranteed convergence bounds.
Whether you are modeling quantum cognition or complex adaptive systems, PIRTM ensures your recurrence remains bounded, auditable, and ethically gated through the CSL framework.
Contractive Step
Every step satisfies q < 1 - ε, ensuring strict convergence towards a stable fixed point.
Adaptive Margin
Epsilon auto-tunes via residual + contraction telemetry to maximize stability.
ACE Certification
Post-run certificates with tail bounds and ISS guarantees for full auditability.
Spectral Analysis
Prime-indexed eigenvalue decomposition and phase coherence tracking.
The PIRTM Pipeline
Define Operators
Supply T, P, and parameter sequences Ξt, Λt, Gt to configure the system dynamics.
Run Recurrence
pirtm.run() auto-projects parameters to maintain contraction and records telemetry per step.
Certify Results
ace_certificate() produces a Certificate with margin, tail bound, and convergence status.
Developer Interface
import numpy as np
from pirtm import step, ace_certificate
# Initialize State and Parameters
X = np.zeros(4)
Xi = 0.3 * np.eye(4)
Lam = 0.2 * np.eye(4)
T = lambda x: np.tanh(x)
G = np.random.randn(4) * 0.01
P = lambda x: np.clip(x, -1, 1)
# Run a single step with epsilon constraint
X_next, info = step(X, Xi, Lam, T, G, P, epsilon=0.05)
# Generate Audit Certificate
cert = ace_certificate(info, tail_norm=0.01)
print(f"q={info.q:.4f}, certified={cert.certified}, margin={cert.margin:.4f}")Tier Roadmap
Core library structure and pip distribution.
Full implementation of step, run, and certify functions.
Telemetry + Q-ARI integration for safety.
Full pipeline for constitutional certification.