FLOW ALGEBRA
TITLE: Predicate Relationship Ontology
DOMAIN: Relationship Ontologies / Knowledge Graph Relationships
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/knowledge-graph-relationships/predicate-relationship-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "PredicateRelationshipOntology" v1.0 {
ontology:
id: "predicate-relationship-ontology"
parent: "knowledge-graph-relationships"
purpose: "Represent RDF predicates as typed, identified relationships connecting subjects to objects, with explicit semantics and provenance."
types:
IRI: string
Resource: {id: IRI}
BlankNode: {local_id: string, graph_scope: string}
Literal: {lexical_value: string, datatype: IRI?, language: string?}
Term: union[Resource, BlankNode, Literal]
Predicate: {iri: IRI, label: string?, domain: IRI[]?, range: IRI[]?, inverse_of: IRI?, provenance: string?}
Triple: {subject: union[Resource, BlankNode], predicate: Predicate, object: Term}
NamedGraph: {id: IRI, triples: Triple[], provenance: string?, version: string?}
Assertion: {triple: Triple, graph: IRI?, evidence: string[], confidence: number?, valid_from: datetime?, valid_to: datetime?}
predicates:
relates(subject: union[Resource, BlankNode], predicate: Predicate, object: Term)
has_domain(predicate: Predicate, class: IRI)
has_range(predicate: Predicate, class: IRI)
subproperty_of(child: Predicate, parent: Predicate)
inverse_of(a: Predicate, b: Predicate)
equivalent_property(a: Predicate, b: Predicate)
asserted_in(triple: Triple, graph: NamedGraph)
constraints:
- "An RDF predicate must be an IRI; literals and blank nodes cannot occupy the predicate position."
- "A triple subject must be an IRI resource or blank node under RDF 1.1 conventions."
- "Literal language tags and datatypes must be well formed; language-tagged strings require language-compatible datatypes."
- "Property domain and range declarations entail types under RDFS; they are not closed-world validation constraints."
- "Inverse, symmetric, transitive and functional behaviour requires explicit vocabulary axioms and a declared reasoning regime."
- "Never equate two predicate IRIs merely because their labels match."
- "Confidence annotations belong to assertions or evidence records, not to RDF truth semantics by default."
inference:
rule subproperty_propagation:
if relates(s,p,o) and subproperty_of(p,q)
then relates(s,q,o)
condition: "RDFS entailment enabled"
rule domain_typing:
if relates(s,p,o) and has_domain(p,c)
then type_of(s,c)
condition: "RDFS entailment enabled"
rule range_typing:
if relates(s,p,o) and has_range(p,c) and is_resource_or_blank_node(o)
then type_of(o,c)
condition: "RDFS entailment enabled; avoid invalid literal-as-resource typing"
rule inverse_relation:
if relates(s,p,o) and inverse_of(p,q) and is_resource_or_blank_node(o)
then relates(o,q,s)
condition: "OWL-compatible inverse-property reasoning enabled"
SEMANTIC_EQUIVALENCE:
- "Distinguish equivalentProperty, subPropertyOf, inverseOf and informal lexical similarity."
- "Normalise IRIs without conflating distinct namespace identities."
- "Preserve ontology versions and the entailment regime used for equivalence claims."
CONFIDENCE:
range: [0,1]
factors: [evidence_quality, source_reliability, mapping_quality, inference_assumptions, temporal_validity]
policy: "Keep confidence separate from logical entailment and never manufacture certainty through chained assertions."
VALIDATION:
- "Check RDF term positions, IRI syntax, literal datatypes, graph scope and provenance."
- "Use SHACL or an explicitly declared constraint language for application-level shape validation."
- "Check property mappings for unintended identity merges and unsupported inverse or transitive assumptions."
- "Report inconsistent claims without silently deleting conflicting evidence."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology version, named graph assertions, inference rules and provenance"
note: "Canonicalise blank nodes using a defined RDF dataset canonicalisation procedure; compute hash at execution."
UPDATE_MODEL:
strategy: "versioned, provenance-preserving incremental update"
steps: [ingest, parse, normalise, validate, reconcile, recompute_entailments, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed RDF knowledge graph with explicit predicate semantics"
outputs: [predicate_catalogue, relation_triples, inferred_triples, provenance_records, uncertainty_annotations]
safeguards: [preserve_predicate_IRIs, distinguish_inference_from_assertion, no_unsupported_equivalence, respect_graph_scope]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard