FLOW ALGEBRA
Prey Ontology — Full Flow Algebra v1.0
Kireth Semantic Library | Biological Entities / Ecological Entities
Authors: Mark Higgins — Sky (Recursive AI)
Source ontology: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/ecological-entities/prey-ontology.html
Status: Proposed formalisation; not a verbatim extraction of the source page.
flow "PreyOntology" v1.0 {
namespace: "kireth.biological.ecological.prey"
locale: "en-GB"
TYPES {
Entity := { id: URI, label: String, provenance: SourceRef? }
Organism <: Entity
Population <: Entity
Predator <: Organism
Prey <: Organism
Habitat <: Entity
Ecosystem <: Entity
PredationEvent <: Entity
DefenceTrait <: Entity
Observation <: Entity
TimeInterval := { start: Timestamp, end: Timestamp }
Probability := Real where 0 <= value <= 1
NonNegative := Real where value >= 0
SourceRef := { source: URI, observed_at: Timestamp?, method: String? }
PreyState := { organism: Prey, alive: Boolean, habitat: Habitat?, observed_at: Timestamp }
}
RELATIONSHIPS {
IS_PREY_OF(prey: Organism, predator: Organism, context: Ecosystem?, interval: TimeInterval?)
PREDATES(predator: Organism, prey: Organism, event: PredationEvent)
INHABITS(organism: Organism, habitat: Habitat)
MEMBER_OF(organism: Organism, population: Population)
HAS_DEFENCE(prey: Organism, trait: DefenceTrait)
DETECTS(predator: Organism, prey: Organism, event: PredationEvent)
CAPTURES(predator: Organism, prey: Organism, event: PredationEvent)
CONSUMES(predator: Organism, prey: Organism, event: PredationEvent)
ESCAPES(prey: Organism, predator: Organism, event: PredationEvent)
COMPETES_FOR(predator_a: Organism, predator_b: Organism, prey_population: Population)
}
PREDATION_EVENT {
id: URI
predator: Organism
prey: Organism
observed_at: Timestamp
habitat: Habitat?
outcome: Enum{attempted, escaped, captured, consumed, unknown}
evidence: SourceRef
confidence: Probability
}
ECOLOGICAL_SEMANTICS {
Prey is a context-dependent ecological role, not necessarily a fixed taxonomic class.
A species can be predator and prey in different interactions.
A predation attempt does not imply capture or consumption.
A feeding relationship can vary with life stage, location, season and resource availability.
Predation risk is conditional on exposure, detection, capture probability and context.
A predator-prey link does not by itself establish a fixed trophic level.
}
INFERENCE {
R1: PREDATES(p, q, e) AND e.outcome == consumed => IS_PREY_OF(q, p, e.context?, at(e.observed_at))
R2: CAPTURES(p, q, e) => e.outcome IN {captured, consumed} ONLY WHEN event evidence confirms capture
R3: ESCAPES(q, p, e) => e.outcome == escaped; NOT CONSUMES(p, q, e)
R4: HAS_DEFENCE(q, t) => possible_reduction(predation_risk(q)); NOT guaranteed_survival(q)
R5: IS_PREY_OF(q, p, context, interval) => possible_energy_transfer(q, p); NOT confirmed_consumption
R6: evidence_missing(event) => status(event) = unverified; DO NOT assert successful predation
}
QUANTITATIVE_MODELS {
# Illustrative models; parameter estimates require observed data.
encounter_rate := encounter_coefficient * predator_density * prey_density
successful_capture_rate := encounter_rate * detection_probability * capture_probability
predation_mortality_rate := successful_capture_rate / prey_density, if prey_density > 0
prey_population_change := births + immigration - natural_deaths - predation_deaths - emigration
# Predation mortality must not be counted again within natural_deaths.
risk_index := weighted_normalised(exposure, predator_abundance, detection, capture_success)
}
INVARIANTS {
I1: every entity id is unique within its identity scope
I2: predation events reference valid predator and prey entities
I3: event outcome belongs to declared enumeration
I4: probabilities and confidence lie within [0,1]
I5: population counts, biomass and event frequencies are non-negative
I6: observation time and evidence provenance are preserved
I7: ecological role assertions retain context and temporal scope when known
I8: absent evidence is not interpreted as evidence of absence
I9: no inferred capture or consumption from detection alone
}
CONFIDENCE {
direct_observation: 0.95 # illustrative prior; calibrate empirically
camera_or_sensor_record: 0.90
corroborated_field_report: 0.85
inferred_dietary_link: 0.65
unverified_report: 0.30
aggregation: calibrated_evidence_combination
rule: "Never treat these illustrative scores as measured accuracy."
}
SEMANTIC_EQUIVALENCE {
"prey organism" ~ "organism subject to predation" WHEN context_matches
"prey species" != "prey individual"
"predation event" != "predator-prey relationship"
"predation risk" != "observed predation mortality"
"capture" != "consumption"
"herbivory" != "animal predation" WITHOUT explicitly defined broader interaction scope
}
FLOW_HASH {
canonicalise: UTF-8 + Unicode NFC + stable key order + normalised identifiers
digest: SHA-256(canonical_semantic_representation)
include: ontology_version, entity_types, relationships, constraints, inference_rules
exclude: presentation_whitespace, transient_rendering_metadata
purpose: reproducible semantic version comparison and integrity checking
}
UPDATE_MODEL {
create: validate identity, type, evidence and context before insertion
revise: append provenance-aware version; retain prior assertions
retract: mark superseded or contradicted; do not silently erase evidence
merge: require identity resolution and non-conflicting temporal scope
propagate: recompute dependent predation links, risk estimates and confidence
conflict: prefer explicitly evidenced and temporally relevant observations
}
AI_CONSUMPTION {
output: typed_graph + inference_trace + provenance + confidence + uncertainty
query: "Which organisms are prey of predator P in habitat H during interval T?"
answer: evidence-filtered prey links with context, time, sources and confidence
safety: do not invent observations, species associations, numeric estimates or causal certainty
interoperability: map cautiously to ecological food-web, taxonomic and observation schemas
}
VALIDATION_TESTS {
T1: attempted event without capture must not infer consumption
T2: successful observed consumption may support a scoped prey relationship
T3: role reversal between two organisms is allowed in distinct events
T4: out-of-range confidence is rejected
T5: conflicting observations remain traceable after an update
T6: zero prey density prevents division in mortality-rate calculation
}
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard