From 10284eb590f392d2fe855bf287ab25b03568736c Mon Sep 17 00:00:00 2001 From: josd Date: Thu, 14 Mar 2024 21:52:25 +0100 Subject: [PATCH] adding alternative RDF TriG syntax example --- README.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/README.md b/README.md index e3b154c..e4a8a92 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,40 @@ See the living document [RDF Surfaces Primer](https://w3c-cg.github.io/rdfsurfac - https://github.com/eyereasoner/Notation3-By-Example/tree/main/blogic - https://github.com/eyereasoner/eye/tree/b81e05163e21e93e9fc0ab27c369af7f98a16658/reasoning/blogic + +### Example using alternative RDF TriG syntax + +```trig +# ------------------ +# Socrates inference +# ------------------ +# +# Infer that Socrates is mortal. + +@prefix rdfs: . +@prefix blogic: . +@prefix : . + +:Socrates a :Man. +:Man rdfs:subClassOf :Human. +:Human rdfs:subClassOf :Mortal. + +(_:A _:B _:S) blogic:onNegativeSurface _:subclass_surface1. + +_:subclass_surface1 { + _:A rdfs:subClassOf _:B. + _:S a _:A. + () blogic:onNegativeSurface _:subclass_surface2. +} + +_:subclass_surface2 { + _:S a _:B. +} + +# query +(_:S _:C) blogic:onQuerySurface _:query_surface. + +_:query_surface { + _:S a _:C. +} +```