Hi,
I tested your problem with the script below.
The individual i is reclassed as an instance of Rupture, but not a (direct) instance of LOC (as you expected, if I understood well). This is because the Rupture class itself is reclassed as a child class of LOC (due to the union).
As a consequent, the individual is an instance of LOC, but indirectly.
Jiba
----8<---------
from owlready2 import *
onto = get_ontology("
http://test.org/onto.owl")
with onto:
class Ieffect(Thing): pass
class effect_of_deviation(Thing >> Thing): pass
class effect_involves(Thing >> Thing): pass
class HighPressure(Thing): pass
class LowTemperature(Thing): pass
class PressurizedContainment(Thing): pass
class Rupture(Ieffect):
equivalent_to = [
Ieffect & (effect_of_deviation.some(HighPressure) & effect_involves.some(PressurizedContainment))
]
class BrittleFracture(Ieffect):
equivalent_to = [
Ieffect &(effect_of_deviation.some(LowTemperature) & effect_involves.some(PressurizedContainment))
]
class LOC(Ieffect):
equivalent_to = [Rupture | BrittleFracture]
i = Ieffect(effect_of_deviation = [HighPressure()], effect_involves = [PressurizedContainment()])
sync_reasoner()
assert isinstance(i, Rupture)
assert isinstance(i, LOC)