FLOW ALGEBRA
Immune Cell Ontology — Kireth Semantic Library
Version: 1.0 | Date: 2026-10-19
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/immune-system-entities/immune-cell-ontology.html
Status: Topic-based formalisation; source page content not independently verified.
Authors: Mark Higgins — Sky (Recursive AI)
1. DOMAIN AND SCOPE
ontology ImmuneCellOntology extends BiologicalEntityOntology
purpose: represent immune-cell identity, lineage, phenotype, activation, localisation, function and evidence.
world_assumption: open
identity_policy: identifiers are distinct from labels; no automatic identity from shared markers.
2. TYPED ENTITIES
entity ImmuneCell <: Cell
entity InnateImmuneCell <: ImmuneCell
entity AdaptiveImmuneCell <: ImmuneCell
entity MyeloidCell <: ImmuneCell
entity LymphoidCell <: ImmuneCell
entity TCell <: LymphoidCell
entity BCell <: LymphoidCell
entity NaturalKillerCell <: LymphoidCell
entity InnateLymphoidCell <: LymphoidCell
entity Monocyte <: MyeloidCell
entity Macrophage <: MyeloidCell
entity DendriticCell <: ImmuneCell
entity Neutrophil <: MyeloidCell
entity Eosinophil <: MyeloidCell
entity Basophil <: MyeloidCell
entity MastCell <: ImmuneCell
entity PlasmaCell <: BCell
entity RegulatoryTCell <: TCell
entity CytotoxicTCell <: TCell
entity HelperTCell <: TCell
entity Antigen <: BiologicalEntity
entity Receptor <: Protein
entity Cytokine <: SignallingMolecule
entity Chemokine <: Cytokine
entity Tissue <: BiologicalEntity
entity Pathogen <: BiologicalEntity
entity ImmuneResponse <: BiologicalProcess
entity Phenotype <: BiologicalState
entity Evidence <: InformationEntity
3. ATTRIBUTES
ImmuneCell.id: Identifier
ImmuneCell.species: Taxon
ImmuneCell.lineage: CellLineage?
ImmuneCell.markers: Set[MarkerObservation]
ImmuneCell.state: ActivationState
ImmuneCell.location: Tissue?
ImmuneCell.functions: Set[ImmuneFunction]
ImmuneCell.sample_time: Timestamp?
ImmuneCell.viability: Probability?
MarkerObservation = (marker: Protein, status: {positive,negative,unknown}, assay: String, context: String)
ActivationState = {naive, resting, primed, activated, effector, memory, exhausted, anergic, apoptotic, unknown}
ImmuneFunction = {phagocytosis, antigen_presentation, cytotoxicity, antibody_secretion, cytokine_secretion, immune_regulation, surveillance, tissue_repair}
4. RELATIONSHIP ALGEBRA
is_a(ImmuneCell, Cell)
develops_from(ImmuneCell, ProgenitorCell)
expresses(ImmuneCell, Receptor)
recognises(ImmuneCell, Antigen)
responds_to(ImmuneCell, Cytokine)
secretes(ImmuneCell, Cytokine)
migrates_to(ImmuneCell, Tissue)
interacts_with(ImmuneCell, ImmuneCell)
presents_antigen_to(DendriticCell, TCell)
phagocytoses(Macrophage, TargetEntity)
kills(CytotoxicTCell, TargetCell)
produces(PlasmaCell, Antibody)
regulates(RegulatoryTCell, ImmuneResponse)
participates_in(ImmuneCell, ImmuneResponse)
supported_by(Assertion, Evidence)
5. CLASSIFICATION CONSTRAINTS
forall x: TCell(x) => ImmuneCell(x)
forall x: BCell(x) => ImmuneCell(x)
forall x: NaturalKillerCell(x) => ImmuneCell(x)
forall x: Neutrophil(x) => MyeloidCell(x)
forall x: Monocyte(x) => MyeloidCell(x)
forall x: PlasmaCell(x) => BCell(x)
NOTE: Innate/adaptive describes functions and programmes; some immune cells bridge both.
NOTE: Dendritic cells, macrophages and mast cells are heterogeneous; origin and subtype require context.
NOTE: A single surface marker is generally insufficient to assign definitive cell identity.
6. STATE TRANSITION ALGEBRA
transition activate: resting -> activated
precondition: appropriate receptor signal and contextual co-signals
effect: state_change and altered effector programme
transition differentiate: progenitor -> mature_subtype
precondition: lineage-specific transcriptional and environmental signals
transition memory_form: activated -> memory
precondition: eligible adaptive lymphocyte programme
transition exhaust: activated -> exhausted
precondition: persistent stimulation and context-specific evidence
transition apoptosis: viable -> apoptotic
precondition: cell-death signalling
NOTE: transitions are conditional, not universal or irreversible for every cell type.
7. FUNCTIONAL FLOWS
flow InnateRecognition:
input: pathogen_pattern, innate_receptor, local_context
process: receptor_binding -> signalling -> effector_response
output: cytokines | phagocytosis | cytotoxicity | recruitment
flow AntigenPresentation:
input: antigen, antigen_presenting_cell, MHC_context
process: uptake_or_processing -> peptide_loading -> presentation
output: T_cell_recognition_possible
flow AdaptiveActivation:
input: antigen_recognition, co_stimulation, cytokine_context
process: activation -> proliferation -> differentiation
output: effector_cells | memory_cells | regulatory_response
flow Resolution:
input: reduced_threat, inhibitory_signals, tissue_context
process: effector_contraction -> clearance -> repair
output: homeostasis_or_persistent_inflammation
8. QUANTITATIVE MODELS
Population dynamics: dN/dt = (p - d + i - e) * N
where p=per-capita proliferation, d=death, i=influx, e=efflux; homogeneous approximation.
Receptor occupancy: theta = [L] / (Kd + [L])
valid for single-site equilibrium binding under stated assumptions.
Chemotactic flux: J = -D * grad(n) + chi * n * grad(c)
where n=cell density, c=chemoattractant concentration.
Activation probability: P(A|S,C) = sigmoid(beta0 + betaS*S + betaC*C)
empirical model requiring fitted coefficients and calibration.
Evidence confidence is not equivalent to activation probability.
9. LOGICAL INFERENCE
rule R1: observed_phagocytosis(x) => supports_function(x, phagocytosis)
rule R2: presents_peptide_MHC(x) => supports_function(x, antigen_presentation)
rule R3: secretes_immunoglobulin(x) AND verified_B_lineage(x) => supports_type(x, PlasmaCell)
rule R4: expresses(x, CD3) AND corroborating_T_lineage_evidence(x) => supports_type(x, TCell)
rule R5: cytotoxic_granule_release(x) => supports_function(x, cytotoxicity)
rule R6: marker_pattern(x, m) AND context_valid(m) => candidate_subtype(x, m)
rule R7: candidate_subtype(x, m) AND independent_confirmation(x, m) => verified_subtype(x, m)
constraint: no subtype assertion solely from a non-specific marker.
constraint: absence of measured expression is not proof of biological absence.
10. SEMANTIC EQUIVALENCE
SEMANTIC_EQUIVALENCE:
immune_cell ~ leukocyte [context: nucleated immune cells; not always identical across datasets]
B_lymphocyte == B_cell [standard biological synonym]
T_lymphocyte == T_cell [standard biological synonym]
NK_cell == natural_killer_cell [standard biological synonym]
macrophage != monocyte [related lineage; distinct states/types]
immune_cell != white_blood_cell [immune cells can reside outside blood]
cell_identity != activation_state
cell_type != cell_function
11. CONFIDENCE AND PROVENANCE
CONFIDENCE:
claim_id: Identifier
score: Real[0,1]
evidence_type: {flow_cytometry, sequencing, imaging, functional_assay, literature, inference}
sample_species: Taxon?
tissue_context: Tissue?
method: String
source_reference: URI?
timestamp: Timestamp
calibration_method: String?
limitations: Set[String]
rule: inferred_claim_confidence <= weakest_required_evidence_confidence unless validated fusion model exists
rule: report uncertainty, assay limitations, batch effects and marker ambiguity.
12. RECURSIVE FLOW
recursive_flow ImmuneNetwork(cell, context, depth):
if depth <= 0: return observed_state(cell)
neighbours = documented_interactions(cell, context)
propagate only typed, supported relations
return aggregate(observed_state(cell),
map(neighbours, n -> ImmuneNetwork(n, context, depth-1)))
termination: depth_bound + visited_entity_set
cycle_policy: detect feedback loops; do not imply causal direction from correlation.
13. FLOW_HASH
FLOW_HASH:
algorithm: SHA-256
canonical_input: ontology_id + version + normalised_entities + normalised_relations + rules + source_revision
exclude: volatile_runtime_timestamps
output: content_addressed_digest
NOTE: digest must be computed from actual canonical serialisation; none is fabricated here.
14. UPDATE_MODEL
UPDATE_MODEL:
triggers: new_evidence | revised_cell_taxonomy | marker_reinterpretation | pathway_revision | source_change
steps: ingest -> validate -> compare -> version -> re-evaluate_inferences -> publish
preserve: prior_versions + provenance + changelog
conflict_policy: retain competing hypotheses with evidence and context
rollback: supported by immutable prior version.
15. AI_CONSUMPTION
AI_CONSUMPTION:
input: typed_graph + evidence + context + query
outputs: classification_candidates + explanation + confidence + provenance
safeguards: no unsupported diagnostic inference; distinguish observed from inferred; preserve uncertainty
interoperability: RDF/OWL-compatible concepts; ontology mappings require explicit review
query_example: "Which immune cells present antigen to CD4 T cells in this tissue?"
answer_contract: entity_ids + relevant_relationships + supporting_evidence + caveats
16. VALIDATION
check: all entity identifiers unique
check: relation domain/range consistent
check: subclass graph acyclic
check: activation states contextualised
check: provenance attached to non-trivial assertions
check: numeric equations declare assumptions and units
check: no unsupported equivalence or forced single-lineage classification
check: recursion terminates
check: FLOW_HASH generated only from canonical content
check: update model preserves history
17. SCIENTIFIC LIMITATIONS
Immune phenotypes depend on species, tissue, developmental stage, assay and activation context.
Immune-cell classifications evolve with single-cell and spatial profiling.
Mathematical examples are illustrative models, not universal physiological laws.
No clinical diagnosis or treatment decision should be derived from this ontology alone.
END FLOW ALGEBRA
Download Code
Copy to Clipboard