FLOW ALGEBRA
BIOLOGICAL GAS ONTOLOGY
Kireth Semantic Library | Chemical Foundations of Life
Authors: Mark Anthony Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/chemical-foundations-of-life/biological-gas-ontology.html
Version: 1.0 | 2026-10-15 | Locale: en-GB
AI INTERPRETATION NOTE
Formal, typed declarative reasoning specification. The rules define intended semantics; implementation requires a conforming inference and validation engine. Do not treat a rule as empirical proof.
flow "BiologicalGasOntology" v1.0
# 01 — DOMAIN AND TYPES
ontology.id: biological_gas
ontology.parent: chemical_foundations_of_life
ontology.scope: gas species and gas-related states, transport and biological effects
type Entity = BiologicalGas | Molecule | Ion | Organism | Cell | Tissue | Compartment | Process | Reaction | Protein | Measurement | Evidence
type BiologicalGas <: Molecule
fields:
id: iri
label: string
formula: string
chemical_identity: iri
biological_role: set<Role>
physical_state: StateContext
source: Evidence?
type Role = RespiratorySubstrate | MetabolicProduct | SignallingMediator | EnvironmentalExposure | Toxicant | OtherRole
type StateContext:
temperature_K: real?
pressure_Pa: real?
medium: GasPhase | Aqueous | Blood | Tissue | Other
type Measurement:
quantity: Concentration | PartialPressure | Flux | Solubility | Saturation | ExposureDuration
value: real
unit: string
location: iri?
time: timestamp?
method: string?
uncertainty: real?
# 02 — EXEMPLAR ENTITIES (NOT EXHAUSTIVE)
entity O2: BiologicalGas {label:"Oxygen", formula:"O2", biological_role:[RespiratorySubstrate]}
entity CO2: BiologicalGas {label:"Carbon dioxide", formula:"CO2", biological_role:[MetabolicProduct]}
entity NO: BiologicalGas {label:"Nitric oxide", formula:"NO", biological_role:[SignallingMediator]}
entity CO: BiologicalGas {label:"Carbon monoxide", formula:"CO", biological_role:[SignallingMediator,Toxicant]}
entity H2S: BiologicalGas {label:"Hydrogen sulphide", formula:"H2S", biological_role:[SignallingMediator,Toxicant]}
entity N2: BiologicalGas {label:"Nitrogen", formula:"N2", biological_role:[EnvironmentalExposure]}
# 03 — RELATIONSHIPS
relation participates_in(BiologicalGas, Process)
relation produced_by(BiologicalGas, Process)
relation consumed_by(BiologicalGas, Process)
relation diffuses_between(BiologicalGas, Compartment, Compartment)
relation transported_by(BiologicalGas, Protein)
relation binds_to(BiologicalGas, Protein)
relation signals_through(BiologicalGas, Process)
relation measured_in(BiologicalGas, Compartment)
relation affects(BiologicalGas, Entity)
relation has_measurement(BiologicalGas, Measurement)
relation supported_by(Entity, Evidence)
relation context_of(Entity, StateContext)
relation semantically_equivalent_to(Entity, Entity)
# 04 — BIOLOGICAL PROCESSES
process CellularRespiration:
inputs: [O2] # aerobic respiration context
outputs: [CO2] # typical carbon oxidation context
caveat: reaction stoichiometry depends on substrate and organism
process GasExchange:
participants: [O2, CO2]
mechanisms: [diffusion, ventilation, perfusion]
caveat: mechanisms and direction depend on organism and gradient
process GasSignalling:
participants: [NO, CO, H2S]
caveat: signalling depends on dose, site, mechanism and biological context
# 05 — INFERENCE RULES
rule R01_GAS_PARTICIPATION:
when participates_in(g:BiologicalGas, p:Process)
then classify(g, BiologicalGas); link(g,p)
rule R02_TRANSPORT:
when transported_by(g:BiologicalGas, carrier:Protein)
then link(g,carrier,transported_by)
require evidence_for(g,carrier)
rule R03_DIFFUSION_DIRECTION:
when partial_pressure(g, compartment_a, pa) and partial_pressure(g, compartment_b, pb)
and pa > pb and membrane_permeable_to(g, compartment_a, compartment_b)
then infer_possible_net_diffusion(g, compartment_a, compartment_b)
note: gradient alone does not establish actual flux magnitude
rule R04_ROLE_CONTEXT:
when has_role(g, role, context)
then assert_role(g,role,context)
prohibit: infer universal role without context
rule R05_TOXICITY:
when measured_exposure(g, dose, duration, organism) and validated_threshold(g, organism, context, threshold)
then assess_exposure_against_threshold(g,dose,duration,threshold)
prohibit: conclude toxicity from gas identity alone
rule R06_REACTION_BALANCE:
when reaction_has_species(r, reactants, products)
then require atom_balance(r) and charge_balance(r)
# 06 — CONSTRAINTS AND VALIDATION
constraint V01: every gas entity has stable id, label and chemical formula
constraint V02: chemical identity must distinguish molecules from ions and radicals
constraint V03: measurements require dimensionally compatible units
constraint V04: partial pressure and concentration are distinct quantities
constraint V05: no inference of causality from co-occurrence alone
constraint V06: biological roles must be scoped by organism, compartment or conditions where relevant
constraint V07: toxicity assertions require dose, exposure route, duration and evidence where available
constraint V08: uncertain or disputed claims remain qualified, not promoted to facts
constraint V09: state-dependent gas behaviour records temperature, pressure and medium when material
constraint V10: reaction assertions pass mass and charge conservation checks
# 07 — SEMANTIC EQUIVALENCE
semantic_equivalence:
exact_identity: canonical chemical identifier and compatible molecular form
lexical_alias: e.g. "carbon dioxide" <=> "CO2" only within unambiguous chemical context
non_equivalence:
- NO != NO2
- CO != CO2
- dissolved_gas_concentration != gas_partial_pressure
- molecular_oxygen_O2 != atomic_oxygen_O
policy: never merge different species on similar names or biological roles
# 08 — PROVENANCE
provenance:
claim_id: iri
evidence_source: uri | citation
evidence_type: Experimental | Observational | CuratedDatabase | Review | Derived
method: string?
organism: iri?
context: string?
observed_at: timestamp?
retrieved_at: timestamp?
version: string
attribution: string
# 09 — CONFIDENCE
confidence:
range: [0.0, 1.0]
dimensions: [source_reliability, measurement_quality, reproducibility, context_fit, inference_validity]
aggregation: calibrated_model_required
policy:
- record uncertainty and supporting evidence for each claim
- do not interpret an uncalibrated score as probability of truth
- derived confidence cannot exceed the strength justified by premises and inference rule
- contradictory evidence triggers review rather than silent overwrite
# 10 — FLOW HASH
flow_hash:
algorithm: SHA-256
input: canonical_serialisation(ontology_id, version, entities, relations, rules, constraints)
output: lowercase_hex_digest
note: hash is integrity metadata, not scientific validation
# 11 — UPDATE MODEL
update_model:
event_types: [AddEntity, ReviseClaim, AddEvidence, DeprecateAlias, UpdateMeasurement, CorrectRule]
on_change:
- validate types and constraints
- preserve previous version and provenance
- recompute affected inference dependencies
- flag contradictions and unresolved evidence
- regenerate flow_hash
- publish versioned change record
# 12 — AI CONSUMPTION
ai_consumption:
ingest: [typed_entities, relations, contextual_claims, evidence, validation_rules]
query_modes: [classification, graph_traversal, process_lookup, evidence_lookup, qualified_inference]
outputs: [answer, supporting_claims, provenance, confidence_status, uncertainty, ontology_version]
safeguards:
- separate observation from inference
- cite source for factual claims
- disclose unknown or missing context
- do not fabricate measurements, mechanisms or thresholds
- never treat this ontology as clinical guidance
# 13 — EXAMPLE QUERY FLOW
query: "Which gases participate in aerobic cellular respiration?"
resolve(Process:CellularRespiration)
traverse(inputs, outputs)
return:
- O2: common respiratory substrate
- CO2: common product of carbon oxidation
qualify: depends on organism, pathway and substrate
attach: provenance, context, confidence_status
# 14 — ACCEPTANCE TESTS
test T01: parse(O2) => BiologicalGas
test T02: equivalence("carbon dioxide", "CO2") => true when context unambiguous
test T03: equivalence("CO", "CO2") => false
test T04: compare(10 kPa, 100 mmol/L) => reject without conversion model
test T05: toxicity(CO, unspecified_dose) => insufficient_context
test T06: changed_claim => updated_provenance_and_hash
test T07: unsupported_causal_assertion => reject_or_qualify
END FLOW ALGEBRA
Download Code
Copy to Clipboard