Re: Cardinality Reasoning

Hello,

Ok thanks that makes sense - so i tried using complements to get what
i want but still not useful.

I changed it slightly - theres one class called 'HasAtLeastOneColor'
which printer1 is an instance of, then i have created one called
'DoesNotHaveAtLeastOneColor' which is its complement. Then
'Everything' is the union of the two.

If 'Everything' contains every instance, and ''HasAtLeastOneColor'
contains only printer1, then why doesn't 'DoesNotHaveAtLeastOneColor'
contain printer2 and all the colour instances? Shouldn't complement
specify every individual that is not in the set specified by the
complement class?

This is probably actually a question about complements themselves,
because even when I take out the cardinality restrictions, if i make
printer1 an instance of HasAtLeastOneColour, its complement class
doesnt not contain all other instances. Why is this?

Thanks again,
Luke



<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:test="urn:test:"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
    xmlns:owl="http://www.w3.org/2002/07/owl#"
    xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
  <owl:Ontology rdf:about=""/>
  <owl:Class rdf:about="urn:test:Printer"/>


  <owl:Class rdf:about="urn:test:Everything">
    <owl:unionOf  rdf:parseType="Collection">
        <owl:Class rdf:about="urn:test:DoesNotHaveAtLeastOneColor"/>
        <owl:Class rdf:about="urn:test:HasAtLeastOneColor"/>
    </owl:unionOf>
  </owl:Class>

  <owl:Class rdf:about="urn:test:DoesNotHaveAtLeastOneColor">
    <owl:complementOf>
        <owl:Class rdf:about="urn:test:HasAtLeastOneColor"/>
    </owl:complementOf>
  </owl:Class>

  <owl:Class rdf:about="urn:test:HasAtLeastOneColor">
    <owl:equivalentClass>
      <owl:Restriction>
        <owl:onProperty>
          <owl:ObjectProperty rdf:about="urn:test:hasColor"/>
        </owl:onProperty>
        <owl:minCardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
        >1</owl:minCardinality>
      </owl:Restriction>
    </owl:equivalentClass>
  </owl:Class>

  <owl:Class rdf:about="urn:test:HasNoColor">
    <owl:equivalentClass>
      <owl:Restriction>
        <owl:onProperty>
          <owl:ObjectProperty rdf:about="urn:test:hasColor"/>
        </owl:onProperty>
        <owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
        >0</owl:cardinality>
      </owl:Restriction>
    </owl:equivalentClass>
  </owl:Class>

  <owl:Class rdf:about="urn:test:HasFourColors">
    <owl:equivalentClass>
      <owl:Restriction>
        <owl:onProperty>
          <owl:ObjectProperty rdf:about="urn:test:hasColor"/>
        </owl:onProperty>
        <owl:cardinality
rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger"
        >4</owl:cardinality>
      </owl:Restriction>
    </owl:equivalentClass>
  </owl:Class>

  <owl:Class rdf:about="urn:test:Color"/>

  <owl:ObjectProperty rdf:about="urn:test:hasColor">
    <rdfs:range rdf:resource="urn:test:Color"/>
  </owl:ObjectProperty>

  <owl:AllDifferent>
     <owl:distinctMembers rdf:parseType="Collection">
        <test:Color rdf:about="urn:test:yellow"/>
        <test:Color rdf:about="urn:test:blue"/>
        <test:Color rdf:about="urn:test:black"/>
        <test:Color rdf:about="urn:test:red"/>
     </owl:distinctMembers>
  </owl:AllDifferent>

  <test:Printer rdf:about="urn:test:printer1">
    <test:hasColor rdf:resource="urn:test:black"/>
    <test:hasColor rdf:resource="urn:test:red"/>
    <test:hasColor rdf:resource="urn:test:blue"/>
    <test:hasColor rdf:resource="urn:test:yellow"/>
  </test:Printer>

  <test:Printer rdf:about="urn:test:printer2"/>
</rdf:RDF>

Received on Thursday, 17 August 2006 13:22:03 UTC