+++ title = “The Archive Format” section = “technical” +++
The Archive Format (v2)
htpy uses a self-describing JSON archive format for storing and exchanging spectral sequence data. The format has two entity types: ModuleDefinition (input) and ComputationRecord (output).
ModuleDefinition
A module definition specifies an $A$-module:
{
"htpy_archive": "module_definition",
"version": 2,
"algebra": { "type": "adem", "p": 2 },
"generators": [
{ "name": "x0", "degree": 0 },
{ "name": "x4", "degree": 4 }
],
"actions": [
{ "op": "Sq4", "input": "x0", "output": { "x4": 1 } }
]
}
Fields:
| Field | Type | Description |
|---|---|---|
htpy_archive | string | Must be "module_definition" |
version | integer | Format version (currently 2) |
algebra | object | Algebra specification (type + prime) |
generators | array | Named generators with degrees |
actions | array | Steenrod algebra actions on generators |
content_hash | string | SHA-256 hash for verification |
ComputationRecord
A computation record stores the output of an Ext computation:
{
"htpy_archive": "computation_record",
"version": 2,
"prime": 2,
"coordinate_system": "adams",
"max_stem": 60,
"max_filtration": 15,
"num_gens": [[0, 0, 1], [1, 1, 1], ...],
"products": { "h0": { "bidegree": [0, 1], "matrices": [...] } },
"differentials": [...],
"generator_names": [...]
}
Fields:
| Field | Type | Description |
|---|---|---|
htpy_archive | string | Must be "computation_record" |
prime | integer | The prime $p$ |
coordinate_system | string | "adams" or "adams_novikov" |
max_stem, max_filtration | integer | Computation range |
num_gens | array of [n, s, dim] | Ext dimensions per bidegree |
products | object | Product matrices per generator |
differentials | array | Differential matrices per page |
generator_names | array | Optional: names per bidegree |
Product matrices
Each product entry specifies the bidegree shift and a list of matrices:
{
"h0": {
"bidegree": [0, 1],
"matrices": [
{ "source": [0, 0], "matrix": [[1]] },
{ "source": [1, 1], "matrix": [[1, 0], [0, 1]] }
]
}
}
The matrix at source bidegree $(n, s)$ has dimensions $\dim \operatorname{Ext}^{s,n+s} \times \dim \operatorname{Ext}^{s+s_h, n+n_h+s+s_h}$ where $(n_h, s_h)$ is the product’s bidegree shift.
Differential matrices
Each differential entry specifies a page, source bidegree, and matrix:
{ "page": 2, "source": [14, 2], "matrix": [[1, 0, 1]] }
The matrix has dimensions $\dim E_2^{s,n+s} \times \dim E_2^{s+r, n-1+s+r}$.
Motivic extensions
For motivic spectral sequences, the computation record includes:
has_weight: trueweight_range: [min_w, max_w]- Per-generator
weights: [w_1, w_2, ...]in each node - Per-generator
tautorsion: [k_1, k_2, ...]($\tau$-torsion orders)
Content hashing
Module definitions include a SHA-256 content hash computed from the canonical JSON serialization (sorted keys, no whitespace). This allows verification that a computation record was produced from a specific module definition.
Backward compatibility
The v2 format uses the JSON field htpy_archive (with
serde(alias = "homotopy_archive") for backward compatibility with
the v1 field name). The loader tries v2 first, then falls back to v1
format.