Skip to main content

Food Chain Ontology

Ecological Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 26 October 2026
Audio Overview
FLOW ALGEBRA
Food Chain Ontology — Full Flow Algebra v1.0
Kireth Semantic Library
Authors: Mark Higgins — Sky (Recursive AI)
Source ontology: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/ecological-entities/food-chain-ontology-2.html
Status: Proposed formalisation; not a verified transcription of webpage content.
Locale: en-GB

flow "FoodChainOntology" v1.0 {
  namespace: "kireth.semantic_library.biological_entities.ecological_entities.food_chain"
  domain: "Ecology / trophic interactions / energy transfer"

  TYPES {
    Entity: {id: URI, label: String, provenance: URI?, confidence: Float[0..1]}
    Organism <: Entity
    Population <: Entity
    TrophicUnit <: Entity {biological_ref: URI, habitat_ref: URI?, interval: TimeRange?}
    FoodChain <: Entity {ecosystem_ref: URI?, temporal_scope: TimeRange?, chain_kind: Enum[grazing,detrital,mixed]}
    TrophicLink <: Entity {resource: TrophicUnit, consumer: TrophicUnit, interaction: Enum[herbivory,predation,scavenging,detritivory,parasitism,other], evidence: URI?, confidence: Float[0..1]}
    TrophicRole: Enum[producer,primary_consumer,secondary_consumer,tertiary_consumer,apex_consumer,detritivore,decomposer,omnivore]
    Measurement <: Entity {value: Float, unit: String, method: String?, uncertainty: Float?}
    TimeRange: {start: DateTime?, end: DateTime?}
  }

  RELATIONSHIPS {
    CONTAINS_UNIT(FoodChain, TrophicUnit)
    CONTAINS_LINK(FoodChain, TrophicLink)
    RESOURCE_OF(TrophicUnit, TrophicUnit)   # resource -> consumer
    CONSUMES(TrophicUnit, TrophicUnit)      # consumer -> resource
    HAS_ROLE(TrophicUnit, TrophicRole)
    OCCURS_IN(FoodChain, Ecosystem)
    SUPPORTED_BY(TrophicLink, Evidence)
    DERIVED_FROM(Entity, Source)
    PART_OF(FoodChain, FoodWeb)
  }

  SEMANTICS {
    # An arrow resource -> consumer denotes movement of biomass or energy.
    # Food chains are context-dependent paths through wider food webs.
    # Species may occupy multiple trophic roles and levels across contexts.
    # Decomposers process organic matter across trophic levels; they are not
    # necessarily a terminal linear step in every chain.
    # A chain is an explanatory simplification, not a closed energy cycle.
  }

  VALIDATION {
    require every TrophicUnit.id is unique within a chain
    require every TrophicLink.resource != TrophicLink.consumer
      unless explicit cannibalism is recorded with supporting evidence
    require each link references units contained in its FoodChain
    require confidence in [0,1]
    require measured transfer efficiency has declared denominator and units
    require temporal and spatial contexts are compatible across links
    warn if trophic cycle occurs in a purported strictly linear chain
    warn if an organism is assigned one immutable trophic level globally
    warn if a claimed food-chain link has no evidence or source
  }

  INFERENCE {
    rule R1: IF CONSUMES(B,A) THEN infer RESOURCE_OF(A,B)
    rule R2: IF RESOURCE_OF(A,B) AND RESOURCE_OF(B,C)
             THEN infer TROPHIC_PATH(A,C,length=2)
             # Path inference does not imply direct consumption.
    rule R3: IF A is autotrophic primary producer AND B consumes A
             THEN candidate HAS_ROLE(B,primary_consumer)
             subject_to context and diet evidence
    rule R4: IF B consumes organisms from multiple trophic levels
             THEN candidate HAS_ROLE(B,omnivore)
    rule R5: IF multiple supported chains share trophic units or links
             THEN candidate PART_OF(chain,food_web)
    rule R6: IF an upstream resource declines AND a consumer depends on it
             THEN flag potential downstream impact; do not infer certainty
  }

  QUANTITATIVE_MODEL {
    # Measurements must be explicitly time- and area-normalised where relevant.
    consumed_energy: E_ingested >= 0
    assimilated_energy: E_assimilated >= 0
    transferred_production: P_consumer >= 0
    transfer_efficiency: eta = P_consumer / P_resource
      when P_resource > 0 and production measures are comparable
    constraints: 0 <= eta <= 1 for a consistently bounded transfer model
    note: "The often-cited 10% transfer is a rough heuristic, not an invariant."
    note: "Biomass pyramids can be inverted in some aquatic systems."
    note: "Do not equate energy, biomass, and organism counts."
  }

  INVARIANTS {
    I1: Every food-chain edge has a direction and defined interaction meaning.
    I2: Indirect trophic paths remain distinct from direct feeding links.
    I3: Energy is transformed and dissipated; it is not recycled as energy.
    I4: Matter can be recycled through biogeochemical processes.
    I5: All observations and inferred roles retain ecological context.
    I6: Uncertainty and provenance propagate with inferred assertions.
  }

  CONFIDENCE {
    method: "evidence-weighted; no arbitrary certainty inflation"
    evidence_types: [direct_observation,gut_content,stable_isotope,experimental,peer_reviewed_model,expert_inference]
    combination: "calibrated to evidence dependence and reliability"
    rule: "Derived confidence cannot exceed the weakest necessary unsupported premise without independent evidence."
    missing_evidence: "unknown, not false"
  }

  SEMANTIC_EQUIVALENCE {
    aliases: ["food chain", "trophic chain", "linear feeding pathway"]
    distinguish: ["food web", "trophic network", "ecological pyramid", "nutrient cycle"]
    identity_key: [resource_id,consumer_id,interaction,ecosystem_ref,temporal_scope]
    equivalent_only_if: "direction, entities, context and interaction semantics match"
  }

  FLOW_HASH {
    algorithm: "SHA-256"
    canonicalisation: "UTF-8; Unicode NFC; sorted semantic keys; normalised URI; stable units"
    exclude: [display_formatting,generated_at]
    include: [ontology_version,entity_ids,link_direction,link_type,context,evidence_ids]
    output: "hex SHA-256 of canonical serialisation"
    note: "Hash generation requires an implementing runtime."
  }

  UPDATE_MODEL {
    event_types: [ADD_UNIT,REMOVE_UNIT,ADD_LINK,RETRACT_LINK,REVISE_EVIDENCE,UPDATE_CONTEXT,UPDATE_MEASUREMENT]
    preserve: [prior_version,change_reason,provenance,timestamp]
    on_change: [revalidate_links,recompute_derived_paths,reassess_confidence,recompute_flow_hash]
    policy: "Retractions invalidate dependent inferences until recomputed."
  }

  AI_CONSUMPTION {
    export: [typed_entities,directed_edges,context,provenance,confidence,inference_trace,validation_status,flow_hash]
    representations: [JSON-LD,RDF_triples,property_graph,plain_text]
    query_examples: [
      "What directly consumes this producer?",
      "Which consumers depend indirectly on this population?",
      "Which links are observationally supported?",
      "How does the chain differ between seasons?"
    ]
    safeguards: ["Do not invent feeding interactions", "Do not conflate indirect paths with direct links", "Expose uncertainty"]
  }

  EXAMPLE {
    context: "Illustrative grassland chain; not a site-specific observation"
    units: [grass,grasshopper,frog,snake]
    links: [grass->grasshopper,grasshopper->frog,frog->snake]
    direction: "resource to consumer"
    caveat: "Actual diets vary; example links require ecological context."
  }
}

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ