Metadata-Version: 2.4
Name: lyapunov-stability
Version: 0.1.0
Summary: Lyapunov stability analysis for agent systems — convergence, divergence, basin estimation
Author-email: Oracle1 <oracle1@cocapn.ai>
License-Expression: MIT
Project-URL: Homepage, https://github.com/SuperInstance/lyapunov-stability
Keywords: lyapunov,stability,convergence,dynamical-systems,cocapn
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# lyapunov-stability

Lyapunov stability analysis for agent systems. Is your fleet converging, diverging, or oscillating?

Uses real mathematics — numerical differentiation, Hessian analysis, positive definiteness checking, and basin of attraction estimation. Zero dependencies (no numpy).

## Usage

```python
from lyapunov_stability import LyapunovAnalyzer

analyzer = LyapunovAnalyzer()

# Analyze V = x^2 + y^2 (stable paraboloid)
result = analyzer.analyze(
    V=lambda x, y: x**2 + y**2,
    dVdx=lambda x, y: 2*x,
    dVdy=lambda x, y: 2*y,
    equilibrium=(0.0, 0.0),
)

print(result.stability)           # STABLE
print(result.is_positive_definite) # True
print(result.basin_radius)        # 4.99+ (large basin)
```

Supports 2D systems. Analytical or numerical gradients. Central difference approximation.

`pip install lyapunov-stability`
