$ show thofma/Hecke.jl
Hecke.jl is a Julia package for computational algebraic number theory, forming a core component of the OSCAR computer algebra system. It provides a comprehensive suite of algorithms for number fields (absolute, relative, simple, non-simple), orders and ideals, class groups, unit groups, elliptic curves (including isogenies, heights, pairings), quadratic and Hermitian forms, local fields, function fields, associative algebras, and Riemann surfaces. The architecture is modular, with separate source files for each algebraic structure, extensive use of caching via attributes, and integration with GAP and Polymake for group-theoretic and polyhedral computations. The library is designed for research mathematicians and relies on the Nemo/AbstractAlgebra ecosystem for base ring infrastructure. The codebase is large (875 files) and well-tested, with a dedicated test suite covering most modules. It includes reusable components such as sparse matrix types, AVL trees, generic map infrastructure, and factored element representations. The package is actively maintained, with recent commits, CI pipelines, and a changelog documenting ongoing development. While some parts are experimental or contain commented-out code, the core algorithms are production-grade and used in research publications. Hecke.jl is primarily a library (application) rather than a data pipeline, though it includes example scripts and benchmarks that demonstrate research workflows. Its primary purpose is to provide efficient, rigorous implementations of number-theoretic algorithms for use by mathematicians and computer algebra systems.
The LLM identified 4 files worth highlighting for reuse:
Implements reduced row echelon form (rref) and nullspace computation for sparse matrices (SMat type). The algorithm is efficient and handles both integer and modular entries. This component is self-contained and could be extracted for use in any Julia project requiring sparse linear algebra operations.
Provides a balanced binary search tree (AVL tree) implementation with support for insertion, deletion, lookup, and rank queries. The implementation is generic and does not depend on Hecke internals, making it reusable as a standalone data structure for any Julia application.
Computes the Howell normal form for matrices over Z/nZ, a canonical form for matrices over principal ideal rings. The implementation is self-contained and demonstrates non-obvious algorithmic skill. It can be reused in any project requiring matrix canonical forms over residue rings.
Defines a generic map infrastructure with support for caching, composition, and inverse computation. The MapHeader and MapFromFunc types provide a flexible framework for representing homomorphisms between algebraic structures. This component is reusable for any Julia project needing structured morphisms with lazy evaluation.