Skip to main content

Marine Habitat Ontology

Environmental Biological Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 26 October 2026
Audio Overview
FLOW ALGEBRA
Marine Habitat Ontology — Full Flow Algebra v1.0
Kireth Semantic Library
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/experimental-biological-entities/marine-habitat-ontology.html
Status: Proposed conceptual formalisation; not verified against webpage content and not executable without an implementation.
Locale: en-GB

flow "MarineHabitatOntology" v1.0

# 1. PURPOSE
# Represent marine habitats, their physical and biological characteristics,
# inhabitants, interactions, pressures, evidence, and changes over time.

# 2. TYPED ENTITIES
entity MarineHabitat {
  id: URI
  name: String
  category: MarineHabitatType
  geometry: SpatialGeometry?
  depth_range_m: Range<NonNegativeReal>?
  salinity_psu: Measurement<Real>?
  temperature_c: Measurement<Real>?
  dissolved_oxygen_mg_l: Measurement<NonNegativeReal>?
  substrate: Set<SubstrateType>
  light_zone: LightZone?
  observation_interval: TimeInterval
  provenance: EvidenceRef
}

enum MarineHabitatType {
  coastal, intertidal, estuarine, mangrove, salt_marsh,
  seagrass_meadow, coral_reef, kelp_forest, continental_shelf,
  pelagic, benthic, deep_sea, hydrothermal_vent, cold_seep,
  polar_marine, open_ocean
}

enum SubstrateType {rock, sand, mud, gravel, biogenic, mixed, water_column}
enum LightZone {euphotic, dysphotic, aphotic, variable}

entity MarineOrganism {
  id: URI
  taxon_id: URI?
  life_stage: String?
  ecological_role: Set<String>
  observed_at: TimeInterval
}

entity MarineCommunity {
  id: URI
  member_taxa: Set<URI>
  observed_at: TimeInterval
}

entity EnvironmentalPressure {
  id: URI
  kind: String
  intensity: Measurement<Real>?
  temporal_extent: TimeInterval
}

entity Observation {
  id: URI
  subject: URI
  property: String
  value: Any
  unit: String?
  method: String
  timestamp: DateTime
  evidence: EvidenceRef
}

# 3. TYPED RELATIONSHIPS
relation OCCURS_IN(MarineOrganism, MarineHabitat, TimeInterval)
relation SUPPORTS(MarineHabitat, MarineCommunity, TimeInterval)
relation PART_OF(MarineHabitat, MarineHabitat)
relation ADJACENT_TO(MarineHabitat, MarineHabitat)
relation CONNECTED_BY_CURRENT(MarineHabitat, MarineHabitat, TimeInterval)
relation PROVIDES_RESOURCE(MarineHabitat, MarineOrganism, String)
relation EXPERIENCES_PRESSURE(MarineHabitat, EnvironmentalPressure, TimeInterval)
relation MEASURED_BY(MarineHabitat, Observation)
relation PREYS_ON(MarineOrganism, MarineOrganism, TimeInterval)
relation FACILITATES(MarineOrganism, MarineOrganism, MarineHabitat)

# 4. CONSTRAINTS / INVARIANTS
invariant habitat.id is globally_unique
invariant habitat.depth_range_m.lower >= 0 when depth_range_m exists
invariant habitat.depth_range_m.lower <= habitat.depth_range_m.upper
invariant habitat.salinity_psu.value >= 0 when measured
invariant habitat.dissolved_oxygen_mg_l.value >= 0 when measured
invariant every Observation has timestamp and evidence
invariant ecological assertions are indexed by space and time
invariant missing_measurement != zero_measurement
invariant classification != direct_measurement
invariant ADJACENT_TO is symmetric; PART_OF is not assumed symmetric

# 5. SEMANTIC RELATIONSHIPS
SEMANTIC_EQUIVALENCE("marine habitat", "saltwater habitat", context="broad ecological usage", confidence=0.80)
SEMANTIC_EQUIVALENCE("seagrass bed", "seagrass meadow", context="habitat classification", confidence=0.92)
# Estuaries and coastal wetlands can be transitional; classification is context-sensitive.
# Pelagic (water column) and benthic (seafloor) are distinct spatial domains.

# 6. INFERENCE RULES
rule habitat_supports_taxon:
  when OCCURS_IN(organism, habitat, interval) and organism.taxon_id exists
  infer habitat_has_observed_taxon(habitat, organism.taxon_id, interval)
  confidence := confidence_of_observation(organism, habitat)

rule possible_low_oxygen_stress:
  when measured_oxygen(habitat, value, interval)
   and value < species_specific_oxygen_threshold(taxon, context)
   and OCCURS_IN(taxon_instance, habitat, interval)
  infer possible_stress(taxon_instance, "low dissolved oxygen", interval)
  confidence := combine(evidence_quality, threshold_applicability)
  note "Requires a validated species/life-stage-specific threshold."

rule connected_habitat_potential_dispersal:
  when CONNECTED_BY_CURRENT(h1, h2, interval)
   and compatible_larval_traits(taxon, interval)
  infer potential_dispersal(taxon, h1, h2, interval)
  confidence := combine(current_evidence, trait_evidence)
  note "Potential connectivity is not proof of actual dispersal."

rule pressure_exposure:
  when EXPERIENCES_PRESSURE(habitat, pressure, interval)
   and OCCURS_IN(organism, habitat, overlapping(interval))
  infer potential_exposure(organism, pressure, interval)
  note "Exposure alone does not establish harm or causation."

# 7. QUANTITATIVE MODELS
model areal_density:
  inputs: observed_count N, sampled_area A_m2
  precondition: A_m2 > 0
  output: density_individuals_m2 = N / A_m2
  note: "Adjust for detectability and sampling design where applicable."

model habitat_occupancy:
  inputs: occupied_sampling_units n, surveyed_sampling_units total
  precondition: total > 0 and 0 <= n <= total
  output: naive_occupancy = n / total
  note: "Not detection-corrected occupancy."

model pressure_change:
  inputs: baseline B, current C
  output: absolute_change = C - B
  optional_output: proportional_change = (C - B) / B when B != 0
  note: "Ensure comparable sampling methods, locations and units."

# 8. CONFIDENCE
CONFIDENCE {
  range: [0, 1]
  factors: [method_quality, temporal_relevance, spatial_resolution,
            independent_replication, taxonomic_certainty, measurement_uncertainty]
  policy: "Never promote a modelled or inferred assertion to observed fact."
  missing_evidence: "unknown, not false"
}

# 9. PROVENANCE / FLOW HASH
FLOW_HASH {
  canonical_fields: [flow_name, version, entity_id, relation_type,
                     source_ids, timestamp, method, normalised_values]
  normalisation: "stable ordering, UTF-8, canonical units"
  digest: "SHA-256 over canonical serialisation"
  note: "Hash algorithm and canonical serialisation must be implemented."
}

# 10. UPDATE MODEL
UPDATE_MODEL {
  operations: [ADD_OBSERVATION, CORRECT_OBSERVATION, RECLASSIFY_HABITAT,
               ADD_RELATIONSHIP, RETIRE_ASSERTION, RECOMPUTE_INFERENCE]
  preserve_history: true
  require_provenance: true
  version_conflicts: "flag for review"
  invalidate_derived_assertions_on_source_change: true
  distinguish_observation_time_from_record_update_time: true
}

# 11. AI CONSUMPTION
AI_CONSUMPTION {
  expose: [entity_types, relation_types, constraints, rules,
           evidence, confidence, spatial_extent, temporal_extent, flow_hash]
  query_examples: ["Which habitats support taxon X?",
                   "Which observations indicate changing oxygen conditions?",
                   "Which marine habitats are potentially connected by currents?",
                   "What evidence supports a habitat classification?"]
  response_requirements: [cite_evidence, distinguish_fact_from_inference,
                          show_uncertainty, preserve_units, report_time_and_place]
}

# 12. VALIDATION CASES
assert depth_range_m(-5, 10) -> INVALID
assert dissolved_oxygen_mg_l(-1) -> INVALID
assert sampled_area(0) -> INVALID_DENSITY_CALCULATION
assert missing_salinity -> UNKNOWN_NOT_FRESHWATER
assert potential_dispersal -> NOT_CONFIRMED_DISPERSAL
assert observed_taxon_at_t1 -> NOT_AUTOMATICALLY_PRESENT_AT_t2

# 13. CROSS-ONTOLOGY LINKS
link_to "Aquatic Habitat Ontology"
link_to "Terrestrial Habitat Ontology"
link_to "Biological Environment Ontology"
link_to "Ecosystem Ontology"
link_to "Biological Community Ontology"
link_to "Population Ontology"
link_to "Ecological Niche Ontology"
link_to "Food Chain Ontology"
link_to "Trophic Level Ontology"

end flow

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