Skip to content

Medical Dosing โ€” sealed pharmacokinetic one-compartment

GFTCL-LION-MEDICAL-001.

What the cell guarantees

Given (D, V, tยฝ, n), the cell computes plasma concentration C(t) as an exact-Rat function: C = (D/V) ยท (1/2)โฟ where n = elapsed half-lives. Bit-for-bit against proof/lean/FirstRoars/PharmacokineticOneComp.lean + RadioactiveTracerDecay.lean.

The safety-threshold rule fires when C(t) < threshold_pct ยท C_peak โ€” the canonical "washed out" verdict.

Walkthrough

MedicalDomainPanel โ†’ tap a patient case card โ†’ DosingValidationWalkthrough opens:

  1. Case confirmation โ€” (D mg, V L, tยฝ h, safety_threshold_pct) from sealed substrate row; clinician CANNOT edit
  2. Time-point slider โ€” pick n half-lives elapsed (n=5 = canonical washout check)
  3. Live concentration โ€” C in exact reduced Rat
  4. Bit-exact match vs sealed formula โ€” substrate CHECK enforces match=1; divergence REFUSED at SQL
  5. Safety threshold verdict โ€” below_safety_threshold bit
  6. Witness sealed โ€” append-only dosing_validations; signed quintet; broadcast permitted; emission flows to federation_emissions

Federation

  • NATS subject: gaiaftcl.medical.dosing.sealed
  • AlertableDomain: MedicalAlertableEvents (seedRules: match=true โ†’ GOOD; match=false โ†’ BAD)
  • Peer recompute: GET /federation/witnesses/{emission_id} returns canonical witness JSON

What stays NAMED OPEN

  • Two-compartment / Michaelis-Menten kinetics (summit.medical.two_compartment_pk)
  • Population variability / Bayesian priors (summit.medical.pop_pk)
  • Drug-drug interaction matrix (summit.medical.ddi_witness)

Files

  • Lean: proof/lean/FirstRoars/PharmacokineticOneComp.lean, RadioactiveTracerDecay.lean
  • Engine: cells/xcode/Sources/MedicalUI/MedicalEngine.swift
  • Panel: cells/xcode/Sources/MedicalUI/MedicalDomainPanel.swift
  • Alertable: cells/xcode/Sources/MedicalAlertableEvents/
  • Substrate: V124 patient_cases + dosing_validations

Federation-cosigned

This page's source is sealed in the GaiaFTCL federation manifest โ€” page SHA-256 bcbdccb82f9f31d7โ€ฆ, manifest witness a090592e0609adc8โ€ฆ, signed 2026-06-02T18:58:22Z by cell gaiaftcl-mac-cell. Verify with gaiaftcl wiki sign --all and compare wiki-all-signatures.json.