Skip to content

v0.2.0

Choose a tag to compare

@behackl behackl released this 17 Sep 12:43
· 55 commits to main since this release

zero-sum-sequences v0.2.0

New public API: AutomorphismGroup, Automorphism, CanonicalForm, AtomOrbit, AnchoredCanonicalizer, FactorizationCache.

New features

  • Materialized automorphism groups. For a finite parent, the whole automorphism group can now be built explicitly (space.automorphism_group()), giving orbits, stabilizers, canonical orbit representatives (smallest element + witness automorphism), transporters, and orbit classification of atom catalogues in one pass. AdditiveSequence gained a total order (length, then terms) so canonical forms are well-defined regardless of how the group was found. Cross-checked against brute force for C_42, C_2×C_4, C_2×C_6, C_4×C_4, C_3×C_9, C_2^3, C_2^4, C_3^3.

  • Indexed, serializable atom catalogues. AtomCatalogue atoms now have stable indices (catalogue.index(atom), catalogue[i], in), can be filtered/restricted (filter, restrict(max_length=..., support=...)), classified into automorphism orbits (AtomOrbit), and round-tripped through to_jsonl/from_jsonl with digest-based re-verification on load. Parents gained encode_term/decode_term; spaces gained decode(), sequences gained encode().

  • FactorizationCache — a memoized, optionally group-aware front end for length-set queries (length_set, minimum, maximum, has_length, witness, witnesses, factorizations) over a catalogue, with an unbounded length-set cache and LRU-bounded solvers. Supports preload/to_jsonl/from_jsonl scoped to the catalogue digest and group order. Ships alongside AnchoredCanonicalizer, which transports the largest atom divisor to its orbit representative and reduces under its stabilizer — useful for normalizing sequences before comparison.

Breaking change

  • FactorizationOracle is renamed to FactorizationCache (space.oracle() → space.factorization_cache()). The old name reflected the paper's internal terminology rather than what the object does.