FLOW ALGEBRA
TITLE: Chemical Relationship Ontology
VERSION: 1.0
DOMAIN: Kireth Semantic Library / Relationship Ontologies / Scientific Relationships
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/scientific-relationships/chemical-relationship-ontology.html
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "ChemicalRelationshipOntology" v1.0
ENTITY_TYPES:
ChemicalEntity: {id: IRI, label: string, kind: enum[atom, ion, molecule, compound, mixture, radical, material]}
Element: {atomic_number: integer, symbol: string}
Species: {formula: string, charge: integer, phase: optional[string]}
Bond: {kind: enum[covalent, ionic, metallic, hydrogen, coordination, other], order: optional[number]}
Reaction: {id: IRI, reactants: multiset[Species], products: multiset[Species], conditions: map}
Condition: {temperature: optional[quantity], pressure: optional[quantity], solvent: optional[string], pH: optional[number]}
Measurement: {quantity: string, value: number, unit: string, uncertainty: optional[number]}
Evidence: {source: IRI, method: string, observed_at: optional[datetime]}
RELATIONSHIP_TYPES:
has_element: ChemicalEntity -> Element
bonded_to: ChemicalEntity -> ChemicalEntity
has_bond: ChemicalEntity -> Bond
reacts_with: Species -> Species
reactant_in: Species -> Reaction
product_of: Species -> Reaction
catalyses: Species -> Reaction
inhibits: Species -> Reaction
dissolves_in: Species -> Species
interacts_with: Species -> Species
is_isomer_of: Species -> Species
is_conjugate_acid_of: Species -> Species
is_conjugate_base_of: Species -> Species
oxidises: Species -> Species
reduces: Species -> Species
measured_under: Measurement -> Condition
supported_by: relationship -> Evidence
TYPE_RULES:
R1: Every relationship endpoint MUST match its declared entity type.
R2: A chemical formula alone MUST NOT establish unique chemical identity.
R3: Reaction participants MUST preserve stoichiometric coefficients and phase when known.
R4: Bond order and bond kind MUST be distinguished from intermolecular interactions.
R5: Relationships requiring experimental conditions MUST carry those conditions or an explicit unknown marker.
INFERENCE_RULES:
I1: reactant_in(x,r) AND product_of(y,r) => transformation_candidate(x,y,r).
I2: is_conjugate_acid_of(a,b) => is_conjugate_base_of(b,a).
I3: is_isomer_of(a,b) => is_isomer_of(b,a), PROVIDED distinct structures share molecular formula.
I4: catalyses(c,r) => affects_rate(c,r), NOT consumed_stoichiometrically(c,r) by default.
I5: reacts_with(a,b) DOES NOT imply reacts_with(b,a) as a directed mechanistic assertion; use symmetric co_participation only where defined.
I6: correlation(x,y) DOES NOT imply chemical_causation(x,y).
CONSTRAINTS:
C1: Validate elemental and charge balance for fully specified reaction equations.
C2: Flag unbalanced equations rather than silently repairing them.
C3: Distinguish observed relationships from predicted and hypothetical relationships.
C4: No automatic equivalence between substance, molecular species, and sample.
C5: Preserve units, uncertainties, measurement method, and experimental context.
C6: Never infer safety or compatibility solely from a chemical relationship edge.
SEMANTIC_EQUIVALENCE:
exact_identity: require stable identifiers plus structure, charge, isotope, and stereochemical context as applicable.
lexical_alias: synonyms and naming variants are labels, not proof of identity.
related_match: structurally or functionally related species remain distinct.
mapping: retain source ontology, mapping predicate, evidence, and confidence.
CONFIDENCE:
range: [0.0, 1.0]
inputs: [evidence_quality, measurement_uncertainty, context_match, replication, model_calibration]
rule: derived_confidence MUST NOT exceed warranted support from its premises.
unknown: null
PROVENANCE:
fields: [source, evidence_method, timestamp, curator, version, licence]
requirement: inferred assertions retain traceable supporting premises.
VALIDATION:
checks: [schema, types, identifiers, reaction_balance, context, provenance, uncertainty, logical_consistency]
result: enum[valid, warning, invalid, unresolved]
FLOW_HASH:
algorithm: SHA-256
input: canonical_serialisation(ontology_version, entities, relationships, rules, provenance)
output: hex_digest
note: recompute when canonical input changes.
UPDATE_MODEL:
strategy: versioned_append_and_reconcile
actions: [validate_input, compare_versions, retain_provenance, detect_conflicts, recalculate_inferences, update_hash]
conflict_policy: preserve competing claims with evidence; do not silently overwrite.
AI_CONSUMPTION:
format: typed_semantic_graph
supported_tasks: [entity_linking, chemical_knowledge_retrieval, relation_extraction, explainable_inference, consistency_checking]
output_fields: [subject, predicate, object, conditions, evidence, confidence, provenance, flow_hash]
safeguards: distinguish facts from hypotheses; expose uncertainty; avoid unsupported causal inference.
END FLOW ALGEBRA
Download Code
Copy to Clipboard