Warning
🚀 DEPRECATION NOTICE (Feb 2026) 🚀
This repository represents an early, theoretical exploration of the framework using analogies from theoretical physics and cosmology. While historically relevant, this code and theory have been superseded and rigorously formalized into pure discrete mathematics (
Please visit the active, production-ready repository: 👉 Triadic-Neurosymbolic-Engine 👈
The new engine features exact Topological Shortest-Path Auditing, interactive Streamlit dashboards, and reproducible industrial-scale benchmarks without relying on physical metaphors.
[](https://zenodo.org/badge/DOI/10.5281/zenodo.17613664.svg)
TL;DR: A formal, integer-based (GCD) framework for neurosymbolic logic to replace floating-point vector addition. This repository contains the official Python implementation and paper materials for "A Rigorous Triadic Framework for Neurosymbolic Reasoning".
[source: A Rigorous Triadic Framework for Neurosymbolic Reasoning.pdf] Current Large Language Models (LLMs) excel at statistical pattern matching but struggle with verifiable symbolic logic. This paper proposes a formal, integer-based relational framework as a candidate model for the underlying logic of emergent "sparse circuits". The framework is built on dual functions: a generative function (
)
This work is permanently archived and can be cited using the Zenodo DOI. Title: A Rigorous Triadic Framework for Neurosymbolic Reasoning (v1.0.0) Author: Ornelas Brand,. josé A. Year: 2025 Published in: Zenodo DOI: 10.5281/zenodo.17613664 Link: https://doi.org/10.5281/zenodo.17613664
This framework introduces a formal, integer-based method for relational reasoning, diverging from traditional floating-point vector arithmetic.
Dual Functions: The core of the framework is built on two complementary functions:
Generative Function (
This repository provides the reference implementation. The scripts are designed to be used as a library or run directly to test the paper's examples.
- Environment Setup Clone the repository: git clone https://github.com/arturoornelasb/Triadic-Relational-Framework.git cd Triadic-Relational-Framework
#Install the dependencies: pip install -r requirements.txt
(Note: requirements.txt should contain networkx. The math and fractions libraries are part of the Python standard library).
2. Key Functions
[source: TriadicRelationalFramework.py] The file src/TriadicRelationalFramework.py contains the TriadicRelationalFramework class, which provides the main functions described in the paper:
compute_triad(C1, C2, C3, a, b): The generative function (
framework = TriadicRelationalFramework() C4, K, steps = framework.compute_triad(18, 6, 8, 3, 4) print("Abstract Example:") print(f"C4: {C4}, K: {K}")
##Repository Structure
Triadic-Relational-Framework/
├── src/
│ └── TriadicRelationalFramework.py
├── paper/
│ ├── A Rigorous Triadic Framework for Neurosymbolic Reasoning.pdf
│ └── A Rigorous Triadic Framework for Neurosymbolic Reasoning.tex
├── README.md
├── requirements.txt
└── LICENSE
If you use this framework or theory in your research, please cite:
Ornelas Brand, . josé A. (2025). A Rigorous Triadic Framework for Neurosymbolic Reasoning (v1.0.0). Zenodo. https://doi.org/10.5281/zenodo.17613664
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/4.0/
Copyright (c) 2025 José Arturo Ornelas Brand