+++ title = “Architecture Overview” section = “technical” +++
Architecture Overview
htpy is organized as a Rust workspace with 14 crates. The core computation is pure Rust with no external dependencies beyond the standard library; the web interface uses Axum and Askama.
Crate dependency graph
htpy-fp
|
htpy-algebra
|
+------+------+
| | |
htpy-sseq | htpy-resolution
| | |
+------+------+
|
htpy-deduction
|
+-----------+-----------+
| | |
htpy-web htpy-wasm htpy-tools
(local) (browser) (CLI)
Supporting crates: htpy-fp, htpy-once, htpy-bivec, htpy-maybe-rayon, htpy-archive, htpy-groebner.
Core crates
htpy-fp
Field arithmetic and linear algebra over $\mathbb{F}_p$.
- Bit-packed vector representation (
FpVector,FqVector) - Matrix operations with M4RI (Method of Four Russians)
- NEON SIMD on ARM, optimized odd-prime row reduction
- Subspace computation, affine subspaces
htpy-algebra
The Steenrod algebra and module categories.
AdemAlgebra,MilnorAlgebra: both bases of the Steenrod algebraMotivicAdemAlgebra: the motivic Steenrod algebra over $\mathbb{F}_2$PStarAlgebra: the polynomial subalgebra $P^*$ (for CESS)- Module types: finite-dimensional, free, $C\tau$, truncated-$\tau$, $P^$-polynomial, $P^$-exterior
- Generic grading framework:
Gradingtrait withi32(classical) andMotivicDegree(trigraded) instances
htpy-sseq
Spectral sequence data structures and deduction algorithms.
Sseq<P>: bigraded spectral sequence with differential tracking- Staircase data structure: per-bidegree echelon form with level encoding for page-by-page survival
- Deduction algorithms: degree argument, Leibniz propagation, Moss’ theorem, $E_r$ Massey products, elimination by contradiction
- Profile-specific implementations:
StaircaseSseq<Adams>,StaircaseSseq<Cess>with motivic and CESS deduction passes
htpy-resolution
Minimal free resolution engine.
Resolution: classical resolution of $A$-modulesMotivicResolution<T>: motivic resolution, generic over target module- Chain map computation and connecting homomorphism
- Yoneda products and Massey products (3-fold, 4-fold, matric)
- $\tau$-torsion via iterated LES (
motivic_chain_map.rs) resolution_core.rs: shared two-phase resolution step (extend_resolution_matrix+finalize_resolution_step)
htpy-deduction
Standalone deduction engine (extracted from htpy-web).
run_deduction(): 11-pass fixed-point loop- Types:
UserDifferential,DiffKnowledge,VanishingLine,NaturalityInput,DeductionResult - Can be used by htpy-web, htpy-wasm, and future CLI tools
htpy-web
Axum web server with embedded viewer.
- Routes for archive browsing, computation, deduction, export
- Askama HTML templates with Canvas-based chart renderer
- Module library with persistence to
~/.htpy/ - Build binaries for generating archive data (build_motivic, build_ctau, build_cess, build_novikov)
Data flow
Module definition (JSON)
|
v
htpy-resolution: minimal free resolution
|
v
htpy-archive: ComputationRecord (Ext dims, products, diffs)
|
v
htpy-web: ChartData (pre-computed pages, products, annotations)
|
v
Browser: Canvas renderer (pan/zoom, selection, detail panel)
Parallelism
htpy uses optional parallelism via the concurrent Cargo feature,
which enables rayon through htpy-maybe-rayon. Without it, all
computation is sequential (useful for WASM targets).
Parallel workloads:
- Classical resolution wavefront scheduler (diagonal parallelism)
- Motivic resolution weight batching within each $(s, t)$ step
- LES chain map and homotopy inner loops
- Cofiber/fiber resolution via
rayon::join