Take the following scenario:
Class A has two subclasses, A1 and A2. Class B also has two subclasses, B1 and B2. Let class A has a property has_A, and class B has a property has_B. We are defining property restrictors here; C1 and C2 with the equivalant_to notation in owlready2.
To define the property restrictors (C1 and C2 in our case), all the items inside should be a class or subclass. In our application, it would be better if we had more freedom in it, like using class instances rather than subclasses. We would like to use instances of class A, let's say a1 and a2 and instances of class B, b1 and b2 in the property restrictors. For eg.,
c1 = equivalant_to([D & has_A.value(a1) & has_B.value(b1)])
Right now, if we use this approach with hermit reasoner, the first case with pre-defined classes will output the property constraint, but while using instances instead, it's always pointing to the default class, D in our case.
Is there any way to use instances rather than classes/subclasses in property restrictors? Or any other approach, where we need to use restrictors, but remove/reduce the hard coding and use class instances instead?