Skip to main content

graphkind

GraphKind — motor de descubrimiento estructural sobre universos de observación: color refinement (1-WL), k-FWL, la ley de T4, la coherencia de canales multicapa, el dual por aridad en hipergrafos y la individualización (IR). Cero dependencias (numpy solo para las suites de verificación).

Instalar

pip install graphkind

Quickstart

from graphkind.wl import adj_from_edges, separa, t4
from graphkind import universos

c6  = adj_from_edges(6, [(i, (i + 1) % 6) for i in range(6)])
dos = adj_from_edges(6, [(0, 1), (1, 2), (2, 0), (3, 4), (4, 5), (5, 3)])

separa(c6, dos, 1)   # False  — 1-WL colisiona
separa(c6, dos, 2)   # True   — 2-FWL (≡ 3-WL) separa
t4(c6)               # True   — la partición sobrevive al complemento

universos.t4_garantizado(1, 2, "dual")   # True  — la ley de T4
universos.t4_garantizado(1, 1, "dual")   # False — f colapsa 1 y 2

La ley (universos)

T4(ι, f) vive ⟺ ι ∈ Sₙ·K y, cuando ι cambia el par, f(1) ≠ f(2)

donde la clase de ι se mide (trivial / dual / local) y el oráculo predice sin enumerar:

from graphkind import universos
from graphkind.wl import adj_from_edges, complement

adj = adj_from_edges(6, [(i, (i + 1) % 6) for i in range(6)])
universos.oraculo(6, adj, lambda n, a: complement(n, a),
                  f=lambda k: k, f1=1, f2=2)
# {'clase': 'dual', 'f1': 1, 'f2': 2, 't4_predicho': True}

Multicapa (ley de canales)

from graphkind import multicapa

capas = [E1, E2]
multicapa.t4(n, capas, multicapa.complemento_total(n, capas))
# {'perfil_igual': True, 'particion_igual': True}   (el complemento total es uniforme)

Hipergrafos (dual por aridad)

from graphkind import hipergrafo

hipergrafo.t4_k_uniforme(n, 3, aristas)          # T4_k en k-uniforme
hipergrafo.refine_dual_mezclado(n, e2, e3)       # elige el lado ralo por aridad

Individualización

from graphkind import individualizacion

individualizacion.IR_k(16, rook_edges, 1, "peor")   # IR₁ no separa Rook/Shrikhande
individualizacion.IR_k(16, rook_edges, 2, "peor")   # IR₂ sí (i* = 2)

Módulos

módulo contenido
graphkind.wl 1-WL, k-FWL (≡ (k+1)-WL), separación, perfil, partición, T4
graphkind.universos clasificación de involuciones (trivial/dual/local) y el oráculo de la ley
graphkind.multicapa refinamiento conjunto; complemento total / por capa / de canales
graphkind.hipergrafo k-uniforme y aridades mezcladas; dual por aridad
graphkind.individualizacion IR_k en modos peor y multiset
graphkind.verificaciones suites V1–V12 (requieren numpy)
graphkind.verificaciones_v2 suites V13–V19 (requieren numpy)

Tests

pip install "graphkind[test]"
pytest -m "not slow"        # anclas y leyes (~10 s)

Las suites completas V1–V19 viven en el repositorio (necesitan sus datos congelados): pytest -m slow con GRAPHKIND_REPO=1.

Cita

Argaña Silguero, J. (2026). GraphKind — Universes v2: T4 and the universe arc. Zenodo. https://doi.org/10.5281/zenodo.22747350

Licencia

CC-BY-4.0.

Metadata

Release files for graphkind 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for graphkind 0.1.1
File Size Uploaded
graphkind-0.1.1.tar.gz 21.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for graphkind 0.1.1
File Interpreter ABI Platform
graphkind-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.4 kB

Release files / graphkind-0.1.1.tar.gz

Download URL graphkind-0.1.1.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c30b7d24b5c40fbc59a8ae9330716cd9932209d7d53de48926014a9f9f97c126
BLAKE2b-256 checksum
How to use checksums
f1cb50321bff603b96e6e96d5ee81779a9821b636f83c4bbca4a193e49b28963
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / graphkind-0.1.1-py3-none-any.whl

Download URL graphkind-0.1.1-py3-none-any.whl
Size 22.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f2d8a2342278b33c087c00c27014bb8eb432d6b2eec91c7099543f2b0b42ef3
BLAKE2b-256 checksum
How to use checksums
b1db76d6e26122ff7d2744a29b617c4711538bccfea5e506f5094988069c1d4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page