# Inherited-family dependence and treatment-order decisions

Companion to manuscript 66, SHA-256 `96c8eb87625ee95044617d81f9a11ed08d44cf309c63d8036f84ea0775fbf3ff`. Python 3.11+.

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

## What is held fixed, and what changes

Six molecular types record two sites carrying activating, repressive or unmarked material: UU,UR,RR,AU,AR,AA. RR is a repressive molecular state, **not** resistance. The seventh type M is an autonomous durable resistant lineage. Writing and erasing move a molecular cell between the six types. Protected AU and AA have lower background death. All molecular cells divide at the same rate.

`ComplementarySisters` assigns each of the mother's old marks to exactly one daughter, then refills unmarked sites. `IndependentSisters` draws two daughters independently from exactly the same one-daughter marginal. The second law is a model reduction: it preserves each daughter's distribution but generally does not conserve the mother's marks across the pair. A custom `SisterLaw` must be normalized, exchangeable and share these marginals to remain in the matched comparison.

At division, with probability `mu_i=epsilon*kappa_i`, **exactly one** sampled daughter, chosen uniformly, is replaced by M. The mother disappears and there are still exactly two daughters. The generating function is `(1-mu)*D(x,x)+mu*y*Lambda*x`. Independently mutating both daughters or adding a third daughter is another source. The synthetic acquisition probabilities .01 and .04 are coarse per-division quantities, not per-base mutation rates.

`BranchingSource.polynomial` exposes the full seven-dimensional constant, linear and quadratic field. Its mean matrix is the derivative at the all-one vector with positive sign. Both sister laws give the same complete matrix for every shared action, including the resistant coordinate. Hence all type-resolved means agree **law-to-law under each common deterministic schedule**. AB and BA need not have the same means. Unconditional means under population-dependent feedback are not covered by that identity.

## Reusable model components

The editable block in `example.py` contains acquisition scale/profile, erasure and extra death in both actions, pulse duration, resistant birth/death, initial type counts and approximation-error allowance. Fixed paper certificates are executed separately, so edits do not inherit the reference reversal or continuum guarantee.

```python
from fractions import Fraction as F
from branching import (BranchingSource, ComplementarySisters,
    IndependentSisters, Acquisition, ResistantLineage, Action, Phase)

model = BranchingSource(ComplementarySisters(),
    acquisition=Acquisition(scale=F(1,20)),
    resistant=ResistantLineage(birth=F(1,10), death=F(1,50)))
A = Phase(Action(erasure=F(3,10)), duration=F(10))
B = Phase(Action(erasure=F(1,100), extra_molecular_death=F(12,100)),
          duration=F(10))
terminal, clearing_slack = model.clearing_terminal()
q_ab = model.compose([A,B], terminal)
q_ba = model.compose([B,A], terminal)
print(q_ab[5], q_ba[5])  # numerical AA extinction probabilities
```

Backward extinction flows compose phases in reverse chronological order: chronological AB means flow A applied to flow B of the terminal payoff. `means` instead propagates a forward mean row vector chronologically with each phase matrix. `mechanism` carries covariance and sensitivity states through backward phase boundaries without resetting them.

The six-state chemical architecture and molecular demographic map remain the paper's literal source. Replacing those requires extending `BranchingSource.polynomial`, rechecking source normalization, and supplying a new clearing and interval-soundness argument. The classes expose this construction rather than hiding it behind a fitted two-state reduction.

## The endpoint is part of the source

After the course, the reference continuation sets intrinsic erasure .3, extra death zero and acquisition zero. Molecular cells then clear almost surely: the exact positive weight (14,11,10,84,43,107) verifies drift at most -.09 times the weight. M retains autonomous birth .1 and death .02, giving minimal extinction probability rho=.2. The terminal eventual-extinction vector is therefore `(1,1,1,1,1,1,.2)`.

The model separately computes four events from AA:

* Total survival at the deadline: terminal payoff zero, then complement.
* Some M present at the deadline: molecular terminal ones, resistant terminal zero, then complement.
* Some M ever appeared by the deadline: a killed molecular field that deletes acquisition-success terms, then complement.
* Eventual total survival under the clearing continuation: terminal molecular ones and resistant rho, then complement.

These differ because a resistant cell can appear and later die. Default complementary AB diagnostics are approximately .14318, .03292, .03785 and .03042 respectively. They are numerical diagnostics, not interchangeable observations. The continuation is not drug-free: indefinite erasure .3 has infinite integrated additional exposure if charged to the budget. The finite-course equality compares eraser increment 2.9 and additional molecular-death exposure 1.20553 in either order, not drug mass, toxicity or pharmacokinetic exposure.

## Fresh decision certificates

`source.py` and `validated.py` are unmodified manuscript campaign kernels; hashes and provenance are supplied. `consequence_kernel.py` extracts the scalar and linear enclosure routines from the same campaign, removing a filesystem-writing side effect. No saved flow certificates are loaded. The new driver re-executes four central flows and four endpoint flows.

The outward integrator uses rational source coefficients and integer endpoints on a 110-bit dyadic grid. A recurrence on the entire invariant cube bounds the normalized twelfth derivative; a degree-11 Taylor polynomial at step .05 is supplemented by that remainder. The global error uses the checked Metzler/logarithmic-norm row bound .09. Projection of the numerical center is included in the local distance and errors persist through phase boundaries. This is exact validated arithmetic under a conventional soundness proof, not a Lean-verified integrator.

At the fixed reference, the AA extinction probabilities are about:

| Sister law | AB | BA | Preferred order |
|---|---:|---:|---|
| Complementary J | .969579866104741 | .969581567445559 | BA |
| Independent I | .969623237350070 | .969621466763779 | AB |

Fresh rational gap intervals prove both signs with margins over 1.6e-6. Raising these probabilities to any positive integer founder count preserves the ordering for **identical AA founders under deterministic schedules**. It does not establish an arbitrary heterogeneous-preparation ordering.

To certify the entire killing interval [.120545,.120561], the driver encloses J's left endpoint and I's right endpoint, forms exact secants to the central gaps, and uses the analytic gap-curvature bound 6912. The resulting upper derivative bounds are negative throughout the whole interval, so the endpoint signs extend across it. Sampled curves or floating roots are not used for this inference. This is an inner certified interval, not the maximal reversal region. The fixed curvature proof depends on the paper's durations, acquisition scale and rates; edited scenarios receive numerical exploration only.

## Why sister covariance matters

For small acquisition scale epsilon, both laws have the same first-order response h because that equation uses only the mean matrix and common marginal. The second-order difference Delta obeys a mean-transport equation forced by minus the complementary sister covariance of h. Exact enumeration checks the six covering relations, seven nonempty up-sets and 32 quasi-monotonicity inequalities per phase. The conventional monotone-cone and Harris arguments then give a nonnegative leading dependence correction for this source.

That sign is insufficient to rank schedules: the comparison depends on the **difference between their errors**. At finite epsilon the exact identity for z=xI-xJ has the form `z'=B(t)z+C(t)`, where C is again minus a sister covariance, now evaluated on the full complementary solution. The example numerically integrates this response alongside both full fields and an absolute-forcing bound, checking their agreement. “Exact identity” describes the equation; its floating solution is not a new rigorous enclosure.

Leading-order curves explain the mechanism but cannot certify the 1e-6 decision. The manuscript's generic third-derivative remainder estimate exceeds 600 at epsilon=.1. The supplied example therefore uses the fresh full-flow intervals for every rigorous ranking claim. The paired correction E_AB-E_BA is about 3.47193e-6, larger than the independent-model order margin about 1.77059e-6, which reverses the sign.

## Decision cost and uncertainty

If J is the true law, following I's AB recommendation loses about 1.7013408186e-6 extinction probability for one AA founder. This is the direct misspecification cost. Small absolute probability error can exceed a still smaller decision margin.

`winner` reports unresolved whenever a signed gap interval includes zero. The separately enclosed paired correction establishes BA, whereas a symmetric correction bound of plus/minus 4e-6 leaves the decision unresolved. This is model-approximation uncertainty, not empirical confidence. If only separate symmetric schedule-error bounds are available, their sum must be smaller than the approximate positive margin to preserve a ranking.

Exact rational increment signs at founder counts 31 and 32, together with the single-sign-change formula, establish a unique maximum advantage at 32 founders under both laws. The advantage then tends to zero; increasing founder count does not amplify it indefinitely. A random preparation requires averaging products under its actual distribution rather than replacing counts with their mean.

The code also computes the two-model minimax regret interval, about 8.67636513e-7. Its premise is that permitted information cannot distinguish the two laws, and it randomizes an entire deterministic course independently of the population. It is not the deterministic mistake cost, a randomization of nature, a dosing prescription or a restriction on a rule that observes sister pairs.

## Feedback floor and continuation burden

The fixed action rectangle yields a law-independent scalar survival floor by a population-generator barrier, with no founder independence under feedback. The scalar equation is `a'=.0008-.3228*a-.099*a*a`, a(0)=0. Its fresh rational enclosure gives a(20) about .002472578295568. This is a necessary obstruction for every admitted predictable policy under the specified continuation, not a constructive risk guarantee or evidence that the exhibited schedule is optimal. The achieved complementary BA risk is roughly twelve times this floor.

The example recomputes two separate continuation perturbation budgets using exact occupation rewards and validated linear flows:

* Residual acquisition scale eta<=3e-5 preserves both central preferences under continued clearing. Its errors are one-sided and use the appropriate schedule's upper bound, not a symmetric sum.
* Mutation-free clearing for H=152 before an alternate continuation preserves both preferences under the stated autonomy/no-immigration assumptions. Its extra erasure exposure is 44.08, exactly 15.2 times the initial course's 2.9. The same sufficient bound does not certify H=151; that does not prove a physical minimum.

These are separate scenarios. They cannot be combined without a new bound, and an alternate continuation cannot alter autonomous descendants of M already present. The substantial common clearing cost is reported with the finite-realizability claim.

## Scope, outputs and license

All rates, acquisition profiles and calendar scales are synthetic. The 20-unit course has integrated reference division hazard two; it is not two synchronized cell generations. Density dependence, spatial structure, immune effects, toxicity, pharmacokinetics, resistant reversion and observation error are absent. The example teaches what a model reduction must preserve, not how to treat a population clinically.

JSON outputs include fresh dyadic flow intervals, exact mean matrices, separate endpoint diagnostics, continuum secants, decision consequences, cone checks, scalar and continuation enclosures, and numerical mechanism diagnostics. CSVs expose curves and founder effects; figures derive from those outputs. Seven scientific test groups check source matching, endpoints, fresh reversal, covariance response, chronology, feedback algebra and edited-source boundaries. Lean and the conventional stochastic theorem are not rerun or presented as formalized.

MIT is proposed for the new example, pending the owner's decision. No new license grant is asserted; manuscript-kernel and repository terms remain separate.
