Architecture and computation boundaries

中文

The theory is tied to homology-operator-lab @ 6143729669902ee875b211b58085e954c76cdf88. The formal definition, proofs, projection space, and six-edge example are in operator theory. This page describes implementation responsibilities and computation boundaries. See the API, result model, and solver contract.

Chain window and projection

For a fixed degree k, the input is a finite based window over F2:

\[ C_{k+1}\xrightarrow{D}C_k\xrightarrow{A}C_{k-1},\qquad AD=0,\qquad w_i>0. \]

The reference selects generalized inverses with AGA=A and DUD=D and constructs

\[ R=I+GA,\qquad Q=I+DU,\qquad P=QR,\qquad L=I+P. \]

Every candidate is independently checked for P²=P, AP=0, PD=0, and z+Pz∈im(D) on a complete cycle basis. The last condition ensures preservation of cycle homology. A zero projection can satisfy the first three conditions and still lose nonzero homology. Other solver parameterizations use the same boundary.

HomologyOperator uses one P for topology, representatives, weighted geometry, and stretch. Queries do not choose another representative or run independent PH to populate the result. ker(L) identifies the selected homology representation.

Geometry in original coordinates

For cycles z,y, define

\[ m_w(x)=\sum_i w_i x_i,\qquad \mathrm{selected\_mass}(z)=m_w(Pz),\qquad d_P([z],[y])=m_w(P(z+y)). \]

Support and its intersection/union are read from the same projected coordinates. A basis change may preserve homology while changing mass, support, and stretch. Weight semantics and units belong to the input, not to an inferred geometric name.

True minimum class mass and the current/optimal projection objectives are different:

\[ \mu_w([z])=\min\{m_w(x):Ax=0,\ [x]=[z]\},\qquad \Gamma_w(P)=\max_{0\ne z,\ Az=0}\frac{m_w(Pz)}{m_w(z)},\qquad \Gamma_*=\min_P\Gamma_w(P). \]

minimum_class_mass independently searches one boundary coset under exact weights and resource limits; its representatives are not combined into a linear P. Feasibility, exact current Γ, and global optimality are separate facts. Empty cycle space has declared stretch 0 with EmptyDomain; a nonempty cycle space with zero Betti has a legitimate computed 0. This is distinct from a separately defined section-accounting convention. Exact F2 algebra does not certify floating-point geometry or optimality.

Filtration transport

OperatorFamily accepts finite ordered windows and matching operators in one degree. Basis identifiers define inclusions in all three degrees; chain-map, coordinate, and weight policies are validated. Repeated scales preserve stage order, and the terminal extension is constant.

\[ \mathcal H_i=\ker L_i,\qquad T_{ij}=P_jJ_{ij}|_{\mathcal H_i}. \]

Transports retain kernel-coordinate action and original target chain action. They must satisfy T_ii=I and T_jl T_ij=T_il, and agree with the induced homology map under the chosen representation. Stage Betti alone does not determine this map.

barcode() reads adjacent kernel maps while preserving the full rank invariant. barcode_basis() and rank_table() explicitly request larger historical/all-rank outputs. Death yields a valid zero chain, mass, and support. Failed stages remain missing rather than becoming empty spaces. The historical proof is retained in the filtration guide.

features() names those same histories and checks a complete interval-module isomorphism. Optional face-first simplex sources rebuild A/D and certify birth and death relations against the whole historical basis. No independent PH reduction supplies production pairings. The certificate, proof argument and support domain are in the historical certificate.

Existing modules

Module

Responsibility

algebra.py

Explicit-shape F2 matrices and the supported CyclicAction

chain.py

Window, coordinate, AD=0, weight and source validation

solver.py

Requests, capabilities, budgets, solver records and dispatch

validation.py

Independent projection and optimization certificate validation

operator.py

Same-P single-scale readouts, query history and results

family.py

Inclusions, transport, rank/barcode, tracking and family snapshots

result.py

Six identities, query state, canonical JSON and cache boundaries

native.py / native/src

Optional safe Rust adaptation, packed algebra and supported batch operations

There is no public LinearAction base class; native adaptive storage is internal, and callers construct based chain windows for the supported input domain.

Matrix uses integer-packed rows internally and exports the same tuple coordinates and JSON. Stable reductions and image coordinates are cached per immutable matrix. The independent projection validator performs its own packed cycle/image reductions, without using solver decomposition caches. D’s image reduction is shared across the residual batch. Each construction and untrusted recovery still validates the candidate. Betti reads the validated window’s boundary ranks.

Greedy construction updates an XOR pivot table for independence; its independent certificate verifier still checks the minimum admissible choice. Exhaustive solvers remain exponential. rank_table() composes adjacent transports, and historical basis readout constructs each stage’s kernel matrix once per request. Metadata is validated and frozen in one traversal; immutable input identities can be reused, while restored inputs recompute them.

Action and native boundaries

Matrix stores explicit P/L. CyclicAction represents the fixed supported family. CompactAction stores generalized-inverse or HC factors without materializing full P/L. Every representation preserves the same action on all chains, including noncycle extension, and undergoes independent validation and recovery.

NativeFeasibleSolver and apply_batch support multiword chain spaces; geometry_batch supports multiword Matrix and Factorized/HC. GeometryWorkspace binds all six identities and reuses process-local action/weight buffers. Checked u64 mass and explicit exact/floating Python fallback preserve the arithmetic policy. Different representations may have different content identities.

Resource and evidence boundaries

Projection verification keeps independently constructed cycle bases, actions and homology residuals packed, without expanding a binary coordinate-tuple matrix. It still checks every projection condition from original A/D/P data and ignores solver decompositions and success flags. Compact actions are still checked on every original chain generator without materializing P. Exact class-mass search retains Gray order; filling and pair-volume searches retain binary coefficient order. They update exact costs only at changed coordinates, preserving their tie rules, witnesses and per-candidate checkpoints. The search domain remains exponential.

Within one operator recovery, the minimum-class alias can share the independent replay of its byte-equivalent complete query record. Different requests are checked separately. Every external recovery validates again; no verified-result cache survives a recovery call. Wire schemas and canonical encodings are unchanged.

Solver budgets are cooperative state, wall-time, and logical-entry checkpoints. They are not hard RSS limits or a unified preemption budget for validation, certificate replay, serialization, and recovery. Those costs remain part of the complete call. Missing or uncomputed objective is never replaced by zero.

Independent PH reduction and GUDHI are test/measurement oracles. They do not populate production barcodes, replace representatives, or fill missing results. Performance comparisons match input, P, arithmetic, certificates and budgets, and retain conversion, validation, query, snapshot and recovery costs.

The native path owns immutable matrix handles across the compute pipeline. Sparse sorted indices and contiguous dense words share the existing internal matrix type; actual fill switches the sparse working matrix to packed storage. Transport embeds and projects a source kernel matrix, then solves the target coordinates inside Rust. The independent verifier first obtains fresh Python reference views and never reads native/solver decomposition caches. Coordinates, identity hashing and snapshots retain explicit export costs.