# See https://en.wikipedia.org/wiki/Disjunction_elimination

@prefix list: <http://www.w3.org/2000/10/swap/list#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <https://eyereasoner.github.io/ns#>.

# water is an inorganic compound
:water a :InorganicCompound.

# water is solid or liquid or gas
{
    ?A a :InorganicCompound.
} => {
    (?A) log:allPossibleCases (
        { ?A :is :solid }
        { ?A :is :liquid }
        { ?A :is :gas }
    )
}.

# solid, liquid and gas things are observable
{ ?A :is :solid } => { ?A :is :observable }.
{ ?A :is :liquid } => { ?A :is :observable }.
{ ?A :is :gas } => { ?A :is :observable }.

# proof by cases
{
    (?A) log:allPossibleCases ?B.
    (
        { ?B list:member { ?A :is ?C } }
        { { ?A :is ?C } => { ?A :is :observable } }
    ) log:forAllIn ?SCOPE.
} => {
    ?A :is :observable.
}.
