FLOW ALGEBRA
TITLE: Semantic Mapping Ontology
DOMAIN: Kireth Semantic Library / Relationship Ontologies / Semantic Relationships
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/semantic-relationships/semantic-mapping-ontology.html
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source page not independently verified.
VERSION: 1.0
ENTITY TYPES
Concept(id, label, ontology, definition, context)
SemanticMapping(id, source:Concept, target:Concept, relation:MappingType, confidence:Real[0,1], evidence:Set[Evidence], scope:Context, status:Status)
MappingType := exactMatch | closeMatch | broadMatch | narrowMatch | relatedMatch | disjointMatch
Evidence(id, source_uri, method, timestamp)
Context(id, domain, language, version)
Status := proposed | reviewed | accepted | rejected | deprecated
RELATIONSHIPS
mapsTo(source, target, type, context)
hasEvidence(mapping, evidence)
validIn(mapping, context)
derivedFrom(mapping, mapping)
conflictsWith(mapping, mapping)
TYPING RULES
mapsTo(a,b,t,c) => Concept(a) AND Concept(b) AND MappingType(t) AND Context(c)
exactMatch(a,b,c) => mapsTo(a,b,exactMatch,c)
broadMatch(a,b,c) => narrowMatch(b,a,c) [inverse orientation]
relatedMatch(a,b,c) => relatedMatch(b,a,c) [symmetric]
disjointMatch(a,b,c) => disjointMatch(b,a,c) [symmetric]
INFERENCE RULES
exactMatch(a,b,c) AND exactMatch(b,d,c) => candidateExactMatch(a,d,c)
broadMatch(a,b,c) AND broadMatch(b,d,c) => candidateBroadMatch(a,d,c)
closeMatch(a,b,c) AND closeMatch(b,d,c) => candidateRelatedMatch(a,d,c)
NOTE: candidate mappings require review; closeMatch is not generally transitive.
NOTE: cross-context inferences require an explicit context-alignment mapping.
SEMANTIC_EQUIVALENCE
exactMatch: strong correspondence within stated scope; not automatically owl:sameAs.
closeMatch: substantial overlap without guaranteed substitutability.
broadMatch/narrowMatch: asymmetric conceptual coverage.
relatedMatch: associative alignment without equivalence.
disjointMatch: incompatible conceptual extension in the stated scope.
CONFIDENCE
confidence(m) in [0,1]
evidence_quality(m) in [0,1]
confidence(derived) <= min(confidence(premises)) unless independently validated.
No confidence score may substitute for evidence or scope checks.
VALIDATION
REQUIRE source != null AND target != null AND relation != null.
REQUIRE source and target identifiers resolve within their ontology versions.
REQUIRE provenance for accepted mappings.
REJECT contradictory exactMatch and disjointMatch for the same pair and scope.
FLAG exactMatch(a,b) with broadMatch(a,b) for expert review.
FLAG cycles in strict broad/narrow hierarchies.
PRESERVE directional meaning and context boundaries.
UPDATE_MODEL
On source ontology change: re-evaluate affected mappings.
On target ontology change: re-evaluate affected mappings.
On context/version change: invalidate stale derivations until reviewed.
Maintain revision history, evidence, author, and timestamp.
FLOW_HASH
canonical_payload := normalise(source_id, target_id, relation, context_id, ontology_versions, evidence_ids, status)
FLOW_HASH := SHA256(UTF8(canonical_payload))
Hash identifies a canonical mapping record version; not proof of correctness.
AI_CONSUMPTION
INPUT: concepts, ontology versions, context, mapping candidates, evidence.
PROCESS: type_check -> contextualise -> compare -> score -> validate -> infer_candidates -> review -> publish.
OUTPUT: versioned semantic mapping graph with confidence, provenance, constraints, and audit trail.
SAFETY: do not silently collapse relatedMatch, closeMatch or exactMatch into entity identity.
END FLOW ALGEBRA
Download Code
Copy to Clipboard