| 1 |
# -------------------------- |
| 2 |
# RDF surfaces water example |
| 3 |
# -------------------------- |
| 4 |
# |
| 5 |
# See https://en.wikipedia.org/wiki/Disjunction_elimination |
| 6 |
|
| 7 |
@prefix log: <http://www.w3.org/2000/10/swap/log#>. |
| 8 |
@prefix : <urn:example:>. |
| 9 |
|
| 10 |
# water is an inorganic compound |
| 11 |
:water a :InorganicCompound. |
| 12 |
|
| 13 |
# water is solid or liquid or gas |
| 14 |
(_:A) log:onNegativeSurface { |
| 15 |
_:A a :InorganicCompound. |
| 16 |
() log:onNegativeSurface { |
| 17 |
_:A :is :solid. |
| 18 |
}. |
| 19 |
() log:onNegativeSurface { |
| 20 |
_:A :is :liquid. |
| 21 |
}. |
| 22 |
() log:onNegativeSurface { |
| 23 |
_:A :is :gas. |
| 24 |
}. |
| 25 |
}. |
| 26 |
|
| 27 |
# solid things are observable |
| 28 |
(_:A) log:onNegativeSurface { |
| 29 |
_:A :is :solid. |
| 30 |
() log:onNegativeSurface { |
| 31 |
_:A :is :observable. |
| 32 |
}. |
| 33 |
}. |
| 34 |
|
| 35 |
# liquid things are observable |
| 36 |
(_:A) log:onNegativeSurface { |
| 37 |
_:A :is :liquid. |
| 38 |
() log:onNegativeSurface { |
| 39 |
_:A :is :observable. |
| 40 |
}. |
| 41 |
}. |
| 42 |
|
| 43 |
# gas things are observable |
| 44 |
(_:A) log:onNegativeSurface { |
| 45 |
_:A :is :gas. |
| 46 |
() log:onNegativeSurface { |
| 47 |
_:A :is :observable. |
| 48 |
}. |
| 49 |
}. |
| 50 |
|
| 51 |
# query |
| 52 |
() log:onNegativeSurface { |
| 53 |
:water :is :observable. |
| 54 |
() log:onNegativeAnswerSurface { |
| 55 |
:water :is :observable. |
| 56 |
}. |
| 57 |
}. |