FastCubicalHomologyContext
Flash Cubical's dual-graph union-find (Le Breton, Szustakowski, Piraud, arXiv:2606.04801) for H_0 and the TOP homological degree (H_{d-1}, d = ambient dimension) of a CubicalGridStream, generic over Field coefficients and recording real representatives for every bar -- neither of which the source paper's own F2-only, barcode-only treatment provides; both are this codebase's own extension, derived independently (.claude/DESIGN-fast-cubical-engine.md's 2026-09-25 update has the full derivation and a hand-verified worked example -- this session could not reach the paper itself, network-blocked, and no reference implementation exists to port the way streams.EdgeCollapse could port GUDHI's; this is original work built on Alexander duality, not a translation).
'''Valid at any ambient dimension >= 2''' (required). At d=2, H_0 (ordinary primal union-find) plus H_1 (= H_{d-1} at d=2, via the dual union-find below) together account for every cell dimension a 2D grid has, with NO general Chain.reduceBy reduction needed at all. At d >= 3 there are d-2 "middle" dimensions (1 = s}, which requires the LARGEST possible value, not the smallest). Primal H_{d-1} of the sublevel filtration equals ordinary H_0 of this dual graph's own SUPERLEVEL filtration (Alexander duality, H_{d-1}(X) ~= H^0(S^d \ X)), computed by the same elder-rule array union-find CellularPersistenceInChunksContext.unionFindDim01 already uses, just processing dual vertices/edges together in DESCENDING order of their own primal value, with every resulting bar's endpoints SWAPPED (a dual merge at value v absorbing a younger dual component born at value b becomes a primal bar (birth = v, death = b)) and ∞'s own component producing no bar at all (it is always the elder/surviving side of every merge it takes part in, by construction, so it never "dies" -- nothing to explicitly filter out).
'''Representatives''': each active dual component tracks its own running signed sum of top cells (a Map[Cube, CoefficientT], cheap to merge -- just a map union with one side's signs flipped as needed), oriented COHERENTLY as unions happen so that shared internal facets cancel in the sum's own boundary; when a component dies (is absorbed into an older one across some facet f), its H_{d-1} representative is boundary(that running sum) -- the internal facets cancel by construction, leaving exactly the (d-1)-cycle bounding the dual component, per the design note's own derivation. The orientation flip needed when merging two components across f is solved directly from f's own boundary coefficients toward its two top cells (both always +-1, from cubeIsOrderedCell's alternating-sign rule) and each side's own already-established sign for its half of f.
Attributes
- Experimental
- true
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any