moonlight-algebra: Algebraic type class tower for Pale Meridian.

[ library, math, mit ] [ Propose Tags ] [ Report a vulnerability ]

A tower of pure, law-governed algebraic structures: semigroups, monoids and groups, lattices up to Heyting and Boolean algebras, integral and Euclidean domains, modules and vector spaces, modular arithmetic, and free constructions, plus the public finite-lattice sublibrary for checked finite-order compilation and dense query plans.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1
Change log CHANGELOG.md
Dependencies base (>=4.22 && <5), containers (>=0.6 && <0.9), hedgehog (>=1.2 && <1.8), moonlight-algebra, moonlight-core (>=0.1 && <0.2), moonlight-pale (>=0.1 && <0.2), tasty (>=1.4 && <1.6), tasty-hedgehog (>=1.4 && <1.5), tasty-hunit (>=0.10 && <0.11), vector (>=0.13 && <0.14) [details]
Tested with ghc ==9.14.1
License MIT
Copyright (c) 2026 Blue Rose
Author Blue Rose
Maintainer rosaliafialkova@gmail.com
Uploaded by bluerose at 2026-07-23T02:28:56Z
Category Math
Home page https://github.com/PaleRoses/moonlight
Bug tracker https://github.com/PaleRoses/moonlight/issues
Source repo head: git clone https://github.com/PaleRoses/moonlight.git(moonlight-algebra)
Distributions
Downloads 4 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for moonlight-algebra-0.1.0.1

[back to package description]

moonlight-algebra

Part of Moonlight, the sheaf-theoretic computation layer beneath Melusine and Pale Meridian.

The law-governed algebraic tower the rest of the cathedral stands on.

moonlight-algebra is Moonlight's algebraic tier, building on moonlight-core. The front door is the umbrella module Moonlight.Algebra, whose header carries the tower's shape and its relationship to core; the public finite-lattice sublibrary has its own front door, Moonlight.FiniteLattice, whose header carries the compiled-lattice cookbook.

Public modules

Module Surface
Moonlight.Algebra Umbrella re-export of the whole tower, plus the operation-bearing numeric classes from moonlight-core.
Moonlight.Algebra.Pure.Group Standard Semigroup/Monoid, Group/AbelianGroup, and Additive/Multiplicative wrappers.
Moonlight.Algebra.Pure.FreeMonoid, .FreeAbelianGroup Free monoids and free abelian groups.
Moonlight.Algebra.Pure.Action Monoid actions (Action) and their group-acting refinement (InvertibleAction).
Moonlight.Algebra.Pure.Orientation The two-element sign/orientation group ℤ/2 with a direct standard monoid/group instance.
Moonlight.Algebra.Pure.Lattice Join/meet semilattices up to Heyting and Boolean algebras.
Moonlight.FiniteLattice.* Public finite-lattice sublibrary: checked finite-order compilation, dense query plans, resident keys, Heyting implication, fixpoints, covers, presentation builders, and support kernels.
Moonlight.Algebra.Pure.Ring Re-exported semiring/commutative-ring law classes plus integral/GCD/Euclidean/canonical-domain refinements.
Moonlight.Algebra.Pure.Zn, .Quotient Modular arithmetic and quotient rings R/(n).
Moonlight.Algebra.Pure.NumberTheory, .GCD Number theory and gcd.
Moonlight.Algebra.Pure.Polynomial Univariate polynomials over a coefficient ring; a free module on monomial degrees.
Moonlight.Algebra.Pure.Module Modules, free modules, vector spaces, and bilinear spaces over a field.
Moonlight.Algebra.Pure.Magnitude Real-valued magnitudes for obstructions.
Moonlight.Algebra.Pure.PowerSet, .Product Power-set lattices and finite n-fold product algebras (coordinatewise structure).
Moonlight.Algebra.Pure.SparseVec Sparse vectors with finite support.

All Moonlight.Algebra.Pure.* leaves are exposed by the public abstract sublibrary and gathered by the Moonlight.Algebra surface. The unsafe GCD witness (Moonlight.Algebra.Unsafe.GCDWitness) lives in the private moonlight-algebra-internal sublibrary, the compiled finite lattice realization lives in the public finite-lattice sublibrary, and the law suite (Moonlight.Algebra.Effect.Laws, Moonlight.Algebra.Test.Generators) lives in the private moonlight-algebra-laws sublibrary.

Performance

Compilation and the resident-key and <= query paths are fast; join/meet throughput and the compiled ContextLattice query surface are under active performance work.

License

MIT; see LICENSE.