@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix : <foo://bla/names#>.
:Person owl:disjointUnionOf (:Male :Female).
:Male a :Sex.
:Female a :Sex.
:MaleNames owl:equivalentClass [ a rdfs:Datatype; owl:oneOf ("John" "Bob") ] .
:FemaleNames owl:equivalentClass [ a rdfs:Datatype; owl:oneOf ("Mary" "Alice") ].
:Male a owl:Class; owl:equivalentClass [owl:intersectionOf ( :Person
  [a owl:Restriction; owl:onProperty :name; owl:someValuesFrom :MaleNames])].
:Female a owl:Class; owl:equivalentClass [owl:intersectionOf ( :Person
  [a owl:Restriction; owl:onProperty :name; owl:someValuesFrom :FemaleNames])].
:name a owl:FunctionalProperty; a owl:DatatypeProperty.
:john a :Person; :name "John".
:mary a :Person; :name "Mary".
