FLOW ALGEBRA
TITLE: Class Relationship Ontology
DOMAIN: Relationship Ontologies / Knowledge Graph Relationships
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/knowledge-graph-relationships/class-relationship-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "ClassRelationshipOntology" v1.0 {
ontology:
id: "class-relationship-ontology"
parent: "knowledge-graph-relationships"
purpose: "Represent and validate class definitions, subclass relationships, class equivalence, disjointness and instance membership in RDF/OWL knowledge graphs."
types:
Class: {iri: string, label: string?, definition: string?, ontology_version: string?}
Individual: {id: string, iri: string?, provenance: string?}
Property: {iri: string, kind: enum[object, datatype, annotation], domain: string?, range: string?}
ClassAxiom: {id: string, subject_class: string, relation: enum[subclass_of, equivalent_to, disjoint_with, intersects_with], object_class: string, evidence: string[], confidence: number}
Membership: {individual: string, class_iri: string, asserted: bool, provenance: string, confidence: number}
Evidence: {id: string, source: string, timestamp: datetime?, method: string?}
predicates:
subclass_of(child: Class, parent: Class)
equivalent_class(a: Class, b: Class)
disjoint_class(a: Class, b: Class)
instance_of(entity: Individual, class: Class)
domain_of(property: Property, class: Class)
range_of(property: Property, class: Class)
defined_in(class: Class, ontology: string)
constraints:
- "All class and property IRIs must be valid and resolvable within a declared namespace policy."
- "Class membership is distinct from subclass membership."
- "Class equivalence must not be inferred from similar labels alone."
- "Disjoint classes must not share a satisfiable instance in a consistent OWL interpretation."
- "Subclass and equivalent-class reasoning must respect the selected entailment regime."
- "RDFS domain and range statements support type inference; they are not closed-world validation constraints."
- "Confidence values lie within [0,1] and annotate evidence, not OWL truth values."
inference:
rule subclass_transitivity:
if subclass_of(a,b) and subclass_of(b,c)
then subclass_of(a,c)
confidence: "retain derivation provenance"
rule membership_inheritance:
if instance_of(x,a) and subclass_of(a,b)
then instance_of(x,b)
confidence: "retain premises and entailment regime"
rule equivalence_symmetry:
if equivalent_class(a,b)
then equivalent_class(b,a)
confidence: "retain original axiom"
rule equivalence_subsumption:
if equivalent_class(a,b)
then subclass_of(a,b) and subclass_of(b,a)
confidence: "logical entailment under OWL semantics"
rule disjointness_conflict:
if instance_of(x,a) and instance_of(x,b) and disjoint_class(a,b)
then flag_inconsistency(x,a,b)
confidence: "explain conflicting assertions; do not silently delete"
SEMANTIC_EQUIVALENCE:
- "Use explicit owl:equivalentClass or justified bidirectional subsumption."
- "Keep lexical similarity, SKOS mapping and formal logical equivalence separate."
- "Record vocabulary versions, namespaces and alignment evidence."
CONFIDENCE:
range: [0,1]
factors: [source_reliability, mapping_evidence, ontology_consistency, version_alignment, independent_validation]
policy: "Do not treat inferred axioms as independently verified evidence or increase confidence solely by chaining."
VALIDATION:
- "Check IRI syntax, typed endpoints, axiom provenance and ontology version."
- "Run an OWL reasoner for satisfiability and disjointness conflicts where applicable."
- "Use SHACL or an explicit closed-world profile for operational cardinality and data-quality checks."
- "Preserve alternative mappings and flag unsupported identity merges."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology version, class axioms, instance assertions, rules and provenance"
note: "Compute hash at execution; no hash value is claimed here."
UPDATE_MODEL:
strategy: "versioned, provenance-preserving incremental update"
steps: [ingest, normalise, validate, classify, detect_inconsistencies, reconcile, recompute_inferences, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed RDF/OWL knowledge graph with class hierarchy and evidence-backed axioms"
outputs: [class_hierarchy, class_memberships, equivalent_classes, disjointness_conflicts, inference_traces, provenance_records]
safeguards: [no_label_only_equivalence, no_unsupported_identity_merges, preserve_open_world_semantics, report_inconsistencies]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard