FLOW ALGEBRA
Microbiome Ontology — Kireth Semantic Library
Version: 1.0 | 23 October 2026
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/microbial-entities/microbiome-ontology.html
Status: Independently constructed formalisation; page's embedded specification was not available for comparison.
flow "MicrobiomeOntology" v1.0
# ---------- DOMAIN ----------
DOMAIN: BiologicalEntities / MicrobialEntities / Microbiome
PURPOSE: Represent a microbiome as a context-bound system comprising microorganisms, their genetic material, interactions, and associated environmental conditions.
# ---------- TYPED ENTITIES ----------
ENTITY Microbiome : BiologicalSystem
ENTITY MicrobialCommunity : EcologicalCommunity
ENTITY MicrobialPopulation : Population
ENTITY Microorganism : BiologicalOrganism
ENTITY Bacterium : Microorganism
ENTITY Archaeon : Microorganism
ENTITY MicroscopicFungus : Microorganism
ENTITY MicrobialProtist : Microorganism
ENTITY Virus : BiologicalAgent # Not classified here as a cellular organism
ENTITY HostOrganism : BiologicalOrganism
ENTITY Habitat : EnvironmentalContext
ENTITY EnvironmentalCondition : MeasuredCondition
ENTITY Sample : BiologicalSample
ENTITY Taxon : TaxonomicConcept
ENTITY Gene : GeneticEntity
ENTITY Metagenome : GeneticDataset
ENTITY Metabolite : ChemicalEntity
ENTITY MicrobialFunction : BiologicalFunction
ENTITY Interaction : EcologicalRelationship
ENTITY Observation : EvidenceRecord
ENTITY TimePoint : TemporalEntity
ENTITY Method : AnalyticalMethod
# ---------- TYPED RELATIONSHIPS ----------
RELATION HAS_COMMUNITY(Microbiome, MicrobialCommunity)
RELATION CONTAINS_POPULATION(MicrobialCommunity, MicrobialPopulation)
RELATION MEMBER_OF(Microorganism, MicrobialPopulation)
RELATION ASSIGNED_TAXON(MicrobialPopulation, Taxon)
RELATION OCCURS_IN(Microbiome, Habitat)
RELATION ASSOCIATED_WITH_HOST(Microbiome, HostOrganism)
RELATION HAS_ENVIRONMENT(Microbiome, EnvironmentalCondition)
RELATION HAS_METAGENOME(Microbiome, Metagenome)
RELATION CONTAINS_GENE(Metagenome, Gene)
RELATION SUPPORTS_FUNCTION(Gene, MicrobialFunction)
RELATION PRODUCES(MicrobialPopulation, Metabolite)
RELATION PARTICIPATES_IN(MicrobialPopulation, Interaction)
RELATION INTERACTS_WITH(Interaction, MicrobialPopulation)
RELATION SAMPLED_AS(Microbiome, Sample)
RELATION ANALYSED_BY(Sample, Method)
RELATION OBSERVED_AT(Observation, TimePoint)
RELATION SUPPORTED_BY(Assertion, Observation)
RELATION DERIVED_FROM(Assertion, Assertion)
# ---------- CORE CONSTRAINTS ----------
CONSTRAINT C1: Every microbiome assertion must specify a habitat or sampling context.
CONSTRAINT C2: A microbiome and a microbial community are related but not identical concepts.
CONSTRAINT C3: Taxonomic presence does not prove activity or functional expression.
CONSTRAINT C4: Detection of genetic potential does not establish measured metabolism.
CONSTRAINT C5: Host association does not imply pathogenicity or benefit.
CONSTRAINT C6: Relative abundance is not equivalent to absolute cell count.
CONSTRAINT C7: Sampling and sequencing methods can introduce bias and contamination.
CONSTRAINT C8: Viral components may be represented without treating viruses as cellular organisms.
CONSTRAINT C9: Temporal changes require comparable sampling context and methods.
# ---------- FORMAL INFERENCE ----------
RULE R1 CommunityMembership:
IF HAS_COMMUNITY(m,c) AND CONTAINS_POPULATION(c,p)
THEN ASSOCIATED_POPULATION(m,p)
CONFIDENCE = min(confidence(HAS_COMMUNITY), confidence(CONTAINS_POPULATION))
RULE R2 HabitatContext:
IF OCCURS_IN(m,h) AND HAS_ENVIRONMENT(m,e)
THEN CONTEXTUALISED_BY(m,h,e)
REQUIRE same_sampling_context(m,h,e)
RULE R3 FunctionalPotential:
IF HAS_METAGENOME(m,g) AND CONTAINS_GENE(g,x) AND SUPPORTS_FUNCTION(x,f)
THEN HAS_FUNCTIONAL_POTENTIAL(m,f)
NOT_INFER FUNCTION_OBSERVED(m,f)
RULE R4 MeasuredActivity:
IF OBSERVED_ACTIVITY(m,f,o) AND validated(o)
THEN FUNCTION_OBSERVED(m,f)
CONFIDENCE = evidence_quality(o)
RULE R5 HostAssociation:
IF ASSOCIATED_WITH_HOST(m,h)
THEN HOST_ASSOCIATED_MICROBIOME(m)
NOT_INFER DISEASE_CAUSATION(m,h)
RULE R6 TemporalDifference:
IF MEASURED_AT(m,t1,s1) AND MEASURED_AT(m,t2,s2)
AND comparable_methods(s1,s2)
THEN ELIGIBLE_FOR_TEMPORAL_COMPARISON(m,t1,t2)
RULE R7 EvidenceGuard:
IF evidence_is_correlational(a)
THEN prohibit_causal_promotion(a)
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
"microbiome" <-> "microbial ecosystem" : CONTEXT_DEPENDENT
"microbiota" <-> "microbial community" : APPROXIMATE
"microbiome" <-> "microbiota" : NOT_STRICTLY_EQUIVALENT
"metagenome" <-> "microbiome" : NOT_EQUIVALENT
"taxonomic detection" <-> "functional activity" : NOT_EQUIVALENT
# ---------- CONFIDENCE ----------
CONFIDENCE:
range: [0.0, 1.0]
evidence_dimensions: [method_validity, sample_quality, replication, contamination_control, temporal_relevance, taxonomic_resolution]
combination: calibrated_evidence_model
policy: do_not_invent_numeric_confidence
missing_evidence: UNKNOWN
# ---------- PROVENANCE ----------
PROVENANCE:
required_fields: [source_id, observation_id, sampling_context, method, recorded_at, assertion_author]
optional_fields: [accession, instrument, laboratory, version, licence, uncertainty]
preserve_raw_observations: true
record_inference_chain: true
# ---------- FLOW HASH ----------
FLOW_HASH:
algorithm: SHA-256
canonical_input: [flow_name, version, entity_schema, relationship_schema, rules, constraints, source_identifiers]
encoding: UTF-8
exclude_volatile_fields: [execution_timestamp]
recompute_on_semantic_change: true
# ---------- RECURSIVE UPDATE MODEL ----------
UPDATE_MODEL:
on_new_observation:
- validate_sample_and_method
- resolve_entity_identifiers
- append_provenance
- revise_supported_assertions
- propagate_dependent_inferences
- preserve_prior_versions
- recompute_flow_hash
conflict_policy: retain_competing_claims_with_evidence
termination: fixed_point_or_iteration_limit
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
mode: typed_semantic_graph
output: [entities, relations, contextual_assertions, confidence, provenance, inference_trace, flow_hash]
safeguards:
- distinguish_observation_from_inference
- preserve_uncertainty
- distinguish_association_from_causation
- reject_unsupported_disease_claims
- avoid_taxonomic_overgeneralisation
human_readable_explanations: true
# ---------- VALIDATION EXAMPLES ----------
EXAMPLE E1:
GIVEN microbiome M, community C, population P
GIVEN HAS_COMMUNITY(M,C), CONTAINS_POPULATION(C,P)
EXPECT ASSOCIATED_POPULATION(M,P)
EXAMPLE E2:
GIVEN gene X in metagenome G, SUPPORTS_FUNCTION(X,F)
EXPECT HAS_FUNCTIONAL_POTENTIAL(M,F)
REJECT automatic FUNCTION_OBSERVED(M,F)
EXAMPLE E3:
GIVEN ASSOCIATED_WITH_HOST(M,H)
REJECT automatic DISEASE_CAUSATION(M,H)
END FLOW
Download Code
Copy to Clipboard