# When dilution resolves a low sandwich-immunoassay signal

Runnable companion to manuscript 54, SHA-256 `9d7e87368f1db8e2548ecfc878dab2b4d56b42faef68d1734bc9262526c8116a`. Python 3.11+. Inputs are synthetic paper examples, not fitted or measured assay parameters.

```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
```

## What the model teaches

Finite capture and detector supplies can bind different analyte molecules at high concentration. A low doubly occupied signal then has two possible concentration explanations. `BindingSite` solves each reagent mass balance with a stable positive quadratic root; `SandwichSource` composes the two independent sites and exposes all four analyte species, the signal, elasticity and paired preparation. For unit parameters, accessible concentrations 200/2499 and 2499/50 give exactly the same neat signal 49/2550, while matched dilution separates them. The peak is at 2. Different positive site parameters retain unimodality and an increasing diluted/neat ratio.

Concentrations are final reaction concentrations in nM for the illustrations, with a separate raw signal scale. Specimen dilution occurs **before fresh reagents are added**. Diluting an assembled assay changes reagent capacities and is not this protocol. Accessible concentration is u=rho*x: invisible native material consumes neither reagent. Partially masked competitors require a larger source model.

## Editable, composable calculation

The constants at the top configure source parameters, on-rates, dilution, availability, error, declared ceiling, numerical work budget and washing. For a different calibration regime, construct a `CalibrationBox` using exact `Interval(F(...), F(...))` values; `Fraction('0.9')` expresses an exact decimal. Construct a `MarginCertificate` with an accessible low bound, accessible high interval and target source margin. The ten cases in `paper_certificates()` reproduce all paper certificate rows, including unequal capacities, 100-fold capacity/affinity ratios, relative error, availability drift and incomplete equilibration. The collection is a set of worked designs, not an optimizer or a claim that the margins are sharp.

The high certificate preserves the shared reagent product CD across both readings. It freshly computes eight rational Bernstein coefficients. The test suite independently expands the Bernstein and dilution-interpolation polynomial identities with SymPy. Nonnegative coefficients prove a sufficient continuum bound under the model; negative coefficients mean **this certificate failed**, not that separation is impossible. Subdivide the accessible interval or reduce the margin if appropriate. The low sign has its own exact inequality. Do not combine one design's best threshold with another design's best margin.

Native classes follow from the availability bounds: x<=u_low/rho_max and x in [u_high_low/rho_min, u_high_high/rho_max]. For the main case these are x<=0.4 and x in [25,100]. These classes leave a guard band. `ObservationBudget.report` supplies one-sided exclusions without a binary promise; it supplies a promised low/high decision only when the bounds strictly separate. A record excluding both classes contradicts a caller's binary promise. It does not force a high label.

## Sound outer sets, not fitted point estimates

`OuterInference` uses exact rational branch pruning over accessible concentration, then projects to the native scale. Each signal envelope produces a gain interval; the **same gain** must satisfy both. Exact contrast cuts are admitted only from a matching verified certificate. The program returns disconnected outer intervals, not assertions that every retained concentration is feasible. This generalizes the manuscript's `anc/enclosure.py` calculation into independently configurable source, error and inference components.

Missing readings are `None`; censored readings are intervals, and the measurement allowance expands those intervals once. The example reproduces the blank enclosure [0,125/16384] under the separately supplied ceiling 100. With no ceiling it abstains. At a cell-budget limit it retains the last complete covering, so tightness can be lost but possible states are not silently dropped. `calibrated=False` is the default. The main result shows hypothetical enclosures with the paper's premises and separately reports the configured unvalidated record as unresolved. Passing `calibrated=True` asserts external premises; it does not validate a real assay.

## Precision, kinetics and washing

`ObservationBudget` adds the two absolute error allowances, preserving the distinction between a deterministic envelope and a coefficient of variation. `gaussian_allowance` computes bias + Phi^-1(1-alpha/4)*sigma under the stated centered-normal standard-deviation bound. A union bound gives simultaneous coverage without requiring independent readings; the calibration quantities must be justified separately. This is repeated-experiment coverage, not a posterior probability or a selected-specimen error rate. Shared offsets cancel only if genuinely common.

`CalibrationBox.relative_error(eta)` widens gain drift. Also multiply the minimum gain by 1-eta in `ObservationBudget`, and recompute the margin; do not retain the old margin or count the same fluctuation twice. `availability_drift` changes the effective dilution interval. `attenuation` changes both the low and high certificate, and the outer signal bounds, for source signals between attenuation*B and B. Combined departures need a fresh certificate; separate extension results cannot simply be stacked.

`BindingKinetics` integrates either the literal four-species mass-action system or the independent occupancy equations from an unbound start. The main run compares them and exports trajectories with the concentration-dependent attenuation bound. Independent on-rates allow rate changes without changing equilibrium affinities. The near-unit box with minimum on-rate 0.001 nM^-1 s^-1 gives a uniform sufficient incubation of 1666.67 seconds (27.78 minutes) for at least 90% of equilibrium signal. This is a sufficient model bound, not an empirical incubation recommendation; surface transport, cooperative binding and lateral flow are outside the model.

`SequentialSource` performs capture, wash and detector binding. Perfect retention and washing produce a monotone saturating response; every fixed positive free-analyte carry-over restores a vanishing high-dose tail. `wash_limit` computes the exact finite-range sufficient specification. D_min=10, U=1000 and retention 90% give carry-over <=1/900. This guarantees retention relative to the ideally washed model, not monotonicity. The 10^6 nM row illustrates the mathematical tail and is not a plausible concentration claim.

## What extra controls cannot establish

Accessible spikes depend on rho*x/d+s. Native worlds (0.1,1) and (100,0.001) therefore remain identical under every such action; the latter intentionally violates the near-unit availability contract. More precise accessible-spike measurements cannot identify masking. With nonzero error and any bounded finite dilution panel, an unbounded high tail can also imitate blank readings: for factors <=11 and error 10^-4, every x>=133100 has an admissible all-blank transcript. A finite operating ceiling is independent information, not something the blank establishes.

## Outputs and evidence

`results.json` contains all fresh rational certificate coefficients, conditional enclosures, inference limitations and protocol quantities. CSVs expose source curves, kinetic trajectories, sequential comparisons and certificate coefficients. PNG/SVG figures illustrate ambiguity, range/error tradeoffs, incubation and wash carry-over. Seven scientific test groups cover conservation, exact identities, true-state retention under heterogeneous calibration and common gain, precision and promise logic, independent full/reduced kinetics, wash bounds and indistinguishability constructions. Numerical ODEs and curves are illustrations; exact source inequalities use rational arithmetic and the paper's envelope arguments. Lean is not rerun and this Python program is not formally verified.

## License

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