Repository navigation
Conversation
Library (reusable): ReactionNetwork.kinetic_invariant_basis() and kinetic_residuals() find conserved linear quantities that depend on rate values. Reactions are grouped by reactant monomial; w is invariant for every state exactly when it annihilates each group's rate-weighted stoichiometry. Solved with the existing exact rational row reduction. The span contains the stoichiometric pools; extra vectors turn integral identities into exact checks, e.g. eliminated amount = k * AUC and the exposure identity H + (kappa/delta) E - (kappa alpha/delta) U. Experiment (fork-specific, for Project Asma): an invented tumor-effector- neuron-marker network with burden-driven or release-driven antigen presentation, surgery as a retain event and chemotherapy as instantaneous or continuous kill. Checked against exact invariants, closed-form integrals and, optionally, Asma's exact rational module from a trusted local checkout. Tests: 16 new focused cases; full suite 231 passed with no skips; JavaScript engine checks pass. Invented units only; no biological or clinical claim. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CoFhtGJLght7YiLeEMReMt
Both runs pass on clean checkouts: VH c88db66 and Project Asma a5086b8. Exposure invariant drift 8.7e-14; identity error 8.9e-14; survival exp(-H) error 1.2e-12; continuous closed forms 5.0e-12 relative; committed hazard 2.6e-15; 28 Asma exact values matched within 8.5e-12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CoFhtGJLght7YiLeEMReMt
- Parameter ledger rows P023-P031: five abstract-only premises (CONJECTURE) and four missing kinetic inputs (MISSING) for the paraneoplastic exposure experiment; README section; pinned label counts updated and a row test. All 17 DOIs pass the Crossref title/first-author check, which caught a typographic-apostrophe mismatch now fixed. - Roadmap item 10 status and next steps; graph formalization section on rate-dependent invariants; research foundation toy example of order- dependent exposure with commuting endpoints, plus a dated snapshot update; README layout lists reactions.py. - Integration record: verification for the increment, runtime versions and a Debian setuptools/venv environment note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CoFhtGJLght7YiLeEMReMt
… into auto/E-kinetic-invariants-exposure # Conflicts: # README.md # auto-research/README.md
…ic-invariants-exposure # Conflicts: # README.md
This was referenced Nov 9, 2026
rohanarun
reviewed
Nov 10, 2026
| column = [sum((rates[j] * self._stoich_exact[i][j] for j in members), Fraction(0)) | ||
| for i in range(len(self.ids))] | ||
| label = "*".join(s if n == 1 else f"{s}^{n}" for s, n in key) or "1" | ||
| columns[label] = column |
Owner
There was a problem hiding this comment.
Distinct reactant monomials can overwrite each other and certify a false invariant.
Species IDs accept any nonempty string. Create species A, B, A*B, and C. Add one reaction consuming {"A": 1, "B": 1} and another consuming {"A*B": 1}, both producing C at unit rate. Both monomials format to the key "A*B". The second column overwrites the first, and kinetic_residuals({"A": 1}) returns only a zero while the first reaction consumes A. The basis also includes A alone as a purported invariant.
Keep the structured monomial tuples as keys for the calculation and use a collision-free representation when returning residuals.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stack: #5 → #6 → #7 → #8 (this PR is layer 4 of 4). Each branch contains the previous layer, so merging in order with merge commits lands the whole stack in one sweep with no conflicts (verified locally: four sequential merges, final tree identical to the #8 tip, 304 tests passing). GitHub retargets each child to
mainas its parent merges. Please avoid squash- or rebase-merging individual layers, which would strand the child branches' copies of the parent commits.Stacked on the competitive-binding PR #7 (base
auto/E-competitive-binding-envelopes). This completes the Foundation-0 migration: it merges the fork's one branch that was never in itsmain—claude/admiring-cori-0qyybb, kinetic invariants + paraneoplastic antigen exposure — whose preservation was flagged in #6. The original branch also remains pushed here unchanged for provenance.Contents (from the branch's own report,
auto-research/2026-11-05-E-paraneoplastic-exposure/report.md):vh/graph/reactions.py:kinetic_invariant_basis/kinetic_residuals— rate-dependent kinetic invariants (e.g. exposure/AUC identities) beyond stoichiometric conservation, with exact checks.scripts/validate_paraneoplastic_exposure.py, bridged against Project Asma exact rationals (28 bridge values ≤8.5e-12, invariant drift ≤8.7e-14; explicitly no biological validation).reaction_experiments,research-foundation,roadmap,project-asma-integration).Merge notes
Merged onto the full imported stack (graph stack + competitive binding). Textual conflicts only in
README.mdandauto-research/README.md, resolved as unions (kinetic-invariants clause added to thevh.graphrow and layout; its index row inserted chronologically). Ledger JSON and docs auto-merged and were re-validated rather than trusted.Verification (this branch)
pytest -q -m "not network": 292 passed, 1 skipped, 1 deselected, 0 failed (includes the branch's 16 kinetic-invariant/exposure tests, green both on their original base and here).validate_paraneoplastic_exposure,validate_ovarian_parameter_ledger,validate_reaction_experiments: exit 0, no artifact drift.