Metadata-Version: 2.4
Name: lnt-sovereign
Version: 1.0.1
Summary: High-performance neuro-symbolic verification layer for AI validation and logic-based guardrails.
Author-email: wassmi <algasim.w@gmail.com>
Project-URL: Homepage, https://github.com/wassmi/lnt-sovereign
Project-URL: Bug Tracker, https://github.com/wassmi/lnt-sovereign/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi
Requires-Dist: uvicorn
Requires-Dist: pydantic>=2.0
Requires-Dist: numpy
Requires-Dist: numba
Requires-Dist: sqlalchemy
Requires-Dist: httpx
Requires-Dist: z3-solver
Requires-Dist: pytest-asyncio
Dynamic: license-file

# LNT: Logic Neutrality Tensor
**High-Performance Neuro-Symbolic Validation & Deterministic Guardrails**

[![PyPI version](https://img.shields.io/badge/pypi-v1.0.1-blue.svg)](https://pypi.org/project/lnt-sovereign/)
[![Performance](https://img.shields.io/badge/Latency-2.5ms_/_10k_rules-green.svg)](#performance)
[![Verification](https://img.shields.io/badge/Z3-Formally_Verified-brightgreen.svg)](#formal-verification)

## ⚖️ Deterministic AI Validation
Standard AI guardrails often rely on probabilistic models to monitor other probabilistic models. **LNT (Logic Neutrality Tensor)** introduces a deterministic layer that enforces hard symbolic constraints over model outputs.

Designed for high-reliability sectors like FinTech, HealthTech, and automated infrastructure, LNT ensures that AI behavior remains within strict, mathematically verifiable boundaries.

## 🚀 Technical Core

### 1. Vectorized Evaluation (BELM)
The Bilateral Evaluation Logic Manifold (BELM) is a JIT-compiled, SIMD-accelerated kernel. It leverages Numba and NumPy to enable sub-millisecond evaluation cycles, capable of processing **10,000+ constraints in <3ms**.

### 2. Temporal State Buffers
LNT supports state-aware validation through high-concurrency sliding windows. This enables:
*   **Behavioral Frequency**: Monitoring event rates and burst protection.
*   **Trailing Indicators**: Calculating signal averages and deltas over configurable time horizons.

### 3. Hierarchical Constraint Logic (DAG)
Supports complex rule inter-dependencies using Directed Acyclic Graphs. Rules can be conditioned on the results of prerequisite checks, optimizing evaluation paths for complex domain logic.

### 4. Domain Registry
LNT provides a extensible framework for domain-specific rule manifests. Supported integration patterns include:
*   **Financial Compliance**: Transaction monitoring and AML heuristics.
*   **Medical Telemetry**: Structured validation of vital signal consistency.
*   **Logistics & Grid Control**: Real-time load-balancing and operational boundaries.

## 🛠 Quick Start

### Installation
```bash
pip install lnt-sovereign
```

### Basic Usage
```python
from lnt_sovereign.client import LNTClient

# Initialize the Validation Client
client = LNTClient()

# Define an input proposal
proposal = {
    "velocity": 450,
    "context": {"age_days": 2}
}

# Audit against a domain manifest
result = client.audit(manifest_id="fintech_v1", proposal=proposal)

if result.status == "PASS":
    print(f"Validation Score: {result.score} - SUCCESS")
else:
    print(f"FAILED: {result.violations[0].description}")
```

## 🔍 Formal Verification
Every LNT manifest is validated using **Z3 SMT Solvers** to mathematically guarantee:
*   **Conflict-Free Logic**: No internal rule contradictions.
*   **Satisfiability**: Ensures the constraint set can be logically met by some input.
*   **Boundary Soundness**: Verification of signal thresholds and range logic.

## 📜 Documentation
For detailed architecture, API references, and manifest schema specifications, visit the [Documentation Portal](docs/index.md).

---
*LNT is maintained for the development of high-reliability AI systems.*
