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
CONSTRUCT {
    :water a :InorganicCompound.
} WHERE {}

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

# solid, liquid and gas things are observable
CONSTRUCT { ?A :is :observable } WHERE { ?A :is :solid }
CONSTRUCT { ?A :is :observable } WHERE { ?A :is :liquid }
CONSTRUCT { ?A :is :observable } WHERE { ?A :is :gas }

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