The most simple way of modelling is to define the class of toys and add some instances to it:

ex#rubberDuckie : ex#Toy .

turtle: ex#rubberDuckie rdf:type ex#Toy .

ex#stuffedAnimal : ex#Toy .

turtle: ex#stuffedAnimal rdf:type ex#Toy .

ex#telescope : ex#Toy .

turtle: ex#telescope rdf:type ex#Toy .

A somewhat more organised way of tidying up a large amount of toys is to classify it within a taxonomy (technically: class tree) of a domain. In the toy world a taxonomy of toys could look like this:

ex#FireEngine :: ex#Toy .

turtle: ex#FireEngine rdfs:subClassOf ex#Toy .

ex#erniesFireEngine : ex#FireEngine .

turtle: ex#erniesFireEngine rdf:type ex#FireEngine .

ex#Pet :: ex#Toy .

turtle: ex#Pet rdfs:subClassOf ex#Toy .

ex#horse : ex#Pet .

turtle: ex#horse rdf:type ex#Pet .

ex#Instrument :: ex#Toy .

turtle: ex#Instrument rdfs:subClassOf ex#Toy .

ex#trumpet : ex#Instrument .

turtle: ex#trumpet rdf:type ex#Instrument .

ex#trombone : ex#Instrument .

turtle: ex#trombone rdf:type ex#Instrument .

In fact this might be classification Bert was thinking of most probably. An intuitive (but not given!) assumption is that the subclasses of a classification are disjunct to each other (in math language: form a partition).

A (informal) semantics of the term "subclass" is:

  • If an object belongs to the sub class FireEngine, it also belongs to the super class Toy.
In F-logic this kind of (rather simple) inferencing is performed automatically. If you query for all toys there you get
  • all "direct" instances (math: elements) of the class (math: set) Toy
  • all objects which are an instance of a subclass of the class toy (includes transitive subclasses).

A simple query asks for instances (math: elements) of the class (math: the set of) toys:

@{ allToys } ?-
?X : ex#Toy .

@{ allFireEngines } ?-
?X : ex#FireEngine .