A Rust ecosystem for mathematical abstractions and computations, focusing on rigorous implementations of algebraic structures, topological spaces, and computational mathematics.
Cova provides a collection of crates that implement various mathematical structures and algorithms with a focus on type safety, correctness, and composability. The project aims to provide foundational mathematical tools that can be used in scientific computing, computational topology, abstract algebra, and other domains requiring robust mathematical implementations.
Cova includes interactive demos to help you get started:
- Vietoris-Rips Complex Demo: An interactive WebAssembly demo showcasing real-time topological data analysis. Click to place points and watch simplicial complexes emerge as you adjust the distance threshold.
- Type Safety: Mathematical properties are encoded in the type system where possible
- Correctness: Implementations prioritize mathematical correctness over performance
- Composability: Structures are designed to work together seamlessly
- Documentation: Extensive mathematical documentation and examples
The cova
crate is a meta crate that re-exports the cova-space
and cova-algebra
crates.
The cova-space
crate implements topological spaces, simplicial complexes, and graph structures, providing a foundation for computational topology and geometry. It includes:
- Topological Spaces: Sets, metric spaces, normed spaces, and inner product spaces
- Simplicial Complexes: Simplex representation, chain complexes, and homology computations
- Graph Theory: Flexible directed and undirected graph data structures
- Sheaf Theory: Advanced categorical constructions for topology
- Filtrations: Tools for persistent homology and topological data analysis
The cova-algebra
crate provides implementations of algebraic structures with proper type constraints and mathematical rigor. It includes:
- Modular Arithmetic: Custom modular number types with the
modular!
macro - Abstract Algebra: Groups, rings, fields, modules, and vector spaces
- Category Theory: Fundamental categorical constructions and morphisms
- Tensors: Tensor algebra and operations
- Linear Algebra: Vector spaces and linear transformations
Cova requires Rust 1.70 or later.
Add the desired crates to your Cargo.toml
:
[dependencies]
cova = "*"
# or if you only need one of the crates
cova-space = "*"
cova-algebra = "*"
-
Clone the repository:
git clone https://github.com/harnesslabs/cova.git cd cova
-
Install
just
(if not already installed):# macOS brew install just # Linux curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
-
Run the development setup:
just setup
-
Build and test:
just test
The project provides two types of documentation:
-
API Documentation: View the Rust API documentation for all crates:
just docs
This will build and open the Rust API documentation in your browser.
-
Book Documentation: View the comprehensive book documentation:
just book
This will serve the book documentation locally and open it in your browser. The book includes detailed explanations of mathematical concepts, examples, and usage guides.
For more development commands, run just --list
.
We welcome contributions! Please check our CONTRIBUTING.md for guidelines on how to contribute to the project.
This project is licensed under the AGPLv3 License.