The Inferal Sets Ontology defines RDF terms for classical sets of RDF resources and first-class membership occurrences. It is intended as a small foundation for modules that need set membership while still needing a resource on which local information, such as ordering or roles, can be attached.
This is an unofficial 0.1 Editor's Draft maintained in the Inferal ontology repository.
Feedback should be sent to contact@inferal.com.
This specification defines three conformance classes: sets data graph, sets producer, and sets validator.
A sets data graph is an RDF graph that uses terms from this specification consistently with the term definitions and validation expectations below.
A sets producer is software or an authoring process that emits set resources, membership occurrences, direct member shortcuts, or asserted cardinalities.
A sets validator is software that checks the structural constraints in . A conforming validator MUST reject duplicate membership occurrences for the same set and member.
| Prefix | IRI |
|---|---|
set |
https://ontology.inferal.com/modules/sets/ |
| Term | Kind | Normative role |
|---|---|---|
set:Set |
Class | A classical set of RDF resources. |
set:Membership |
Class | A first-class occurrence connecting one set to one member resource. |
set:hasMembership |
Object property | Connects a set to one of its membership occurrences. |
set:inSet |
Object property | Connects a membership occurrence to its set. |
set:member |
Object property | Connects a membership occurrence to its member resource. |
set:hasMember |
Object property | Direct convenience relation from a set to a member resource. |
set:cardinality |
Datatype property | Optional asserted count of explicit member resources. |
A set:Set represents a classical set whose members are RDF resources. This module does not define set-theoretic equality, subsethood, powersets, unions, intersections, or complement operations. It only defines the structural surface needed to state membership.
A set:Membership MUST identify exactly one set:inSet and exactly one set:member. The member MUST be an IRI or blank node. Literal members are out of scope for this version. Producers that need literal-like values in sets SHOULD mint value resources or use a domain-specific value ontology.
A conforming set:Set MUST NOT have two distinct set:Membership resources with the same set:member. This is the key difference between this module and a bag, multiset, or tuple model.
The direct set:hasMember property connects a set to a member resource. Producers MAY assert it for query ergonomics. Processors MAY materialize it from set:hasMembership and set:member, or infer it with the OWL property chain below. When asserted directly, every set:hasMember triple MUST be backed by an explicit membership occurrence.
This ontology declares an OWL property chain for set:hasMember:
inverse(set:inSet) o set:member -> set:hasMember. OWL 2
property-chain reasoners can therefore derive direct membership from
explicit set:Membership resources. Producers and consumers that
do not run OWL property-chain reasoning can use the colocated SPARQL
materialization query instead.
set:Membership declares an OWL key over set:inSet and set:member. OWL key reasoning can identify duplicate membership occurrences as the same individual. SHACL validation remains the source-profile mechanism for reporting duplicate occurrences as authoring errors.
The set:cardinality property records an asserted non-negative
integer count of explicit membership occurrences. It is represented as
an xsd:integer value constrained to be at least zero. It is not an OWL
cardinality restriction. A validator MAY compare the value with the
explicit set:Membership resources available in the data graph.
Because RDF graphs are open-world by default, producers SHOULD only assert set:cardinality when the emitted set description is meant to be complete for the validation context.
A conforming sets data graph MUST satisfy the following constraints:
These constraints define a source-authoring validation profile. Producers SHOULD validate source graphs before applying OWL property-chain materialization, or with an entailment regime that does not add derived set:hasMember triples. OWL property-chain materialization is semantic enrichment for consumers, not a substitute for validating the explicit source structure.