# From enzyme activity to functional recovery

Runnable companion to manuscript 58, SHA-256 `081a2f60534a885288a77debb6655765c7c40ffe21ddc5d1c9d620bf6d4e1884`. Python 3.11+. All inputs are designed model values, with no donor data or clinical calibration.

```sh
python -m venv .venv
# Activate .venv using your platform's command.
python -m pip install -r requirements.txt
python -m unittest -v
python example.py --output outputs
```

## Rates, trajectories and populations

The paper connects three different objects: an individual enzyme rate, a trajectory completing a prescribed carrier-recovery task, and the fraction of a heterogeneous population that completes it. This package implements each object separately and carries the assumptions between them explicitly.

The reference source is the literal six-parameter rate

`v = V*(N/Kn)*(S/Kg) / [1+(N/Kn)*(1+S/Kg)+H/Kh+A/Ka+B/Kb]`.

For the task, N=56-g, H=g, S=7, A=B=0, Kn=3, Kg=7, Kh=56, Ka=125, Kb=520. The scalar equation is `g' = V*k(g)-.3`, with `k(g)=(56-g)/(115-109*g/56)`, g(0)=10, target 28 and closed deadline 120. Arrival exactly at the deadline counts. These are model units; 120 is not asserted to mean 120 minutes. Carrier arrival is not a full NADPH balance, peroxide clearance, membrane service or whole-cell viability.

Edit the named inputs at the top of `example.py`. **User** outputs follow those task, band, calibration and normalization inputs. Separate **reference** demonstrations remain fixed to reproduce the manuscript. An edited two-band class receives the exact interval only after its inward-field, low-band nonarrival and high-band deadline conditions pass. Otherwise the result is “not certified from these inputs.”

## Reusable components

`kinetics.py` contains immutable `EnzymeParameters`, `ScalarTask` and the capacity-varying `CapacityFamily`, plus `ObservationPolyhedron` for individual rate-band constraints. `population.py` contains finite weighted populations, two-band sharp bounds, readout calibration, weight conversion, off-band constructions, cell-resolved measurement bounds and finite-support measurement analysis. `example.py` combines them into demonstrations and outputs. No class depends on a website, a fitted distribution or another paper package.

The trajectory solver evaluates the original rate law. The separate collapsed rate and first-passage integral are checked against it. Exact rational rectangle sums bracket passage times because the reciprocal positive drift increases with g. The numerical closed form uses high precision to avoid cancellation near the eventual threshold; it remains a numerical result. Nonpositive target drift means no finite arrival under the paper's monotonicity and uniqueness argument. A task whose field is not inward at zero receives an explicit unsupported-physical-domain result rather than a clipped trajectory. Edited models can expose unresolved passage bounds; increasing the rectangle budget can resolve some, but no numerical root is silently promoted to a certificate.

## Individual observations yield a deadline

For one kinetic realization, the six positive reciprocal coefficients are

`beta=(1/V, Kg/V, Kn*Kg/V, Kn*Kg/(V*Kh), Kn*Kg/(V*Ka), Kn*Kg/(V*Kb))`.

At positive substrates, `1/v=phi*beta` with `phi=(1,1/S,1/(N*S),H/(N*S),A/(N*S),B/(N*S))`. The coefficient map has an exact inverse, so a positive coefficient vector represents literal kinetic parameters. A rate band becomes two linear inequalities. Nonnegative dual multipliers whose weighted rows equal the target feature vector supply an upper bound U on the target reciprocal rate. If `1/U>q`, every compatible trajectory reaches the target by `(target-initial)/(1/U-q)`.

`ObservationPolyhedron.propose_dual` uses a numerical linear program only to suggest multipliers. Rational reconstruction and an exact row identity then decide whether a certificate is accepted. `verify_dual` rejects even a small nonzero residual. A supplied positive feasible coefficient vector verifies nonemptiness separately. A numerical solver failure means no certificate was obtained, not that recovery is impossible.

The paper's designed inhibitory functional y(K)=K/(3K+56) in [.24,.26] gives K in [48,728/11], with a=2 and c=3 pinned in the collapsed rate. The example builds those constraints in the full six-dimensional coefficient space and checks the multipliers. It reproduces U=243/112, drift floor 391/2430 and uniform deadline **43740/391 = 111.867008...**. The compatible K=56 realization arrives numerically at **103.805763...**. A second demonstration uses literal rate bands at two clamped inhibitor levels whose average feature vector is the target feature vector.

Removing the inhibition constraint leaves the target reciprocal direction unbounded. A separate sequence K decreasing to 252/103 has positive target drift for every member, while arrival times grow without bound. Eventual recovery of every member of a class does not imply one common deadline.

These certificates concern an individual realization. The reciprocal of a pooled heterogeneous rate is generally different from the mean reciprocal coefficients; the tests demonstrate this explicitly. A pooled assay cannot be inserted into the individual polyhedron without an additional modeling bridge.

## Exact population sets and witnesses

The reference population has nonnegative weights summing to one, mean capacity one, and support `[5/8,9/14] union [1,11/8]`. The low band has negative target drift. Every high-band cell has arrival time at most 21780/197<120. Therefore success is exactly membership in the high band, justified by the dynamics rather than assigned as a label.

On that support, `V <= 9/14 + (41/56)*success`. Averaging gives **p in [20/41,1]**. `TwoBandClass.witness(p)` realizes every value with at most three capacities: 9/14, 11/8 and 1. At the lower endpoint, 42 cells at 9/14 and 40 at 11/8 give the same mean as 82 cells at capacity one, while only 40 versus 82 cells recover. `Population.count_realization` clears rational denominators to produce integer counts.

All these populations have the **same entire clamped initial-rate surface**, not merely the same rate at one assay setting. At fixed common affinities and clamped inputs, each rate is V times a common shape, so averaging sees only mean V. The code evaluates the literal rate at several substrate/inhibitor settings and verifies the identity exactly. It makes no such claim for intact-cell time courses with heterogeneous internal states.

With conditional readout sensitivity in [.9,1], false-positive fraction in [0,.02] and total positives in [.68,.72], the exact set narrows to **[33/49,4/5]**. `ReadoutCalibration.witness` constructs compatible sensitivity, false-positive fraction and all four joint masses for each feasible p. Combined with the same population witness, this establishes joint attainability. Conditional proportions concern the declared recovery task, not a clinical deficiency label; their mixture identity needs no independence assumption.

The corresponding minimax midpoint/radius pairs are (61/82,21/82) for bulk information and (361/490,31/490) after the interval-valued readout. These are worst-case identification errors, not standard errors or statistical confidence intervals.

## One shared measurement margin

The repaired lower bound exceeds two-thirds by 1/147. Its additional downward readout-error budget is a different quantity, **1/150**. Improving only the lower sensitivity bound tightens the upper recovery bound, not this lower guarantee.

`convert_weights` turns a weighted success interval into a number-fraction enclosure when positive cell weights have a known maximum/minimum ratio Rh. For Rh=6/5 it returns [55/87,24/29], which no longer certifies two-thirds. It does not convert an enzyme-activity normalization directly into a recovery fraction.

Readout error epsilon and normalization draw on one budget. The exact reference frontier is `epsilon <= (33-32*Rh)/(50*(1+2*Rh))`. It is 1/150 at Rh=1, 9/3800 at Rh=51/50, and zero at Rh=33/32. Beyond that ratio no nonnegative error budget suffices. `ADDITIONAL_READOUT_ERROR` is added beyond the supplied observed interval; uncertainty already included there should not be counted twice. The default decision reports the composed number-fraction bound. This composed enclosure remains valid under further coupling assumptions, but its joint sharpness then needs a new argument.

The illustrative Hoeffding counts 33,702 and 41,500 assume independent representative Bernoulli sampling of one readout proportion and control one or two sides, respectively. They do not address systematic calibration, donor clustering or gating selection.

## What the support gap contributes

On connected support [5/8,11/8], success is V>=cT. The exact 128-panel rectangle bounds prove `.950<c120<.951`; the numerical cutoff is .9506018463. The compatible recovery set is `((1-c120)/(11/8-c120),1]`, with an **unattained infimum near .1163957789**. The failing atom must lie strictly below the cutoff; at equality it succeeds because the deadline is closed. The exact cutoff bracket alone bounds the infimum between 49/424 and 2/17.

`connected_limits` handles cutoffs outside or at support endpoints, and records endpoint attainment. The horizon table gives numerical cutoffs at 60,120,240,1000. The eventual threshold is exactly 363/560, where finite arrival fails. Consequently the deadline-free floor **197/407** is attained by a population placing failing mass at that threshold and compensating mass at 11/8. It remains below one half. The numerical asymptotic comparison reproduces the rate 9/8470 and shows why its leading approximation is inaccurate at moderate deadlines.

`offband_infimum` interpolates between the separated and connected support assumptions when at most eta mass lies outside the bands. The endpoint is attained only at eta=0. `offband_witness` creates explicit finite populations approaching the bound; the main run independently certifies each off-band atom's failure with exact rectangle sums. It caps the off-band mass to preserve nonnegative weights at the transition, using the two-atom branch when needed. The allowance is a model assumption, not inferred from the pooled mean.

The equal-variance example has the same mean one and variance 3/64 but recovery fractions **1/4 and 3/4**. This refutes point identification from those moments on this class; it does not say that variance can never tighten a bound.

## Which additional observation can help?

`row_span_certificate` works on an explicitly supplied finite support. If the success row belongs to the observed feature-row span, it returns exact multipliers. Otherwise it returns a null direction and two nonnegative, normalized populations with identical feature observations and different outcomes. This is a criterion for identification for **all** weight vectors; nonnegativity at a particular observed value can still identify the target on a smaller feasible face.

The reference inhibition example uses atoms 1/20,1/10,1/5,4/5, observations x and 2x/(1+x), and the null vector (-98,165,-70,3). The two extremal populations share mean 9/80 and second-assay value 7/36 while attaining recovery fractions 1/56 and 5/12. The code also checks their literal inhibition-dependent dynamics at deadline 300. A numerical finite-support LP provides a separate reusable exploration tool, clearly labeled numerical; exact endpoint witnesses and null identities carry the reference conclusion.

`resolved_capacity_bounds` applies a known cell-resolved capacity-error bound and an exact cutoff enclosure to normalized measurements. It returns success lower/upper masses and the unresolved mass near the threshold. With error .01 the ambiguity band is [.940,.961). It accepts a calibrated capacity observation; a raw fluorescence value is not automatically one. The interval is valid under that measurement contract, without claiming sharpness under additional retained moments.

Finally, the package integrates the paper's positive two-state counterexample: y'=1-(1+V²)y, x'=Vy-x. Capacity one reaches x=1/4 by time one, while capacity four never can, since x<4/17. The system is cooperative in its state but not monotone in the capacity parameter. Its exact solution is independently compared with the numerical ODE. Transferring a scalar capacity cutoff to a larger model requires the paper's state-order, parameter-order, invariant-domain and target-set hypotheses.

## Evidence, outputs and license

Outputs include literal trajectories, exact population/readout witnesses, pooled assay values, passage bounds, horizon and off-band tables, figures and provenance hashes. Seven scientific test groups connect the original rate to the reciprocal and scalar representations, check finite certificates and extremal populations, and compare independent numerical formulations. General solution-existence, comparison and partial-identification theorems are supplied by the manuscript; Lean is not rerun. Neither the kinetic task nor its calibration is established biologically by this example.

MIT is proposed for the newly authored example, pending owner confirmation. This note does not grant a license. Manuscript and cited material retain their own terms.
