Solver contract¶
The fixed-class minimum_class_mass query is separate from projection solving.
Its exact boundary-coset enumeration and homology witness are specified in the
API. Its ExactOptimal certifies one class,
not optimal stretch or a linear section. ExhaustiveExactSolver continues to
enumerate sections and cycle ratios without a shortest-class table as input or
intermediate data. Rank-two solver minima remain its own bounded certificate.
The objective, section equivalence, and universal bounds are proved in operator theory.
Responsibility and validation¶
A solver chooses a projection for one ProjectionProblem. It does not define
query semantics, generate a separate barcode, or modify the mathematical
meaning of HomologyOperator. Before acceptance, independently validate
P²=P, AP=0, PD=0 and cycle homology preservation z+Pz∈im(D).
The objective is minimum worst weighted cycle stretch:
Selected mass is not true minimum class mass. Changing a solver can change the selected P and therefore representatives/geometry, while query definitions remain fixed. Do not modify a stage objective to make filtration transport look preferable.
Request binding¶
ProjectionProblem carries the window, resource limits, objective, requested
certificate level, tie-break and arithmetic policies, declared input structure,
matrix-free output, determinism, solver options and an optional cancellation token.
Dispatch checks capabilities() before running and validates the returned complete
configuration, arithmetic, tie policy and reported limits against that request.
Labels do not enlarge an algorithm’s domain.
ProjectionSolution retains status, projection, six identities, solver run,
certificate level, current objective, lower/upper bounds and gap, method and
configuration, generalized inverses where present, resource usage and diagnostics.
A failed request does not create a usable projection. An interrupted but validated
candidate can be retained without pretending the search finished.
Certificate levels¶
Level |
Meaning |
|---|---|
Feasible |
Independent projection legality; no global optimum claim |
ExactOptimal |
Legal projection, exact objective, supported independently replayed optimality proof |
CertifiedUpperBound |
Proven upper bound on the optimum |
CertifiedInterval |
Independently valid L≤Γ*≤U |
Heuristic |
Algorithmic evidence alone; any accepted action still requires full legality validation |
Equal certified bounds with an exact objective and supported proof must be reported as ExactOptimal. Exact F2 does not make floating-point bounds exact. Public verification fields come from the verifier, not a backend Boolean.
Status and certificate level are independent: ResourceExhausted may carry a validated candidate and valid bounds. Missing objective/bounds remain missing. Empty cycle space and nonempty zero homology have different query states even when the declared/current value is 0.
Supported reference solvers¶
Solver |
Current input and output domain |
|---|---|
FeasibleSolver |
General based windows; integer/rational/float weights; explicit Matrix, StableBasisOrder |
ExhaustiveExactSolver |
Small exact-weight windows; full section search and explicit optimum certificate |
GreedyCertifiedSolver |
Exact weights; cycle enumeration, deterministic greedy section and certified bounds |
Rank2ExactSolver |
Exact weights, Betti=2; general or explicitly validated graph/three-terminal structure |
StructuredFamilySolver |
Declared CyclicTrace, m=2/3/4, equal exact positive weights; Matrix or CyclicAction |
GeneralSearchSolver is not a registered public backend.
Certificate replay and search limits¶
CycleBounds enumerates nonzero cycles, recomputes the current Γ and validates the universal lower bound: 0 for zero Betti and at most 1 for nonzero Betti. Replay allows at most 100,000 nonzero cycles. It cannot certify a global lower bound greater than 1 by itself.
ExhaustiveExactSolver searches 2^(rank(D)*β) sections of the cycle quotient
using a fixed noncycle retraction. Independent replay uses a separate quotient
basis-lift enumeration. The supported limit is at most 100,000 nonzero cycles and
at most 100,000 for candidate count times max(1, nonzero cycle count).
Tie-breaking is deterministic in the original coordinates under the fixed
retraction, not a claim of global lexicographic order over every noncycle extension.
Only completed section coverage and independent replay certify ExactOptimal.
GreedyCertifiedSolver sorts all cycles by mass then packed original-coordinate
order and chooses independent homology generators modulo boundaries. Its
independently checked theoretical bound Γ≤β for β>0 is separate from the actual
computed Γ and global optimality. β=0 has Γ=0. Ordinary ExactOptimal requests are
not generally supported; a completed equal-bound result can independently certify
optimality. Replay requires nonzero cycles * max(1, β) ≤ 100000.
Interrupted seeds do not acquire unfinished greedy guarantees.
Rank2ExactSolver requires β=2 and checks structure rather than trusting its name. The general path searches boundary corrections of two quotient generators; graph/three-terminal reductions use their own validated hypotheses. Unsupported structure or replay scale returns Unavailable. StructuredFamilySolver accepts only the declared fixed family and verifies its formula and certificate. The detailed reduction records remain in the Chinese contract.
Fixed-boundary filling certificates¶
minimum_filling solves min m_{k+1}(c) subject to D c=z over F2, separately
from projection/stretch optimization. Upper weights are exact positive integers
or rationals in the explicitly aligned degree-k+1 window.
A feasible seed c0 gives precisely the affine space c0+ker(D): the difference
of any two fillings lies in the kernel, and every such difference preserves the
boundary. Complete enumeration therefore proves the global minimum. The verifier
recomputes the boundary and mass directly, obtains a full kernel by its own
elimination without solver caches, and replays every filling and packed-coordinate
tie. Reported coverage counters and verification flags are never proof inputs.
The supported replay cap is 100,000 fillings (dim ker(D) <= 16). A linear solve
alone only supplies a feasible seed, never the minimum certificate.
For zero boundary, strict positivity proves lower bound 0 attained by the zero
chain without enumeration. Infeasibility is certified by a vector y with
D^T y=0 and y^T z=1; the verifier checks these parities directly. Missing or
interrupted results carry no optimum. Search budgets do not preempt independent
verification, source binding, or JSON processing. No LP relaxation is certified
as an exact filling optimum, and no persistence pairing claim is made.
Finite-pair volume certificates¶
OperatorFamily.optimal_volume uses the certified product feature history and
actual simplex insertion order. It never obtains pairs from an independent PH
reduction. With fixed death coefficient 1, let F contain only upper simplices
strictly between birth b and death d; let Q contain the birth row and intermediate
k-simplex rows. The remaining coefficients satisfy the exact affine equations
D[Q,F] x = e_b + D[Q,d]. A seed plus the full kernel enumerates every allowed
filling. Positive upper mass is minimized, with original-coordinate packed ties.
ExactOptimal requires complete enumeration and independent replay; no bound is
inferred from feasibility, a linear solve, or an LP optimum.
The verifier reconstructs all incidence coefficients from original simplex face sets, checks the death anchor, forbidden upper coordinates, birth/intermediate boundary coefficients, actual D c, cycle condition, mass and source locations. Its own elimination rebuilds the full constraint kernel and replays the entire affine space, including ties. A maximum nullity of 16 bounds both search and replay. An interrupted candidate is checked only for feasibility.
The pair domain allows the boundary to vary on earlier simplices and excludes
upper simplices at/before birth; fixed-boundary filling does neither. For example,
an early filled triangle 012 followed by edges 23,03 and death face 023 admits
pair filling 023, while filling the fixed outer loop 01+12+23+03 requires both
faces. Minimizing upper mass also differs from minimizing boundary mass.
The returned boundary realizes the finite pair, but need not equal the birth
class of the chosen historical basis; same_history_class checks that extra
property explicitly with the birth-stage P. See the pinned
approved definition and argument.
HomCloud 5.4.0’s default optimal-volume implementation uses a real oriented l1 LP; its documented integer switch is ignored, and its birth constraint differs. It supplies no strict F2 optimum comparison without independently matching the feasible set, integrality and certification level. This implementation makes no HomCloud numerical parity or real-LP optimality claim.
Optional native selection¶
NativeFeasibleSolver supports multiword chain spaces and returns the same deterministic G/U/P as the reference, subject to its logical-entry budget. NativeFactorizedSolver requires matrix_free_output=True and provides Factorized or HC action with Feasible and uncomputed objective; it does not add an optimality certificate.
The four supported optimization solvers allow Native-prefixed dispatch names or
native=True. Domains, objective, tie-breaking, budgets and independent replay
remain those of the corresponding solver. Exact mass beyond the native integer
range uses explicit arbitrary-precision fallback. PreparedMatrix is a decomposition
tool, not a projection solver.
Fallback is explicit, visible and restricted to the corresponding supported reference solver. Factorized output has no reference fallback to an explicit matrix. Unknown/unavailable extensions or domains are reported as Unavailable.
Resources, cancellation, and comparison¶
State, wall-time and logical matrix-entry budgets are checked cooperatively.
NativeFactorizedSolver uses the separate ResourceLimits.packed_word_limit
for compact storage; None selects 8,000,000 words and 0 rejects nonempty
construction. The logical matrix_entry_limit continues to govern explicit
solvers; it is not charged for an unmaterialized P in the compact solver.
The compact guard accounts boundary copies, worst-case elimination fill and
row transforms, compact inverse rows, scratch, and HC output/span workspace.
HC output is checked after ranks determine its actual shapes, before allocation.
packed_words_upper, effective_packed_word_limit, storage_breakdown and
materialized_projection_entries expose the accounting on success and exhaustion.
Word charges bound encoded payload estimates including sparse/dense transitions,
not allocator capacity, Python object overhead or process RSS. Input creation and
independent validation remain outside the solve budget. Other solvers reject an
explicit packed-word request as unsupported instead of silently ignoring it.
Independent certificate replay and operator/recovery validation have separate
costs; there is no hard RSS or step-preemption guarantee. Cooperative cancellation
is ResourceExhausted with a reason. Any retained candidate remains validated.
Benchmark comparisons match the problem, weights, objective, arithmetic, certificate request and achieved level, budget, determinism and tie policy. ExactOptimal, feasibility-only, bounds and heuristic timings are not interchangeable. Record source/build/input/output identities, conversion and mandatory validation, query and recovery costs, and all interrupted/unavailable/failure cases.
The exhaustive solver caches cycle denominators and output masses, and updates consecutive sections by rank-one XOR changes in the original parameter order. A section is pruned only after a visited cycle proves its objective strictly exceeds the incumbent. Equality is fully checked to preserve deterministic ties. Completion covers every section by evaluation or that strict lower bound; independent replay still enumerates the original full search without trusting pruning counters. Native supported exact weights run the complete section loop in Rust; unbounded arithmetic has explicit Python fallback. Resource usage reports candidates_pruned, cached_output_masses and incremental_section_updates. An interrupted search retains only a fully evaluated incumbent and never claims completed optimality. Enumeration/replay domains remain exponential and retain their existing finite support limits.