Skip to main content

ogdoad

CI crates.io PyPI docs.rs License: AGPL v3

Ogdoad is a pure-Rust library for Clifford algebras, quadratic forms, and related arithmetic over exact, finite, local, transfinite, and game-adjacent coefficient systems. Optional PyO3 bindings expose selected concrete backends without entering the generic math core.

The library supports degenerate metrics. In characteristic two it keeps the quadratic and polar data independent:

e_i^2             = q_i
e_i e_j + e_j e_i = b_ij

An optional upper-triangular a_ij records ordered contraction for a general bilinear metric. Generic product code obtains signs through Scalar::neg and does not special-case the characteristic.

Scope

A Clifford scalar is a commutative ring. Arbitrary partizan games form only an abelian group under disjunctive sum, so Ogdoad is not a Clifford algebra over all games. The scalar pillar includes field-like game subclasses such as finite nimbers and represented surcomplex numbers; genuinely game-theoretic constructions live in the separate games pillar.

Representation limits are part of the API:

  • Nimber(u128) is F_(2^128), not the algebraic closure of F_2.
  • Surreal stores finite-support Conway-normal-form expressions, not arbitrary surreal series.
  • valued and local models have explicit precision caps and do not silently claim exact field laws outside them.
  • Ordinal::nim_mul, nim_pow, checked_inv, and checked_sqrt preserve the supported Kummer-tower boundary through Option; the Scalar multiplication wrapper panics if that checked boundary is ignored.
  • fixed-width mathematical payloads use u128 or i128; usize is reserved for dimensions, indices, and ABI hooks.

Architecture

path role
src/scalar/ coefficient traits and exact, finite, valued, global, surreal, and ordinal backends
src/clifford/ metrics, blades, multivectors, products, versors, spinors, and geometric-algebra constructions
src/forms/ quadratic-form classification, Witt/Brauer theory, Springer and local--global arithmetic
src/forms/integral/ lattices, discriminant forms, codes, theta series, genera, neighbors, and Weyl bridges
src/games/ impartial, partizan, misere, loopy, thermographic, Witt--FIFO/Brown, octal-certificate, Hackenbush, and game-exterior constructions
src/py/ optional per-backend PyO3 bindings; scalar worlds never mix at runtime
src/linalg/ crate-private shared linear algebra
grundy/ unpublished expression-language workspace crate using only Ogdoad's public API
formal/ separately pinned Lean 4 development
writeups/ current mathematical papers and BibTeX sources

Public pillars re-export their children shallowly. Each source pillar has an AGENTS.md with its local invariants; docs/README.md indexes the current project documentation.

Use

Rust:

cargo add ogdoad
cargo run --example tour

Python 3.9 or newer:

python -m maturin build --profile dev -i python
python -m pip install --force-reinstall --no-deps target/wheels/ogdoad-*.whl
import ogdoad as og

# q and b are independent in characteristic two.
A = og.NimberAlgebra(q=[og.Nimber(2), og.Nimber(3)], b={(0, 1): 1})
e0, e1 = A.gen(0), A.gen(1)
assert e0 * e1 + e1 * e0 == A.scalar(og.Nimber(1))

# Exact finite-support surreal monomials.
S = og.SurrealAlgebra(q=[og.omega(), og.epsilon()])
assert (S.gen(0) * S.gen(1)) ** 2 == S.scalar(og.Surreal.from_int(-1))

# Checked game constructors preserve their proof and validation boundaries.
arena = og.WittFifoArena(diagonal=[True], polar=[0], input=1)
assert arena.quadratic_value and arena.grundy(state_budget=100_000) != 0

selector = og.BrownSelector(q4=[3], brown_polar=[0], input=1)
outcome = selector.outcome_class(state_budget_per_follower=100_000)
assert og.BrownSelector.decode_outcome(outcome) == selector.residue

code = og.OctalCode([2])
certificate = og.GuySmithCertificate.compute(code, 1, 2, term_budget=16)
assert certificate.heap_grundy(10**30) == 1

The Python layer monomorphizes a documented slice of the Rust backends. It does not provide a runtime-tagged any-scalar algebra. Its typed report surface includes finite quadratic modules and Nikulin criteria, extraspecial and Heisenberg--Weil objects, function-field Brauer--Wall classes, Niemeier data, finite-field Witt decompositions, lexicode turning games, conformal-algebra accessors, represented ordinal finite-subfield degrees, checked Witt--FIFO and Brown constructors, and sealed Guy--Smith periodicity certificates. Python repr delegates to canonical Rust rendering where the core provides it.

Mathematical status

The papers under writeups/ form one current research suite:

paper result
transfinite_arf.tex classification over perfect Artin--Schreier-surjective characteristic-two fields and its full-nimber specialization
goldarf.tex quadratic-refinement realization in normal play, Gold specialization, Brown selector, and game-exterior obstruction
thermo_newton.tex thermic regrading under Norton multiplication and its separation from Newton tropicalization
linking_affine.tex proved reductions and exact remaining obstruction for isolated-dummy FIFO linking
excess.tex four-arm reduction and exact remaining selected-order problem for transfinite nim excess

The last two universal claims remain open. Their concise statements and sharp proof boundaries are in docs/OPEN.md. Lean checks named ingredients and several end-to-end finite constructions, not the open propositions; see formal/README.md.

Verification

cargo fmt --all --check
cargo test --workspace
cargo clippy --workspace --all-targets -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace
(cd formal && lake build --wfail)
npm ci
python scripts/check_writeups.py

docs/VERIFY.md records the optional Python-binding gates, exactness contracts, certificate boundary, and claim classes. Contributions should identify mathematical claims as standard/cited, implemented and tested, proved here, or open; see CONTRIBUTING.md.

Ogdoad is licensed under AGPL-3.0-or-later.

Download files

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

Source Distribution

ogdoad-1.0.4.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

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

ogdoad-1.0.4-cp39-abi3-win_amd64.whl (17.2 MB view details)

Uploaded CPython 3.9+Windows x86-64

ogdoad-1.0.4-cp39-abi3-musllinux_1_2_x86_64.whl (16.3 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ x86-64

ogdoad-1.0.4-cp39-abi3-musllinux_1_2_aarch64.whl (15.2 MB view details)

Uploaded CPython 3.9+musllinux: musl 1.2+ ARM64

ogdoad-1.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.8 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

ogdoad-1.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (15.0 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

ogdoad-1.0.4-cp39-abi3-macosx_11_0_arm64.whl (13.7 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

ogdoad-1.0.4-cp39-abi3-macosx_10_12_x86_64.whl (14.7 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file ogdoad-1.0.4.tar.gz.

File metadata

  • Download URL: ogdoad-1.0.4.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ogdoad-1.0.4.tar.gz
Algorithm Hash digest
SHA256 57eef5d65e91973161f2df53752f4fe1e1eb40658cd0ed83160168eb52e3ded5
MD5 9e670f6b35d9a232e98ad6d7afdb4b14
BLAKE2b-256 fbfe8177b118cf62ab7eef8b1adc4a6f26f5cd701af7bcb786aa0b6a2f3f72ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for ogdoad-1.0.4.tar.gz:

Publisher: release.yml on a9lim/ogdoad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ogdoad-1.0.4-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: ogdoad-1.0.4-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 17.2 MB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ogdoad-1.0.4-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 65f3bfc5504d2080c8aaf98fb52a38abc914ea76ea19c11e2e7113f167e85517
MD5 1e90dc14551b34f4188ece743a3980c9
BLAKE2b-256 689f77cf8766609ae09dbc36ecb28a0725bbf84ee78ed661babda1efb50d5efd

See more details on using hashes here.

Provenance

The following attestation bundles were made for ogdoad-1.0.4-cp39-abi3-win_amd64.whl:

Publisher: release.yml on a9lim/ogdoad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ogdoad-1.0.4-cp39-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for ogdoad-1.0.4-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2a23ca0a29cf71fa0c418986c096fc94c019b855d50a540c793c46045394be2f
MD5 dd5b23a91db567892e5c97660efe629e
BLAKE2b-256 d3143db7525a49dfc4af51c5d53da631ad037b139db4c7f37f80b25b5d9b1d27

See more details on using hashes here.

Provenance

The following attestation bundles were made for ogdoad-1.0.4-cp39-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on a9lim/ogdoad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ogdoad-1.0.4-cp39-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for ogdoad-1.0.4-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4aa2f3cfb97b14467fb1d74c6d83a1c38b26839ac2262f63a0b56a2543a76767
MD5 29788c7109dc455c10259118173587e7
BLAKE2b-256 159666513a4a7812a0b955d6975665a63d595975b193929eecec8292de45ba71

See more details on using hashes here.

Provenance

The following attestation bundles were made for ogdoad-1.0.4-cp39-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on a9lim/ogdoad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ogdoad-1.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ogdoad-1.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6791f34e8e7133088d549aae587a9b24a9589276c0d4407727957476bc98d16d
MD5 9e84ed92374b0e76ad1fa1419ac5d736
BLAKE2b-256 82fea4433afd54b0f685d43b82473239326afeb5319120be9d0d59a8fb0c8f92

See more details on using hashes here.

Provenance

The following attestation bundles were made for ogdoad-1.0.4-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on a9lim/ogdoad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ogdoad-1.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for ogdoad-1.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 371f3e824a0585754c4bed5b99ee13c0962185d9512f5869b58d67dcd9eb6c8f
MD5 ba52c2e24a7050d77a3fbb4ff96d5b8c
BLAKE2b-256 405aeb9e908ffd7f8e2a9546aa3774f3003951701f5da7f838139fe770e4c535

See more details on using hashes here.

Provenance

The following attestation bundles were made for ogdoad-1.0.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on a9lim/ogdoad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ogdoad-1.0.4-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ogdoad-1.0.4-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6d0050cd8a1245aceb9e81199dfd873ed2ee1211055b4a96e4e44eb426eb84eb
MD5 27f9394a02f72ac678953e316e55be6f
BLAKE2b-256 a29de2b4aca1dfc48768b50e7c1277f5624fd2f0270036cc934314eef86e8f8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for ogdoad-1.0.4-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on a9lim/ogdoad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ogdoad-1.0.4-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ogdoad-1.0.4-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 75f586ee1d01057e140511eefa50d419b22cc5ffa1ee87b4ee6a954414f0ae0d
MD5 5cec84b8cea361b969d3abd1c79b2690
BLAKE2b-256 b06f15a21d7f684c7b95d8b9f4e7291ddc6bb6c6ea6b66b81a223820c97cbb7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ogdoad-1.0.4-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on a9lim/ogdoad

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.0.7

8 files

1.0.6

8 files

1.0.5

8 files

This release

1.0.4 This release

8 files

1.0.3

8 files

1.0.2

8 files

1.0.1

8 files

1.0.0

8 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