West African Adinkra symbolic encoding + SUSY adinkras for data scientists
# adinkra-math
> West African Adinkra symbols as a mathematical framework — symbolic encoding, topology, supersymmetry, and machine learning.
## What This Does
`adinkra-math` implements the mathematics inspired by Adinkra symbols — the visual symbols of the Ashanti people of West Africa. It provides symbolic encoding of concepts as geometric primitives, glyph composition with invariant preservation, topological analysis (Euler characteristic, genus), supersymmetry Adinkra graphs (Boson-Fermion classification with chromotopology verification), and basic ML operations (kNN, K-means) on symbol vectors. Use it for symbolic AI, topological data analysis, physics simulations, or cultural math education.
## The Cultural Root
Adinkra symbols originated with the Ashanti (Asante) people of Ghana and Côte d'Ivoire. Each symbol encodes a proverb or concept — Sankofa ("go back and fetch it") represents learning from the past. The mathematical insight: **symbols compress complex meaning into structured geometric primitives**, which is exactly what feature vectors do in machine learning. Adinkras also appear in theoretical physics: supersymmetry Adinkras are bipartite graphs encoding the relationship between bosons and fermions.
## Install
```bash
pip install adinkra-math
```
## Quick Start
```python
from adinkramath.symbol import Symbol, SymbolType, get_builtin_symbols
from adinkramath.glyph import Glyph, GlyphOperation, compose
from adinkramath.topology import euler_characteristic, genus
from adinkramath.encoding import encode_concept, knn, kmeans
from adinkramath.supersymmetry import create_adinkra, verify_chromotopology
# Work with built-in Adinkra symbols
symbols = get_builtin_symbols()
for s in symbols:
print(f"{s.name}: {s.to_vector()}")
# Compose glyphs (symbols combined)
g1 = Glyph(symbols=[symbols[0]])
g2 = Glyph(symbols=[symbols[1]])
composed = compose(g1, g2, GlyphOperation.SUPERIMPOSE)
print(f"Composed weight: {composed.total_weight()}")
# Check topologica …