Alice
A rigorous topology and algebra library from first principles, with Lie group machinery.
on crates.io as
alice-math. Import asalicevia the package alias
[]
= { = "alice-math", = "0.1.0" }
What it is
Alice builds the mathematical foundations needed for Lie group simulation and Riemannian optimizationfrom the ground up in Rust. The algebraic hierarchy starts at Magma and builds to Field. The topology layer encodes open set axioms, manifolds, and smooth structure. The groups module provides concrete matrix Lie groups with correct constraint enforcement and no_std compatibility.
Modules
alice::core— Algebraic hierarchy (MagmathroughField),FiniteF64,Rational, morphismsalice::topology— Topological spaces, manifolds, smooth structure, metric spacesalice::algebra— Lie algebras, Lie bracket, Baker-Campbell-Hausdorff formulaalice::maps— Exponential and logarithmic maps via Padé approximation and eigendecompositionalice::groups—GL,SL,SO,SE,Affwith full constraint enforcement at construction
Quick example
use So;
use HasExpMap;
use Dynamic;
let theta = PI / 4.0;
let rotation = new.unwrap;
let log = rotation.log.unwrap;
let recovered = exp;
Design
no_std + alloccompatible- Algebraic axioms enforced at the type level where possible, at construction otherwise
- All group constructors return
Result<Self, GroupError>rather than panicking
Companion crate
riemannian-gd provides Riemannian gradient descent over Lie groups, consuming alice-math as its foundation.
Status
0.1.0 — API is functional and tested. Atlas implementations for concrete groups, additional Lie group examples, and Manim visualizations are planned for subsequent releases.
License
MIT