You can represent some fairly complicated conditional sentences in OWL using general subclass axioms. Let's look at a few examples. If you were trying something a little bit simpler, say
Students with at least five dogs have at least one cat.
which is shorthand for the quantified conditional "For all x, if x is a student with at least five dogs, then x has at least one cat, you can do this in OWL with
(Student and hasPet min 5 Dog) subClassOf (hasPet some Cat)
Those are both anonymous class expressions, but you could define some equivalent classes to make some things simpler:
StudentWithAtLeastFiveDogs equivalentClass (Student and hasPet min 5 Dogs)
CatOwner equivalentClass (hasPet some Cat)
StudentWithAtLeastFiveDogs subClassOf CatOwner
Now, your example was Bob is a Student, If Bob has 5 dogs, then he has at least 1 cat. There are two sentences there. The first is easily encoded by
Bob a Student
The second is a bit more complicated. You're saying that Bob is a member of the class of things which, if they have at least five dogs, they have at least one cat. A (material) conditional "If P then Q" is logically equivalent to the disjunction "(not P) or Q". So we're saying that Bob is a member of the class of things that either do not have at least five dots or that do have at least one cat. The class expression for that is
(not (hasPet min 5 Dog)) or (hasPet some Cat)
Now our knowledge about Bob is that
Bob a Student
Bob a (not (hasPet min 5 Dog)) or (hasPet some Cat)
You could define an equivalent class for that anonymous class expression, but I doubt it will be rendered very naturally in most languages. Here's what an ontology containing that knowledge about Bob looks like (in the N3 format):
@prefix : <http://www.example.com/example#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://www.example.com/example>
a owl:Ontology .
:Cat a owl:Class .
:Student
a owl:Class .
:Dog a owl:Class .
:hasPet
a owl:ObjectProperty .
:Bob a :Student , owl:NamedIndividual ;
a [ a owl:Class ;
owl:unionOf ([ a owl:Class ;
owl:complementOf
[ a owl:Restriction ;
owl:minQualifiedCardinality
"5"^^xsd:nonNegativeInteger ;
owl:onClass :Dog ;
owl:onProperty :hasPet
]
] [ a owl:Restriction ;
owl:onProperty :hasPet ;
owl:someValuesFrom :Cat
])
] .
This same approach can be used for datatype properties and restrictions on their values. For instance, to say that "if Bob weighs at least 60kg, then he is at least 180cm tall," we can say that Bob is an element of the class of things that, if they weight at least 60kg, then they are at least 180cm tall, or equivalently, the class of things that either do not weight at least 60kg, or that are at least 180 cm tall. In the Manchester syntax, the class expression looks like
(not (hasWeight some int[>= 60])) or (hasHeight some int[>= 180])
The relevant portion from the N3 serialization of the ontology is:
:Bob a [ a owl:Class ;
owl:unionOf ([ a owl:Class ;
owl:complementOf
[ a owl:Restriction ;
owl:onProperty :hasWeight ;
owl:someValuesFrom
[ a rdfs:Datatype ;
owl:onDatatype xsd:int ;
owl:withRestrictions
([ xsd:minInclusive 60
])
]
]
] [ a owl:Restriction ;
owl:onProperty :hasHeight ;
owl:someValuesFrom
[ a rdfs:Datatype ;
owl:onDatatype xsd:int ;
owl:withRestrictions
([ xsd:minInclusive 180
])
]
])
] .