@prefix : <https://chimezie.medium.com/the-origin-story-of-a-reborn-semantic-web-reasoner-and-query-mediator-9185bc1e55e7#> .
@prefix schema: <http://schema.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

# ═══════════════════════════════════════════════════════════
# LIGHTWEIGHT ONTOLOGY
# Meshup ontology bridging FuXi theory (Medium article) with
# the semantic-web-reasoner-skill tool layer (GitHub).
# ═══════════════════════════════════════════════════════════

: a owl:Ontology ;
    schema:name "FuXi Semantic Web Reasoning Meshup Ontology" ;
    schema:description "A lightweight ontology representing the conceptual and implementation mesh between Chimezie Ogbuji's FuXi origin story article and the semantic-web-reasoner-skill GitHub repository. Bridges theoretical reasoning concepts (RETE-UL, BFP, SPARQL Interlocution) with their practical tool manifestations." ;
    schema:identifier "https://chimezie.medium.com/the-origin-story-of-a-reborn-semantic-web-reasoner-and-query-mediator-9185bc1e55e7" ;
    rdfs:label "FuXi Meshup Ontology" ;
    rdfs:comment "Bridges two sources: the Medium article on FuXi's origin story and the semantic-web-reasoner-skill GitHub repository." .

:ReasoningParadigm a rdfs:Class ;
    rdfs:label "Reasoning Paradigm" ;
    rdfs:comment "A high-level approach to automated logical inference (e.g., forward chaining, backward chaining, meta-interpretation, SIP)." ;
    rdfs:isDefinedBy : .

:AIAgentSkill a rdfs:Class ;
    rdfs:label "AI Agent Skill" ;
    rdfs:comment "A packaged set of tool definitions and routing rules deployable in an AI agent environment such as Claude Code / OpenCode." ;
    rdfs:isDefinedBy : .

:SemanticWebTool a rdfs:Class ;
    rdfs:label "Semantic Web Tool" ;
    rdfs:comment "A software tool specifically designed for Semantic Web tasks: ontology management, RDF reasoning, SPARQL querying, or OWL validation." ;
    rdfs:isDefinedBy : .

:hasImplementation a rdf:Property ;
    rdfs:label "has implementation" ;
    rdfs:comment "Links a theoretical concept or algorithm to a software implementation that realises it." ;
    rdfs:domain schema:Thing ;
    rdfs:range schema:SoftwareApplication ;
    rdfs:isDefinedBy : .

:supportsReasoning a rdf:Property ;
    rdfs:label "supports reasoning" ;
    rdfs:comment "Links a software application to a reasoning paradigm it supports." ;
    rdfs:domain schema:SoftwareApplication ;
    rdfs:range :ReasoningParadigm ;
    rdfs:isDefinedBy : .

:evolutionOf a rdf:Property ;
    rdfs:label "evolution of" ;
    rdfs:comment "Links a software to a predecessor system it evolved from." ;
    rdfs:domain schema:SoftwareApplication ;
    rdfs:range schema:SoftwareApplication ;
    rdfs:isDefinedBy : .

:implementsAlgorithm a rdf:Property ;
    rdfs:label "implements algorithm" ;
    rdfs:comment "Links a software application to a named algorithm or procedure it implements." ;
    rdfs:domain schema:SoftwareApplication ;
    rdfs:range schema:DefinedTerm ;
    rdfs:isDefinedBy : .

:usesTool a rdf:Property ;
    rdfs:label "uses tool" ;
    rdfs:comment "Links an AI agent skill to a software tool it makes available to the agent." ;
    rdfs:domain :AIAgentSkill ;
    rdfs:range :SemanticWebTool ;
    rdfs:isDefinedBy : .

# ═══════════════════════════════════════════════════════════
# PERSONS
# ═══════════════════════════════════════════════════════════

<https://chimezie.medium.com/#this> a schema:Person ;
    schema:name "Chimezie Ogbuji" ;
    schema:url <https://chimezie.medium.com/> ;
    schema:identifier "https://chimezie.medium.com/" ;
    schema:description "Informatics engineer, data scientist, inventor, and business owner. Creator of FuXi reasoner. Founder of Metacognition LLC. Former researcher at Cleveland Clinic Cardiothoracic Surgery Research and PhD student / Medical Informatics fellow at Case Western Reserve University." ;
    schema:affiliation :metacognitionLLC ;
    schema:alumniOf <http://dbpedia.org/resource/Case_Western_Reserve_University> ;
    schema:knowsAbout :fuxi, :reteUL, :bfp, :sparqlInterlocution, :dlp, :openWorldAssumption ;
    schema:sameAs <https://chimezie.medium.com/> ;
    owl:sameAs <https://github.com/chimezie> .

:doorenbos a schema:Person ;
    schema:name "Robert B. Doorenbos" ;
    schema:description "Computer scientist whose 1995 PhD thesis at Carnegie Mellon University described the RETE-UL algorithm adopted by FuXi." .

:bry a schema:Person ;
    schema:name "Francois Bry" ;
    schema:description "Computer scientist who defined the Backward Fixpoint Procedure (BFP) in 1990, adapted by Chimezie Ogbuji for SPARQL interlocution." .

:grosof a schema:Person ; schema:name "Benjamin N. Grosof" .
:horrocks a schema:Person ;
    schema:name "Ian Horrocks" ;
    owl:sameAs <http://dbpedia.org/resource/Ian_Horrocks> .
:volz a schema:Person ; schema:name "Raphael Volz" .
:decker a schema:Person ; schema:name "Stefan Decker" .

# ═══════════════════════════════════════════════════════════
# ORGANIZATIONS
# ═══════════════════════════════════════════════════════════

:metacognitionLLC a schema:Organization ;
    schema:name "Metacognition LLC" ;
    schema:description "A company founded by Chimezie Ogbuji focused on recursively introspective AI systems and semantic web technologies. The name reflects the core principle of using AI to reason about and automate aspects of how it functions." ;
    schema:founder <https://chimezie.medium.com/#this> ;
    schema:url <https://chimezie.medium.com/> .

<http://dbpedia.org/resource/Cleveland_Clinic> a schema:Organization ;
    schema:name "Cleveland Clinic" ;
    schema:description "Academic medical center where Chimezie Ogbuji worked in the Advanced Database department of Cardiothoracic Surgery Research, developing the CVIR outcomes registry system that motivated FuXi." ;
    schema:url <https://www.clevelandclinic.org/> ;
    owl:sameAs <http://www.wikidata.org/entity/Q1280135> .

<http://dbpedia.org/resource/Case_Western_Reserve_University> a schema:Organization ;
    schema:name "Case Western Reserve University" ;
    schema:description "University where Chimezie Ogbuji was a PhD student and Medical Informatics fellow (2011+), deepening his understanding of description logics, Godel's theorems, and formal reasoning systems." ;
    schema:url <https://case.edu/> ;
    owl:sameAs <http://www.wikidata.org/entity/Q309350> .

# ═══════════════════════════════════════════════════════════
# SOURCES — PRIMARY MESH INPUTS
# ═══════════════════════════════════════════════════════════

:article a schema:TechArticle ;
    schema:name "The Origin Story of a Reborn Semantic Web Reasoner and Interlocutor" ;
    schema:alternateName "Semantic Web Reasoning Series 1/3" ;
    schema:url <https://chimezie.medium.com/the-origin-story-of-a-reborn-semantic-web-reasoner-and-query-mediator-9185bc1e55e7> ;
    schema:author <https://chimezie.medium.com/#this> ;
    schema:datePublished "2026-05-22"^^xsd:date ;
    schema:publisher :mediumPlatform ;
    schema:isPartOf :semanticWebReasoningSeries ;
    schema:keywords "FuXi", "RETE-UL", "Backward Fixpoint Procedure", "SPARQL Interlocution", "OWL Reasoning", "Semantic Web", "Description Logic Programs", "Open World Assumption" ;
    schema:about :fuxi, :reteUL, :bfp, :sparqlInterlocution, :openWorldAssumption, :dlp ;
    schema:hasPart :faqSection, :glossarySection, :howtoSection, :meshupSection, :theoreticalSection, :historicalSection ;
    schema:relatedLink <https://github.com/chimezie/semantic-web-reasoner-skill> ;
    schema:identifier "https://chimezie.medium.com/the-origin-story-of-a-reborn-semantic-web-reasoner-and-query-mediator-9185bc1e55e7" ;
    prov:wasGeneratedBy :kgGeneratorSkillApp .

:swrSkill a schema:SoftwareApplication, :AIAgentSkill ;
    schema:name "semantic-web-reasoner-skill" ;
    schema:url <https://github.com/chimezie/semantic-web-reasoner-skill> ;
    schema:codeRepository <https://github.com/chimezie/semantic-web-reasoner-skill> ;
    schema:description "An OpenCode / Claude skill for Semantic Web architecture and development. Uses tool-aware LLMs and VLMs, taking full advantage of reasoners and SW tools such as FuXi, robot, riot, and owl_dsl." ;
    schema:author <https://chimezie.medium.com/#this> ;
    schema:programmingLanguage "TypeScript" ;
    schema:programmingLanguage "Python" ;
    schema:license "MIT" ;
    schema:isBasedOn :article ;
    schema:about :fuxi, :owlDsl, :robot, :riot ;
    schema:hasPart :listOntologiesTool, :verbalizeOntologyClassTool, :findOntologyPropertyTool,
                   :createOntologyTool, :findOntologyClassTool, :dirOntologyTool,
                   :checkOntologyTool, :extractClassTool, :ontologyReportTool, :ontologyMeasureTool ;
    :usesTool :fuxi, :owlDsl, :robot, :riot ;
    schema:relatedLink <https://chimezie.medium.com/the-origin-story-of-a-reborn-semantic-web-reasoner-and-query-mediator-9185bc1e55e7> .

:semanticWebReasoningSeries a schema:CreativeWorkSeries ;
    schema:name "Semantic Web Reasoning Series" ;
    schema:description "A 3-part series by Chimezie Ogbuji: (1/3) FuXi origin story and SPARQL interlocution theory; (2/3) FuXi SPARQL service and high-performance reasoning endpoint; (3/3) Verbalizing OWL ontologies, rules, and proofs with owl_dsl." ;
    schema:author <https://chimezie.medium.com/#this> ;
    schema:hasPart :article .

:article schema:isPartOf :semanticWebReasoningSeries .

:mediumPlatform a schema:Organization ;
    schema:name "Medium" ;
    schema:url <https://medium.com/> ;
    owl:sameAs <http://dbpedia.org/resource/Medium_(website)> .

# ═══════════════════════════════════════════════════════════
# FUXI — THE CENTRAL MESH ENTITY
# ═══════════════════════════════════════════════════════════

:fuxi a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "FuXi" ;
    schema:alternateName "FuXi-reincarnate" ;
    schema:url <https://github.com/chimezie/FuXi-reincarnate> ;
    schema:description "A Python bi-directional reasoning engine (forward/bottom-up + backward/top-down) companion to RDFLib. Handles OWL 1.1/2.0, RDF, RDFS, RIF, N3. Implements RETE-UL networks and the Backward Fixpoint Procedure for SPARQL interlocution. Version 2.0.1 released 2026." ;
    schema:author <https://chimezie.medium.com/#this> ;
    schema:version "2.0.1" ;
    schema:programmingLanguage "Python" ;
    schema:license "Open Source" ;
    schema:dateModified "2026-05-22"^^xsd:date ;
    schema:releaseNotes <https://github.com/chimezie/FuXi-reincarnate/releases/tag/v2.0.1> ;
    :implementsAlgorithm :reteUL, :bfp ;
    :supportsReasoning :forwardChaining, :backwardChaining, :metaInterpretation ;
    :evolutionOf :pychinko ;
    schema:isPartOf :swrSkill ;
    schema:hasPart :fuxiCoreTool, :fuxiOWLTool, :fuxiProofTool ;
    owl:sameAs <https://github.com/rdflib/fuxi> .

:swrSkill :usesTool :fuxi .
:fuxi schema:isPartOf :swrSkill .

# ═══════════════════════════════════════════════════════════
# TOOL ECOSYSTEM
# ═══════════════════════════════════════════════════════════

:owlDsl a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "owl_dsl" ;
    schema:url <https://github.com/chimezie/owl_dsl> ;
    schema:description "A Python tool for verbalizing OWL ontologies into Controlled Natural Language. Renders OWL classes and properties as Manchester Syntax phrases. Used by the semantic-web-reasoner-skill for LLM-assisted ontology management." ;
    schema:programmingLanguage "Python" ;
    schema:author <https://chimezie.medium.com/#this> ;
    schema:isPartOf :swrSkill .
:swrSkill :usesTool :owlDsl .

:robot a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "ROBOT" ;
    schema:url <https://robot.obolibrary.org/> ;
    schema:description "A command-line tool for OBO Foundry ontology development. Validates OWL 2 profiles (RL, DL). Used by the skill's check-ontology tool for running structural reports on ontology files." ;
    schema:isPartOf :swrSkill .
:swrSkill :usesTool :robot .

:riot a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "riot (Apache Jena)" ;
    schema:url <https://jena.apache.org/documentation/io/> ;
    schema:description "Apache Jena's RDF I/O Technology CLI. Parses, converts, and validates RDF in multiple serialization formats. Used by the semantic-web-reasoner-skill for RDF I/O operations." ;
    schema:isPartOf :swrSkill .
:swrSkill :usesTool :riot .

:owlready2 a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "owlready2" ;
    schema:url <https://owlready2.readthedocs.io/> ;
    schema:description "A Python module for manipulating OWL 2.0 ontologies using SQLite persistence. Used by the skill's ontology management tools (create-ontology, list-ontologies, verbalize-ontology-class)." ;
    schema:isPartOf :swrSkill .

:pychinko a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "Pychinko" ;
    schema:description "An early Python N3 reasoner using the original RETE algorithm. FuXi (circa 2006) initially continued in Pychinko's footsteps before evolving to the RETE-UL variant." .

:cwm a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "CWM (Closed World Machine)" ;
    schema:url <https://www.w3.org/2000/10/swap/doc/cwm.html> ;
    schema:description "W3C's Notation 3 reasoner. One of the first N3 reasoners used in the CVIR project before FuXi was created." .

:euler a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "Euler" ;
    schema:url <https://github.com/eyereasoner/eye> ;
    schema:description "An N3 reasoner supporting backward reasoning. One of the early reasoners (alongside CWM and Pychinko) used before FuXi was created to handle larger scale reasoning." .

# FuXi CLI subcommands

:fuxiCoreTool a schema:SoftwareSourceCode, :SemanticWebTool ;
    schema:name "fuxi.core" ;
    schema:description "FuXi CLI subcommand for forward chaining evaluation and RETE network diagnostics." ;
    schema:programmingLanguage "Python" ;
    schema:codeSampleType "command-line" ;
    schema:text "fuxi.core facts.n3" ;
    schema:isPartOf :fuxi .
:fuxi schema:hasPart :fuxiCoreTool .

:fuxiOWLTool a schema:SoftwareSourceCode, :SemanticWebTool ;
    schema:name "fuxi.owl" ;
    schema:description "FuXi CLI subcommand for OWL reasoning, DLP compilation, and BFP query answering. Supports --dlp (Description Logic Programs), --hybrid, --method=bfp, --why (SPARQL goal), --output (proof-graph-svg, man-owl, pml, etc.)." ;
    schema:programmingLanguage "Python" ;
    schema:codeSampleType "command-line" ;
    schema:text "fuxi.owl --method=bfp --dlp --hybrid --ns eg=http://example.net/vocab# --why \"ASK { eg:bob your:isBrotherOf eg:joe }\" --output proof-graph-svg test/OWL/inverseOf/premises001.rdf > proof.svg" ;
    schema:isPartOf :fuxi ;
    schema:target <https://github.com/chimezie/FuXi-reincarnate> .
:fuxi schema:hasPart :fuxiOWLTool .

:fuxiProofTool a schema:SoftwareSourceCode, :SemanticWebTool ;
    schema:name "fuxi.proof" ;
    schema:description "FuXi CLI subcommand for proof and SIP graph generation. Output formats include rete-network-svg, sip-collection-svg, adornment (adorned rules), pml (Provenance Markup Language), proof-graph-svg, proof-graph-png." ;
    schema:programmingLanguage "Python" ;
    schema:codeSampleType "command-line" ;
    schema:text "fuxi.proof --method=bfp --dlp --hybrid --ns eg=http://example.net/vocab# --why \"ASK { eg:bob your:isBrotherOf eg:joe }\" --output rete-network-svg test/OWL/inverseOf/premises001.rdf > rete_network.svg" ;
    schema:isPartOf :fuxi ;
    schema:target <https://github.com/chimezie/FuXi-reincarnate> .
:fuxi schema:hasPart :fuxiProofTool .

# Skill Tools

:listOntologiesTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "list-ontologies" ;
    schema:description "Lists OWL ontologies saved as owlready2 SQLite files in a working directory." ;
    schema:isPartOf :swrSkill .

:verbalizeOntologyClassTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "verbalize-ontology-class" ;
    schema:description "Verbalizes an OWL class into Controlled Natural Language using owlready2 and owl_dsl. Input: ontologyUri, sqliteFile, baseUri, classReference. Used to suggest annotation property values for ontologies like IAO." ;
    schema:isPartOf :swrSkill .

:findOntologyPropertyTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "find-ontology-property" ;
    schema:description "Finds OWL properties by label and URL pattern in an ontology SQLite file." ;
    schema:isPartOf :swrSkill .

:createOntologyTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "create-ontology" ;
    schema:description "Creates an owlready2 SQLite ontology and archives provenance for later use. Input: ontologyUri, baseUri, owlFile, workingDir." ;
    schema:isPartOf :swrSkill .

:findOntologyClassTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "find-ontology-class" ;
    schema:description "Finds OWL classes by label pattern (string or regex) in an ontology SQLite file." ;
    schema:isPartOf :swrSkill .

:dirOntologyTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "dir-ontology" ;
    schema:description "Lists ontology terms in Manchester OWL Syntax from an owlready2 SQLite file." ;
    schema:isPartOf :swrSkill .

:checkOntologyTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "check-ontology" ;
    schema:description "Runs a ROBOT-powered structural and quality report on all issues with an OWL ontology file." ;
    schema:isPartOf :swrSkill .

:extractClassTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "extract-class" ;
    schema:description "Extracts a class and its dependencies from an OWL ontology. Input: owlFile, term, outputOwl." ;
    schema:isPartOf :swrSkill .

:ontologyReportTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "ontology-report" ;
    schema:description "Exports details about ontology entities as a tabular report file." ;
    schema:isPartOf :swrSkill .

:ontologyMeasureTool a schema:SoftwareApplication, :SemanticWebTool ;
    schema:name "ontology-measure-essentials" ;
    schema:description "Computes quantitative and structural metrics about an OWL ontology: class count, property count, complexity, coverage, and more complex derived metrics." ;
    schema:isPartOf :swrSkill .

# ═══════════════════════════════════════════════════════════
# REASONING PARADIGMS (THEORETICAL LAYER)
# ═══════════════════════════════════════════════════════════

:forwardChaining a :ReasoningParadigm ;
    schema:name "Forward Chaining" ;
    schema:description "A data-driven inference method that starts with available data and uses inference rules to derive new facts (extract more data) until a goal is reached. Used in FuXi's RETE-UL evaluation engine." ;
    owl:sameAs <http://dbpedia.org/resource/Forward_chaining> .

:backwardChaining a :ReasoningParadigm ;
    schema:name "Backward Chaining" ;
    schema:description "A goal-driven inference method that works backward from a goal, identifying rules whose conclusion matches and recursively satisfying their premises. Implemented in FuXi via the Backward Fixpoint Procedure." ;
    owl:sameAs <http://dbpedia.org/resource/Backward_chaining> .

:metaInterpretation a :ReasoningParadigm ;
    schema:name "Meta-Interpretation" ;
    schema:description "A logic programming technique where an interpreter for a language is written in that same language. In FuXi, the meta-interpreter compiles a ruleset and goal into RETE-UL meta-interpretation rules that drive query evaluation." .

# ═══════════════════════════════════════════════════════════
# THEORETICAL CONCEPTS (ALGORITHM / PROCEDURE LAYER)
# ═══════════════════════════════════════════════════════════

:reteUL a schema:DefinedTerm ;
    schema:name "RETE-UL" ;
    schema:description "A modification of the original RETE production rule algorithm (Doorenbos 1995) that limits fact syntax to 3-item tuples, naturally mapping to RDF triples (subject, predicate, object). Uses hash tables for efficient alpha and beta network node evaluation." ;
    :hasImplementation :fuxi ;
    owl:sameAs <http://dbpedia.org/resource/Rete_algorithm> .
:fuxi :implementsAlgorithm :reteUL .

:bfp a schema:DefinedTerm ;
    schema:name "Backward Fixpoint Procedure (BFP)" ;
    schema:description "A meta-interpreter defined by Francois Bry (1990) for reconciling bottom-up and top-down query evaluation in recursive databases. Asserts query and evaluate terms that trigger goal-directed fact generation, enabling a forward-chaining network to simulate SLD resolution." ;
    :hasImplementation :fuxi .
:fuxi :implementsAlgorithm :bfp .

:sparqlInterlocution a schema:DefinedTerm ;
    schema:name "SPARQL Interlocution" ;
    schema:description "An extension of Bry's BFP meta-interpreter that incorporates SPARQL service evaluation into the reasoning loop. Generates open queries and intermediate bindings, enabling complete, sound, memoized bottom-up simulation of SLD resolution even over recursive rules. Enables declarative SPARQL Entailment Regime evaluation without pre-materializing the full inference closure." ;
    :hasImplementation :fuxi .

:dlp a schema:DefinedTerm ;
    schema:name "Description Logic Programs (DLP)" ;
    schema:description "A technique from Grosof et al. (2003) providing a direct mapping from a subset of OWL Description Logic into equivalent Horn rules (logic programs). Used in FuXi to compile OWL axioms (inverseOf, TransitiveProperty) into N3 Horn rules for RETE-UL evaluation." .

:openWorldAssumption a schema:DefinedTerm ;
    schema:name "Open World Assumption (OWA)" ;
    schema:description "The semantic principle of OWL and RDF stating that the absence of a stated fact does not imply its falsehood. A reasoning-aware application can assume a logically entailed statement is present even if not explicitly in the knowledge base. SPARQL 1.1 Entailment Regimes formalise this declaratively." ;
    owl:sameAs <http://dbpedia.org/resource/Open-world_assumption> .

:sip a schema:DefinedTerm ;
    schema:name "Sideways Information Passing (SIP)" ;
    schema:description "Query evaluation strategies that pass variable binding information (bound/free adornments) sideways between rule body terms. Originating from relational database Magic Sets research (Beeri & Ramakrishnan 1987; Bancilhon et al. 1985), SIP enables efficient evaluation of recursive queries by directing search toward relevant facts." .

:tbox a schema:DefinedTerm ;
    schema:name "TBox (Terminological Box)" ;
    schema:description "In Description Logic, the TBox contains terminological statements: class names, property descriptions, restrictions, and their hierarchies. Defines the vocabulary (schema) used to describe a domain." ;
    owl:sameAs <http://dbpedia.org/resource/Description_logic> .

:abox a schema:DefinedTerm ;
    schema:name "ABox (Assertional Box)" ;
    schema:description "In Description Logic, the ABox contains grounded individual statements: class memberships, object relationships, and data property values for specific named individuals. Uses the vocabulary defined in the TBox." .

:productionRuleMatching a schema:DefinedTerm ;
    schema:name "Production Rule Matching" ;
    schema:description "The process of matching facts in working memory against conditions (left-hand sides) of production rules to determine which rules can fire. RETE and RETE-UL networks implement this efficiently using discriminating network nodes." .

:sldResolution a schema:DefinedTerm ;
    schema:name "SLD Resolution" ;
    schema:description "Selective Linear Definite clause resolution — the inference mechanism underlying logic programming. Implemented in FuXi via backward-chaining simulation using the Backward Fixpoint Procedure over a forward-chaining RETE-UL network." .

# ═══════════════════════════════════════════════════════════
# HISTORICAL ARTEFACTS
# ═══════════════════════════════════════════════════════════

:cvir a schema:Dataset ;
    schema:name "Cardiovascular Information Registry (CVIR)" ;
    schema:description "A clinical outcomes registry at Cleveland Clinic capturing preoperative demographic data, comorbidities, operative variables, complications, and mortality for all cardiac surgery patients. The domain for which the domain interpreter architecture (and ultimately FuXi) was initially developed." ;
    schema:publisher <http://dbpedia.org/resource/Cleveland_Clinic> ;
    schema:isPartOf :historicalSection .

:extensibleDBPatent a schema:CreativeWork ;
    schema:name "Extensible Database System and Method (US7836097B2)" ;
    schema:identifier "US7836097B2" ;
    schema:description "Expired patent documenting the CVIR domain interpreter architecture: a domain expert specifies a domain model as an RDF Graph, and an interpreter/logical reasoner generates data management tools — XSLT transformations, XForms, and validation documents. The system in which FuXi emerged as a reasoning component." ;
    schema:url <https://patents.google.com/patent/US7836097B2/en> ;
    schema:about <https://chimezie.medium.com/#this>, <http://dbpedia.org/resource/Cleveland_Clinic> .

:historicalSection a schema:ArticleSection ;
    schema:name "Historical Context" ;
    schema:description "The historical origins of FuXi: the CVIR project at Cleveland Clinic, the extensible database patent, the Semantic Web activity period, and the progression from CWM/Euler/Pychinko to RETE-UL and the Backward Fixpoint Procedure." ;
    schema:isPartOf :article ;
    schema:hasPart :cvir, :extensibleDBPatent .
:article schema:hasPart :historicalSection .

:theoreticalSection a schema:ArticleSection ;
    schema:name "Theoretical Foundations" ;
    schema:description "The theoretical foundations of FuXi: RETE-UL production rule matching, the Backward Fixpoint Procedure meta-interpretation, SPARQL interlocution, Sideways Information Passing strategies, and DLP compilation of OWL axioms." ;
    schema:isPartOf :article ;
    schema:hasPart :reteUL, :bfp, :sparqlInterlocution, :sip, :dlp .
:article schema:hasPart :theoreticalSection .

:meshupSection a schema:ArticleSection ;
    schema:name "Meshup: Interconnected Knowledge Graph" ;
    schema:description "The semantic mesh connecting FuXi's theoretical foundations (from the Medium article) with the semantic-web-reasoner-skill's tool implementations (from GitHub), forming a fully interlinked knowledge graph where entities share IRIs across both source contexts." ;
    schema:isPartOf :article ;
    schema:hasPart :fuxi, :swrSkill .
:article schema:hasPart :meshupSection .

# ═══════════════════════════════════════════════════════════
# ACADEMIC WORKS REFERENCED
# ═══════════════════════════════════════════════════════════

:doorenbos1995 a schema:ScholarlyArticle ;
    schema:name "Production Matching for Large Learning Systems" ;
    schema:author :doorenbos ;
    schema:datePublished "1995" ;
    schema:publisher <http://dbpedia.org/resource/Carnegie_Mellon_University> ;
    schema:description "PhD thesis describing RETE-UL: limits RETE fact syntax to 3-item tuples (matching RDF triples), adds hash tables for alpha/beta node efficiency. Foundation of FuXi's rule evaluation engine." .

:bry1990 a schema:ScholarlyArticle ;
    schema:name "Query Evaluation in Recursive Databases: Bottom-up and Top-down Reconciled" ;
    schema:author :bry ;
    schema:datePublished "1990" ;
    schema:description "Defines the Backward Fixpoint Procedure (BFP): a meta-interpreter reconciling bottom-up and top-down evaluation in recursive databases. Adopted and extended by Chimezie Ogbuji for SPARQL interlocution." .

:grosof2003 a schema:ScholarlyArticle ;
    schema:name "Description Logic Programs: Combining Logic Programs with Description Logic" ;
    schema:author :grosof, :horrocks, :volz, :decker ;
    schema:datePublished "2003" ;
    schema:description "2003 WWW paper providing a direct mapping from OWL Description Logic subsets to equivalent Horn rules. Foundational for FuXi's DLP compilation of OWL axioms into N3 rules for RETE-UL evaluation." .

# ═══════════════════════════════════════════════════════════
# HOWTO SECTION
# ═══════════════════════════════════════════════════════════

:howtoSection a schema:HowTo ;
    schema:name "How to Use the Semantic Web Reasoner Skill with FuXi" ;
    schema:description "A step-by-step guide to setting up and using the semantic-web-reasoner-skill and FuXi for Semantic Web ontology management, OWL reasoning, and SPARQL proof generation." ;
    schema:step :step1, :step2, :step3, :step4, :step5, :step6, :step7 ;
    schema:isPartOf :article .
:article schema:hasPart :howtoSection .

:step1 a schema:HowToStep ;
    schema:name "Install FuXi and owl_dsl via uv" ;
    schema:text "Use uv to install FuXi and owl_dsl into your Python environment: 'uv pip install fuxi owl_dsl'. Alternatively use 'uv pip install -e \".[dev]\"' for development mode. uv is preferred for environment isolation and reproducibility." ;
    schema:position 1 .

:step2 a schema:HowToStep ;
    schema:name "Create or load an OWL ontology" ;
    schema:text "Use the create-ontology tool with ontologyUri, baseUri, and owlFile parameters to create an owlready2 SQLite ontology. Use list-ontologies to enumerate existing ontologies. Use dir-ontology to list terms in Manchester OWL Syntax." ;
    schema:position 2 .

:step3 a schema:HowToStep ;
    schema:name "Verbalize ontology classes with owl_dsl" ;
    schema:text "Use verbalize-ontology-class providing the ontology URI, SQLite file, base URI, and class reference. The tool renders OWL classes in Controlled Natural Language using owl_dsl, enabling LLM-assisted ontology Q&A and annotation suggestion workflows." ;
    schema:position 3 .

:step4 a schema:HowToStep ;
    schema:name "Validate the ontology against OWL 2 profiles" ;
    schema:text "Use check-ontology or invoke ROBOT directly: 'robot validate-profile --profile DL --input ontology.owl'. Use '--profile RL' for the OWL 2 RL profile. Structural errors and profile violations are reported in the output." ;
    schema:position 4 .

:step5 a schema:HowToStep ;
    schema:name "Run OWL reasoning with FuXi DLP and BFP" ;
    schema:text "Invoke fuxi.owl with --method=bfp --dlp --hybrid flags to compile OWL axioms into Horn rules and run Backward Fixpoint Procedure reasoning. Use --why 'SPARQL GOAL' to specify the entailment query, --ns for namespace prefixes, and --output proof-graph-svg to visualize the proof trace." ;
    schema:position 5 .

:step6 a schema:HowToStep ;
    schema:name "Visualize RETE-UL networks and SIP collections" ;
    schema:text "Use fuxi.proof with --output rete-network-svg to render the meta-interpreter RETE-UL network as SVG. Use --output sip-collection-svg to show Sideways Information Passing binding adornments (b=bound, f=free) flowing through rule evaluation. Both outputs can be refined in Inkscape." ;
    schema:position 6 .

:step7 a schema:HowToStep ;
    schema:name "Export proofs in PML and upload to Virtuoso" ;
    schema:text "Use fuxi.proof with --output pml to serialize the reasoning proof in Provenance Markup Language. The generated RDF proof can be uploaded to a Virtuoso SPARQL endpoint (e.g., via the Virtuoso example at linkeddata.uriburner.com) for exploration using SPARQL queries." ;
    schema:position 7 .

# ═══════════════════════════════════════════════════════════
# FAQ SECTION (12 Questions)
# ═══════════════════════════════════════════════════════════

:faqSection a schema:FAQPage ;
    schema:name "FAQ: FuXi Reasoning and the Semantic Web Reasoner Skill" ;
    schema:mainEntity :q1, :q2, :q3, :q4, :q5, :q6, :q7, :q8, :q9, :q10, :q11, :q12 ;
    schema:isPartOf :article .
:article schema:hasPart :faqSection .

:q1 a schema:Question ;
    schema:name "What is FuXi and why is it called a 'reborn' reasoner?" ;
    schema:text "What is FuXi and why is it called a 'reborn' Semantic Web reasoner?" ;
    schema:acceptedAnswer :a1 .
:a1 a schema:Answer ;
    schema:text "FuXi is a Python bi-directional reasoning engine companion to RDFLib, supporting forward-chaining (RETE-UL) and backward-chaining (Backward Fixpoint Procedure). It is called 'reborn' because version 2.0.1 (2026) is a major modernisation restoring its OWL 1.1/2.0, RDF/RDFS, RIF, and SPARQL Entailment capabilities after years of dormancy, adapting to Python and rdflib changes in the interim." .

:q2 a schema:Question ;
    schema:name "What is RETE-UL and how does it relate to RDF?" ;
    schema:text "What is the RETE-UL algorithm and how does it relate to the RDF triple syntax?" ;
    schema:acceptedAnswer :a2 .
:a2 a schema:Answer ;
    schema:text "RETE-UL (from Doorenbos 1995) modifies the original RETE algorithm by limiting fact syntax to 3-item tuples, which correspond naturally to RDF triples (subject, predicate, object). It uses hash tables to improve the efficiency of alpha and beta network nodes. FuXi implements RETE-UL as its production rule evaluation engine for both forward-chaining fact derivation and meta-interpretation rule evaluation." .

:q3 a schema:Question ;
    schema:name "What is the Backward Fixpoint Procedure and how does FuXi use it?" ;
    schema:text "What is the Backward Fixpoint Procedure (BFP) and how does FuXi use it for backward reasoning?" ;
    schema:acceptedAnswer :a3 .
:a3 a schema:Answer ;
    schema:text "The BFP (Bry 1990) is a meta-interpreter that compiles a ruleset and a goal into meta-interpretation rules: evaluate-k terms trigger rule body evaluation; query-p terms assert new sub-goals; fact assertions trigger new queries. A forward-chaining RETE-UL network evaluates these rules, simulating backward-chaining SLD resolution. Chimezie Ogbuji adapted BFP for RDF, RDFS, OWL, and N3 in 2011." .

:q4 a schema:Question ;
    schema:name "What is SPARQL interlocution?" ;
    schema:text "What is SPARQL interlocution and what problem does it solve?" ;
    schema:acceptedAnswer :a4 .
:a4 a schema:Answer ;
    schema:text "SPARQL interlocution extends Bry's BFP meta-interpreter by incorporating SPARQL service evaluation into the reasoning loop. It generates only relevant facts and sub-queries in response to intermediate bindings, enabling complete, sound, safely memoized bottom-up simulation of SLD resolution. It solves the problem of dynamically inferring logically entailed RDF triples under SPARQL Entailment Regimes without pre-materialising the full inference closure — analogous to how SQL views are computed on demand rather than stored." .

:q5 a schema:Question ;
    schema:name "What tools does the semantic-web-reasoner-skill provide?" ;
    schema:text "What ontology management and reasoning tools are available in the semantic-web-reasoner-skill?" ;
    schema:acceptedAnswer :a5 .
:a5 a schema:Answer ;
    schema:text "The skill provides 10 tool definitions: list-ontologies, verbalize-ontology-class, find-ontology-property, create-ontology, find-ontology-class, dir-ontology, check-ontology, extract-class, ontology-report, and ontology-measure-essentials. It also exposes three FuXi CLI subcommands (fuxi.core for RETE diagnostics; fuxi.owl for OWL/DLP/BFP reasoning; fuxi.proof for proof and SIP graph generation) and ROBOT validation commands." .

:q6 a schema:Question ;
    schema:name "How does the skill use LLMs for ontology verbalization?" ;
    schema:text "How does the semantic-web-reasoner-skill integrate LLMs into ontology verbalization and management workflows?" ;
    schema:acceptedAnswer :a6 .
:a6 a schema:Answer ;
    schema:text "The skill uses owl_dsl via owlready2 to render OWL classes and properties as Controlled Natural Language phrases in Manchester Syntax. These are injected into the LLM context, enabling the agent to suggest annotation property values (e.g., IAO definition annotations), check Q&A accuracy, and generate human-readable descriptions. The verbalize-ontology-class workflow was demonstrated using the open-weight Qwen3.6-35B model on commodity hardware." .

:q7 a schema:Question ;
    schema:name "What is the Open World Assumption and why does it matter for SPARQL?" ;
    schema:text "What is the Open World Assumption (OWA) and why is it important for SPARQL reasoning?" ;
    schema:acceptedAnswer :a7 .
:a7 a schema:Answer ;
    schema:text "The OWA states that absence of a stated fact does not imply its falsehood. For SPARQL, this means a reasoning-aware implementation should return results for patterns that are logically entailed — not only those explicitly stored. Section 1.3 of the SPARQL 1.1 Entailment Regimes recommendation defines this declaratively: it specifies required answers without mandating any specific reasoning strategy (forward or backward chaining)." .

:q8 a schema:Question ;
    schema:name "What is DLP and how does FuXi compile OWL axioms?" ;
    schema:text "What are Description Logic Programs (DLP) and how does FuXi use them to compile OWL axioms?" ;
    schema:acceptedAnswer :a8 .
:a8 a schema:Answer ;
    schema:text "DLP (Grosof et al. 2003) provides a direct mapping from OWL Description Logic subsets to equivalent Horn rules. FuXi uses DLP to compile OWL axioms such as owl:inverseOf and owl:TransitiveProperty into N3 Horn rules — for example, owl:inverseOf(hasBrother, isBrotherOf) compiles to two bidirectional Horn rules. These rules are then evaluated by the RETE-UL engine, operationally analogous to how meta-interpreters compile rules into equivalent Horn clauses for SPARQL interlocution." .

:q9 a schema:Question ;
    schema:name "What are Sideways Information Passing strategies?" ;
    schema:text "What are Sideways Information Passing (SIP) strategies and why are they important for recursive query evaluation?" ;
    schema:acceptedAnswer :a9 .
:a9 a schema:Answer ;
    schema:text "SIP strategies pass variable binding information (bound/free adornments) between rule body terms, directing search toward known access patterns. They originate from relational database research: Magic Sets (Bancilhon et al. 1985) and the power of magic (Beeri & Ramakrishnan 1987). FuXi uses SIP through its BFP meta-interpreter to efficiently evaluate recursive SPARQL queries, and fuxi.proof can render SIP collection graphs and adorned rules showing b/f adornments." .

:q10 a schema:Question ;
    schema:name "How does FuXi's proof visualisation work?" ;
    schema:text "What proof visualisation capabilities does FuXi provide and what formats can it generate?" ;
    schema:acceptedAnswer :a10 .
:a10 a schema:Answer ;
    schema:text "FuXi's fuxi.proof command generates: proof-graph-svg/png (the full SPARQL interlocution proof trace); rete-network-svg/png (the RETE-UL meta-interpreter network used for evaluation); sip-collection-svg/png (SIP binding adornments showing b=bound / f=free variables); adornment (adorned rule text); and pml (Provenance Markup Language RDF serialisation of the full proof). SVG outputs can be refined in Inkscape for publication." .

:q11 a schema:Question ;
    schema:name "What is the 'meshup' relationship between the article and the skill?" ;
    schema:text "What does 'meshup' (not mashup) mean in the context of combining the FuXi article and the semantic-web-reasoner-skill?" ;
    schema:acceptedAnswer :a11 .
:a11 a schema:Answer ;
    schema:text "A meshup creates a semantic mesh where entities from both sources share IRIs and are interconnected rather than merely mixed. The Medium article provides the theoretical and historical layer: RETE-UL, BFP, SPARQL interlocution, DLP, and OWA. The GitHub skill provides the tool layer: fuxi.owl, fuxi.proof, verbalize-ontology-class, robot, owl_dsl, riot. FuXi is the central connecting entity. Together they form an integrated knowledge graph where every theoretical concept links to its implementation and every tool links to its reasoning foundations." .

:q12 a schema:Question ;
    schema:name "What is the vision for generative expert systems?" ;
    schema:text "How does FuXi relate to the concept of generative expert systems?" ;
    schema:acceptedAnswer :a12 .
:a12 a schema:Answer ;
    schema:text "Chimezie Ogbuji envisions FuXi as part of a suite for building generative expert systems — systems combining traditional expert system techniques (OWL ontologies, logic rules, backward-chaining proof, PML provenance) with modern transformer-based LLMs. The FuXi series has three parts: (1) origin story and SPARQL interlocution theory (this article); (2) FuXi as SPARQL service endpoint for high-performance ontology reasoning; (3) verbalizing OWL ontologies, rules, and proofs with owl_dsl for LLM-guided expert reasoning workflows." .

# ═══════════════════════════════════════════════════════════
# GLOSSARY SECTION (10 Terms)
# ═══════════════════════════════════════════════════════════

:glossarySection a schema:DefinedTermSet, skos:ConceptScheme ;
    schema:name "Semantic Web Reasoning Glossary" ;
    schema:description "Key terms spanning both the FuXi origin story article and the semantic-web-reasoner-skill GitHub repository." ;
    schema:hasDefinedTerm :termRETEUL, :termBFP, :termSPARQLInterlocution, :termDLP, :termOWA,
                          :termSIP, :termN3, :termRIF, :termTBoxABox, :termMetaInterpreter ;
    schema:isPartOf :article .
:article schema:hasPart :glossarySection .

:termRETEUL a schema:DefinedTerm ;
    schema:name "RETE-UL" ;
    schema:description "A variant of the RETE production rule matching algorithm adapted for 3-item tuple facts that map to RDF triples. Uses hash tables to improve alpha and beta network node efficiency. FuXi's core rule evaluation engine." ;
    schema:inDefinedTermSet :glossarySection .

:termBFP a schema:DefinedTerm ;
    schema:name "Backward Fixpoint Procedure (BFP)" ;
    schema:description "A meta-interpreter (Bry 1990) that compiles a ruleset and a goal into meta-interpretation rules evaluated by a forward-chaining RETE network, simulating top-down SLD resolution. Adapted by Chimezie Ogbuji for SPARQL reasoning in 2011." ;
    schema:inDefinedTermSet :glossarySection .

:termSPARQLInterlocution a schema:DefinedTerm ;
    schema:name "SPARQL Interlocution" ;
    schema:description "An extension of BFP meta-interpretation that incorporates SPARQL service queries into the reasoning loop. Enables declarative SPARQL Entailment Regime evaluation without pre-materialising the full inference closure." ;
    schema:inDefinedTermSet :glossarySection .

:termDLP a schema:DefinedTerm ;
    schema:name "Description Logic Programs (DLP)" ;
    schema:description "A technique (Grosof et al. 2003) mapping OWL Description Logic axioms to equivalent Horn rules, enabling OWL semantics (inverseOf, TransitiveProperty) to be compiled into Logic Program rules for RETE-UL evaluation." ;
    schema:inDefinedTermSet :glossarySection .

:termOWA a schema:DefinedTerm ;
    schema:name "Open World Assumption (OWA)" ;
    schema:description "The OWL/RDF semantic principle that the absence of a stated fact does not imply its falsehood. SPARQL Entailment Regimes formalise this: answers include facts logically entailed by the graph, not only explicitly stored facts." ;
    schema:inDefinedTermSet :glossarySection .

:termSIP a schema:DefinedTerm ;
    schema:name "Sideways Information Passing (SIP)" ;
    schema:description "Query evaluation strategies that pass bound/free variable adornments between rule body terms, enabling efficient evaluation of recursive queries. Related to Magic Sets rewriting. Used by FuXi's BFP implementation and visualised by fuxi.proof --output sip-collection-svg." ;
    schema:inDefinedTermSet :glossarySection .

:termN3 a schema:DefinedTerm ;
    schema:name "Notation 3 (N3)" ;
    schema:description "A W3C Semantic Web rule language extending RDF with quantified variables, formula contexts, and rule notation. Supported by early reasoners CWM, Euler, Pychinko, and FuXi. N3 rules use left-to-right infix notation with { premise } => { conclusion } syntax." ;
    schema:inDefinedTermSet :glossarySection .

:termRIF a schema:DefinedTerm ;
    schema:name "Rule Interchange Format (RIF)" ;
    schema:description "A W3C standard for exchanging rules among rule systems. FuXi adopts the RIF Basic Logic Dialect (BLD) as its abstract syntax and API for representing and serializing Horn rules. FuXi can output rules in both BLD and N3 format." ;
    schema:inDefinedTermSet :glossarySection .

:termTBoxABox a schema:DefinedTerm ;
    schema:name "TBox / ABox" ;
    schema:description "In Description Logic: TBox (Terminological Box) defines the vocabulary — class names, property descriptions, restrictions, and hierarchies. ABox (Assertional Box) contains grounded individual statements using that vocabulary. Together they constitute an OWL knowledge base." ;
    schema:inDefinedTermSet :glossarySection .

:termMetaInterpreter a schema:DefinedTerm ;
    schema:name "Meta-Interpreter" ;
    schema:description "An interpreter for a language written in the language itself. In FuXi, the meta-interpreter compiles N3/RIF rules and a SPARQL goal into RETE-UL meta-interpretation rules (evaluate-k and query-p terms) that drive backward-reasoning simulation via a forward-chaining network." ;
    schema:inDefinedTermSet :glossarySection .

# ═══════════════════════════════════════════════════════════
# PROVENANCE
# ═══════════════════════════════════════════════════════════

:kgGeneratorSkillApp a schema:SoftwareApplication ;
    schema:name "kg-generator skill" ;
    schema:url <https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/kg-generator> ;
    schema:description "OpenLink Software AI agent skill for generating comprehensive RDF knowledge graphs from web content." .

:rdfInfographicSkillApp a schema:SoftwareApplication ;
    schema:name "rdf-infographic-skill" ;
    schema:url <https://github.com/OpenLinkSoftware/ai-agent-skills/tree/main/rdf-infographic-skill> ;
    schema:description "OpenLink Software AI agent skill for generating interactive HTML infographics and Markdown companion documents from RDF knowledge graphs." .

# COMPLIANCE SELF-AUDIT NOTES:
# 1. schema: = http://schema.org/ (HTTP) — PASS
# 2. :faqSection a schema:FAQPage with schema:mainEntity :q1-:q12 — PASS
# 3. :glossarySection a schema:DefinedTermSet with schema:hasDefinedTerm 10 terms — PASS
# 4. :article schema:hasPart :faqSection, :glossarySection, :howtoSection, :meshupSection, :theoreticalSection, :historicalSection — PASS
# 5. DBpedia/Wikidata IRIs fully expanded — PASS
# 6. No file: scheme IRIs — PASS
# 7. owl:sameAs for DBpedia cross-refs (not schema:sameAs) — PASS
# 8. @prefix : = canonical https: source URL with # — PASS
# 9. Ontology: schema:name, schema:description, schema:identifier; all classes/props have rdfs:isDefinedBy — PASS
# 10. No blank nodes for schema:Answer — PASS (:a1-:a12 are all named entities)
# 11. Inverse relationships: schema:hasPart / schema:isPartOf pairs explicit — PASS
# 12. prov:wasGeneratedBy links :article to :kgGeneratorSkillApp — PASS
# COMPLIANCE SELF-AUDIT: 12/12 passed.

# ═══════════════════════════════════════════════════════════
# FUXI → SPARQL TRANSLATION EXAMPLES (schema:SoftwareSourceCode)
# These SPARQL queries are generated by / evaluated by FuXi
# during its Backward Fixpoint Procedure (BFP) reasoning.
# Source: RDFLib/FuXi test suite (github.com/RDFLib/FuXi)
# ═══════════════════════════════════════════════════════════

:sparqlGoalInverseOf a schema:SoftwareSourceCode ;
    schema:name "FuXi BFP Goal: inverseOf Entailment" ;
    schema:description "The SPARQL ASK goal that FuXi evaluates via Backward Fixpoint Procedure using owl:inverseOf. Data: eg:joe your:isBrotherOf eg:bob. Axiom: your:isBrotherOf owl:inverseOf your:isBrotherOf. FuXi proves eg:bob your:isBrotherOf eg:joe by backward chaining. Source: test/OWL/inverseOf/premises001.rdf" ;
    schema:programmingLanguage "SPARQL" ;
    schema:codeSampleType "query-goal" ;
    schema:text """PREFIX your: <http://example.net/vocab#>
PREFIX eg: <http://example.net/>

# FuXi BFP goal: prove this is entailed via owl:inverseOf
# fuxi.owl --method=bfp --dlp --why \"ASK { eg:bob your:isBrotherOf eg:joe }\"
ASK {
  eg:bob your:isBrotherOf eg:joe .
}""" ;
    schema:isPartOf :fuxi ;
    schema:url <https://github.com/RDFLib/FuXi/blob/master/test/OWL/inverseOf/> .

:sparqlEDBSubQuery a schema:SoftwareSourceCode ;
    schema:name "FuXi SPARQL Interlocution: EDB Property Check" ;
    schema:description "The SPARQL ASK sub-query FuXi generates internally during SPARQL interlocution when checking the Extensional Database (EDB) for OWL functional and inverse-functional property axioms. FuXi's BFP meta-interpreter dispatches this query to determine whether to apply functional property rules. Source: FuXi/test/testBFPQueryMemoization.py" ;
    schema:programmingLanguage "SPARQL" ;
    schema:codeSampleType "edb-subquery" ;
    schema:text """PREFIX owl: <http://www.w3.org/2002/07/owl#>

# FuXi-generated EDB sub-query during SPARQL interlocution
# Checks whether any OWL functional/inverse-functional properties
# exist in the EDB before applying corresponding Horn rules
ASK {
  [] a ?KIND
  FILTER(
    ?KIND = owl:InverseFunctionalProperty ||
    ?KIND = owl:FunctionalProperty
  )
}""" ;
    schema:isPartOf :fuxi ;
    schema:url <https://github.com/RDFLib/FuXi/blob/master/test/testBFPQueryMemoization.py> .

:sparqlSuperpropertyGoal a schema:SoftwareSourceCode ;
    schema:name "FuXi Forward Chaining: Superproperty Entailment" ;
    schema:description "SPARQL SELECT demonstrating what FuXi entails via forward chaining (RETE-UL) from rdfs:subPropertyOf and owl:equivalentProperty axioms. ABox: john has_brother jack, jack brother john. TBox: has_brother subPropertyOf has_sibling, brother equivalentProperty has_brother. FuXi forward-chains to entail john has_sibling jack. Source: FuXi/test/test_superproperty_entailment.py" ;
    schema:programmingLanguage "SPARQL" ;
    schema:codeSampleType "entailment-check" ;
    schema:text """PREFIX exterms: <http://example.org/terms/>
PREFIX : <http://example.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

# FuXi forward-chaining (RETE-UL) entailment via subPropertyOf + equivalentProperty:
# ABox:  :john exterms:has_brother :jack
#        :jack exterms:brother     :john
# TBox:  exterms:has_brother rdfs:subPropertyOf exterms:has_sibling
#        exterms:brother owl:equivalentProperty exterms:has_brother
# Entailed triple: :john exterms:has_sibling :jack
SELECT ?subject ?entailedPredicate ?object WHERE {
  BIND(:john AS ?subject)
  BIND(exterms:has_sibling AS ?entailedPredicate)
  BIND(:jack AS ?object)
}""" ;
    schema:isPartOf :fuxi ;
    schema:url <https://github.com/RDFLib/FuXi/blob/master/test/test_superproperty_entailment.py> .

:fuxi schema:hasPart :sparqlGoalInverseOf, :sparqlEDBSubQuery, :sparqlSuperpropertyGoal,
         :sparqlSelectSuperproperty, :sparqlDescribeInverseOf, :sparqlConstructInverseOf .

# ═══════════════════════════════════════════════════════════
# SAMPLE DATASETS USED IN FUXI SPARQL EXAMPLES
# schema:Dataset entities with ABox + TBox source data
# Source: RDFLib/FuXi test suite (github.com/RDFLib/FuXi)
# ═══════════════════════════════════════════════════════════

:datasetInverseOf a schema:Dataset ;
    schema:name "FuXi inverseOf Sample Dataset" ;
    schema:description "ABox + TBox used in the FuXi BFP inverseOf entailment example. ABox asserts eg:joe isBrotherOf eg:bob. TBox declares isBrotherOf as its own owl:inverseOf. FuXi backward-chains to prove eg:bob isBrotherOf eg:joe." ;
    schema:url <https://github.com/RDFLib/FuXi/tree/master/test/OWL/inverseOf/> ;
    schema:isPartOf :fuxi ;
    schema:hasPart :datasetInverseOfABox, :datasetInverseOfTBox .

:datasetInverseOfABox a schema:SoftwareSourceCode ;
    schema:name "inverseOf ABox (facts)" ;
    schema:programmingLanguage "Turtle/N3" ;
    schema:codeSampleType "abox" ;
    schema:text """@prefix your: <http://example.net/vocab#> .
@prefix eg: <http://example.net/> .

eg:joe your:isBrotherOf eg:bob .""" ;
    schema:isPartOf :datasetInverseOf .

:datasetInverseOfTBox a schema:SoftwareSourceCode ;
    schema:name "inverseOf TBox (ontology)" ;
    schema:programmingLanguage "Turtle/N3" ;
    schema:codeSampleType "tbox" ;
    schema:text """@prefix your: <http://example.net/vocab#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

your:isBrotherOf owl:inverseOf your:isBrotherOf .""" ;
    schema:isPartOf :datasetInverseOf .

:datasetInverseOf schema:workExample :sparqlGoalInverseOf .
:sparqlGoalInverseOf schema:dataset :datasetInverseOf .

# ── Superproperty Entailment Dataset ──────────────────────────────────────

:datasetSuperproperty a schema:Dataset ;
    schema:name "FuXi Superproperty Entailment Dataset" ;
    schema:description "ABox + TBox used in FuXi forward-chaining (RETE-UL) superproperty entailment test. ABox: john has_brother jack, jack brother john. TBox: has_brother subPropertyOf has_sibling, brother equivalentProperty has_brother. FuXi entails: john has_sibling jack." ;
    schema:url <https://github.com/RDFLib/FuXi/blob/master/test/test_superproperty_entailment.py> ;
    schema:isPartOf :fuxi ;
    schema:hasPart :datasetSuperpropertyABox, :datasetSuperpropertyTBox .

:datasetSuperpropertyABox a schema:SoftwareSourceCode ;
    schema:name "Superproperty ABox (facts)" ;
    schema:programmingLanguage "Turtle/N3" ;
    schema:codeSampleType "abox" ;
    schema:text """@prefix exterms: <http://example.org/terms/> .
@prefix : <http://example.org/> .

:john exterms:has_brother :jack .
:jack exterms:brother     :john .""" ;
    schema:isPartOf :datasetSuperproperty .

:datasetSuperpropertyTBox a schema:SoftwareSourceCode ;
    schema:name "Superproperty TBox (ontology)" ;
    schema:programmingLanguage "Turtle/N3" ;
    schema:codeSampleType "tbox" ;
    schema:text """@prefix exterms: <http://example.org/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

exterms:Person a rdfs:Class ; rdfs:subClassOf exterms:Agent .
exterms:Agent a rdfs:Class .
exterms:has_sibling a rdf:Property .
exterms:has_brother a rdf:Property ;
    rdfs:subPropertyOf exterms:has_sibling ;
    rdfs:domain exterms:Person ;
    rdfs:range exterms:Person .
exterms:brother a rdf:Property ;
    owl:equivalentProperty exterms:has_brother ;
    rdfs:domain exterms:Person ;
    rdfs:range exterms:Person .""" ;
    schema:isPartOf :datasetSuperproperty .

:datasetSuperproperty schema:workExample :sparqlSuperpropertyGoal .
:sparqlSuperpropertyGoal schema:dataset :datasetSuperproperty .

# ── BFP Memoization / intersectionOf Dataset ──────────────────────────────

:datasetIntersectionOf a schema:Dataset ;
    schema:name "FuXi BFP intersectionOf Dataset" ;
    schema:description "OWL ontology used in FuXi BFP query memoization test. Declares first:C and first:B as owl:intersectionOf sets. first:John is asserted as type first:B. FuXi's BFP dispatcher generates SPARQL sub-queries to check for OWL functional/inverse-functional properties in the EDB during reasoning." ;
    schema:url <https://github.com/RDFLib/FuXi/blob/master/test/testBFPQueryMemoization.py> ;
    schema:isPartOf :fuxi ;
    schema:hasPart :datasetIntersectionOfOnt .

:datasetIntersectionOfOnt a schema:SoftwareSourceCode ;
    schema:name "intersectionOf Ontology (ABox + TBox)" ;
    schema:programmingLanguage "Turtle/N3" ;
    schema:codeSampleType "ontology" ;
    schema:text """@prefix first: <http://www.w3.org/2002/03owlt/intersectionOf/premises001#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

first:C owl:intersectionOf ( first:Employee first:Student ) .
first:John a first:B .
first:B owl:intersectionOf ( first:Student first:Employee ) .""" ;
    schema:isPartOf :datasetIntersectionOf .

:datasetIntersectionOf schema:workExample :sparqlEDBSubQuery .
:sparqlEDBSubQuery schema:dataset :datasetIntersectionOf .

:fuxi schema:hasPart :datasetInverseOf, :datasetSuperproperty, :datasetIntersectionOf .

# ═══════════════════════════════════════════════════════════
# FUXI SAMPLE DATA — ACTUAL RDF TRIPLES
# ABox and TBox facts from the FuXi test suite, expressed
# as real RDF triples (not just schema:text strings)
# ═══════════════════════════════════════════════════════════

# ── inverseOf Example (test/OWL/inverseOf/) ───────────────────────────────
@prefix your: <http://example.net/vocab#> .
@prefix eg:   <http://example.net/> .

# ABox: asserted fact
eg:joe your:isBrotherOf eg:bob .

# TBox: owl:inverseOf axiom — FuXi's BFP backward-chains over this to prove eg:bob your:isBrotherOf eg:joe
your:isBrotherOf owl:inverseOf your:isBrotherOf .

# Link ABox/TBox individuals to their dataset entity
eg:joe a :FuXiSampleIndividual ;
    schema:isPartOf :datasetInverseOf .
eg:bob a :FuXiSampleIndividual ;
    schema:isPartOf :datasetInverseOf .
your:isBrotherOf a rdf:Property ;
    schema:isPartOf :datasetInverseOf .

# ── Superproperty Entailment Example (test/test_superproperty_entailment.py) ──
@prefix exterms: <http://example.org/terms/> .
@prefix exind:   <http://example.org/> .

# ABox: asserted facts
exind:john exterms:has_brother exind:jack .
exind:jack exterms:brother     exind:john .

# TBox: ontology axioms FuXi compiles into Horn rules
exterms:has_sibling a rdf:Property .
exterms:has_brother a rdf:Property ;
    rdfs:subPropertyOf exterms:has_sibling ;
    rdfs:domain exterms:Person ;
    rdfs:range  exterms:Person .
exterms:brother a rdf:Property ;
    owl:equivalentProperty exterms:has_brother ;
    rdfs:domain exterms:Person ;
    rdfs:range  exterms:Person .
exterms:Person a rdfs:Class ;
    rdfs:subClassOf exterms:Agent .
exterms:Agent a rdfs:Class .

# Entailed triple (forward-chained by FuXi RETE-UL)
exind:john exterms:has_sibling exind:jack .

# Link individuals to their dataset entity
exind:john a :FuXiSampleIndividual ; schema:isPartOf :datasetSuperproperty .
exind:jack a :FuXiSampleIndividual ; schema:isPartOf :datasetSuperproperty .

# ── intersectionOf / BFP Memoization Example (test/testBFPQueryMemoization.py) ──
@prefix first: <http://www.w3.org/2002/03owlt/intersectionOf/premises001#> .

# ABox + TBox (combined ontology)
first:C owl:intersectionOf ( first:Employee first:Student ) .
first:B owl:intersectionOf ( first:Student  first:Employee ) .
first:John a first:B .

# Link to dataset entity
first:John a :FuXiSampleIndividual ; schema:isPartOf :datasetIntersectionOf .
first:C    a owl:Class             ; schema:isPartOf :datasetIntersectionOf .
first:B    a owl:Class             ; schema:isPartOf :datasetIntersectionOf .

# Class definition for the sample-data marker
:FuXiSampleIndividual a rdfs:Class ;
    schema:name "FuXi Sample Individual" ;
    schema:description "Marker class for individuals from FuXi test suite sample datasets, used to demonstrate BFP backward-chaining and RETE-UL forward-chaining reasoning." .

# ── New SPARQL examples: SELECT (named-graph), DESCRIBE, CONSTRUCT ────────────

:sparqlSelectSuperproperty a schema:SoftwareSourceCode ;
    schema:name "SELECT: Superproperty Entailment from Named Graph" ;
    schema:programmingLanguage "SPARQL" ;
    schema:codeSampleType "full" ;
    schema:description "Real SELECT against the URIBurner named graph that retrieves all triples whose subject is in http://example.org/ and predicate in http://example.org/terms/ — including the ABox facts and the triple FuXi RETE-UL forward-chained via rdfs:subPropertyOf." ;
    schema:text """PREFIX exterms: <http://example.org/terms/>
PREFIX exind: <http://example.org/>
SELECT ?subject ?predicate ?object
WHERE {
  GRAPH <https://linkeddata.uriburner.com/DAV/demos/daas/fuxi-semantic-web-reasoner-meshup-claude_sonnet4-1.ttl> {
    ?subject ?predicate ?object .
    FILTER(STRSTARTS(STR(?subject), 'http://example.org/')
        && STRSTARTS(STR(?predicate), 'http://example.org/terms/'))
  }
}
ORDER BY ?subject ?predicate""" ;
    schema:url "https://github.com/RDFLib/FuXi/blob/master/test/test_superproperty_entailment.py" ;
    schema:dataset :datasetSuperproperty .

:sparqlDescribeInverseOf a schema:SoftwareSourceCode ;
    schema:name "DESCRIBE: inverseOf Individuals from Named Graph" ;
    schema:programmingLanguage "SPARQL" ;
    schema:codeSampleType "full" ;
    schema:description "SPARQL DESCRIBE that retrieves all known triples about eg:joe and eg:bob from the named graph, exposing the ABox assertion and owl:inverseOf axiom that FuXi BFP backward-chains to prove eg:bob your:isBrotherOf eg:joe." ;
    schema:text """PREFIX eg: <http://example.net/>
DESCRIBE eg:joe eg:bob
WHERE {
  GRAPH <https://linkeddata.uriburner.com/DAV/demos/daas/fuxi-semantic-web-reasoner-meshup-claude_sonnet4-1.ttl> {
    eg:joe ?p ?o .
  }
}""" ;
    schema:url "https://github.com/RDFLib/FuXi/tree/master/test/OWL/inverseOf/" ;
    schema:dataset :datasetInverseOf .

:sparqlConstructInverseOf a schema:SoftwareSourceCode ;
    schema:name "CONSTRUCT: owl:inverseOf Entailed Triple" ;
    schema:programmingLanguage "SPARQL" ;
    schema:codeSampleType "full" ;
    schema:description "SPARQL CONSTRUCT that materialises the triple proved by FuXi BFP via owl:inverseOf: from eg:joe your:isBrotherOf eg:bob and the owl:inverseOf axiom, FuXi derives eg:bob your:isBrotherOf eg:joe." ;
    schema:text """PREFIX your: <http://example.net/vocab#>
PREFIX eg: <http://example.net/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
CONSTRUCT { eg:bob your:isBrotherOf eg:joe . }
WHERE {
  GRAPH <https://linkeddata.uriburner.com/DAV/demos/daas/fuxi-semantic-web-reasoner-meshup-claude_sonnet4-1.ttl> {
    eg:joe your:isBrotherOf eg:bob .
    your:isBrotherOf owl:inverseOf your:isBrotherOf .
  }
}""" ;
    schema:url "https://github.com/RDFLib/FuXi/tree/master/test/OWL/inverseOf/" ;
    schema:dataset :datasetInverseOf .

