Skip to main content

Global structure in highly symmetric systems via the short exact sequence 0→H→G→G/H→0

Project description

symlib — Global Structure in Highly Symmetric Systems

v2.0.0 · March 2026

Finding global structure in combinatorial problems via the short exact sequence 0 → H → G → G/H → 0.


The core idea

Every highly symmetric combinatorial problem has a group G with a normal subgroup H. The quotient G/H is the fiber — a single modulus m that governs solvability, construction strategy, and solution space size. The library extracts 8 algebraic weights from this structure and uses them to:

  • Prove impossibility in O(1) — before any search, before any construction attempt
  • Construct solutions algebraically — not by search, wherever the algebra supports it
  • Measure the solution space exactly — |M_k(G_m)| = φ(m) × coprime_b(m)^(k−1), exact for m=3
  • Auto-detect the best decomposition for any arbitrary finite group

Quick start

from symlib.engine import DecisionEngine
from symlib.domain import Problem

engine = DecisionEngine()

# Classify and construct
result = engine.run(Problem.from_cycles(m=5, k=3))
print(result.one_line())
# (5,3) PROVED POSSIBLE   W4=φ=4  W6=0.1328  0.1ms

# Auto-detect: no prior knowledge of group structure needed
from symlib.autodetect import detect
r = detect("symmetric", n=3, k=3)
print(r.is_impossible)   # True — S_3 k=3 is H²-blocked
r = detect("dihedral",  n=5, k=2)
print(r.is_constructible)  # True

Standalone theorem utilities

from symlib.theorems import ParityObstruction, CoprimeCoverage, QuotientCounter

# O(1) impossibility — applies to any symmetric system
ParityObstruction.check(m=8, k=3).blocked    # True — 3 odd tasks can't fill 8 slots

# Step-and-wrap coverage (hash tables, buffers, schedulers)
CoprimeCoverage.check(step=4, space=12).covers_all   # False — gcd(4,12)=4

# Count distinct states in symmetric system
QuotientCounter.distinct_states(12)   # 4 = φ(12)

Benchmark

Solver Correct Proves ⊘ Avg ms Timeouts
symlib v2.0 8/8 5 <1 0
Pure SA 3/8 0 6,900 5
Brute random 0/8 0 8

Impossible cases proved in <0.03ms. Random search times out on all of them.

Repository layout

symlib/
  kernel/          Frozen mathematical kernel — theorems, no randomness
    weights.py     The 8 weights: W1-W8, all exact or O(1)
    obstruction.py H² and H³ obstruction checkers
    construction.py Algebraic construction: precomputed → formula → search
    verify.py      Hamiltonian cycle verifier, O(m³)
    torsor.py      Moduli theorem, H¹ classes, solution space geometry
    group_algebra.py Finite group representation, subgroup detection
    ses_analyzer.py SES candidate scoring and ranking
  autodetect.py    Auto-detect best SES for any group
  domain.py        Problem representation and registry
  engine.py        Decision engine: classify → construct → prove
  theorems.py      Standalone theorem utilities
  search/
    equivariant.py Group-equivariant SA with orbit moves
  proof/
    builder.py     Formal proof objects, versioned
    lean4.py       Lean 4 export (machine-verifiable)
tests/
  test_kernel.py   64 kernel tests
  test_autodetect.py  77 auto-detection tests
docs/
  DOCUMENTATION.md Full API reference (1,600+ lines)
showcase.py        85-check live implementation study

Tests

python -m pytest tests/           # 141 tests
python showcase.py                # 85 live checks with real data

Open problems

Problem Status Best known
P1: k=4, m=4 OPEN Score 337→230
P2: m=6, k=3 OPEN Score 9 (depth-3 barrier confirmed)
P3: m=8, k=3 OPEN Not yet attempted at scale
Closure Lemma (general m) PARTIAL Proved for m=3

Cross-domain applications

The framework governs: Cayley digraphs, Latin squares, Hamming codes, magic squares, difference sets, non-abelian groups (S_3), product groups (ℤ_m×ℤ_n), hash functions, circular buffers, symmetric schedulers, and configuration spaces.

See docs/DOCUMENTATION.md for full API reference.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

symlib_core-2.0.0.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

symlib_core-2.0.0-py3-none-any.whl (54.2 kB view details)

Uploaded Python 3

File details

Details for the file symlib_core-2.0.0.tar.gz.

File metadata

  • Download URL: symlib_core-2.0.0.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for symlib_core-2.0.0.tar.gz
Algorithm Hash digest
SHA256 28b81aa74405752ba1d2629e0f1334950c479ca9ae038f8e413a62798742e875
MD5 0ef224c258f07d01c9099419672e3b69
BLAKE2b-256 cf7bb8d997349ea4d5c886a67806946dc79cd6fa292c758a8df1734c679a7288

See more details on using hashes here.

File details

Details for the file symlib_core-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: symlib_core-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 54.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for symlib_core-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd9d5bf811ba2f04fb41aac1828059d9d89da046889ed3501476ec74606b4df2
MD5 22c022fd7b3c905cd530dc769567d0f8
BLAKE2b-256 83b7894c9a51be90a24506e7a1b37c73a0b2202b1995f199ba1c4ad99c36cbfa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page