;; ================================================
;;      SUMO (Suggested Upper Merged Ontology)
;; ================================================                                            

;; The original versions of SUMO incorporated elements from many public sources
;; which are documented at http://www.ontologyportal.org/SUMOhistory/

;; The SUMO is freely available, subject to the following IEEE license.  

;; ----------------------
;; Copyright � 2004 by the Institute of Electrical and Electronics Engineers, Inc.
;; Three Park Avenue
;; New York, NY 10016-5997, USA
;; All rights reserved.
          
;; 1. COPYRIGHT                                                                                                                                                                                                                                                      
;; The Institute of Electrical and Electronics Engineers, Inc., ("IEEE") owns the         
;; copyright to this Document in all forms of media. Copyright in the text retrieved,     
;; displayed or output from this Document is owned by IEEE and is protected by the        
;; copyright laws of the United States and by international treaties. The IEEE reserves   
;; all rights not expressly granted herein.                                               
                                                                                                                                                                                
;; 2. ROYALTIES                                                                                                                                                                                                                                                     
;; The IEEE is providing the Document at no charge. However, the Document is not to be    
;; considered "Public Domain," as the IEEE is, and at all times shall remain, the sole    
;; copyright holder in the Document. The IEEE intends to revise the Document from time to 
;; time; the latest version shall be available at http://standards.ieee.org/catalog/      
                                                                                                                                                                              
;; 3. TERMS OF USE                                                                                                                                                                                                                                                        
;; The IEEE hereby grants Licensee a perpetual, non-exclusive, royalty-free, world-wide   
;; right and license to copy, publish and distribute the Document in any way, and to      
;; prepare derivative works that are based on or incorporate all or part of the Document  
;; provided that the IEEE is appropriately acknowledged as the source and copyright owner 
;; in each and every use.                                                                                                                                                         
                                                                                       
;; 4. LIMITED WARRANTIES & LIMITATIONS OF REMEDIES                                                                                                                                                                                                                        
;; LICENSOR Does not warrant or represent the accuracy or content of the document and     
;; Expressly Disclaims any Express or Implied Warranty, including any Implied Warranty of 
;; Merchantability or Fitness for a Specific Purpose or that the use of the document is   
;; free from patent infringement. The document is supplied ONLY "AS IS."                  
;; ----------------------

;; The SUMO was initially developed at Teknowledge Corp.

;; Any questions or comments about this ontology can be directed to the
;; Technical editor, Adam Pease, apease [at] articulatesoftware [dot] com  

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; The knowledge representation language in which the SUMO is expressed is SUO-KIF, 
;; which stands for "Standard Upper Ontology - Knowledge Interchange Format".  SUO-KIF 
;; is a simplified form of the popular KIF knowledge representation language.  A 
;; specification of SUO-KIF can be found at:  http://www.ontologyportal.org

;; The SUMO is a modular ontology.  That is, the ontology is divided into 
;; self-contained subontologies.  Each subontology is indicated by a section 
;; header, and the dependencies between the subontologies are specified with 
;; statements of the form ";; INCLUDES '<SUBONTOLOGY>'".  These statements are 
;; found at the beginning of each section.  

;; We ask the people using or referencing SUMO cite our primary paper:

;; Niles, I., and Pease, A.  2001.  Towards a Standard Upper Ontology.  In 
;; Proceedings of the 2nd International Conference on Formal Ontology in 
;; Information Systems (FOIS-2001), Chris Welty and Barry Smith, eds, 
;; Ogunquit, Maine, October 17-19, 2001.  Also see http://www.ontologyportal.org

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;   STRUCTURAL ONTOLOGY   ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'BASE ONTOLOGY'

;; The Structural Ontology consists of definitions of certain syntactic 
;; abbreviations that can be both heuristically useful and computationally 
;; advantageous.

(instance instance BinaryPredicate)
(domain instance 1 Entity)
(domain instance 2 SetOrClass)
(documentation instance EnglishLanguage "An object is an &%instance of a &%SetOrClass if 
it is included in that &%SetOrClass.  An individual may be an instance of many 
classes, some of which may be subclasses of others.  Thus, there is no 
assumption in the meaning of &%instance about specificity or uniqueness.")

(subrelation immediateInstance instance)
(instance immediateInstance AsymmetricRelation)
(instance immediateInstance IntransitiveRelation)
(documentation immediateInstance EnglishLanguage "An object is an &%immediateInstance of 
a &%SetOrClass if it is an instance of the &%SetOrClass and it is not an 
instance of a proper subclass of &%SetOrClass.")

(=>
   (immediateInstance ?ENTITY ?CLASS)
   (not (exists (?SUBCLASS)
      (and
         (subclass ?SUBCLASS ?CLASS)
         (not (equal ?SUBCLASS ?CLASS))
         (instance ?ENTITY ?SUBCLASS)))))
                 
(instance inverse BinaryPredicate)
(instance inverse IrreflexiveRelation)
(instance inverse IntransitiveRelation)
(instance inverse SymmetricRelation)
(domain inverse 1 BinaryRelation)
(domain inverse 2 BinaryRelation)
(documentation inverse EnglishLanguage "The inverse of a &%BinaryRelation is a relation 
in which all the tuples of the original relation are reversed.  In 
other words, one &%BinaryRelation is the inverse of another if they are 
equivalent when their arguments are swapped.")

; causes a predicate variable expansion explosion
; (=>
;    (and
;      (inverse ?REL1 ?REL2)
;      (instance ?REL1 Predicate)
;      (instance ?REL2 Predicate))
;    (forall (?INST1 ?INST2)
;       (<=>
;          (?REL1 ?INST1 ?INST2)
;          (?REL2 ?INST2 ?INST1))))

(instance subclass BinaryPredicate)
(instance subclass PartialOrderingRelation)
(domain subclass 1 SetOrClass)
(domain subclass 2 SetOrClass)
(documentation subclass EnglishLanguage "(&%subclass ?CLASS1 ?CLASS2) means that ?CLASS1 is 
a subclass of ?CLASS2, i.e. every instance of ?CLASS1 is also an instance of 
?CLASS2.  A class may have multiple superclasses and subclasses.")

(=>
  (subclass ?X ?Y)
  (and
    (instance ?X SetOrClass)
    (instance ?Y SetOrClass)))

(=>
  (and
    (subclass ?X ?Y)
    (instance ?Z ?X))
  (instance ?Z ?Y))

(subrelation immediateSubclass subclass)
(instance immediateSubclass AsymmetricRelation)
(instance immediateSubclass IntransitiveRelation)
(documentation immediateSubclass EnglishLanguage "A &%SetOrClass ?CLASS1 is an &%immediateSubclass 
of another &%SetOrClass ?CLASS2 just in case ?CLASS1 is a subclass of ?CLASS2 and 
there is no other subclass of ?CLASS2 such that ?CLASS1 is also a subclass of it.")

(=>
   (immediateSubclass ?CLASS1 ?CLASS2)
   (not (exists (?CLASS3)
      (and
         (subclass ?CLASS3 ?CLASS2)
         (subclass ?CLASS1 ?CLASS3)
         (not (equal ?CLASS2 ?CLASS3))
         (not (equal ?CLASS1 ?CLASS3)))))) 

(instance subrelation BinaryPredicate)
(instance subrelation PartialOrderingRelation)
(domain subrelation 1 Relation)
(domain subrelation 2 Relation)
(documentation subrelation EnglishLanguage "(&%subrelation ?REL1 ?REL2) means that 
every tuple of ?REL1 is also a tuple of ?REL2.  In other words, if 
the &%Relation ?REL1 holds for some arguments arg_1, arg_2, ... arg_n, 
then the &%Relation ?REL2 holds for the same arguments.  A consequence 
of this is that a &%Relation and its subrelations must have the same 
&%valence.")

(=>
   (and
      (subrelation ?PRED1 ?PRED2)
      (valence ?PRED1 ?NUMBER))
   (valence ?PRED2 ?NUMBER))
   
(=>
   (and
      (subrelation ?PRED1 ?PRED2)
      (domain ?PRED2 ?NUMBER ?CLASS1))
   (domain ?PRED1 ?NUMBER ?CLASS1))

(=>
   (and
      (subrelation ?REL1 ?REL2)
      (instance ?REL1 Predicate)
      (instance ?REL2 Predicate)
      (?REL1 @ROW))
   (?REL2 @ROW))

(=>
   (and
      (subrelation ?PRED1 ?PRED2)
      (instance ?PRED2 ?CLASS)
      (instance ?CLASS InheritableRelation))
   (instance ?PRED1 ?CLASS))

(instance domain TernaryPredicate)
(domain domain 1 Relation)
(domain domain 2 PositiveInteger)
(domain domain 3 SetOrClass)
(documentation domain EnglishLanguage "Provides a computationally and heuristically
convenient mechanism for declaring the argument types of a given relation.  
The formula (&%domain ?REL ?INT ?CLASS) means that the ?INT'th element of each 
tuple in the relation ?REL must be an instance of ?CLASS.  Specifying argument
types is very helpful in maintaining ontologies.  Representation systems can 
use these specifications to classify terms and check integrity constraints.  
If the restriction on the argument type of a &%Relation is not captured by a 
&%SetOrClass already defined in the ontology, one can specify a &%SetOrClass 
compositionally with the functions &%UnionFn, &%IntersectionFn, etc.")

(=>
   (and
      (domain ?REL ?NUMBER ?CLASS1)
      (domain ?REL ?NUMBER ?CLASS2))
   (or
      (subclass ?CLASS1 ?CLASS2)
      (subclass ?CLASS2 ?CLASS1)))

(instance domainSubclass TernaryPredicate)
(domain domainSubclass 1 Relation)
(domain domainSubclass 2 PositiveInteger)
(domain domainSubclass 3 SetOrClass)
(documentation domainSubclass EnglishLanguage "&%Predicate used to specify argument 
type restrictions of &%Predicates.  The formula (&%domainSubclass 
?REL ?INT ?CLASS) means that the ?INT'th element of each tuple in the 
relation ?REL must be a subclass of ?CLASS.")

(=>
   (and
      (subrelation ?REL1 ?REL2)
      (domainSubclass ?REL2 ?NUMBER ?CLASS1))
   (domainSubclass ?REL1 ?NUMBER ?CLASS1))

(=>
   (and
      (domainSubclass ?REL ?NUMBER ?CLASS1)
      (domainSubclass ?REL ?NUMBER ?CLASS2))
   (or
      (subclass ?CLASS1 ?CLASS2)
      (subclass ?CLASS2 ?CLASS1)))

(instance equal BinaryPredicate)
(instance equal EquivalenceRelation)
(instance equal RelationExtendedToQuantities)
(domain equal 1 Entity)
(domain equal 2 Entity)
(documentation equal EnglishLanguage "(equal ?ENTITY1 ?ENTITY2) is true just in case 
?ENTITY1 is identical with ?ENTITY2.")

(=>
   (equal ?THING1 ?THING2)
   (forall (?ATTR)
      (<=>
         (property ?THING1 ?ATTR)
         (property ?THING2 ?ATTR))))

(=>
   (equal ?ATTR1 ?ATTR2)
   (forall (?THING)
      (<=>
         (property ?THING ?ATTR1)
         (property ?THING ?ATTR2))))

(=>
   (equal ?THING1 ?THING2)
   (forall (?CLASS)
      (<=>
         (instance ?THING1 ?CLASS)
         (instance ?THING2 ?CLASS))))

(=>
   (equal ?CLASS1 ?CLASS2)
   (forall (?THING)
      (<=>
         (instance ?THING ?CLASS1)
         (instance ?THING ?CLASS2))))

;;(=>
;;   (equal ?REL1 ?REL2)
;;   (forall (@ROW)
;;      (<=>
;;         (?REL1 @ROW)
;;         (?REL2 @ROW))))

(=>
   (equal ?LIST1 ?LIST2)
      (=>
         (and
            (equal ?LIST1 (ListFn @ROW1))
            (equal ?LIST2 (ListFn @ROW2)))
         (forall (?NUMBER)
            (equal (ListOrderFn (ListFn @ROW1) ?NUMBER) (ListOrderFn (ListFn @ROW2) ?NUMBER)))))
    
(instance range BinaryPredicate)
(instance range AsymmetricRelation)
(domain range 1 Function)
(domain range 2 SetOrClass)
(documentation range EnglishLanguage "Gives the range of a function.  In other words, 
(&%range ?FUNCTION ?CLASS) means that all of the values assigned by 
?FUNCTION are &%instances of ?CLASS.") 

(=>
   (and
      (range ?FUNCTION ?CLASS)
      (equal (AssignmentFn ?FUNCTION @ROW) ?VALUE))
   (instance ?VALUE ?CLASS))

(=>
   (and
      (subrelation ?REL1 ?REL2)
      (range ?REL2 ?CLASS1))
   (range ?REL1 ?CLASS1))

(=>
   (and
      (range ?REL ?CLASS1)
      (range ?REL ?CLASS2))
   (or
      (subclass ?CLASS1 ?CLASS2)
      (subclass ?CLASS2 ?CLASS1)))

(instance rangeSubclass BinaryPredicate)
(instance rangeSubclass AsymmetricRelation)
(domain rangeSubclass 1 Function)
(domainSubclass rangeSubclass 2 SetOrClass)
(documentation rangeSubclass EnglishLanguage "(&%rangeSubclass ?FUNCTION ?CLASS) means that 
all of the values assigned by ?FUNCTION are &%subclasses of ?CLASS.")

(=>
   (and
      (rangeSubclass ?FUNCTION ?CLASS)
      (equal (AssignmentFn ?FUNCTION @ROW) ?VALUE))
   (subclass ?VALUE ?CLASS))

(=>
   (and
      (subrelation ?REL1 ?REL2)
      (rangeSubclass ?REL2 ?CLASS1))
   (rangeSubclass ?REL1 ?CLASS1))

(=>
   (and
      (rangeSubclass ?REL ?CLASS1)
      (rangeSubclass ?REL ?CLASS2))
   (or
      (subclass ?CLASS1 ?CLASS2)
      (subclass ?CLASS2 ?CLASS1)))

(instance valence BinaryPredicate)
(instance valence AsymmetricRelation)
(instance valence SingleValuedRelation)
(domain valence 1 Relation)
(domain valence 2 PositiveInteger)
(documentation valence EnglishLanguage "Specifies the number of arguments that a 
relation can take.  If a relation does not have a fixed number of 
arguments, it does not have a valence and it is an instance of 
&%VariableArityRelation.")

(instance documentation TernaryPredicate)
(domain documentation 1 Entity)
(domain documentation 2 HumanLanguage) 
(domain documentation 3 SymbolicString)
(documentation documentation EnglishLanguage "A relation between objects 
in the domain of discourse and strings of natural language text stated in 
a particular &%HumanLanguage.  The domain of &%documentation is not 
constants (names), but the objects themselves.  This means that one does 
not quote the names when associating them with their documentation.") 

(instance format TernaryPredicate)
(domain format 1 Language) 
(domain format 2 Entity)
(domain format 3 SymbolicString)
(documentation format EnglishLanguage "A relation that specifies how
to present an expression in a natural language format.")

(instance termFormat TernaryPredicate)
(domain termFormat 1 Language) 
(domain termFormat 2 Entity)
(domain termFormat 3 SymbolicString)
(documentation termFormat EnglishLanguage "A relation that specifies how
to present a term in a natural language format.")

(instance disjoint BinaryPredicate)
(instance disjoint SymmetricRelation)
(domain disjoint 1 SetOrClass)
(domain disjoint 2 SetOrClass)
(documentation disjoint EnglishLanguage "&%Classes are &%disjoint only if they share no 
instances, i.e. just in case the result of applying &%IntersectionFn to
them is empty.")

(=>
   (disjoint ?CLASS1 ?CLASS2)
   (forall (?INST)
     (not
       (and 
         (instance ?INST ?CLASS1)
         (instance ?INST ?CLASS2)))))

(instance disjointRelation BinaryPredicate)
(instance disjointRelation IrreflexiveRelation)
(domain disjointRelation 1 Relation)
(domain disjointRelation 2 Relation)
(relatedInternalConcept disjointRelation disjoint)
(documentation disjointRelation EnglishLanguage "This predicate relates two &%Relations.  
(&%disjointRelation ?REL1 ?REL2) means that the two relations have no tuples in 
common.")

(=>
   (and
      (domain ?REL1 ?NUMBER ?CLASS1)
      (domain ?REL2 ?NUMBER ?CLASS2)
      (disjoint ?CLASS1 ?CLASS2))
   (disjointRelation ?REL1 ?REL2))

(=>
   (and
      (domainSubclass ?REL1 ?NUMBER ?CLASS1)
      (domainSubclass ?REL2 ?NUMBER ?CLASS2)
      (disjoint ?CLASS1 ?CLASS2))
   (disjointRelation ?REL1 ?REL2))

(=>
   (and
      (range ?REL1 ?CLASS1)
      (range ?REL2 ?CLASS2)
      (disjoint ?CLASS1 ?CLASS2))
   (disjointRelation ?REL1 ?REL2))

(=>
   (and
      (rangeSubclass ?REL1 ?CLASS1)
      (rangeSubclass ?REL2 ?CLASS2)
      (disjoint ?CLASS1 ?CLASS2))
   (disjointRelation ?REL1 ?REL2))

(=>
   (and
      (instance ?REL1 Predicate)
      (instance ?REL2 Predicate)
      (disjointRelation ?REL1 ?REL2)
      (not (equal ?REL1 ?REL2))
      (?REL1 @ROW2))
   (not (?REL2 @ROW2)))

(instance contraryAttribute Predicate)
(instance contraryAttribute VariableArityRelation)
(documentation contraryAttribute EnglishLanguage "A &%contraryAttribute is a set of &%Attributes 
such that something can not simultaneously have more than one of these &%Attributes.  
For example, (&%contraryAttribute &%Pliable &%Rigid) means that nothing can be both 
&%Pliable and &%Rigid.")

(=>
   (contraryAttribute @ROW)
   (=>
      (inList ?ELEMENT (ListFn @ROW))
      (instance ?ELEMENT Attribute)))

(=>
   (and
      (contraryAttribute @ROW1)
      (identicalListItems (ListFn @ROW1) (ListFn @ROW2)))
   (contraryAttribute @ROW2)) 

(=>
   (contraryAttribute @ROW)
   (forall (?ATTR1 ?ATTR2)
      (=>
         (and
            (equal ?ATTR1 (ListOrderFn (ListFn @ROW) ?NUMBER1))
            (equal ?ATTR2 (ListOrderFn (ListFn @ROW) ?NUMBER2))
            (not (equal ?NUMBER1 ?NUMBER2)))
         (=>
            (property ?OBJ ?ATTR1)
            (not (property ?OBJ ?ATTR2))))))

(instance exhaustiveAttribute Predicate)
(instance exhaustiveAttribute VariableArityRelation)
(domainSubclass exhaustiveAttribute 1 Attribute)
(documentation exhaustiveAttribute EnglishLanguage "This predicate relates a &%Class to a 
set of &%Attributes, and it means that the elements of this set exhaust the 
instances of the &%Class.  For example, (&%exhaustiveAttribute &%PhysicalState 
&%Solid &%Fluid &%Liquid &%Gas &%Plasma) means that there are only five instances of 
the class &%PhysicalState, viz. &%Solid, &%Fluid, &%Liquid, &%Gas and &%Plasma.")

(=>
   (exhaustiveAttribute ?CLASS @ROW)
   (=>
      (inList ?ATTR (ListFn @ROW))
      (instance ?ATTR Attribute))) 

(=>
   (exhaustiveAttribute ?CLASS @ROW)
   (forall (?ATTR1)
      (=>
         (instance ?ATTR1 ?CLASS)
         (exists (?ATTR2)
            (and
               (inList ?ATTR2 (ListFn @ROW))
               (equal ?ATTR1 ?ATTR2))))))

(=>
   (exhaustiveAttribute ?ATTRCLASS @ROW)
   (not
     (exists (?EL) 
       (and
         (instance ?EL ?ATTRCLASS)
         (not
           (exists (?ATTR ?NUMBER)
             (and
               (equal ?EL ?ATTR)
               (equal ?ATTR
                 (ListOrderFn
                   (ListFn @ROW) ?NUMBER)))))))))

(instance exhaustiveDecomposition Predicate)
(instance exhaustiveDecomposition VariableArityRelation)
(domain exhaustiveDecomposition 1 Class)
(relatedInternalConcept exhaustiveDecomposition partition)
(documentation exhaustiveDecomposition EnglishLanguage "An &%exhaustiveDecomposition of a 
&%Class C is a set of subclasses of C such that every instance of C is an 
instance of one of the subclasses in the set.  Note:  this does not necessarily 
mean that the elements of the set are disjoint (see &%partition - a &%partition 
is a disjoint exhaustive decomposition).")

(=>
   (exhaustiveDecomposition @ROW)
   (=>
      (inList ?ELEMENT (ListFn @ROW))
      (instance ?ELEMENT Class)))

(instance disjointDecomposition Predicate)
(instance disjointDecomposition VariableArityRelation)
(domain disjointDecomposition 1 Class)
(relatedInternalConcept disjointDecomposition exhaustiveDecomposition)
(relatedInternalConcept disjointDecomposition disjoint)
(documentation disjointDecomposition EnglishLanguage "A &%disjointDecomposition of a &%Class 
C is a set of subclasses of C that are mutually &%disjoint.")

(=>
   (disjointDecomposition @ROW)
   (=>
      (inList ?ELEMENT (ListFn @ROW))
      (instance ?ELEMENT Class)))

(instance partition Predicate)
(instance partition VariableArityRelation)
(domain partition 1 Class)
(documentation partition EnglishLanguage "A &%partition of a class C
is a set of mutually &%disjoint classes (a subclass partition) which
covers C.  Every instance of C is an instance of exactly one of the
subclasses in the partition.")

(<=>
   (partition @ROW)
   (and
      (exhaustiveDecomposition @ROW)
      (disjointDecomposition @ROW)))

(instance relatedInternalConcept BinaryPredicate)
(instance relatedInternalConcept EquivalenceRelation)
(domain relatedInternalConcept 1 Entity)
(domain relatedInternalConcept 2 Entity)
(documentation relatedInternalConcept EnglishLanguage "Means that the two arguments are 
related concepts within the SUMO, i.e. there is a significant similarity 
of meaning between them.  To indicate a meaning relation between a SUMO 
concept and a concept from another source, use the Predicate 
&%relatedExternalConcept.")

(instance relatedExternalConcept TernaryPredicate)
(domain relatedExternalConcept 1 SymbolicString)
(domain relatedExternalConcept 2 Entity)
(domain relatedExternalConcept 3 Language)
(relatedInternalConcept relatedExternalConcept relatedInternalConcept)
(documentation relatedExternalConcept EnglishLanguage "Used to signify a three-place 
relation between a concept in an external knowledge source, a concept 
in the SUMO, and the name of the other knowledge source.")

(subrelation synonymousExternalConcept relatedExternalConcept)
(disjointRelation synonymousExternalConcept subsumedExternalConcept)
(disjointRelation synonymousExternalConcept subsumingExternalConcept)
(disjointRelation subsumedExternalConcept subsumingExternalConcept)
(documentation synonymousExternalConcept EnglishLanguage "(&%synonymousExternalConcept 
?STRING ?THING ?LANGUAGE) means that the SUMO concept ?THING has the 
same meaning as ?STRING in ?LANGUAGE.")

(subrelation subsumingExternalConcept relatedExternalConcept)
(documentation subsumingExternalConcept EnglishLanguage "(&%subsumingExternalConcept 
?STRING ?THING ?LANGUAGE) means that the SUMO concept ?THING subsumes 
the meaning of ?STRING in ?LANGUAGE, i.e. the concept ?THING is broader 
in meaning than ?STRING.")

(subrelation subsumedExternalConcept relatedExternalConcept)
(documentation subsumedExternalConcept EnglishLanguage "(&%subsumedExternalConcept 
?STRING ?THING ?LANGUAGE) means that the SUMO concept ?THING is subsumed 
by the meaning of ?STRING in ?LANGUAGE, i.e. the concept ?THING is narrower 
in meaning than ?STRING.")

(instance externalImage BinaryPredicate)
(documentation externalImage EnglishLanguage "A link between an Entity and a
URL that represents or exemplifies the term in some way.")
(domain externalImage 1 Entity)
(domain externalImage 2 SymbolicString)

(instance subAttribute BinaryPredicate)
(instance subAttribute PartialOrderingRelation)
(domain subAttribute 1 Attribute)
(domain subAttribute 2 Attribute)
(disjointRelation subAttribute successorAttribute)
(documentation subAttribute EnglishLanguage "Means that the second argument can be 
ascribed to everything which has the first argument ascribed to it.")

(=>
   (subAttribute ?ATTR1 ?ATTR2)
   (forall (?OBJ)
      (=>
         (property ?OBJ ?ATTR1)
         (property ?OBJ ?ATTR2))))

(=>
   (and
      (subAttribute ?ATTR1 ?ATTR2)
      (instance ?ATTR2 ?CLASS))
   (instance ?ATTR1 ?CLASS))

(instance successorAttribute BinaryPredicate)
(instance successorAttribute AsymmetricRelation)
(domain successorAttribute 1 Attribute)
(domain successorAttribute 2 Attribute)
(documentation successorAttribute EnglishLanguage "(&%successorAttribute ?ATTR1 ?ATTR2) 
means that ?ATTR2 is the &%Attribute that comes immediately after ?ATTR1 
on the scale that they share.")

(=>
   (and
      (successorAttribute ?ATTR1 ?ATTR2)
      (holdsDuring ?TIME1 (property ?ENTITY ?ATTR2)))
   (exists (?TIME2)
      (and
         (temporalPart ?TIME2 (PastFn ?TIME1))
         (holdsDuring ?TIME2 (property ?ENTITY ?ATTR1)))))

(instance successorAttributeClosure BinaryPredicate)
(instance successorAttributeClosure TransitiveRelation)
(instance successorAttributeClosure IrreflexiveRelation)
(domain successorAttributeClosure 1 Attribute)
(domain successorAttributeClosure 2 Attribute)
(relatedInternalConcept successorAttributeClosure successorAttribute)
(documentation successorAttributeClosure EnglishLanguage "The transitive closure of 
&%successorAttribute.  (&%successorAttributeClosure ?ATTR1 ?ATTR2) means 
that there is a chain of &%successorAttribute assertions connecting 
?ATTR1 and ?ATTR2.") 

(=>
   (successorAttribute ?ATTR1 ?ATTR2)
   (successorAttributeClosure ?ATTR1 ?ATTR2))

(instance greaterThanByQuality TernaryPredicate)
(documentation greaterThanByQuality EnglishLanguage "(greaterThanByQuality 
?ENTITY1 ?ENTITY2 ?ATT) means that ?ENTITY1 has more of the given
quality ?ATT than ?ENTITY2)")
(domain greaterThanByQuality 1 Entity)
(domain greaterThanByQuality 2 Entity)
(domain greaterThanByQuality 3 Attribute)

(=>
  (and
    (greaterThanByQuality ?E1 ?E2 ?ATT)
    (greaterThanByQuality ?E2 ?E3 ?ATT))
  (greaterThanByQuality ?E1 ?E3 ?ATT))

(=>
  (greaterThanByQuality ?E1 ?E2 ?ATT)
  (not 
    (greaterThanByQuality ?E2 ?E1 ?ATT)))


(=>
  (greaterThanByQuality ?E1 ?E2 ?ATT)
  (not 
    (equal ?E2 ?E1)))

(instance entails BinaryPredicate)
(domain entails 1 Formula)
(domain entails 2 Formula)
(documentation entails EnglishLanguage "The operator of logical entailment.  (&%entails 
?FORMULA1 ?FORMULA2) means that ?FORMULA2 can be derived from ?FORMULA1 
by means of the proof theory of SUO-KIF.")

;; The following axiom is commented out, because it is rejected by the 
;; inference engine parser.

;;(=>
;;   (entails ?FORMULA1 ?FORMULA2)
;;   (=> ?FORMULA1 ?FORMULA2))

(instance AssignmentFn Function)
(instance AssignmentFn VariableArityRelation)
(domain AssignmentFn 1 Function)
(range AssignmentFn Entity)
(documentation AssignmentFn EnglishLanguage "If F is a &%Function with a value for the 
objects denoted by N1,..., NK, then (&%AssignmentFn F N1 ... NK) is the 
value of applying F to the objects denoted by N1,..., NK.  Otherwise, 
the value is undefined.")

(instance PowerSetFn UnaryFunction)
(instance PowerSetFn TotalValuedRelation)
(domain PowerSetFn 1 SetOrClass)
(rangeSubclass PowerSetFn SetOrClass)
(documentation PowerSetFn EnglishLanguage "(&%PowerSetFn ?CLASS) maps the &%SetOrClass 
?CLASS to the &%SetOrClass of all &%subclasses of ?CLASS.")

;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;;;;;
;;   BASE ONTOLOGY   ;;
;;;;;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'STRUCTURAL ONTOLOGY'

;; The following hierarchy incorporates content from Sowa, Russell & Norvig, 
;; and the top-level ontology from ITBM-CNR. 

(partition Entity Physical Abstract)
(documentation Entity EnglishLanguage "The universal class of individuals.  This is the root 
node of the ontology.")

;; Informally, it is true that "Everything is Entity"; 
;; We comment out this axiom to avoid logical paradoxes.
;;(forall (?THING)
;;  (instance ?THING Entity))

(exists (?THING) 
  (instance ?THING Entity))

(<=> 
  (instance ?CLASS Class)
  (subclass ?CLASS Entity))

(subclass Physical Entity)
(partition Physical Object Process)
(documentation Physical EnglishLanguage "An entity that has a location in space-time.  
Note that locations are themselves understood to have a location in 
space-time.")

(=> 
  (instance ?PHYS Physical)
  (exists (?LOC ?TIME)
    (and 
      (located ?PHYS ?LOC)
      (time ?PHYS ?TIME))))

(subclass Object Physical)
(documentation Object EnglishLanguage "Corresponds roughly to the class of ordinary 
objects.  Examples include normal physical objects, geographical regions, 
and locations of &%Processes, the complement of &%Objects in the &%Physical 
class.  In a 4D ontology, an &%Object is something whose spatiotemporal 
extent is thought of as dividing into spatial parts roughly parallel to the 
time-axis.")

(subclass SelfConnectedObject Object)
(documentation SelfConnectedObject EnglishLanguage "A &%SelfConnectedObject is any 
&%Object that does not consist of two or more disconnected parts.")

(subclass OrganicThing SelfConnectedObject)
(documentation OrganicThing EnglishLanguage "A &%SelfConnectedObject that is
produced by a non-intentional process from an &%Organism.  Note that this
refers only to the primary cause.  That is, a &%PlantAgriculturalProduct
is firstly produced by a &%Plant, and only secondarily by a &%Human that is
tending the plant.")

(instance FrontFn SpatialRelation)
(instance FrontFn PartialValuedRelation)
(instance FrontFn UnaryFunction)
(instance FrontFn AsymmetricRelation)
(instance FrontFn IrreflexiveRelation)
(domain FrontFn 1 SelfConnectedObject)
(range FrontFn SelfConnectedObject)
(documentation FrontFn EnglishLanguage "A &%Function that maps an &%Object to the side 
that generally receives the most attention or that typically faces the 
direction in which the &%Object moves.  Note that this is a partial 
function, since some &%Objects do not have sides, e.g. apples and 
spheres.  Note too that the &%range of this &%Function is indefinite in 
much the way that &%ImmediateFutureFn and &%ImmediatePastFn are indefinite.  
Although this indefiniteness is undesirable from a theoretical standpoint, 
it does not have significant practical implications, since there is 
widespread intersubjective agreement about the most common cases.")

(=>
   (instance ?OBJ SelfConnectedObject)
   (side (FrontFn ?OBJ) ?OBJ))

(instance BackFn SpatialRelation)
(instance BackFn PartialValuedRelation)
(instance BackFn UnaryFunction)
(instance BackFn AsymmetricRelation)
(instance BackFn IrreflexiveRelation)
(domain BackFn 1 SelfConnectedObject)
(range BackFn SelfConnectedObject)
(documentation BackFn EnglishLanguage "A &%Function that maps an &%Object to the side 
that is opposite the &%FrontFn of the &%Object.  Note that this is a 
partial function, since some &%Objects do not have sides, e.g. apples 
and spheres.  Note too that the &%range of this &%Function is indefinite in 
much the way that &%ImmediateFutureFn and &%ImmediatePastFn are indefinite.  
Although this indefiniteness is undesirable from a theoretical standpoint, 
it does not have significant practical implications, since there is 
widespread intersubjective agreement about the most common cases.")

(=>
   (instance ?OBJ SelfConnectedObject)
   (side (BackFn ?OBJ) ?OBJ))

(instance part SpatialRelation)
(instance part PartialOrderingRelation)
(domain part 1 Object)
(domain part 2 Object)
(documentation part EnglishLanguage "The basic mereological relation.  All other 
mereological relations are defined in terms of this one.  
(&%part ?PART ?WHOLE) simply means that the &%Object ?PART is part
of the &%Object ?WHOLE.  Note that, since &%part is a 
&%ReflexiveRelation, every &%Object is a part of itself.")

(instance properPart AsymmetricRelation)
(instance properPart TransitiveRelation)
(subrelation properPart part)
(documentation properPart EnglishLanguage "(&%properPart ?OBJ1 ?OBJ2) means that 
?OBJ1 is a part of ?OBJ2 other than ?OBJ2 itself. This is a 
&%TransitiveRelation and &%AsymmetricRelation (hence an 
&%IrreflexiveRelation).")

(<=> 
   (properPart ?OBJ1 ?OBJ2)
      (and
     (part ?OBJ1 ?OBJ2)
     (not
        (part ?OBJ2 ?OBJ1))))

(subrelation piece part)
(domain piece 1 Substance)
(domain piece 2 Substance)
(documentation piece EnglishLanguage "A specialized common sense notion of part for 
arbitrary parts of &%Substances.  Quasi-synonyms are: chunk, hunk, bit, 
etc.  Compare &%component, another subrelation of &%part.")

(=>
   (piece ?SUBSTANCE1 ?SUBSTANCE2)
   (forall (?CLASS)
      (=>
         (instance ?SUBSTANCE1 ?CLASS)
         (instance ?SUBSTANCE2 ?CLASS))))

(subrelation component part)
(domain component 1 CorpuscularObject)
(domain component 2 CorpuscularObject)
(documentation component EnglishLanguage "A specialized common sense notion of part 
for heterogeneous parts of complexes. (&%component ?COMPONENT ?WHOLE) 
means that ?COMPONENT is a component of ?WHOLE. Examples of component 
include the doors and walls of a house, the states or provinces of a 
country, or the limbs and organs of an animal.  Compare &%piece, which 
is also a subrelation of &%part.")

(instance material BinaryPredicate)
(domainSubclass material 1 Substance)
(domain material 2 CorpuscularObject)
(documentation material EnglishLanguage "(&%material ?SUBSTANCE ?OBJECT) means that 
?OBJECT is structurally made up in part of ?SUBSTANCE. This relation 
encompasses the concepts of 'composed of', 'made of', and 'formed of'.  
For example, plastic is a &%material of my computer monitor.  Compare 
&%part and its subrelations, viz &%component and &%piece.")

(subrelation contains partlyLocated)
(instance contains SpatialRelation)
(instance contains AsymmetricRelation)
(disjointRelation contains part)
(domain contains 1 SelfConnectedObject)
(domain contains 2 Object)
(documentation contains EnglishLanguage "The relation of spatial containment for two 
separable objects.  When the two objects are not separable (e.g. an 
automobile and one of its seats), the relation of &%part should be used.  
(&%contains ?OBJ1 ?OBJ2) means that the &%SelfConnectedObject ?OBJ1 has 
a space (i.e. a &%Hole) which is at least partially filled by ?OBJ2.")

(<=>
   (contains ?OBJ1 ?OBJ2)
   (exists (?HOLE)
      (and
         (hole ?HOLE ?OBJ1)
         (properlyFills ?OBJ2 ?HOLE))))

(subclass Substance SelfConnectedObject)
(partition Substance PureSubstance Mixture)
(partition Substance SyntheticSubstance NaturalSubstance)
(documentation Substance EnglishLanguage "An &%Object in which every part is similar to 
every other in every relevant respect.  More precisely, something is a 
&%Substance when it has only arbitrary pieces as parts - any parts have 
properties which are similar to those of the whole.  Note that a &%Substance 
may nonetheless have physical properties that vary.  For example, the 
temperature, chemical constitution, density, etc. may change from one part 
to another.  An example would be a body of water.")

(=>
   (and
      (subclass ?OBJECTTYPE Substance)
      (instance ?OBJECT ?OBJECTTYPE)
      (part ?PART ?OBJECT))
   (instance ?PART ?OBJECTTYPE))

(=>
   (and
      (instance ?OBJ Substance)
      (attribute ?OBJ ?ATTR)
      (part ?PART ?OBJ))
   (attribute ?PART ?ATTR))

(subclass SyntheticSubstance Substance)
(documentation SyntheticSubstance EnglishLanguage "Any &%Substance that is the result of an 
&%IntentionalProcess, i.e. any substance that is created by &%Humans.")

(<=>
   (instance ?SUBSTANCE SyntheticSubstance)
   (exists (?PROCESS)
      (and
         (instance ?PROCESS IntentionalProcess)
         (result ?PROCESS ?SUBSTANCE)
         (instance ?SUBSTANCE Substance))))

(subclass NaturalSubstance Substance)
(documentation NaturalSubstance EnglishLanguage "Any &%Substance that is not the result of 
an &%IntentionalProcess, i.e. any substance that occurs naturally.")

(subclass PureSubstance Substance) 
(partition PureSubstance CompoundSubstance ElementalSubstance) 
(documentation PureSubstance EnglishLanguage "The &%Class of &%Substances with constant 
composition.  A &%PureSubstance can be either an element (&%ElementalSubstance) 
or a compound of elements (&%CompoundSubstance).  Examples: Table salt 
(sodium chloride, NaCl), sugar (sucrose, C_{12}H_{22}O_{11}), water (H_2O), 
iron (Fe), copper (Cu), and oxygen (O_2).") 

(subclass ElementalSubstance PureSubstance) 
(documentation ElementalSubstance EnglishLanguage "The &%Class of &%PureSubstances that 
cannot be separated into two or more &%Substances by ordinary chemical 
(or physical) means. This excludes nuclear reactions. &%ElementalSubstances 
are composed of only one kind of atom. Examples: Iron (Fe), copper (Cu), 
and oxygen (O_2).  &%ElementalSubstances are the simplest 
&%PureSubstances.")

(subclass Metal ElementalSubstance) 
(documentation Metal EnglishLanguage "A &%Metal is an &%ElementalSubstance that conducts heat 
and electricity, is shiny and reflects many colors of light, and can be hammered 
into sheets or drawn into wire.  About 80% of the known chemical elements 
(&%ElementalSubstances) are metals.")

(subclass Atom ElementalSubstance)
(documentation Atom EnglishLanguage "An extremely small unit of matter that retains its 
identity in Chemical reactions.  It consists of an &%AtomicNucleus and 
&%Electrons surrounding the &%AtomicNucleus.")

(=>
   (instance ?ATOM Atom)
   (exists (?PROTON ?ELECTRON)
      (and
         (component ?PROTON ?ATOM)
         (component ?ELECTRON ?ATOM)
         (instance ?PROTON Proton)
         (instance ?ELECTRON Electron))))

(=>
   (instance ?ATOM Atom)
   (forall (?NUCLEUS1 ?NUCLEUS2)
      (=>
         (and
            (component ?NUCLEUS1 ?ATOM)
            (component ?NUCLEUS2 ?ATOM)
            (instance ?NUCLEUS1 AtomicNucleus)
            (instance ?NUCLEUS2 AtomicNucleus))
         (equal ?NUCLEUS1 ?NUCLEUS2))))

(subclass SubatomicParticle ElementalSubstance)
(documentation SubatomicParticle EnglishLanguage "The class of &%ElementalSubstances that 
are smaller than &%Atoms and compose &%Atoms.")

(=>
   (instance ?PARTICLE SubatomicParticle)
   (exists (?ATOM)
      (and
         (instance ?ATOM Atom)
         (part ?PARTICLE ?ATOM))))

(subclass AtomicNucleus SubatomicParticle)
(documentation AtomicNucleus EnglishLanguage "The core of the &%Atom.  It is composed of 
&%Protons and &%Neutrons.")

(=>
   (instance ?NUCLEUS AtomicNucleus)
   (exists (?NEUTRON ?PROTON)
      (and
         (component ?NEUTRON ?NUCLEUS)
         (component ?PROTON ?NUCLEUS)
         (instance ?NEUTRON Neutron)
         (instance ?PROTON Proton))))

(subclass Electron SubatomicParticle)
(documentation Electron EnglishLanguage "&%SubatomicParticles that surround the 
&%AtomicNucleus.  They have a negative charge.")

(subclass Proton SubatomicParticle)
(documentation Proton EnglishLanguage "Components of the &%AtomicNucleus.  They have a 
positive charge.")

(subclass Neutron SubatomicParticle)
(documentation Neutron EnglishLanguage "Components of the &%AtomicNucleus.  They have no 
charge.")

(subclass CompoundSubstance PureSubstance) 
(documentation CompoundSubstance EnglishLanguage "The &%Class of &%Substances that contain 
two or more elements (&%ElementalSubstances), in definite proportion by weight. 
The composition of a pure compound will be invariant, regardless of the method 
of preparation. Compounds are composed of more than one kind of atom (element). 
The term molecule is often used for the smallest unit of a compound that still 
retains all of the properties of the compound.  Examples: Table salt (sodium 
chloride, NaCl), sugar (sucrose, C_{12}H_{22}O_{11}), and water (H_2O). ") 

(subclass Mixture Substance) 
(documentation Mixture EnglishLanguage "A &%Mixture is two or more &%PureSubstances, 
combined in varying proportions - each retaining its own specific properties. 
The components of a &%Mixture can be separated by physical means, i.e. without 
the making and breaking of chemical bonds. Examples: Air, table salt thoroughly 
dissolved in water, milk, wood, and concrete. ") 

(=> 
   (instance ?MIXTURE Mixture)
   (exists (?PURE1 ?PURE2)
      (and 
         (instance ?PURE1 PureSubstance)
         (instance ?PURE2 PureSubstance)
         (not (equal ?PURE1 ?PURE2))
         (part ?PURE1 ?MIXTURE)
         (part ?PURE2 ?MIXTURE))))

(=>
   (and
      (instance ?MIXTURE Mixture)
      (part ?SUBSTANCE ?MIXTURE)
      (not (instance ?SUBSTANCE Mixture)))
   (instance ?SUBSTANCE PureSubstance))

(subclass CorpuscularObject SelfConnectedObject)
(disjoint CorpuscularObject Substance)
(documentation CorpuscularObject EnglishLanguage "A &%SelfConnectedObject whose parts have 
properties that are not shared by the whole.")

(=>
   (instance ?OBJ CorpuscularObject)
   (exists (?SUBSTANCE1 ?SUBSTANCE2)
      (and
         (subclass ?SUBSTANCE1 Substance)
         (subclass ?SUBSTANCE2 Substance)
         (material ?SUBSTANCE1 ?OBJ)
         (material ?SUBSTANCE2 ?OBJ)
         (not (equal ?SUBSTANCE1 ?SUBSTANCE2)))))

(subclass Region Object)
(documentation Region EnglishLanguage "A topographic location.  &%Regions encompass 
surfaces of &%Objects, imaginary places, and &%GeographicAreas.  Note 
that a &%Region is the only kind of &%Object which can be located at 
itself.  Note too that &%Region is not a subclass of &%SelfConnectedObject, 
because some &%Regions, e.g. archipelagos, have &%parts which are not 
&%connected with one another.")

(=>
   (instance ?REGION Region)
   (exists (?PHYS)
      (located ?PHYS ?REGION)))

(subclass Collection Object)
(disjoint Collection SelfConnectedObject)
(documentation Collection EnglishLanguage "Collections have &%members like &%Classes, but, 
unlike &%Classes, they have a position in space-time and &%members can be 
added and subtracted without thereby changing the identity of the 
&%Collection.  Some examples are toolkits, football teams, and flocks 
of sheep.")

(=>
  (instance ?COLL Collection)
  (exists (?OBJ)
    (member ?OBJ ?COLL)))

(subrelation member part)
(instance member AsymmetricRelation)
(instance member IntransitiveRelation)
(domain member 1 SelfConnectedObject)
(domain member 2 Collection)
(relatedInternalConcept member instance)
(relatedInternalConcept member element)
(documentation member EnglishLanguage "A specialized common sense notion of part for 
uniform parts of &%Collections.  For example, each sheep in a flock of 
sheep would have the relationship of member to the flock.")

(instance subCollection BinaryPredicate)
(instance subCollection PartialOrderingRelation)
(domain subCollection 1 Collection)
(domain subCollection 2 Collection)
(documentation subCollection EnglishLanguage "(&%subCollection ?COLL1 ?COLL2) means that 
the &%Collection ?COLL1 is a proper part of the &%Collection ?COLL2.")
(subrelation subCollection part)

(<=>
  (subCollection ?COLL1 ?COLL2)
  (forall (?MEMBER)
    (=>
      (member ?MEMBER ?COLL1)
      (member ?MEMBER ?COLL2))))

(subclass ContentBearingPhysical Physical)
(documentation ContentBearingPhysical EnglishLanguage "Any &%Object or &%Process that
expresses content.  This covers &%Objects that contain a &%Proposition,
such as a book, as well as &%ManualSignLanguage, which may similarly
contain a &%Proposition.")

(=>
   (instance ?OBJ ContentBearingPhysical)
   (exists (?THING)
      (represents ?OBJ ?THING)))
      
(subclass ContentBearingProcess ContentBearingPhysical)

;; NS: add.  Missing!
(subclass ContentBearingProcess Process)

;; NS: cf.  Note that &%ManualHumanLanguage is not a subclass of
;; &%Process, despite the documentation statement below.
(documentation ContentBearingProcess EnglishLanguage "Any &%Process, for example 
&%ManualHumanLanguage, which may contain a &%Proposition.") 
                                                      
(subclass ContentBearingObject CorpuscularObject)
(subclass ContentBearingObject ContentBearingPhysical)
(relatedInternalConcept ContentBearingObject containsInformation)
(documentation ContentBearingObject EnglishLanguage "Any &%SelfConnectedObject that expresses 
content.  This content may be a &%Proposition, e.g. when the &%ContentBearingObject 
is a &%Sentence or &%Text, or it may be a representation of an abstract or 
physical object, as with an &%Icon, a &%Word or a &%Phrase.")

(subclass SymbolicString ContentBearingObject)
(documentation SymbolicString EnglishLanguage "The &%Class of alphanumeric sequences.")

(subclass Character SymbolicString)
(documentation Character EnglishLanguage "An element of an alphabet, a set of numerals, etc.  
Note that a &%Character may or may not be part of a &%Language.  &%Character 
is a subclass of &%SymbolicString, because every instance of &%Character is 
an alphanumeric sequence consisting of a single element.")

(=>
    (instance ?STRING SymbolicString)
    (exists (?PART)
        (and
            (part ?PART ?STRING)
            (instance ?PART Character)))) 

(instance containsInformation BinaryPredicate)
(instance containsInformation AsymmetricRelation)
(subrelation containsInformation represents)
(domain containsInformation 1 ContentBearingPhysical)
(domain containsInformation 2 Proposition)
(documentation containsInformation EnglishLanguage "A subrelation of &%represents.  This 
predicate relates a &%ContentBearingPhysical to the &%Proposition that is 
expressed by the &%ContentBearingPhysical. Examples include the relationships 
between a physical novel and its story and between a printed score and its 
musical content.")

(subclass Icon ContentBearingPhysical)
(documentation Icon EnglishLanguage "This is the subclass of &%ContentBearingPhysical 
which are not part of a &%Language and which have some sort of similarity 
with the &%Objects that they represent.  This &%Class would include symbolic 
roadway signs, representational art works, photographs, etc.")

(subclass MotionPicture Text)
(documentation MotionPicture EnglishLanguage "A &%ContentBearingObject which depicts motion 
(and which may have an audio or text component as well).  This &%Class covers 
films, videos, etc.")

(subclass LinguisticExpression ContentBearingPhysical)
(disjoint LinguisticExpression Icon)
(documentation LinguisticExpression EnglishLanguage "This is the subclass of 
&%ContentBearingPhysical which are language-related.  Note that this &%Class 
encompasses both &%Language and the the elements of &%Languages, 
e.g. &%Words.")

(subclass Language LinguisticExpression)
(disjointDecomposition Language AnimalLanguage HumanLanguage ComputerLanguage)
(documentation Language EnglishLanguage "A system of signs for expressing thought.  The 
system can be either natural or artificial, i.e. something that emerges 
gradually as a cultural artifact or something that is intentionally created 
by a person or group of people.")

(subclass AnimalLanguage Language)
(documentation AnimalLanguage EnglishLanguage "The &%subclass of &%Languages used by 
&%Animals other than &%Humans.")

(=>
   (and
      (instance ?LANG AnimalLanguage)
      (agent ?PROC ?AGENT)
      (instrument ?PROC ?LANG))
   (and
      (instance ?AGENT Animal)
      (not (instance ?AGENT Human))))

(subclass ArtificialLanguage Language)
(documentation ArtificialLanguage EnglishLanguage "The &%subclass of &%Languages that are 
designed by &%Humans.")

(subclass ComputerLanguage ArtificialLanguage)
(documentation ComputerLanguage EnglishLanguage "The class of &%Languages designed for 
and interpreted by a computer.")

(=>
   (and
      (instance ?LANG ComputerLanguage)
      (agent ?PROC ?AGENT)
      (instrument ?PROC ?LANG))
   (instance ?AGENT Machine))

(subclass HumanLanguage Language)
(partition HumanLanguage NaturalLanguage ConstructedLanguage)
(partition HumanLanguage SpokenHumanLanguage ManualHumanLanguage)
(documentation HumanLanguage EnglishLanguage "The &%subclass of &%Languages used by 
&%Humans.")

(=>
   (and
      (instance ?LANG HumanLanguage)
      (agent ?PROC ?AGENT)
      (instrument ?PROC ?LANG))
   (instance ?AGENT Human))

(subclass ConstructedLanguage HumanLanguage)
(subclass ConstructedLanguage ArtificialLanguage)
(documentation ConstructedLanguage EnglishLanguage "An &%ConstructedLanguage is a 
&%HumanLanguage that did not evolve spontaneously within a language
community, but rather had its core grammar and vocabulary invented by 
one or more language experts, often with an aim to produce a more 
grammatically regular language than any language that has evolved 
naturally.  This &%Class includes languages like Esperanto that were 
created to facilitate international communication")

(=>
   (instance ?LANG ConstructedLanguage)
   (exists (?PLAN)
      (and
         (instance ?PLAN Planning)
         (result ?PLAN ?LANG))))

(subclass NaturalLanguage HumanLanguage)
(documentation NaturalLanguage EnglishLanguage "The &%subclass of &%HumanLanguages which 
are not designed and which evolve from generation to generation.  This 
&%Class includes all of the national languages, e.g. English, Spanish, 
Japanese, etc.  Note that this class includes dialects of natural 
languages.")

(subclass ManualHumanLanguage HumanLanguage)
(documentation ManualHumanLanguage EnglishLanguage "A &%ManualHumanLanguage is a
&%HumanLanguage which has as its medium gestures and movement, such 
as the shape, position, and movement of the hands.")

(subclass SpokenHumanLanguage HumanLanguage)
(documentation SpokenHumanLanguage EnglishLanguage "A &%SpokenHumanLanguage is a
&%HumanLanguage which has as its medium the human voice. It can also 
berepresented visually through writing, although not all 
&%SpokenHumanLanguages have a codified written form.")

(instance EnglishLanguage NaturalLanguage)
(instance EnglishLanguage SpokenHumanLanguage)
(documentation EnglishLanguage EnglishLanguage "A Germanic language that incorporates many roots 
from the Romance languages.  It is the official language of the &%UnitedStates, 
the &%UnitedKingdom, and many other countries.")

(subclass Word LinguisticExpression)
(documentation Word EnglishLanguage "A term of a &%Language that represents a concept.")

(subclass Formula Sentence)
(documentation Formula EnglishLanguage "A syntactically well-formed formula in the 
SUO-KIF knowledge representation language.")

;; The following ground facts incorporate the 'Agent' hierarchy from the 
;; corresponding ontology on the Ontolingua server.  It also includes 
;; predicates defined in the ITBM-CNR ontology "Actors".

(subclass Agent Object)
(documentation Agent EnglishLanguage "Something or someone that can act on its own and 
produce changes in the world.")

(=>
  (instance ?AGENT Agent)
  (exists (?PROC)
    (capability ?PROC agent ?AGENT)))

(subclass SentientAgent Agent)

;; NS: delete.
;; (documentation SentientAgent EnglishLanguage "An &%Agent that has rights but may or may 
;; not have responsibilities and the ability to reason.  If the latter are 
;; present, then the &%Agent is also an instance of &%CognitiveAgent.  
;; Domesticated animals are an example of &%SentientAgents that are not 
;; also &%CognitiveAgents.")

;; NS: add.
(documentation SentientAgent EnglishLanguage "A &%SentientAgent is an
&%Agent that is capable of &%Perception and experiences some level of
consciousness (see &%ConsciousnessAttribute).  If the &%Agent is able
to reason at a comparatively high level (evinced by the ability to
learn, plan, and feel emotions), then it is also an instance of
&%CognitiveAgent.  A &%DomesticAnimal is a &%SentientAgent, but may or
may not be a &%CognitiveAgent, depending on the type of &%Animal.")

(subclass CognitiveAgent SentientAgent)

;; NS: delete.
;; (documentation CognitiveAgent EnglishLanguage "A &%SentientAgent with
;; responsibilities and the ability to reason, deliberate, make plans,
;; etc.  This is essentially the legal/ethical notion of a person.  Note
;; that, although &%Human is a subclass of &%CognitiveAgent, there may be
;; instances of &%CognitiveAgent which are not also instances of &%Human.
;; For example, chimpanzees, gorillas, dolphins, whales, and some
;; extraterrestrials
;; (if they exist) may be &%CognitiveAgents.")

;; NS: add.
(documentation CognitiveAgent EnglishLanguage "A &%CognitiveAgent is
an &%Agent that has the ability to reason, deliberate, make plans, and
experience emotions.  Although &%Human is a subclass of
&%CognitiveAgent, there may be instances of &%CognitiveAgent which are
not also instances of &%Human.  For example, &%Primates, dolphins,
whales, and some extraterrestrials (if they exist) might be considered &%CognitiveAgents.")

;; NS: new.  Since an Entity might or might not be considered a
;; LegalAgent for its entire existence, depending on the
;; circumstances, it might be better to represent &%LegalAgent as a
;; &%RelationalAttribute.

(subclass LegalAgent Agent)

;; NS: add.
(documentation LegalAgent EnglishLanguage "A &%LegalAgent is an
&%Agent that is allowed by law to to act and be treated as a legal
person for certain purposes, such as being a party to a lawsuit,
owning property, and entering into a contract.  Typically, a
&%LegalAgent is either an adult &%Human or some type of
&%Organization.  Depending on the prevailing legal system in a given
time and location, &%Humans in general, as well as other
&%CognitiveAgents, typically will have additional legal rights and
obligations beyond those accorded to &%LegalAgents.  See the Wikipedia
description of <a
href=http://en.wikipedia.org/wiki/Juristic_person>Juristic
person</a>.")

;; NS: add.
(<=>
  (holdsDuring ?TIME 
    (instance ?AGENT LegalAgent))
  (holdsDuring ?TIME 
    (or
      (capability LegalAction agent ?AGENT)
      (capability LegalAction patient ?AGENT))))

(instance leader BinaryPredicate)
(instance leader AsymmetricRelation)
(instance leader SingleValuedRelation)
(domain leader 1 Agent)
(domain leader 2 Human)
(documentation leader EnglishLanguage "(&%leader ?INSTITUTION ?PERSON)
means that the leader of ?INSTITUTION is ?PERSON.")

(=>
  (holdsDuring ?TIME (leader ?X ?Y))
  (holdsDuring ?TIME (attribute ?Y Living)))

(subclass Process Physical)
(documentation Process EnglishLanguage "The class of things that happen 
and have temporal parts or stages.  Examples include extended events 
like a football match or a race, actions like &%Pursuing and &%Reading, 
and biological processes. The formal definition is: anything that occurs in
time but is not an &%Object.  Note that a &%Process may have 
participants 'inside' it which are &%Objects, such as the players 
in a football match.  In a 4D ontology, a &%Process is something whose 
spatiotemporal extent is thought of as dividing into temporal stages 
roughly perpendicular to the time-axis.")

(subclass DualObjectProcess Process)
(documentation DualObjectProcess EnglishLanguage "Any &%Process that requires two, 
nonidentical &%patients.")

(=>
   (instance ?PROCESS DualObjectProcess)
   (exists (?OBJ1 ?OBJ2)
      (and
         (patient ?PROCESS ?OBJ1)
         (patient ?PROCESS ?OBJ2)
         (not (equal ?OBJ1 ?OBJ2)))))
    
(subclass SingleAgentProcess Process)
(documentation SingleAgentProcess EnglishLanguage "&%SingleAgentProcess 
is the &%Class of all &%Processes that require exactly one &%agent in order to occur.")
 
(=>
  (instance ?PROC SingleAgentProcess)
  (exists (?AGENT)
    (agent ?PROC ?AGENT)))
 
(=>
    (and
      (instance ?PROC SingleAgentProcess)
      (agent ?PROC ?AGENT_1)
      (agent ?PROC ?AGENT_2))
    (and
      (equal ?AGENT_1 ?AGENT_2)
      (not
        (exists (?AGENT_3)
          (and
            (agent ?PROC ?AGENT_3)
            (not
              (equal ?AGENT_3 ?AGENT_1)))))))

(subclass Abstract Entity)
(disjointDecomposition Abstract Quantity Attribute SetOrClass Relation Proposition)
(documentation Abstract EnglishLanguage "Properties or qualities as distinguished from any 
particular embodiment of the properties/qualities in a physical medium.  
Instances of Abstract can be said to exist in the same sense as mathematical 
objects such as sets and relations, but they cannot exist at a particular 
place and time without some physical encoding or embodiment.")

;; Something is Abstract just in case it has neither a spatial nor temporal 
;; location.

(=> 
   (instance ?ABS Abstract)
   (not 
      (exists (?POINT) 
         (or 
            (located ?ABS ?POINT)
            (time ?ABS ?POINT)))))

(subclass Quantity Abstract)
(documentation Quantity EnglishLanguage "Any specification of how many or how much of 
something there is.  Accordingly, there are two subclasses of &%Quantity:  
&%Number (how many) and &%PhysicalQuantity (how much).")

(subclass Attribute Abstract)
;(partition Attribute InternalAttribute RelationalAttribute PerceptualAttribute)
(partition Attribute InternalAttribute RelationalAttribute)
(documentation Attribute EnglishLanguage "Qualities which we cannot or choose not to 
reify into subclasses of &%Object.")

(instance property BinaryPredicate)
(domain property 1 Entity)
(domain property 2 Attribute)
(documentation property EnglishLanguage "This &%Predicate holds between an instance of 
&%Entity and an instance of &%Attribute.  (&%property ?ENTITY ?ATTR) 
means that ?ENTITY has the &%Attribute ?ATTR.")

(instance attribute AsymmetricRelation)
(instance attribute IrreflexiveRelation)
(subrelation attribute property)
(domain attribute 1 Object)
(documentation attribute EnglishLanguage "(&%attribute ?OBJECT ?PROPERTY) means that 
?PROPERTY is a &%Attribute of ?OBJECT.  For example, 
(&%attribute &%MyLittleRedWagon &%Red).")

(instance manner AsymmetricRelation)
(instance manner IrreflexiveRelation)
(subrelation manner property)
(domain manner 1 Process)
(disjointRelation manner attribute)
(documentation manner EnglishLanguage "(&%manner ?PROCESS ?MANNER) means that the 
&%Process ?PROCESS is qualified by the &%Attribute ?MANNER.  The &%Attributes 
of &%Processes are usually denoted by adverbs and include things like the 
speed of the wind, the style of a dance, or the intensity of a sports 
competition.")

; Seldom used function that appears to cause a very complex contradiction

; (instance AbstractionFn UnaryFunction)
; (instance AbstractionFn PartialValuedRelation)
; (domain AbstractionFn 1 Class)
; (range AbstractionFn Attribute)
; (documentation AbstractionFn EnglishLanguage "A &%UnaryFunction that maps a &%Class into 
; the instance of &%Attribute that specifies the condition(s) for membership 
; in the &%Class.")

; (<=>
;   (equal (AbstractionFn ?CLASS) ?ATTR)
;    (forall (?INST)
;       (<=>
;          (instance ?INST ?CLASS)
;          (property ?INST ?ATTR))))

(instance ExtensionFn UnaryFunction)
(instance ExtensionFn PartialValuedRelation)
(domain ExtensionFn 1 Attribute)
(range ExtensionFn Class)
(documentation ExtensionFn EnglishLanguage "A &%UnaryFunction that maps an &%Attribute 
into the &%Class whose condition for membership is the &%Attribute.")

; (<=>
;    (equal (ExtensionFn ?ATTRIBUTE) ?CLASS)
;    (equal (AbstractionFn ?CLASS) ?ATTRIBUTE))

(subclass InternalAttribute Attribute)
(documentation InternalAttribute EnglishLanguage "Any &%Attribute of an &%Entity that is an 
internal property of the &%Entity, e.g. its shape, its color, its fragility, 
etc.")

(documentation PhysicalAttribute EnglishLanguage "An &%InternalAttribute given by physical
properties of the object.")
(subclass PhysicalAttribute InternalAttribute)

(subclass RelationalAttribute Attribute)
(documentation RelationalAttribute EnglishLanguage "Any &%Attribute that an &%Entity has by 
virtue of a relationship that it bears to another &%Entity or set of &%Entities, 
e.g. &%SocialRoles and &%PositionalAttributes.") 

;; The following formulas incorporate the Number hierarchy from the 
;; ontology 'kif-numbers' on the Ontolingua server.

(subclass Number Quantity)
(partition Number RealNumber ImaginaryNumber ComplexNumber)
(documentation Number EnglishLanguage "A measure of how many things there are, or how
much there is, of a certain kind.  &%Numbers are subclassed into 
&%RealNumber, &%ComplexNumber, and &%ImaginaryNumber.")

(instance lessThan BinaryPredicate)
(instance lessThan TransitiveRelation)
(instance lessThan IrreflexiveRelation)
(instance lessThan RelationExtendedToQuantities)
(trichotomizingOn lessThan RealNumber)
(domain lessThan 1 Quantity)
(domain lessThan 2 Quantity)
(documentation lessThan EnglishLanguage "(&%lessThan ?NUMBER1 ?NUMBER2) is true just 
in case the &%Quantity ?NUMBER1 is less than the &%Quantity ?NUMBER2.")

(instance greaterThan BinaryPredicate)
(instance greaterThan TransitiveRelation)
(instance greaterThan IrreflexiveRelation)
(instance greaterThan RelationExtendedToQuantities)
(trichotomizingOn greaterThan RealNumber)
(domain greaterThan 1 Quantity)
(domain greaterThan 2 Quantity)
(inverse greaterThan lessThan)
(documentation greaterThan EnglishLanguage "(&%greaterThan ?NUMBER1 ?NUMBER2) is true 
just in case the &%Quantity ?NUMBER1 is greater than the &%Quantity 
?NUMBER2.")

(instance lessThanOrEqualTo BinaryPredicate)
(instance lessThanOrEqualTo PartialOrderingRelation)
(instance lessThanOrEqualTo RelationExtendedToQuantities)
(trichotomizingOn lessThanOrEqualTo RealNumber)
(domain lessThanOrEqualTo 1 Quantity)
(domain lessThanOrEqualTo 2 Quantity)
(documentation lessThanOrEqualTo EnglishLanguage "(&%lessThanOrEqualTo ?NUMBER1 ?NUMBER2) 
is true just in case the &%Quantity ?NUMBER1 is less than or equal to 
the &%Quantity ?NUMBER2.")

(<=>
  (lessThanOrEqualTo ?NUMBER1 ?NUMBER2)
  (or
    (equal ?NUMBER1 ?NUMBER2)
    (lessThan ?NUMBER1 ?NUMBER2)))

(instance greaterThanOrEqualTo BinaryPredicate)
(instance greaterThanOrEqualTo PartialOrderingRelation)
(instance greaterThanOrEqualTo RelationExtendedToQuantities)
(trichotomizingOn greaterThanOrEqualTo RealNumber)
(domain greaterThanOrEqualTo 1 Quantity)
(domain greaterThanOrEqualTo 2 Quantity)
(inverse greaterThanOrEqualTo lessThanOrEqualTo)
(documentation greaterThanOrEqualTo EnglishLanguage "(&%greaterThanOrEqualTo ?NUMBER1 
?NUMBER2) is true just in case the &%Quantity ?NUMBER1 is greater 
than the &%Quantity ?NUMBER2.")

(<=>
  (greaterThanOrEqualTo ?NUMBER1 ?NUMBER2)
  (or
    (equal ?NUMBER1 ?NUMBER2)
    (greaterThan ?NUMBER1 ?NUMBER2)))

(subclass RealNumber Number)
(partition RealNumber NegativeRealNumber NonnegativeRealNumber)
(partition RealNumber RationalNumber IrrationalNumber)
(documentation RealNumber EnglishLanguage "Any &%Number that can be expressed as a 
(possibly infinite) decimal, i.e. any &%Number that has a position 
on the number line.")

(subclass ImaginaryNumber Number) 
(documentation ImaginaryNumber EnglishLanguage "Any &%Number that is the result of 
multiplying a &%RealNumber by the square root of -1.")

(=>
   (instance ?NUMBER ImaginaryNumber)
   (exists (?REAL)
      (and
         (instance ?REAL RealNumber)
         (equal ?NUMBER (MultiplicationFn ?REAL (SquareRootFn -1))))))

(subclass RationalNumber RealNumber)
(documentation RationalNumber EnglishLanguage "Any &%RealNumber that is the product of 
dividing two &%Integers.")

(subclass IrrationalNumber RealNumber)
(documentation IrrationalNumber EnglishLanguage "Any &%RealNumber that is not also a 
&%RationalNumber.")

(subclass NonnegativeRealNumber RealNumber)
(documentation NonnegativeRealNumber EnglishLanguage "A &%RealNumber that is greater than 
or equal to zero.")

(<=>
   (instance ?NUMBER NonnegativeRealNumber)
   (and
      (greaterThanOrEqualTo ?NUMBER 0)
      (instance ?NUMBER RealNumber)))

(subclass PositiveRealNumber NonnegativeRealNumber)
(documentation PositiveRealNumber EnglishLanguage "A &%RealNumber that is greater than 
zero.")

(<=>
   (instance ?NUMBER PositiveRealNumber)
   (and
      (greaterThan ?NUMBER 0)
      (instance ?NUMBER RealNumber)))

(subclass NegativeRealNumber RealNumber)
(documentation NegativeRealNumber EnglishLanguage "A &%RealNumber that is less than 
zero.")

(<=>
   (instance ?NUMBER NegativeRealNumber)
   (and
      (lessThan ?NUMBER 0)
      (instance ?NUMBER RealNumber)))

(subclass Integer RationalNumber)
(partition Integer OddInteger EvenInteger)
(partition Integer NegativeInteger NonnegativeInteger)
(documentation Integer EnglishLanguage "A negative or nonnegative whole number.")

(subclass EvenInteger Integer)
(documentation EvenInteger EnglishLanguage "An &%Integer that is evenly divisible 
by 2.")

(subclass OddInteger Integer)
(documentation OddInteger EnglishLanguage "An &%Integer that is not evenly divisible 
by 2.")

(subclass PrimeNumber Integer)
(documentation PrimeNumber EnglishLanguage "An &%Integer that is evenly divisible only 
by itself and 1.")

(subclass NonnegativeInteger Integer)
(subclass NonnegativeInteger NonnegativeRealNumber)
(documentation NonnegativeInteger EnglishLanguage "An &%Integer that is greater than 
or equal to zero.")
(=>
  (instance ?X NonnegativeInteger)
  (greaterThan ?X -1))

(subclass NegativeInteger Integer)
(subclass NegativeInteger NegativeRealNumber)
(documentation NegativeInteger EnglishLanguage "An &%Integer that is less than zero.")
(=>
  (instance ?X NegativeInteger)
  (greaterThan 0 ?X))

(subclass PositiveInteger NonnegativeInteger)
(subclass PositiveInteger PositiveRealNumber)
(documentation PositiveInteger EnglishLanguage "An &%Integer that is greater than zero.")
(=>
  (instance ?X PositiveInteger)
  (greaterThan ?X 0))

(subclass BinaryNumber RealNumber)
(documentation BinaryNumber EnglishLanguage "Elements from the number system with base 2.  
Every &%BinaryNumber is expressed as a sequence of the digits 1 and 0.")

(subclass ComplexNumber Number)
(disjoint ComplexNumber RealNumber)
(documentation ComplexNumber EnglishLanguage "A &%Number that has the form: x + yi, where x 
and y are &%RealNumbers and i is the square root of -1.")

(=>
   (instance ?NUMBER ComplexNumber)
   (exists (?REAL1 ?REAL2)
      (and
         (instance ?REAL1 RealNumber)
         (instance ?REAL2 RealNumber)
         (equal ?NUMBER 
           (AdditionFn ?REAL1 
             (MultiplicationFn ?REAL2 
               (SquareRootFn -1)))))))

(subclass PhysicalQuantity Quantity)
(partition PhysicalQuantity ConstantQuantity FunctionQuantity)
(documentation PhysicalQuantity EnglishLanguage "A &%PhysicalQuantity is a measure of 
some quantifiable aspect of the modeled world, such as 'the earth's 
diameter' (a constant length) and 'the stress in a loaded deformable 
solid' (a measure of stress, which is a function of three spatial 
coordinates).  Every &%PhysicalQuantity is either a &%ConstantQuantity
or &%FunctionQuantity.  Instances of &%ConstantQuantity are dependent 
on a &%UnitOfMeasure, while instances of &%FunctionQuantity are 
&%Functions that map instances of &%ConstantQuantity to other instances 
of &%ConstantQuantity (e.g., a &%TimeDependentQuantity is a
&%FunctionQuantity).  Although the name and definition of 
&%PhysicalQuantity is borrowed from physics, a &%PhysicalQuantity need 
not be material.  Aside from the dimensions of length, time, velocity, 
etc., nonphysical dimensions such as currency are also possible.  
Accordingly, amounts of money would be instances of &%PhysicalQuantity.  
A &%PhysicalQuantity is  distinguished from a pure &%Number by the fact that 
the former is associated with a dimension of measurement.")

(subclass ConstantQuantity PhysicalQuantity)
(documentation ConstantQuantity EnglishLanguage "A &%ConstantQuantity
is a &%PhysicalQuantity that has a constant value, e.g. 3 &%Meters and
5 &%HourDurations.  The magnitude (see &%MagnitudeFn) of every
&%ConstantQuantity is a &%RealNumber.  &%ConstantQuantity is
distinguished from &%FunctionQuantity, in that each instance of the
latter is formed through the mapping of one &%PhysicalQuantity to
another &%PhysicalQuantity.  Each instance of &%ConstantQuantity is
expressed with the &%BinaryFunction &%MeasureFn, which takes a
&%Number and a &%UnitOfMeasure as arguments.  For example, 3 &%Meters
is expressed as (&%MeasureFn 3 &%Meter).  Instances of
&%ConstantQuantity form a partial order (see
&%PartialOrderingRelation) with the &%lessThan relation, since
&%lessThan is a &%RelationExtendedToQuantities and &%lessThan is
defined over the &%RealNumbers.  The &%lessThan relation is not a
total order (see &%TotalOrderingRelation) over the class
&%ConstantQuantity since elements of some subclasses of
&%ConstantQuantity (such as length quantities) are incomparable to
elements of other subclasses of &%ConstantQuantity
(such as mass quantities).")

(subclass TimeMeasure ConstantQuantity)
(documentation TimeMeasure EnglishLanguage "The class of temporal durations (instances 
of &%TimeDuration) and positions of &%TimePoints and &%TimeIntervals along 
the universal timeline (instances of &%TimePosition).")

(subclass TimeDuration TimeMeasure)
(documentation TimeDuration EnglishLanguage "Any measure of length of time, 
with or without respect to the universal timeline.")

(subclass TimePosition TimeMeasure)
(partition TimePosition TimeInterval TimePoint)
(documentation TimePosition EnglishLanguage "Any &%TimePoint or &%TimeInterval 
along the universal timeline from &%NegativeInfinity to 
&%PositiveInfinity.")

(subclass TimeInterval TimePosition)
(documentation TimeInterval EnglishLanguage "An interval of time.
Note that a &%TimeInterval has both an extent and a location on the
universal timeline.  Note too that a &%TimeInterval has no gaps,
i.e. this class contains only convex time intervals.")

(subclass TimePoint TimePosition)
(documentation TimePoint EnglishLanguage "An extensionless point on
the universal timeline.  The &%TimePoints at which &%Processes occur
can be known with various degrees of precision and approximation, but
conceptually &%TimePoints are point-like and not interval-like.  That
is, it doesn't make sense to talk about how long a &%TimePoint
lasts.")

(subclass FunctionQuantity PhysicalQuantity)
(documentation FunctionQuantity EnglishLanguage "A &%FunctionQuantity
is a &%PhysicalQuantity that is returned by a &%Function that maps
from one or more instances of &%ConstantQuantity to another instance
of &%ConstantQuantity.  For example, the velocity of a particle would
be represented by a &%FunctionQuantity relating values of time (which
are instances of &%ConstantQuantity) to values of distance
(also instances of &%ConstantQuantity).  Note that all elements of the
range of the &%Function corresponding to a &%FunctionQuantity have the
same physical dimension as the &%FunctionQuantity itself.")

(subclass UnaryConstantFunctionQuantity FunctionQuantity)
(documentation UnaryConstantFunctionQuantity EnglishLanguage "A
&%subclass of &%FunctionQuantity, instances of which are returned by
&%UnaryFunctions that map from one instance of the &%Class
&%ConstantQuantity to another instance of the &%Class
&%ConstantQuantity.")

(subclass TimeDependentQuantity UnaryConstantFunctionQuantity)
(documentation TimeDependentQuantity EnglishLanguage "A
&%UnaryConstantFunctionQuantity of continuous time.  All instances of
this &%Class are returned by &%Functions that map a time quantity into
another &%ConstantQuantity such as temperature.  For example, 'the
temperature at the top of the Empire State Building' is a
&%TimeDependentQuantity, since its value depends on the time.")

(subclass SetOrClass Abstract)
(partition SetOrClass Set Class)
(documentation SetOrClass EnglishLanguage "The &%SetOrClass of &%Sets
and &%Classes, i.e. any instance of &%Abstract that has &%elements or
&%instances.")

;; comment it out to avoid (instance SetOrClass SetOrClass) 
;(subclass Class SetOrClass)
(documentation Class EnglishLanguage "&%Classes differ from &%Sets in three important respects.  
First, &%Classes are not assumed to be extensional.  That is, distinct 
&%Classes might well have exactly the same instances.  Second, &%Classes typically 
have an associated `condition' that determines the instances of the &%Class.  So, 
for example, the condition `human' determines the &%Class of &%Humans.  Note that 
some &%Classes might satisfy their own condition (e.g., the &%Class of &%Abstract 
things is &%Abstract) and hence be instances of themselves.  Third, the instances 
of a class may occur only once within the class, i.e. a class cannot contain 
duplicate instances.")

(subclass Set SetOrClass)
(documentation Set EnglishLanguage "A &%SetOrClass that satisfies extensionality as well as
other constraints specified by some choice of set theory.  &%Sets differ 
from &%Classes in two important respects.  First, &%Sets are extensional - 
two &%Sets with the same &%elements are identical.  Second, a &%Set can be 
an arbitrary stock of objects.  That is, there is no requirement that &%Sets 
have an associated condition that determines their membership.  Note that &%Sets 
are not assumed to be unique sets, i.e. &%elements of a &%Set may occur more 
than once in the &%Set.")

(subclass Relation Abstract)
(disjointDecomposition Relation BinaryRelation TernaryRelation QuaternaryRelation QuintaryRelation VariableArityRelation)
(partition Relation Predicate Function List)
(partition Relation TotalValuedRelation PartialValuedRelation)
(documentation Relation EnglishLanguage "The &%Class of relations.  There are three kinds 
of &%Relation:  &%Predicate, &%Function, and &%List.  &%Predicates and 
&%Functions both denote sets of ordered n-tuples.  The difference between 
these two &%Classes is that &%Predicates cover formula-forming operators, while 
&%Functions cover term-forming operators.  A &%List, on the other hand, is a 
particular ordered n-tuple.")

;; The following part of the ontology covers the various classes under 
;; 'Relation'.  Most of the content here is taken from frame-ontology, 
;; abstract-algebra, kif-relations, and kif-extensions (ontologies 
;; available on the Ontolingua server).

(subclass SingleValuedRelation Relation)
(subclass SingleValuedRelation InheritableRelation)
(documentation SingleValuedRelation EnglishLanguage "A &%Relation is a &%SingleValuedRelation 
just in case an assignment of values to every argument position except the last 
one determines at most one assignment for the last argument position.  Note 
that not all &%SingleValuedRelations are &%TotalValuedRelations.")

;; TODO: this appears to be a syntax error when call replacePredVar in sigma's code
;(=>
;   (instance ?REL SingleValuedRelation)
;   (forall (@ROW ?ITEM1 ?ITEM2)
;      (=>
;         (and
;            (?REL @ROW ?ITEM1)
;            (?REL @ROW ?ITEM2))
;         (equal ?ITEM1 ?ITEM2))))

(subclass TotalValuedRelation Relation)
(subclass TotalValuedRelation InheritableRelation)
(documentation TotalValuedRelation EnglishLanguage "A &%Relation is a &%TotalValuedRelation 
just in case there exists an assignment for the last argument position of the 
&%Relation given any assignment of values to every argument position except 
the last one.  Note that declaring a &%Relation to be both a &%TotalValuedRelation 
and a &%SingleValuedRelation means that it is a total function.")

(<=>
   (and
     (instance ?REL TotalValuedRelation)
     (instance ?REL Predicate))
   (exists (?VALENCE)
      (and
         (instance ?REL Relation)
         (valence ?REL ?VALENCE)
         (=>
            (forall (?NUMBER ?ELEMENT ?CLASS)
               (=>
                  (and
                     (lessThan ?NUMBER ?VALENCE)
                     (domain ?REL ?NUMBER ?CLASS)
                     (equal ?ELEMENT (ListOrderFn (ListFn @ROW) ?NUMBER)))
                  (instance ?ELEMENT ?CLASS)))
            (exists (?ITEM)
               (?REL @ROW ?ITEM))))))

(subclass PartialValuedRelation Relation)
(documentation PartialValuedRelation EnglishLanguage "A &%Relation is a &%PartialValuedRelation 
just in case it is not a &%TotalValuedRelation, i.e. just in case assigning values 
to every argument position except the last one does not necessarily mean that there 
is a value assignment for the last argument position.  Note that, if a &%Relation 
is both a &%PartialValuedRelation and a &%SingleValuedRelation, then it is a partial 
function.")

(subclass BinaryRelation Relation)
(subclass BinaryRelation InheritableRelation)
(documentation BinaryRelation EnglishLanguage "&%BinaryRelations are relations that are 
true only of pairs of things.  &%BinaryRelations are represented as slots 
in frame systems.")

(subclass ReflexiveRelation BinaryRelation)
(documentation ReflexiveRelation EnglishLanguage "&%Relation ?REL is reflexive iff 
(?REL ?INST ?INST) for all ?INST.")

;; appear to be a contradiction when ?REL = subclass
;;(<=>
;;   (instance ?REL ReflexiveRelation)
;;   (?REL ?INST ?INST))

(subclass IrreflexiveRelation BinaryRelation)
(documentation IrreflexiveRelation EnglishLanguage "&%Relation ?REL is irreflexive 
iff (?REL ?INST ?INST) holds for no value of ?INST.")

(=>
   (instance ?REL IrreflexiveRelation)
   (forall (?INST)
      (not 
         (?REL ?INST ?INST))))

(subclass SymmetricRelation BinaryRelation)
(disjoint SymmetricRelation AntisymmetricRelation)
(documentation SymmetricRelation EnglishLanguage "A &%BinaryRelation ?REL is
symmetric just iff (?REL ?INST1 ?INST2) imples (?REL 
?INST2 ?INST1), for all ?INST1 and ?INST2.")

(=>
   (instance ?REL SymmetricRelation)
   (forall (?INST1 ?INST2)
      (=>
         (?REL ?INST1 ?INST2)
         (?REL ?INST2 ?INST1))))

(subclass AsymmetricRelation IrreflexiveRelation)
(subclass AsymmetricRelation AntisymmetricRelation)
(documentation AsymmetricRelation EnglishLanguage "A &%BinaryRelation is asymmetric if and only 
if it is both an &%AntisymmetricRelation and an &%IrreflexiveRelation.")

(<=>
   (instance ?REL AsymmetricRelation)
   (and
       (instance ?REL AntisymmetricRelation)
       (instance ?REL IrreflexiveRelation)))

(subclass AntisymmetricRelation BinaryRelation)
(documentation AntisymmetricRelation EnglishLanguage "&%BinaryRelation ?REL is an 
&%AntisymmetricRelation if for distinct ?INST1 and ?INST2, (?REL ?INST1 
?INST2) implies not (?REL ?INST2 ?INST1).  In other words, for all ?INST1 
and ?INST2, (?REL ?INST1 ?INST2) and (?REL ?INST2 ?INST1) imply that ?INST1 
and ?INST2 are identical.  Note that it is possible for an 
&%AntisymmetricRelation to be a &%ReflexiveRelation.")

(=>
   (instance ?REL AntisymmetricRelation)
   (forall (?INST1 ?INST2)
      (=>
         (and
            (?REL ?INST1 ?INST2)
            (?REL ?INST2 ?INST1))
         (equal ?INST1 ?INST2))))

(subclass TrichotomizingRelation BinaryRelation)
(documentation TrichotomizingRelation EnglishLanguage "A &%BinaryRelation ?REL is a 
&%TrichotomizingRelation just in case all ordered pairs consisting of 
distinct individuals are elements of ?REL.") 

(=>
   (instance ?REL TrichotomizingRelation)
   (forall (?INST1 ?INST2)
      (or
         (and
            (?REL ?INST1 ?INST2)
            (not (equal ?INST1 ?INST2))
            (not (?REL ?INST2 ?INST1)))
         (and
            (not (?REL ?INST1 ?INST2))
            (equal ?INST1 ?INST2)
            (not (?REL ?INST2 ?INST1)))
         (and
            (not (?REL ?INST1 ?INST2))
            (not (equal ?INST1 ?INST2))
            (?REL ?INST2 ?INST1)))))

(subclass TransitiveRelation BinaryRelation)
(disjoint TransitiveRelation IntransitiveRelation)
(documentation TransitiveRelation EnglishLanguage "A &%BinaryRelation ?REL is transitive 
if (?REL ?INST1 ?INST2) and (?REL ?INST2 ?INST3) imply (?REL ?INST1 ?INST3), 
for all ?INST1, ?INST2, and ?INST3.")

(=>
   (instance ?REL TransitiveRelation)
   (forall (?INST1 ?INST2 ?INST3)
      (=>
         (and
            (?REL ?INST1 ?INST2)
            (?REL ?INST2 ?INST3))
         (?REL ?INST1 ?INST3))))

(subclass IntransitiveRelation BinaryRelation)
(documentation IntransitiveRelation EnglishLanguage "A &%BinaryRelation ?REL is 
intransitive only if (?REL ?INST1 ?INST2) and (?REL ?INST2 ?INST3) imply not 
(?REL ?INST1 ?INST3), for all ?INST1, ?INST2, and ?INST3.")

(=> 
   (instance ?REL IntransitiveRelation)
   (forall (?INST1 ?INST2 ?INST3)
      (=> 
         (and 
            (?REL ?INST1 ?INST2)
            (?REL ?INST2 ?INST3))
         (not 
            (?REL ?INST1 ?INST3)))))

(subclass PartialOrderingRelation TransitiveRelation)
(subclass PartialOrderingRelation AntisymmetricRelation)
(subclass PartialOrderingRelation ReflexiveRelation)
(documentation PartialOrderingRelation EnglishLanguage "A &%BinaryRelation is a partial 
ordering if it is a &%ReflexiveRelation, an &%AntisymmetricRelation, and 
a &%TransitiveRelation.")

(subclass TotalOrderingRelation PartialOrderingRelation)
(subclass TotalOrderingRelation TrichotomizingRelation)
(documentation TotalOrderingRelation EnglishLanguage  "A &%BinaryRelation is a 
&%TotalOrderingRelation if it is a &%PartialOrderingRelation 
and a &%TrichotomizingRelation.")

(=>
   (instance ?REL TotalOrderingRelation)
   (forall (?INST1 ?INST2)
      (and
         (or
            (?REL ?INST1 ?INST2)
            (?REL ?INST2 ?INST1))
         (or
            (not (?REL ?INST1 ?INST2))
            (not (?REL ?INST2 ?INST1))))))

(subclass EquivalenceRelation TransitiveRelation)
(subclass EquivalenceRelation SymmetricRelation)
(subclass EquivalenceRelation ReflexiveRelation)
(documentation EquivalenceRelation EnglishLanguage "A &%BinaryRelation is an equivalence 
relation if it is a &%ReflexiveRelation, a &%SymmetricRelation, and a 
&%TransitiveRelation.")

(subclass CaseRole BinaryPredicate)
(subclass CaseRole InheritableRelation)
(subclass CaseRole AsymmetricRelation)
(documentation CaseRole EnglishLanguage "The &%Class of &%Predicates relating the 
spatially distinguished parts of a &%Process. &%CaseRoles include, for 
example, the &%agent, &%patient or &%destination of an action, the flammable 
substance in a burning process, or the water that falls in rain.")

(documentation involvedInEvent EnglishLanguage "(involvedInEvent ?EVENT ?THING) means 
that in the &%Process ?EVENT, the &%Entity ?THING plays some &%CaseRole.")
(instance involvedInEvent BinaryPredicate)
(instance involvedInEvent AsymmetricRelation)
(domain involvedInEvent 1 Process)
(domain involvedInEvent 2 Entity)

; AP - this axiom below seems questionable, what about relations we just haven't 
; "discovered" yet.
;(=>
;  (involvedInEvent ?E ?T)
;  (exists (?R)
;    (and
;      (instance ?R CaseRole)
;      (subrelation ?R involvedInEvent)
;      (?R ?E ?T))))

(=>
  (instance ?R CaseRole)
  (subrelation ?R involvedInEvent))

(instance agent CaseRole)
(domain agent 1 Process)
(domain agent 2 Agent)
(subrelation agent involvedInEvent)
(documentation agent EnglishLanguage "(&%agent ?PROCESS ?AGENT) means that ?AGENT is 
an active determinant, either animate or inanimate, of the &%Process 
?PROCESS, with or without voluntary intention.  For example, Eve is an 
&%agent in the following proposition: Eve bit an apple.")

(instance destination CaseRole)
(domain destination 1 Process)
(domain destination 2 Entity)
(subrelation destination involvedInEvent)
(documentation destination EnglishLanguage "(destination ?PROCESS ?GOAL) means that 
?GOAL is the target or goal of the Process ?PROCESS.  For example, 
Danbury would be the destination in the following proposition:  Bob went 
to Danbury.  Note that this is a very general &%CaseRole and, in 
particular, that it covers the concepts of 'recipient' and 'beneficiary'.  
Thus, John would be the &%destination in the following proposition:  
Tom gave a book to John.")

(instance experiencer CaseRole)
(domain experiencer 1 Process)
(domain experiencer 2 Agent)
(subrelation experiencer involvedInEvent)
(documentation experiencer EnglishLanguage "(&%experiencer ?PROCESS ?AGENT) means 
that ?AGENT experiences the &%Process ?PROCESS.  For example, Yojo 
is the &%experiencer of seeing in the following proposition:  Yojo 
sees the fish.  Note that &%experiencer, unlike &%agent, does 
not entail a causal relation between its arguments.")

(subrelation instrument patient)
(instance instrument CaseRole)
(domain instrument 1 Process)
(domain instrument 2 Object)
(documentation instrument EnglishLanguage "(instrument ?EVENT ?TOOL) means that ?TOOL 
is used by an agent in bringing about ?EVENT and that ?TOOL is not 
changed by ?EVENT.  For example, the key is an &%instrument in the 
following proposition: The key opened the door.  Note that &%instrument 
and &%resource cannot be satisfied by the same ordered pair.")

(instance origin CaseRole)
(domain origin 1 Process)
(domain origin 2 Object)
(subrelation origin involvedInEvent)
(documentation origin EnglishLanguage "(&%origin ?PROCESS ?SOURCE) means that ?SOURCE 
indicates where the ?Process began.  Note that this relation implies 
that ?SOURCE is present at the beginning of the process, but need not 
participate throughout the process.  For example, the submarine is the 
&%origin in the following proposition: the missile was launched from a 
submarine.")

(instance patient CaseRole)
(domain patient 1 Process)
(domain patient 2 Entity)
(subrelation patient involvedInEvent)
(documentation patient EnglishLanguage "(&%patient ?PROCESS ?ENTITY) means that ?ENTITY 
is a participant in ?PROCESS that may be moved, said, experienced, etc.  
For example, the direct objects in the sentences 'The cat swallowed the 
canary' and 'Billy likes the beer' would be examples of &%patients.  Note 
that the &%patient of a &%Process may or may not undergo structural 
change as a result of the &%Process.  The &%CaseRole of &%patient is used 
when one wants to specify as broadly as possible the object of a 
&%Process.")

(subrelation resource patient)
(instance resource CaseRole)
(domain resource 1 Process)
(domain resource 2 Object)
(disjointRelation resource result)
(disjointRelation resource instrument)
(disjointRelation result instrument)
(documentation resource EnglishLanguage "(&%resource ?PROCESS ?RESOURCE) means that 
?RESOURCE is present at the beginning of ?PROCESS, is used by ?PROCESS, 
and as a consequence is changed by ?PROCESS.  For example, soap is a 
&%resource in the following proposition:  the gun was carved out of soap.  
Note that &%resource differs from &%instrument, another subrelation of 
&%patient, in that its internal or physical properties are altered in 
some way by the &%Process.")

(documentation resourceExhausted EnglishLanguage "(&%resourceExhausted ?PROCESS ?RESOURCE) means that ?RESOURCE is present at the beginning of ?PROCESS, is used by ?PROCESS, and as a consequence is completely used up by the ?PROCESS. For example, fuel is a resource in the following proposition: the plane run out of fuel and ditched in the sea.")

(domain resourceExhausted 1 Process)
(domain resourceExhausted 2 Object)
(instance resourceExhausted CaseRole)
(instance resourceExhausted AsymmetricRelation)
(instance resourceExhausted BinaryPredicate)

(=>
    (and
        (resourceExhausted ?P ?R)
        (instance ?R ?C))
    (holdsDuring (ImmediateFutureFn (WhenFn ?P))
        (not
            (exists (?OBJ1)
                (and
                    (part ?OBJ1 ?R)
                    (instance ?OBJ1 ?C))))))

(subrelation result patient)
(instance result CaseRole)
(domain result 1 Process)
(domain result 2 Entity)
(documentation result EnglishLanguage "(result ?ACTION ?OUTPUT) means that ?OUTPUT is 
a product of ?ACTION.  For example, house is a &%result in the 
following proposition: Eric built a house.")

(subclass InheritableRelation Relation)
(documentation InheritableRelation EnglishLanguage "The class of &%Relations whose 
properties can be inherited downward in the class hierarchy via the 
&%subrelation &%Predicate.")

(subclass ProbabilityRelation Relation)
(subclass ProbabilityRelation InheritableRelation)
(documentation ProbabilityRelation EnglishLanguage "The &%Class of &%Relations that 
permit assessment of the probability of an event or situation.")

(instance ProbabilityFn ProbabilityRelation)
(instance ProbabilityFn TotalValuedRelation)
(instance ProbabilityFn UnaryFunction)
(domain ProbabilityFn 1 Formula)
(range ProbabilityFn RealNumber)
(instance ProbabilityFn AsymmetricRelation)
(documentation ProbabilityFn EnglishLanguage "One of the basic &%ProbabilityRelations, 
&%ProbabilityFn is used to state the a priori probability of a state of 
affairs.  (&%ProbabilityFn ?FORMULA) denotes the a priori probability 
of ?FORMULA.")

(instance conditionalProbability ProbabilityRelation)
(instance conditionalProbability TernaryPredicate)
(domain conditionalProbability 1 Formula)
(domain conditionalProbability 2 Formula)
(domain conditionalProbability 3 RealNumber)
(documentation conditionalProbability EnglishLanguage "One of the basic &%ProbabilityRelations.  
&%conditionalProbability is used to state the numeric value of a conditional 
probability.  (&%conditionalProbability ?FORMULA1 ?FORMULA2 ?NUMBER) means 
that the probability of ?FORMULA2 being true given that ?FORMULA1 is true is 
?NUMBER.") 

(instance increasesLikelihood ProbabilityRelation)
(instance increasesLikelihood BinaryPredicate)
(instance increasesLikelihood IrreflexiveRelation)
(domain increasesLikelihood 1 Formula)
(domain increasesLikelihood 2 Formula)
(disjointRelation increasesLikelihood decreasesLikelihood)
(disjointRelation increasesLikelihood independentProbability)
(disjointRelation decreasesLikelihood independentProbability)
(documentation increasesLikelihood EnglishLanguage "One of the basic &%ProbabilityRelations.  
(&%increasesLikelihood ?FORMULA1 ?FORMULA2) means that ?FORMULA2 is more 
likely to be true if ?FORMULA1 is true.")

(=>
   (and
      (increasesLikelihood ?FORMULA1 ?FORMULA2)
      (equal (ProbabilityFn ?FORMULA2) ?NUMBER1)
      (conditionalProbability ?FORMULA1 ?FORMULA2 ?NUMBER2))
   (greaterThan ?NUMBER2 ?NUMBER1))

(instance decreasesLikelihood ProbabilityRelation)
(instance decreasesLikelihood BinaryPredicate)
(instance decreasesLikelihood IrreflexiveRelation)
(domain decreasesLikelihood 1 Formula)
(domain decreasesLikelihood 2 Formula)
(documentation decreasesLikelihood EnglishLanguage "One of the basic &%ProbabilityRelations.  
(&%decreasesLikelihood ?FORMULA1 ?FORMULA2) means that ?FORMULA2 is less 
likely to be true if ?FORMULA1 is true.")

(=>
   (and
      (decreasesLikelihood ?FORMULA1 ?FORMULA2)
      (equal (ProbabilityFn ?FORMULA2) ?NUMBER1)
      (conditionalProbability ?FORMULA1 ?FORMULA2 ?NUMBER2))
   (lessThan ?NUMBER2 ?NUMBER1))

(instance independentProbability ProbabilityRelation)
(instance independentProbability BinaryPredicate)
(instance independentProbability SymmetricRelation)
(domain independentProbability 1 Formula)
(domain independentProbability 2 Formula)
(documentation independentProbability EnglishLanguage "One of the basic &%ProbabilityRelations.  
(&%independentProbability ?FORMULA1 ?FORMULA2) means that the probabilities of 
?FORMULA1 and ?FORMULA2 being true are independent.") 

(=>
   (and
      (independentProbability ?FORMULA1 ?FORMULA2)
      (equal (ProbabilityFn ?FORMULA2) ?NUMBER1)
      (conditionalProbability ?FORMULA1 ?FORMULA2 ?NUMBER2))
   (equal ?NUMBER2 ?NUMBER1))

(=>
   (and
      (instance ?FORMULA1 Formula)
      (instance ?FORMULA2 Formula))
   (or
      (increasesLikelihood ?FORMULA1 ?FORMULA2)
      (decreasesLikelihood ?FORMULA1 ?FORMULA2)
      (independentProbability ?FORMULA1 ?FORMULA2)))

(subclass SpatialRelation Relation)
(subclass SpatialRelation InheritableRelation)
(documentation SpatialRelation EnglishLanguage "The &%Class of &%Relations that are 
spatial in a wide sense.  This &%Class includes mereological relations 
and topological relations.")

(subclass TemporalRelation Relation)
(subclass TemporalRelation InheritableRelation)
(documentation TemporalRelation EnglishLanguage "The &%Class of temporal &%Relations.  
This &%Class includes notions of (temporal) topology of intervals, 
(temporal) schemata, and (temporal) extension.")

(subclass IntentionalRelation InheritableRelation)
(subclass IntentionalRelation Relation)
(documentation IntentionalRelation EnglishLanguage "The &%Class of &%Relations between 
an &%Agent and one or more &%Entities, where the &%Relation requires that 
the &%Agent have awareness of the &%Entity.")

(=>
   (and
      (instance ?REL IntentionalRelation)
      (?REL ?AGENT @ROW)
      (inList ?OBJ (ListFn @ROW)))
   (inScopeOfInterest ?AGENT ?OBJ))

(instance prefers TernaryPredicate)
(instance prefers IntentionalRelation)
(domain prefers 1 CognitiveAgent)
(domain prefers 2 Formula)
(domain prefers 3 Formula)
(documentation prefers EnglishLanguage "(&%prefers ?AGENT ?FORMULA1 ?FORMULA2) means that 
&%CognitiveAgent ?AGENT prefers the state of affairs expressed by ?FORMULA1
over the state of affairs expressed by ?FORMULA2 all things being equal.") 

(subclass PropositionalAttitude IntentionalRelation)
(subclass PropositionalAttitude AsymmetricRelation)
(subclass PropositionalAttitude InheritableRelation)
(documentation PropositionalAttitude EnglishLanguage "The &%Class of 
&%IntentionalRelations where the &%Agent has awareness of a 
&%Proposition.")

(=>
   (and
      (instance ?REL PropositionalAttitude)
      (?REL ?AGENT ?FORMULA))
   (instance ?FORMULA Formula))

(subclass ObjectAttitude IntentionalRelation)
(subclass ObjectAttitude InheritableRelation)
(disjoint ObjectAttitude PropositionalAttitude)
(documentation ObjectAttitude EnglishLanguage "The &%Class of &%IntentionalRelations 
where the &%Agent has awareness of an instance of &%Physical.")

(=>
   (and
      (instance ?REL ObjectAttitude)
      (?REL ?AGENT ?THING))
   (instance ?THING Physical))

(instance inScopeOfInterest BinaryPredicate)
(instance inScopeOfInterest IntentionalRelation)
(domain inScopeOfInterest 1 CognitiveAgent)
(domain inScopeOfInterest 2 Entity)
(documentation inScopeOfInterest EnglishLanguage "A very general &%Predicate.  
(&%inScopeOfInterest ?AGENT ?ENTITY) means that ?ENTITY is within the 
scope of interest of ?AGENT.  Note that the interest indicated can be 
either positive or negative, i.e. the ?AGENT can have an interest in 
avoiding or promoting ?ENTITY.")

(<=>
   (exists (?PROCESS)
      (and
         (instance ?PROCESS IntentionalProcess)
         (agent ?PROCESS ?AGENT)
         (instance ?AGENT CognitiveAgent)
         (patient ?PROCESS ?OBJECT)))
   (inScopeOfInterest ?AGENT ?OBJECT))

(instance needs ObjectAttitude)
(instance needs BinaryPredicate)
(subrelation needs inScopeOfInterest)
(domain needs 1 CognitiveAgent)
(domain needs 2 Physical)
(documentation needs EnglishLanguage "(&%needs ?AGENT ?OBJECT) means that ?OBJECT is 
physically required for the continued existence of ?AGENT.")

(=>
    (needs ?AGENT ?OBJECT)
    (wants ?AGENT ?OBJECT))

(instance wants ObjectAttitude)
(instance wants BinaryPredicate)
(subrelation wants inScopeOfInterest)
(relatedInternalConcept wants desires)
(domain wants 1 CognitiveAgent)
(domain wants 2 Physical)
(documentation wants EnglishLanguage "(&%wants ?AGENT ?OBJECT) means that ?OBJECT is desired by ?AGENT, 
i.e. ?AGENT believes that ?OBJECT will satisfy one of its goals.  Note that there is 
no implication that what is wanted by an agent is not already possessed by the agent.")

(=>
   (wants ?AGENT ?OBJ)
   (exists (?PURP)
      (hasPurposeForAgent ?OBJ ?PURP ?AGENT)))

(=>
  (and
    (wants ?AGENT ?OBJ)
    (instance ?OBJ Object))
  (desires ?AGENT
    (possesses ?AGENT ?OBJ)))

(instance desires PropositionalAttitude)
(instance desires BinaryPredicate)
(subrelation desires inScopeOfInterest)
(relatedInternalConcept desires wants)
(domain desires 1 CognitiveAgent)
(domain desires 2 Formula)
(documentation desires EnglishLanguage "(&%desires ?AGENT ?FORMULA) means that ?AGENT wants 
to bring about the state of affairs expressed by ?FORMULA.  Note that there 
is no implication that what is desired by the agent is not already true.  
Note too that &%desires is distinguished from &%wants only in that the former 
is a &%PropositionalAttitude, while &%wants is an &%ObjectAttitude.")

(instance considers PropositionalAttitude)
(instance considers BinaryPredicate)
(subrelation considers inScopeOfInterest)
(domain considers 1 CognitiveAgent)
(domain considers 2 Formula)
(documentation considers EnglishLanguage "(&%considers ?AGENT ?FORMULA) means that ?AGENT 
considers or wonders about the truth of the proposition expressed by 
?FORMULA.") 

(instance believes PropositionalAttitude)
(instance believes BinaryPredicate)
(subrelation believes inScopeOfInterest)
(domain believes 1 CognitiveAgent)
(domain believes 2 Formula)
(documentation believes EnglishLanguage "The epistemic predicate of belief.  
(&%believes ?AGENT ?FORMULA) means that ?AGENT believes the proposition 
expressed by ?FORMULA.")

(=>
   (believes ?AGENT ?FORMULA)
   (exists (?TIME)
      (holdsDuring ?TIME (considers ?AGENT ?FORMULA))))

(instance knows PropositionalAttitude)
(instance knows BinaryPredicate)
(subrelation knows inScopeOfInterest)
(domain knows 1 CognitiveAgent)
(domain knows 2 Formula)
(documentation knows EnglishLanguage "The epistemic predicate of knowing.  (&%knows 
?AGENT ?FORMULA) means that ?AGENT knows the proposition expressed by 
?FORMULA.  Note that &%knows entails conscious awareness, so this 
&%Predicate cannot be used to express tacit or subconscious or 
unconscious knowledge.")

(=>
  (knows ?AGENT ?FORMULA)
  (believes ?AGENT ?FORMULA))

(=>
  (knows ?AGENT ?FORMULA)
  (truth ?FORMULA True))

(subclass TernaryRelation Relation)
(subclass TernaryRelation InheritableRelation)
(documentation TernaryRelation EnglishLanguage "&%TernaryRelations relate three items.  
The two &%subclasses of &%TernaryRelation are &%TernaryPredicate and 
&%BinaryFunction.")

(subclass QuaternaryRelation Relation)
(subclass QuaternaryRelation InheritableRelation)
(documentation QuaternaryRelation EnglishLanguage "&%QuaternaryRelations relate four 
items.  The two &%subclasses of &%QuaternaryRelation are 
&%QuaternaryPredicate and &%TernaryFunction.")

(subclass QuintaryRelation Relation)
(subclass QuintaryRelation InheritableRelation)
(documentation QuintaryRelation EnglishLanguage "&%QuintaryRelations relate five items.  
The two &%subclasses of &%QuintaryRelation are &%QuintaryPredicate and 
&%QuaternaryFunction.")

(subclass List Relation)
(documentation List EnglishLanguage "Every &%List is a particular ordered n-tuple of 
items.  Generally speaking, &%Lists are created by means of the &%ListFn 
&%Function, which takes any number of items as arguments and returns a 
&%List with the items in the same order.  Anything, including other 
&%Lists, may be an item in a &%List.  Note too that &%Lists are 
extensional - two lists that have the same items in the same order are 
identical.  Note too that a &%List may contain no items.  In that case, 
the &%List is the &%NullList.")

;(=>
;  (and 
;    (instance ?LIST List)
;    (not 
;      (instance ?LIST NullList)))
;  (exists (?NUMBER1 ?ITEM1)
;    (and
;      (not 
;        (equal (ListOrderFn ?LIST ?NUMBER1) ?ITEM1))
;      (forall (?NUMBER2)
;        (=>
;          (and
;            (instance ?NUMBER2 PositiveInteger)
;            (lessThan ?NUMBER2 ?NUMBER1))
;          (exists (?ITEM2)
;            (equal (ListOrderFn ?LIST ?NUMBER2) ?ITEM2)))))))

(subclass UniqueList List)
(documentation UniqueList EnglishLanguage "A &%List in which no item appears more than once, 
i.e. a &%List for which there are no distinct numbers ?NUMBER1 and ?NUMBER2 
such that (&%ListOrderFn ?LIST ?NUMBER1) and (&%ListOrderFn ?LIST ?NUMBER2) 
return the same value.")

(=>
   (instance ?LIST UniqueList)
   (forall (?NUMBER1 ?NUMBER2)
      (=>
         (equal (ListOrderFn ?LIST ?NUMBER1) (ListOrderFn ?LIST ?NUMBER2))
         (equal ?NUMBER1 ?NUMBER2)))) 

(instance NullList List)
(documentation NullList EnglishLanguage "The &%List that has no items.  The uniqueness of 
&%NullList follows from the extensionality of &%Lists, i.e. the fact that 
two &%Lists with the same items in the same order are identical.")

;(<=>
;   (equal ?LIST NullList)
;   (and
;      (instance ?LIST List)
;      (not 
;         (exists (?ITEM)
;            (inList ?ITEM ?LIST)))))

(instance ListFn Function)
(instance ListFn VariableArityRelation) 
;; (instance ListFn TotalValuedRelation) - appears to be a contradiction with VariableArityRelation
(range ListFn List)
(documentation ListFn EnglishLanguage "A &%Function that takes any number of arguments and 
returns the &%List containing those arguments in exactly the same order.")

(=>
   (exhaustiveDecomposition ?CLASS @ROW)
   (forall (?OBJ)
      (=>
         (instance ?OBJ ?CLASS)
         (exists (?ITEM)
            (and
               (inList ?ITEM (ListFn @ROW))
               (instance ?OBJ ?ITEM))))))

(=>
   (disjointDecomposition ?CLASS @ROW)
   (forall (?ITEM)
      (=>
         (inList ?ITEM (ListFn @ROW))
         (subclass ?ITEM ?CLASS))))

(=>
   (disjointDecomposition ?CLASS @ROW)
   (forall (?ITEM1 ?ITEM2)
      (=>
         (and
            (inList ?ITEM1 (ListFn @ROW))
            (inList ?ITEM2 (ListFn @ROW))
            (not
               (equal ?ITEM1 ?ITEM2)))
         (disjoint ?ITEM1 ?ITEM2))))

(<=>
  (disjointDecomposition ?CLASS ?ROW1 ?ROW2 ?ROW3)
  (and
    (disjoint ?ROW1 ?ROW2)
    (disjoint ?ROW2 ?ROW3)
    (disjoint ?ROW3 ?ROW1)))

(instance ListOrderFn BinaryFunction)
(instance ListOrderFn PartialValuedRelation)
(domain ListOrderFn 1 List)
(domain ListOrderFn 2 PositiveInteger)
(range ListOrderFn Entity)
(documentation ListOrderFn EnglishLanguage "(&%ListOrderFn ?LIST ?NUMBER) denotes the item 
that is in the ?NUMBER position in the &%List ?LIST.  For example, 
(&%ListOrderFn (&%ListFn &%Monday &%Tuesday &%Wednesday) 2) would return the 
value &%Tuesday.")

;(=>
;   (and
;      (instance ?LIST1 List)
;      (not 
;        (equal ?LIST1 NullList))
;      (not 
;        (equal ?LIST2 NullList))
;      (instance ?LIST2 List)
;      (forall (?NUMBER)
;         (equal (ListOrderFn ?LIST1 ?NUMBER) (ListOrderFn ?LIST2 ?NUMBER))))
;   (equal ?LIST1 ?LIST2))

(=>
   (and
      (domain ?REL ?NUMBER ?CLASS)
      (instance ?REL Predicate)
      (?REL @ROW))
   (instance (ListOrderFn (ListFn @ROW) ?NUMBER) ?CLASS))

(=>
   (and
      (domainSubclass ?REL ?NUMBER ?CLASS)
      (instance ?REL Predicate)
      (?REL @ROW))
   (subclass (ListOrderFn (ListFn @ROW) ?NUMBER) ?CLASS))

(instance ListLengthFn UnaryFunction)
(instance ListLengthFn TotalValuedRelation)
(domain ListLengthFn 1 List)
(range ListLengthFn NonnegativeInteger)
(documentation ListLengthFn EnglishLanguage "A &%Function that takes a &%List as its sole 
argument and returns the number of items in the &%List.  For example, 
(&%ListLengthFn (&%ListFn &%Monday &%Tuesday &%Wednesday)) would return the 
value 3.")

;(=>
;   (and
;      (equal (ListLengthFn ?LIST) ?NUMBER1)
;      (instance ?LIST List)
;      (not 
;        (equal ?LIST NullList))
 ;     (instance ?NUMBER1 PositiveInteger))
;   (forall (?NUMBER2)
;      (<=>
;         (exists (?ITEM)
;            (and
;               (equal (ListOrderFn ?LIST ?NUMBER2) ?ITEM)
;               (inList ?ITEM ?LIST)))
;         (lessThanOrEqualTo ?NUMBER2 ?NUMBER1))))

(forall (@ROW ?ITEM)
  (equal 
    (ListLengthFn (ListFn @ROW ?ITEM)) 
    (SuccessorFn (ListLengthFn (ListFn @ROW)))))

(forall (@ROW ?ITEM)
  (equal 
    (ListOrderFn 
      (ListFn @ROW ?ITEM) 
      (ListLengthFn (ListFn @ROW ?ITEM))) ?ITEM))

(=>
   (and
     (valence ?REL ?NUMBER)
     (instance ?REL Predicate))
   (forall (@ROW)
      (=>
         (?REL @ROW)
         (equal (ListLengthFn (ListFn @ROW)) ?NUMBER))))

;(=>
;   (and
;      (equal (ListLengthFn ?LIST1) ?NUMBER)
;      (instance ?LIST List)
;      (not 
;        (equal ?LIST NullList))
;      (instance ?NUMBER1 PositiveInteger))
;   (exists (?LIST2 ?ITEM)
;      (and
;         (initialList ?LIST1 ?LIST2)
;         (equal (SuccessorFn ?NUMBER) (ListLengthFn ?LIST2))
;         (equal (ListOrderFn ?LIST2 (SuccessorFn ?NUMBER)) ?ITEM))))

(instance ListConcatenateFn BinaryFunction)
(instance ListConcatenateFn TotalValuedRelation)
(domain ListConcatenateFn 1 List)
(domain ListConcatenateFn 2 List)
(range ListConcatenateFn List)
(documentation ListConcatenateFn EnglishLanguage "A &%Function that returns the concatenation 
of the two &%Lists that are given as arguments.  For example, the value of 
(&%ListConcatenateFn (&%ListFn &%Monday &%Tuesday) (&%ListFn &%Wednesday 
&%Thursday)) would be (&%ListFn &%Monday &%Tuesday &%Wednesday &%Thursday).")

; removed to solve an obscure contradiction, but needs to be reexamined
;
;(<=>
;   (and 
;     (equal ?LIST3 (ListConcatenateFn ?LIST1 ?LIST2))
;     (not 
;       (equal ?LIST1 NullList))
;     (not 
;       (equal ?LIST2 NullList)))
;   (forall (?NUMBER1 ?NUMBER2)
;      (=>
;         (and
;            (lessThanOrEqualTo ?NUMBER1 (ListLengthFn ?LIST1))
;            (lessThanOrEqualTo ?NUMBER2 (ListLengthFn ?LIST2))
;            (instance ?NUMBER1 PositiveInteger)
;            (instance ?NUMBER2 PositiveInteger))
;         (and
;            (equal (ListOrderFn ?LIST3 ?NUMBER1) (ListOrderFn ?LIST1 ?NUMBER1))
;            (equal (ListOrderFn ?LIST3 (AdditionFn (ListLengthFn ?LIST1) ?NUMBER2)) (ListOrderFn ?LIST2 ?NUMBER2))))))

(instance inList BinaryPredicate)
(instance inList IrreflexiveRelation)
(instance inList AsymmetricRelation)
(domain inList 1 Entity)
(domain inList 2 List)
(documentation inList EnglishLanguage "The analog of &%element and &%instance for &%Lists.  
(&%inList ?OBJ ?LIST) means that ?OBJ is in the &%List ?LIST.  For example, 
(&%inList &%Tuesday (&%ListFn &%Monday &%Tuesday &%Wednesday)) would be true.")

(=>
   (inList ?ITEM ?LIST)
   (exists (?NUMBER)
      (equal (ListOrderFn ?LIST ?NUMBER) ?ITEM)))

(instance subList BinaryPredicate)
(instance subList PartialOrderingRelation)
(domain subList 1 List)
(domain subList 2 List)
(documentation subList EnglishLanguage "(&%subList ?LIST1 ?LIST2) means that ?LIST1 is a 
sublist of ?LIST2, i.e. every element of ?LIST1 is an element of ?LIST2 and 
the elements that are common to both &%Lists have the same order in both 
&%Lists.  Elements that are common to both Lists and are consecutive in one 
list must also be consecutive in the other list. (Therefore - the list of 
prime numbers smaller than 10 [1 2 3 5 7] is not a subList of the 
natural numbers smaller than 10 [1 2 3 4 5 6 7 8 9]).")

;(=>
;   (and
;     (subList ?LIST1 ?LIST2)
;     (not 
;       (equal ?LIST1 NullList))
;     (not 
;       (equal ?LIST2 NullList)))
;   (forall (?ITEM)
;      (=>
;         (inList ?ITEM ?LIST1)
;         (inList ?ITEM ?LIST2))))

;(=>
;   (and
;     (subList ?LIST1 ?LIST2)
;     (not 
;       (equal ?LIST1 NullList))
;     (not 
;       (equal ?LIST2 NullList)))
;   (exists (?NUMBER3)
;      (forall (?ITEM)
;         (=>
;            (inList ?ITEM ?LIST1)
;            (exists (?NUMBER1 ?NUMBER2)
;               (and
;                  (equal (ListOrderFn ?LIST1 ?NUMBER1) ?ITEM)
;                  (equal (ListOrderFn ?LIST2 ?NUMBER2) ?ITEM)
;                  (equal ?NUMBER2 (AdditionFn ?NUMBER1 ?NUMBER3))))))))

(instance initialList BinaryPredicate)
(instance initialList PartialOrderingRelation)
(subrelation initialList subList)
(documentation initialList EnglishLanguage "(&%initialList ?LIST1 ?LIST2) means that ?LIST1 
is a &%subList of ?LIST2 and (&%ListOrderFn ?LIST1 ?NUMBER) returns the same 
value as (&%ListOrderFn ?LIST2 ?NUMBER) for all of the values of ?NUMBER over 
which (&%ListOrderFn ?LIST1 ?NUMBER) is defined.")

;(=>
;   (and 
;     (initialList ?LIST1 ?LIST2) 
;     (not 
;       (equal ?LIST1 NullList))
;     (not 
;       (equal ?LIST2 NullList)))
;   (forall (?NUMBER1 ?NUMBER2)
;      (=>
;         (and
;            (equal (ListLengthFn ?LIST1) ?NUMBER1)
;            (lessThanOrEqualTo ?NUMBER2 ?NUMBER1)) 
;         (equal (ListOrderFn ?LIST1 ?NUMBER2) (ListOrderFn ?LIST2 ?NUMBER2)))))

(forall (@ROW ?ITEM)
  (initialList (ListFn @ROW) (ListFn @ROW ?ITEM)))

(instance identicalListItems BinaryPredicate)
(instance identicalListItems EquivalenceRelation)
(domain identicalListItems 1 List)
(domain identicalListItems 2 List)

(documentation identicalListItems EnglishLanguage "(&%identicalListItems ?LIST1 ?LIST2) 
means that ?LIST1 and ?LIST2 have exactly the same items in their 
respective lists.  Although ?LIST1 and ?LIST2 are required to share 
exactly the same items, they may order these items differently.") 

;(=>
;   (and 
;     (identicalListItems ?LIST1 ?LIST2)
;     (not 
;       (equal ?LIST1 NullList))
;     (not 
;       (equal ?LIST2 NullList)))
;   (<=>
;      (inList ?ITEM ?LIST1)
;      (inList ?ITEM ?LIST2)))

(subclass Predicate Relation)
(subclass Predicate InheritableRelation)
(documentation Predicate EnglishLanguage "A &%Predicate is a sentence-forming &%Relation.  
Each tuple in the &%Relation is a finite, ordered sequence of objects.  
The fact that a particular tuple is an element of a &%Predicate is denoted 
by '(*predicate* arg_1 arg_2 .. arg_n)', where the arg_i are the 
objects so related.  In the case of &%BinaryPredicates, the fact can
be read as `arg_1 is *predicate* arg_2' or `a *predicate* of
arg_1 is arg_2'.")

(subclass Function SingleValuedRelation)
(subclass Function InheritableRelation)
(documentation Function EnglishLanguage "A &%Function is a term-forming &%Relation that 
maps from a n-tuple of arguments to a range and that associates this 
n-tuple with at most one range element.  Note that the range is a &%SetOrClass, 
and each element of the range is an instance of the &%SetOrClass.")

(subclass UnaryFunction Function)
(subclass UnaryFunction BinaryRelation)
(subclass UnaryFunction InheritableRelation)
(documentation UnaryFunction EnglishLanguage "The &%Class of &%Functions that require a 
single argument.")

(=>
   (instance ?FUNCTION UnaryFunction)
   (valence ?FUNCTION 1))

(subclass OneToOneFunction UnaryFunction)
(documentation OneToOneFunction EnglishLanguage "The &%Class of &%UnaryFunctions which 
are one to one.  A function F is one to one just in case for all X, Y in the 
domain of F, if X is not identical to Y, then F(X) is not identical to F(Y).")

(=> 
   (instance ?FUN OneToOneFunction) 
   (forall (?ARG1 ?ARG2) 
      (=> 
         (and 
            (domain ?FUN 1 ?CLASS)
            (instance ?ARG1 ?CLASS)
            (instance ?ARG2 ?CLASS)
            (not (equal ?ARG1 ?ARG2))) 
         (not (equal (AssignmentFn ?FUN ?ARG1) (AssignmentFn ?FUN ?ARG2))))))

(subclass SequenceFunction OneToOneFunction)
(documentation SequenceFunction EnglishLanguage "The &%Class of &%OneToOneFunctions whose range 
is a subclass of the &%PositiveIntegers.")

(=> 
   (and
      (instance ?SEQ SequenceFunction) 
      (range ?SEQ ?CLASS))
   (subclass ?CLASS Integer))

(subclass BinaryFunction Function)
(subclass BinaryFunction TernaryRelation)
(subclass BinaryFunction InheritableRelation)
(documentation BinaryFunction EnglishLanguage "The &%Class of &%Functions that require 
two arguments.")

(=>
  (instance ?FUNCTION BinaryFunction)
  (valence ?FUNCTION 2))

(subclass AssociativeFunction BinaryFunction)
(documentation AssociativeFunction EnglishLanguage "A &%BinaryFunction is associative if 
bracketing has no effect on the value returned by the &%Function.  More 
precisely, a &%Function ?FUNCTION is associative just in case 
(?FUNCTION ?INST1 (?FUNCTION ?INST2 ?INST3)) is equal to 
(?FUNCTION (?FUNCTION ?INST1 ?INST2) ?INST3), for all ?INST1, ?INST2, 
and ?INST3.")

(=>
   (instance ?FUNCTION AssociativeFunction)
   (forall (?INST1 ?INST2 ?INST3)
      (=>
         (and
            (domain ?FUNCTION 1 ?CLASS)
            (instance ?INST1 ?CLASS)
            (instance ?INST2 ?CLASS)
            (instance ?INST3 ?CLASS))
         (equal (AssignmentFn ?FUNCTION ?INST1 (AssignmentFn ?FUNCTION ?INST2 ?INST3))
             (AssignmentFn ?FUNCTION (AssignmentFn ?FUNCTION ?INST1 ?INST2) ?INST3)))))

(subclass CommutativeFunction BinaryFunction)
(documentation CommutativeFunction EnglishLanguage "A &%BinaryFunction is commutative if 
the ordering of the arguments of the function has no effect on the value 
returned by the function.  More precisely, a function ?FUNCTION is 
commutative just in case (?FUNCTION ?INST1 ?INST2) is equal to (?FUNCTION 
?INST2 ?INST1), for all ?INST1 and ?INST2.")

(=>
   (instance ?FUNCTION CommutativeFunction)
   (forall (?INST1 ?INST2)
      (=>
         (and
            (domain ?FUNCTION 1 ?CLASS)
            (instance ?INST1 ?CLASS)
            (instance ?INST2 ?CLASS))
         (equal (AssignmentFn ?FUNCTION ?INST1 ?INST2) 
                (AssignmentFn ?FUNCTION ?INST2 ?INST1)))))

(subclass TernaryFunction Function)
(subclass TernaryFunction QuaternaryRelation)
(subclass TernaryFunction InheritableRelation)
(documentation TernaryFunction EnglishLanguage "The &%Class of &%Functions that require 
exactly three arguments.")

(=>
  (instance ?FUNCTION TernaryFunction)
  (valence ?FUNCTION 3))

(subclass QuaternaryFunction Function)
(subclass QuaternaryFunction QuintaryRelation)
(subclass QuaternaryFunction InheritableRelation)
(documentation QuaternaryFunction EnglishLanguage "The &%Class of &%Functions that require 
exactly four arguments.")

(=>
  (instance ?FUNCTION QuaternaryFunction)
  (valence ?FUNCTION 4))

(subclass ContinuousFunction Function)
(documentation ContinuousFunction EnglishLanguage "&%Functions which are continuous.  
This concept is taken as primitive until representations for limits 
are devised.")

(subclass BinaryPredicate Predicate)
(subclass BinaryPredicate BinaryRelation)
(subclass BinaryPredicate InheritableRelation)
(documentation BinaryPredicate EnglishLanguage "A &%Predicate relating two items - its 
valence is two.")

(=>
  (instance ?REL BinaryPredicate)
  (valence ?REL 2))

(subclass TernaryPredicate Predicate)
(subclass TernaryPredicate TernaryRelation)
(subclass TernaryPredicate InheritableRelation)
(documentation TernaryPredicate EnglishLanguage "The &%Class of &%Predicates that require 
exactly three arguments.")

(=>
  (instance ?REL TernaryPredicate)
  (valence ?REL 3))

(subclass QuaternaryPredicate Predicate)
(subclass QuaternaryPredicate QuaternaryRelation)
(subclass QuaternaryPredicate InheritableRelation)
(documentation QuaternaryPredicate EnglishLanguage "The &%Class of &%Predicates that 
require four arguments.")

(=>
  (instance ?REL QuaternaryPredicate)
  (valence ?REL 4))

(subclass QuintaryPredicate Predicate)
(subclass QuintaryPredicate QuintaryRelation)
(subclass QuintaryPredicate InheritableRelation)
(documentation QuintaryPredicate EnglishLanguage "The &%Class of &%Predicates that 
require five arguments.")

(=>
  (instance ?REL QuintaryPredicate)
  (valence ?REL 5))

(subclass VariableArityRelation Relation)
(documentation VariableArityRelation EnglishLanguage "The &%Class of &%Relations that 
do not have a fixed number of arguments.")

(=>
  (instance ?REL VariableArityRelation)
  (not
    (exists (?INT)
    (valence ?REL ?INT))))

(subclass RelationExtendedToQuantities Relation)
(subclass RelationExtendedToQuantities InheritableRelation)
(documentation RelationExtendedToQuantities EnglishLanguage "A 
&%RelationExtendedToQuantities is a &%Relation that, when it is true on 
a sequence of arguments that are &%RealNumbers, it is also true on a 
sequence of instances of &%ConstantQuantity with those magnitudes in some unit of 
measure.  For example, the &%lessThan relation is extended to quantities.  
This means that for all pairs of quantities ?QUANTITY1 and ?QUANTITY2, 
(&%lessThan ?QUANTITY1 ?QUANTITY2) if and only if, for some ?NUMBER1, 
?NUMBER2, and ?UNIT, ?QUANTITY1 = (&%MeasureFn ?NUMBER1 ?UNIT), 
?QUANTITY2 = (&%MeasureFn ?NUMBER2 ?UNIT), and (&%lessThan ?NUMBER1 ?NUMBER2), 
for all units ?UNIT on which ?QUANTITY1 and ?QUANTITY2 can be measured.  
Note that, when a &%RelationExtendedToQuantities is extended from 
&%RealNumbers to instances of &%ConstantQuantity, the &%ConstantQuantity must be 
measured along the same physical dimension.")

(subclass LogicalOperator Predicate)
(documentation LogicalOperator EnglishLanguage "This &%Class comprises all 
of the logical operators (viz. 'and', 'or', 'not', '=>', and '<=>').")

(subclass Proposition Abstract)
(documentation Proposition EnglishLanguage "&%Propositions are &%Abstract entities that 
express a complete thought or a set of such thoughts.  As an example, 
the formula '(instance Yojo Cat)' expresses the &%Proposition that the 
entity named Yojo is an element of the &%Class of Cats.  Note that 
propositions are not restricted to the content expressed by individual 
sentences of a &%Language.  They may encompass the content expressed by 
theories, books, and even whole libraries.  It is important to distinguish 
&%Propositions from the &%ContentBearingObjects that express them.  A 
&%Proposition is a piece of information, e.g. that the cat is on the mat, 
but a &%ContentBearingObject is an &%Object that represents this information.  
A &%Proposition is an abstraction that may have multiple representations: 
strings, sounds, icons, etc.  For example, the &%Proposition that the cat is 
on the mat is represented here as a string of graphical characters displayed 
on a monitor and/or printed on paper, but it can be represented by a sequence 
of sounds or by some non-latin alphabet or by some cryptographic form")

(instance closedOn BinaryPredicate)
(instance closedOn AsymmetricRelation)
(domain closedOn 1 Function)
(domain closedOn 2 SetOrClass)
(documentation closedOn EnglishLanguage "A &%BinaryFunction is closed on a &%SetOrClass 
if it is defined for all instances of the &%SetOrClass and its value is 
always an instance of the &%SetOrClass.")

(=>
   (and
      (closedOn ?FUNCTION ?CLASS)
      (instance ?FUNCTION UnaryFunction))
   (forall (?INST)
      (=> 
         (instance ?INST ?CLASS) 
         (instance (AssignmentFn ?FUNCTION ?INST) ?CLASS))))

(=>
   (and
      (closedOn ?FUNCTION ?CLASS)
      (instance ?FUNCTION BinaryFunction))
   (forall (?INST1 ?INST2)
      (=> 
         (and 
            (instance ?INST1 ?CLASS) 
            (instance ?INST2 ?CLASS))
         (instance (AssignmentFn ?FUNCTION ?INST1 ?INST2) ?CLASS))))

(instance reflexiveOn BinaryPredicate)
(instance reflexiveOn AsymmetricRelation)
(domain reflexiveOn 1 BinaryRelation)
(domain reflexiveOn 2 SetOrClass)
(documentation reflexiveOn EnglishLanguage "A &%BinaryRelation is reflexive on a 
&%SetOrClass only if every instance of the &%SetOrClass bears the relation 
to itself.")

(=> 
   (and
     (reflexiveOn ?RELATION ?CLASS)
     (instance ?RELATION Predicate))
   (forall (?INST)
      (=> 
         (instance ?INST ?CLASS)
         (?RELATION ?INST ?INST))))

(instance irreflexiveOn BinaryPredicate)
(instance irreflexiveOn AsymmetricRelation)
(domain irreflexiveOn 1 BinaryRelation)
(domain irreflexiveOn 2 SetOrClass)
(documentation irreflexiveOn EnglishLanguage "A &%BinaryRelation is irreflexive on a 
&%SetOrClass only if no instance of the &%SetOrClass bears the relation to 
itself.")

(=> 
   (and
     (irreflexiveOn ?RELATION ?CLASS)
     (instance ?RELATION Predicate))
   (forall (?INST)
      (=> 
         (instance ?INST ?CLASS)
         (not 
            (?RELATION ?INST ?INST)))))

(instance partialOrderingOn BinaryPredicate)
(instance partialOrderingOn AsymmetricRelation)
(domain partialOrderingOn 1 BinaryRelation)
(domain partialOrderingOn 2 SetOrClass)
(documentation partialOrderingOn EnglishLanguage "A &%BinaryRelation is a partial 
ordering on a &%SetOrClass only if the relation is &%reflexiveOn the 
&%SetOrClass, and it is both an &%AntisymmetricRelation, and a 
&%TransitiveRelation.")

(=> 
   (partialOrderingOn ?RELATION ?CLASS)
   (and 
      (reflexiveOn ?RELATION ?CLASS)
      (instance ?RELATION TransitiveRelation)
      (instance ?RELATION AntisymmetricRelation)))

(instance totalOrderingOn BinaryPredicate)
(instance totalOrderingOn AsymmetricRelation)
(domain totalOrderingOn 1 BinaryRelation)
(domain totalOrderingOn 2 SetOrClass)
(documentation totalOrderingOn EnglishLanguage "A &%BinaryRelation ?REL is a total 
ordering on a &%SetOrClass only if it is a partial ordering for which either 
(?REL ?INST1 ?INST2) or (?REL ?INST2 ?INST1) for every ?INST1 and ?INST2 
in the &%SetOrClass.")

(<=> 
     (totalOrderingOn ?RELATION ?CLASS)
     (and 
          (partialOrderingOn ?RELATION ?CLASS)
          (trichotomizingOn ?RELATION ?CLASS)))

(instance trichotomizingOn BinaryPredicate)
(instance trichotomizingOn AsymmetricRelation)
(domain trichotomizingOn 1 BinaryRelation)
(domain trichotomizingOn 2 SetOrClass)
(documentation trichotomizingOn EnglishLanguage "A &%BinaryRelation ?REL is 
trichotomizing on a &%SetOrClass only if, for all instances ?INST1 and ?INST2 
of the &%SetOrClass, at least one of the following holds:  (?REL ?INST1 ?INST2),
(?REL ?INST2 ?INST1) or (equal ?INST1 ?INST2).")

(=>
   (and
     (trichotomizingOn ?RELATION ?CLASS)
     (instance ?RELATION Predicate))
   (forall (?INST1 ?INST2)
      (=> 
         (and 
            (instance ?INST1 ?CLASS)
            (instance ?INST2 ?CLASS))
         (or 
            (?RELATION ?INST1 ?INST2) 
            (?RELATION ?INST2 ?INST1) 
            (equal ?INST1 ?INST2)))))

(instance equivalenceRelationOn BinaryPredicate)
(instance equivalenceRelationOn AsymmetricRelation)
(domain equivalenceRelationOn 1 BinaryRelation)
(domain equivalenceRelationOn 2 SetOrClass)
(documentation equivalenceRelationOn EnglishLanguage "A &%BinaryRelation is an 
&%equivalenceRelationOn a &%SetOrClass only if the relation is &%reflexiveOn 
the &%SetOrClass and it is both a &%TransitiveRelation and a 
&%SymmetricRelation.")

(=>
   (equivalenceRelationOn ?RELATION ?CLASS)
   (and
      (instance ?RELATION TransitiveRelation)
      (instance ?RELATION SymmetricRelation)
      (reflexiveOn ?RELATION ?CLASS))) 

(instance distributes BinaryPredicate)
(domain distributes 1 BinaryFunction)
(domain distributes 2 BinaryFunction)
(documentation distributes EnglishLanguage "A &%BinaryFunction ?FUNCTION1 is 
distributive over another &%BinaryFunction ?FUNCTION2 just in case 
(?FUNCTION1 ?INST1 (?FUNCTION2 ?INST2 ?INST3)) is equal to 
(?FUNCTION2 (?FUNCTION1 ?INST1 ?INST2) (?FUNCTION1 ?INST1 ?INST3)), 
for all ?INST1, ?INST2, and ?INST3.") 

(=>
   (distributes ?FUNCTION1 ?FUNCTION2)
   (forall (?INST1 ?INST2 ?INST3)
      (=>
         (and
            (domain ?FUNCTION1 1 ?CLASS1)
            (instance ?INST1 ?CLASS1)
            (instance ?INST2 ?CLASS1)
            (instance ?INST3 ?CLASS1)
            (domain ?FUNCTION2 1 ?CLASS2)
            (instance ?INST1 ?CLASS2)
            (instance ?INST2 ?CLASS2)
            (instance ?INST3 ?CLASS2))
         (equal 
           (AssignmentFn ?FUNCTION1 ?INST1 
             (AssignmentFn ?FUNCTION2 ?INST2 ?INST3))
           (AssignmentFn ?FUNCTION2 
             (AssignmentFn ?FUNCTION1 ?INST1 ?INST2) 
             (AssignmentFn ?FUNCTION1 ?INST1 ?INST3))))))

(documentation relatedEvent EnglishLanguage "(relatedEvent ?EVENT1 ?EVENT2) means 
that the &%Process ?EVENT1 is related to the Process ?EVENT2.  The 
relationship is between separate individual events, not events and 
their subprocesses.  On the other hand, two &%subProcesses of the same 
overarching event may be &%relatedEvents.  The argument order does not 
imply temporal ordering.")
(instance relatedEvent BinaryPredicate)
(instance relatedEvent SymmetricRelation)
(domain relatedEvent 1 Process)
(domain relatedEvent 2 Process)
(=>
  (and
    (subProcess ?S1 ?P)
    (subProcess ?S2 ?P))
  (relatedEvent ?S1 ?S2))

(instance causes BinaryPredicate)
(instance causes AsymmetricRelation)
(domain causes 1 Process)
(domain causes 2 Process)
(relatedInternalConcept causes causesSubclass)
(subrelation causes relatedEvent)
(documentation causes EnglishLanguage "The causation relation between instances of &%Process.  
(&%causes ?PROCESS1 ?PROCESS2) means that the instance of &%Process ?PROCESS1 
brings about the instance of &%Process ?PROCESS2.")

(=>
   (instance ?PROC1 Process)
   (exists (?PROC2)
      (causes ?PROC2 ?PROC1)))

(=>
  (causes ?P1 ?P2)
  (earlier (WhenFn ?P1) (WhenFn ?P2)))

(instance causesSubclass BinaryPredicate)
(instance causesSubclass AsymmetricRelation)
(domainSubclass causesSubclass 1 Process)
(domainSubclass causesSubclass 2 Process)
(documentation causesSubclass EnglishLanguage "The causation relation
between subclasses of &%Process.
(&%causesSubclass ?PROCESS1 ?PROCESS2) means that the subclass of &%Process ?PROCESS1 
brings about the subclass of &%Process ?PROCESS2, e.g. (&%causesSubclass &%Killing 
&%Death).")

(=>
   (causesSubclass ?PROC1 ?PROC2)
   (forall (?INST2)
      (=>
         (instance ?INST2 ?PROC2)
         (exists (?INST1) 
           (and
             (instance ?INST1 ?PROC1)
             (causes ?INST1 ?INST2))))))

(instance causesProposition BinaryPredicate)
(instance causesProposition AsymmetricRelation)
(domain causesProposition 1 Formula)
(domain causesProposition 2 Formula)
(documentation causesProposition EnglishLanguage "(&%causesProposition ?FORMULA1
?FORMULA2) means that the state of affairs described by ?FORMULA1
causes, or mechanistically brings about, the state of affairs
described by ?FORMULA2.  Note that unlike &%entails, the time
during which ?FORMULA2 holds cannot precede the time during which
?FORMULA1 holds, although ?FORMULA1 and ?FORMULA2 can hold
simultaneously.  Note, also, that &%causesProposition is a
predicate, not a truth function.  The following rule
(contraposition) does not hold: (=> (causesProp ?FORMULA1
?FORMULA2) (causesProp (not ?FORMULA2) (not ?FORMULA1))).")

(=>
  (and
    (holdsDuring ?T2 ?SIT2)
    (holdsDuring ?T1 ?SIT1)
    (instance ?T1 TimeInterval)
    (instance ?T2 TimeInterval)
    (causesProposition ?SIT1 ?SIT2))
  (beforeOrEqual (BeginFn ?T1) (BeginFn ?T2)))

(instance copy BinaryPredicate)
(instance copy EquivalenceRelation)
(domain copy 1 Object)
(domain copy 2 Object)
(documentation copy EnglishLanguage "relates an &%Object to an exact copy of the 
&%Object, where an exact copy is indistinguishable from the original 
with regard to every property except (possibly) spatial and/or temporal 
location.")

(=>
   (copy ?OBJ1 ?OBJ2)
   (forall (?ATTR)
      (=>
         (attribute ?OBJ1 ?ATTR)
         (attribute ?OBJ2 ?ATTR))))

(instance time BinaryPredicate)
(instance time TemporalRelation)
(instance time AsymmetricRelation)
(domain time 1 Physical)
(domain time 2 TimePosition)
(relatedInternalConcept time located)
(relatedInternalConcept time holdsDuring)
(documentation time EnglishLanguage "This relation holds between an instance of 
&%Physical and an instance of &%TimePosition just in case the temporal 
lifespan of the former includes the latter.  In other words, (&%time
?THING ?TIME) means that ?THING existed or occurred at ?TIME.  Note 
that &%time does for instances of &%Physical what &%holdsDuring does 
for instances of &%Formula.  The constants &%located and &%time are 
the basic spatial and temporal predicates, respectively.")

(instance holdsDuring BinaryPredicate)
(instance holdsDuring AsymmetricRelation)
(domain holdsDuring 1 TimePosition)
(domain holdsDuring 2 Formula)
(documentation holdsDuring EnglishLanguage "(&%holdsDuring ?TIME ?FORMULA) means that the 
proposition denoted by ?FORMULA is true in the time frame ?TIME.  Note 
that this implies that ?FORMULA is true at every &%TimePoint which is a 
&%temporalPart of ?TIME.")

(=>
   (and
      (holdsDuring ?TIME ?SITUATION1)
      (entails ?SITUATION1 ?SITUATION2))
   (holdsDuring ?TIME ?SITUATION2))

(=>
   (holdsDuring ?TIME (not ?SITUATION))
   (not (holdsDuring ?TIME ?SITUATION)))

(instance capability TernaryPredicate)
(domainSubclass capability 1 Process)
(domain capability 2 CaseRole)
(domain capability 3 Object)
(documentation capability EnglishLanguage "(&%capability ?PROCESS ?ROLE ?OBJ) means 
that ?OBJ has the ability to play the role of ?ROLE in &%Processes of 
type ?PROCESS.")

(=>
   (and
      (instance ?ROLE CaseRole)
      (?ROLE ?ARG1 ?ARG2)
      (instance ?ARG1 ?PROC)
      (subclass ?PROC Process))
   (capability ?PROC ?ROLE ?ARG2))
   
(=>
  (capability ?PROCESS ?ROLE ?OBJ)
  (modalAttribute
    (exists (?P)
      (and
        (instance ?P ?PROCESS)
        (?ROLE ?P ?OBJ))) Possibility))

(instance exploits BinaryPredicate)
(instance exploits AsymmetricRelation)
(domain exploits 1 Object)
(domain exploits 2 Agent)
(documentation exploits EnglishLanguage "(&%exploits ?OBJ ?AGENT) means that ?OBJ is used 
by ?AGENT as a &%resource in an unspecified instance of &%Process.  This 
&%Predicate, as its corresponding axiom indicates, is a composition of the 
relations &%agent and &%resource.")

(=>
     (exploits ?OBJ ?AGENT)
     (exists (?PROCESS)
          (and
               (agent ?PROCESS ?AGENT)
               (resource ?PROCESS ?OBJ)))) 

(instance hasPurpose BinaryPredicate)
(instance hasPurpose AsymmetricRelation)
(domain hasPurpose 1 Physical)
(domain hasPurpose 2 Formula)
(documentation hasPurpose EnglishLanguage "This &%Predicate expresses the concept of a 
conventional goal, i.e. a goal with a neutralized agent's intention.  
Accordingly, (&%hasPurpose ?THING ?FORMULA) means that the instance of 
&%Physical ?THING has, as its purpose, the &%Proposition expressed by 
?FORMULA.  Note that there is an important difference in meaning between 
the &%Predicates &%hasPurpose and &%result.  Although the second argument 
of the latter can satisfy the second argument of the former, 
a conventional goal is an expected and desired outcome, while a result 
may be neither expected nor desired.  For example, a machine process may 
have outcomes but no goals, aimless wandering may have an outcome but no 
goal, a learning process may have goals with no outcomes, and so on.")

(instance hasPurposeForAgent TernaryPredicate)
(domain hasPurposeForAgent 1 Physical)
(domain hasPurposeForAgent 2 Formula)
(domain hasPurposeForAgent 3 Agent)
(documentation hasPurposeForAgent EnglishLanguage "Expresses a cognitive attitude of an 
agent with respect to a particular instance of Physical.  More precisely, 
(&%hasPurposeForAgent ?THING ?FORMULA ?AGENT) means that the purpose of 
?THING for ?AGENT is the proposition expressed by ?FORMULA.  Very complex 
issues are involved here.  In particular, the rules of inference of the 
first order predicate calculus are not truth-preserving for the second 
argument position of this &%Predicate.")

(=>
   (hasPurpose ?THING ?PURPOSE)
   (exists (?AGENT)
      (hasPurposeForAgent ?THING ?PURPOSE ?AGENT)))

(instance hasSkill BinaryPredicate)
(instance hasSkill AsymmetricRelation)
(domainSubclass hasSkill 1 Process)
(domain hasSkill 2 Agent)
(documentation hasSkill EnglishLanguage "Similar to the &%capability &%Predicate 
with the additional restriction that the ability be practised/
demonstrated to some measurable degree.")

(=>
   (hasSkill ?PROC ?AGENT)
   (capability ?PROC agent ?AGENT))

(instance confersNorm TernaryPredicate)
(domain confersNorm 1 Entity)
(domain confersNorm 2 Formula)
(domain confersNorm 3 ObjectiveNorm)
(documentation confersNorm EnglishLanguage "Expresses the relationship between a &%Formula, 
an &%Entity, and an &%ObjectiveNorm when the &%Entity brings it about that 
the &%Formula has the &%ObjectiveNorm.")

(=>
   (holdsDuring ?TIME (confersNorm ?ENTITY ?FORMULA ?NORM))
   (and
      (holdsDuring (ImmediatePastFn ?TIME) (not (modalAttribute ?FORMULA ?NORM)))
      (holdsDuring (ImmediateFutureFn ?TIME) (modalAttribute ?FORMULA ?NORM))))

(instance deprivesNorm TernaryPredicate)
(disjointRelation deprivesNorm confersNorm)
(domain deprivesNorm 1 Entity)
(domain deprivesNorm 2 Formula)
(domain deprivesNorm 3 ObjectiveNorm)
(documentation deprivesNorm EnglishLanguage "Expresses the relationship between an 
&%Entity, a &%Formula, and an &%ObjectiveNorm when the &%Entity 
brings it about that the &%Formula does not have the &%ObjectiveNorm.") 

(=>
   (holdsDuring ?TIME (deprivesNorm ?ENTITY ?FORMULA ?NORM))
   (and
      (holdsDuring (ImmediatePastFn ?TIME) (modalAttribute ?FORMULA ?NORM))
      (holdsDuring (ImmediateFutureFn ?TIME) (not (modalAttribute ?FORMULA ?NORM)))))

(instance partlyLocated SpatialRelation)
(instance partlyLocated BinaryPredicate)
(domain partlyLocated 1 Physical)
(domain partlyLocated 2 Object)
(documentation partlyLocated EnglishLanguage "(&%partlyLocated ?OBJ1 ?OBJ2) means 
that the instance of &%Physical ?OBJ1 is at least partially located at ?OBJ2.  For 
example, Istanbul is partly located in &%Asia and partly located in &%Europe.  
Note that &%partlyLocated is the most basic localization relation:  &%located 
is an immediate &%subrelation of &%partlyLocated and &%exactlyLocated is 
an immediate &%subrelation of &%located.") 

(=>
  (and
    (instance ?OBJ1 Object)
    (partlyLocated ?OBJ1 ?OBJ2))
  (overlapsSpatially ?OBJ1 ?OBJ2)) 

(=>
  (and
    (instance ?OBJ1 Object)
    (partlyLocated ?OBJ1 ?OBJ2))
  (exists (?SUB)
    (and
      (part ?SUB ?OBJ1)
      (located ?SUB ?OBJ2))))
      
(instance located AntisymmetricRelation)
(instance located TransitiveRelation)
(subrelation located partlyLocated)

(domain located 1 Physical)
(domain located 2 Object)

(documentation located EnglishLanguage "(&%located ?OBJ1 ?OBJ2) means that ?OBJ1 is 
&%partlyLocated at ?OBJ2, and there is no &%part of ?OBJ1 that is not &%located at 
?OBJ2.")

(=>
  (located ?OBJ1 ?OBJ2)
  (forall (?SUB)
    (=>
      (part ?SUB ?OBJ1)
      (located ?SUB ?OBJ2))))

(instance eventPartlyLocated CaseRole)
(subrelation eventPartlyLocated partlyLocated)
(domain eventPartlyLocated 1 Process)
(domain eventPartlyLocated 2 Object)
(documentation eventPartlyLocated EnglishLanguage "(&%eventPartlyLocated ?PROC ?OBJ)
means that some &%subProcess of &%Process ?PROC is located in &%Object ?OBJ.")
(termFormat EnglishLanguage eventPartlyLocated "event partly located")

(=>
  (eventPartlyLocated ?PROC ?OBJ)
  (exists (?SUB)
    (and
      (subProcess ?SUB ?PROC)
      (eventLocated ?SUB ?OBJ))))
      
(=>
  (origin ?PROCESS ?LOC)
  (eventPartlyLocated ?PROCESS ?LOC))

(=>
  (destination ?PROCESS ?LOC)
  (eventPartlyLocated ?PROCESS ?LOC))

(subrelation eventPartlyLocated involvedInEvent)

(subrelation eventLocated eventPartlyLocated)
(instance eventLocated CaseRole)
(documentation eventLocated EnglishLanguage "(&%eventLocated ?PROC ?OBJ) means that
the entire &%Process ?PROC is located on &%Object ?OBJ, meaning that all &%subProcess 
of ?PROC is located on ?OBJ")
(termFormat EnglishLanguage eventLocated "event located")

(=>
  (eventLocated ?PROCESS ?OBJ)
  (forall (?SUB)
    (=>
      (subProcess ?SUB ?PROCESS)
      (eventLocated ?SUB ?OBJ))))
      
(subrelation exactlyLocated located)
(documentation exactlyLocated EnglishLanguage "The actual, minimal location of an 
Object.  This is a subrelation of the more general &%Predicate 
&%located.")

(=>
   (exactlyLocated ?OBJ ?REGION)
   (not
      (exists (?OTHEROBJ)
         (and
            (exactlyLocated ?OTHEROBJ ?REGION)
            (not
               (equal ?OTHEROBJ ?OBJ))))))

(instance between SpatialRelation)
(instance between TernaryPredicate)
(domain between 1 Object)
(domain between 2 Object)
(domain between 3 Object)
(documentation between EnglishLanguage "(between ?OBJ1 ?OBJ2 ?OBJ3) means that ?OBJ2 is 
spatially located between ?OBJ1 and ?OBJ3.  Note that this implies that 
?OBJ2 is directly between ?OBJ1 and ?OBJ3, i.e. the projections of ?OBJ1 
and ?OBJ3 overlap with ?OBJ2.")

(=>
  (between ?END1 ?MID ?END2)
  (between ?END2 ?MID ?END1))

(documentation betweenOnPath EnglishLanguage "(betweenOnPath ?OBJ1 ?OBJ2 ?OBJ3 ?PATH) 
means that ?OBJ2 is spatially located between ?OBJ1 and ?OBJ3 on the path 
?PATH.  Note that this is a more specialized relation of between since any 
object that is between others with respect to a particular path is also 
simply between them.") 

(instance betweenOnPath SpatialRelation)
(instance betweenOnPath QuaternaryPredicate)
(domain betweenOnPath 1 Object) 	
(domain betweenOnPath 2 Object) 	
(domain betweenOnPath 3 Object)
(domain betweenOnPath 4 Object)

(=>
  (betweenOnPath ?OBJ1 ?OBJ2 ?OBJ3 ?PATH)
  (between ?OBJ1 ?OBJ2 ?OBJ3))

(instance traverses BinaryPredicate)
(instance traverses SpatialRelation)
(domain traverses 1 Object)
(domain traverses 2 Object)
(documentation traverses EnglishLanguage "(&%traverses ?OBJ1 ?OBJ2) means that ?OBJ1 
crosses or extends across ?OBJ2.  Note that &%crosses and 
&%penetrates are subrelations of &%traverses.")

(=>
   (traverses ?OBJ1 ?OBJ2)
   (or
      (crosses ?OBJ1 ?OBJ2)
      (penetrates ?OBJ1 ?OBJ2)))

(subrelation crosses traverses)
(instance crosses AsymmetricRelation)
(instance crosses TransitiveRelation)
(disjointRelation crosses connected)
(documentation crosses EnglishLanguage "(crosses ?OBJ1 ?OBJ2) means that 
&%Object ?OBJ1 &%traverses Object ?OBJ2, without being &%connected 
to it.")

(subrelation penetrates traverses)
(subrelation penetrates meetsSpatially)
(instance penetrates AsymmetricRelation)
(instance penetrates IntransitiveRelation)
(documentation penetrates EnglishLanguage "(penetrates ?OBJ1 ?OBJ2) means that 
?OBJ1 is &%connected to ?OBJ2 along at least one whole dimension (length, 
width or depth).") 

(instance WhereFn BinaryFunction)
(instance WhereFn SpatialRelation)
(instance WhereFn TotalValuedRelation)
(domain WhereFn 1 Physical)
(domain WhereFn 2 TimePoint)
(range WhereFn Region)
(relatedInternalConcept WhereFn WhenFn)
(documentation WhereFn EnglishLanguage "Maps an &%Object and a &%TimePoint at which the 
&%Object exists to the &%Region where the &%Object existed at that 
&%TimePoint.")

(<=>
   (equal (WhereFn ?THING ?TIME) ?REGION)
   (holdsDuring ?TIME (exactlyLocated ?THING ?REGION)))

(instance possesses BinaryPredicate)
(instance possesses AsymmetricRelation)
(domain possesses 1 Agent)
(domain possesses 2 Object)
(documentation possesses EnglishLanguage "&%Relation that holds between an &%Agent and 
an &%Object when the &%Agent has ownership of the &%Object.")

(=>
   (possesses ?PERSON ?OBJ)
   (modalAttribute (uses ?OBJ ?PERSON) Permission))

(=>
   (and
      (instance ?TIME TimePosition)
      (holdsDuring ?TIME (possesses ?AGENT1 ?OBJ))
      (holdsDuring ?TIME (possesses ?AGENT2 ?OBJ)))
   (equal ?AGENT1 ?AGENT2))

(instance PropertyFn UnaryFunction)
(instance PropertyFn TotalValuedRelation)
(domain PropertyFn 1 Agent)
(range PropertyFn Set)
(documentation PropertyFn EnglishLanguage "A &%UnaryFunction that maps an &%Agent to the 
&%Set of &%Objects owned by the &%Agent.")

(<=> 
   (instance ?OBJ (PropertyFn ?PERSON))
   (possesses ?PERSON ?OBJ))

(instance precondition BinaryPredicate)
(instance precondition AsymmetricRelation)
(instance precondition TransitiveRelation)
(domainSubclass precondition 1 Process)
(domainSubclass precondition 2 Process)
(documentation precondition EnglishLanguage "A very general &%Predicate.  (&%precondition 
?PROC1 ?PROC2) means that an instance of ?PROC2 can exist only if an 
instance of ?PROC1 also exists.")

(=>
   (precondition ?PROC1 ?PROC2)
   (=>
      (exists (?INST2) (instance ?INST2 ?PROC2))
      (exists (?INST1) (instance ?INST1 ?PROC1))))

(instance hindersSubclass BinaryPredicate)
(instance hindersSubclass IrreflexiveRelation)
(domainSubclass hindersSubclass 1 Process)
(domainSubclass hindersSubclass 2 Process)
(documentation hindersSubclass EnglishLanguage "A very general &%Predicate.  (&%hindersSubclass 
?PROC1 ?PROC2) means that the &%Process ?PROC1 hindersSubclass or hinders 
the occurrence of the &%Process ?PROC2.  For example, obstructing an 
object hindersSubclass moving it.  Note that this is a relation between types 
of &%Processes, not between instances.")

(=>
  (hindersSubclass ?PROC1 ?PROC2)
  (forall (?TIME ?PLACE)
    (decreasesLikelihood 
      (holdsDuring ?TIME 
        (exists (?INST1) 
          (and 
            (instance ?INST1 ?PROC1) 
            (eventLocated ?INST1 ?PLACE))))
      (holdsDuring ?TIME 
        (exists (?INST2) 
          (and 
            (instance ?INST2 ?PROC2) 
            (eventLocated ?INST2 ?PLACE)))))))

(instance preventsSubclass BinaryPredicate)
(instance preventsSubclass IrreflexiveRelation)
(domainSubclass preventsSubclass 1 Process)
(domainSubclass preventsSubclass 2 Process)
(relatedInternalConcept preventsSubclass hindersSubclass)
(documentation preventsSubclass EnglishLanguage "A very general &%Predicate.  (preventsSubclass ?PROC1 ?PROC2) means that ?PROC1 preventsSubclass the occurrence of ?PROC2.  In other words, if ?PROC1 is occurring in a particular time and place, ?PROC2 
cannot occur at the same time and place.  For example, innoculating 
preventsSubclass contracting disease.  Note that this is a relation between types 
of &%Processes, not between instances.") 

(=>
  (preventsSubclass ?PROC1 ?PROC2)
  (forall (?TIME ?PLACE)
    (=>
      (holdsDuring ?TIME 
        (exists (?INST1) 
          (and 
            (instance ?INST1 ?PROC1) 
            (eventLocated ?INST1 ?PLACE))))
      (not 
        (holdsDuring ?TIME 
          (exists (?INST2) 
            (and 
              (instance ?INST2 ?PROC2) 
              (eventLocated ?INST2 ?PLACE))))))))

(instance prevents BinaryPredicate)
(instance prevents IrreflexiveRelation)
(domain prevents 1 Process)
(domainSubclass prevents 2 Process)
(relatedInternalConcept prevents preventsSubclass)
(relatedInternalConcept prevents hinders)
(documentation prevents EnglishLanguage "A very general &%Predicate.  (prevents ?PROC1 ?PROC2) means that an instance of ?PROC1 prevents the occurrence of ?PROC2. Note the difference between this relation and &%preventsSubclass, which is relating classes and not instance-class.")
(=>
  (and
    (prevents ?X ?P)
    (equal (WhenFn ?X) ?T)
    (eventLocated ?X ?L))
  (not
    (holdsDuring ?T
      (exists (?Y)
        (and
          (instance ?Y ?P)
          (eventLocated ?Y ?L))))))
          
(instance hinders BinaryPredicate)
(instance hinders IrreflexiveRelation)
(domain hinders 1 Process)
(domainSubclass hinders 2 Process)
(relatedInternalConcept hinders hindersSubclass)
(documentation hinders EnglishLanguage "A genral &%Predicate, where (hinders ?PROC1 ?PROC2) means that an instance of ?PROC1 &%decreasesLikelihood of occurrence of ?PROC2. Compare with &%prevents which is stronger and &%hindersSubclass which relates classes of &%Processes.")
(=>
  (hinders ?X ?PROC)
  (decreasesLikelihood
    (and
      (equal (WhenFn ?X) ?T)
      (eventLocated ?X ?L))
    (holdsDuring ?T
      (exists (?Y)
        (and
          (instance ?Y ?PROC)
          (eventLocated ?Y ?L))))))
          

(instance refers BinaryPredicate)
(domain refers 1 Entity)
(domain refers 2 Entity)
(documentation refers EnglishLanguage "(&%refers ?OBJ1 ?OBJ2) means that ?OBJ1 
mentions or includes a reference to ?OBJ2. Note that &%refers is 
more general in meaning than &%represents, because presumably something 
can represent something else only if it refers to this other thing.  
For example, an article whose topic is a recent change in the price of 
oil may refer to many other things, e.g. the general state of the economy, 
the weather in California, the prospect of global warming, the options 
for alternative energy sources, the stock prices of various oil companies, 
etc.")

(subrelation names refers)
(domain names 1 SymbolicString)
(documentation names EnglishLanguage "(&%names ?STRING ?ENTITY) means that the thing ?ENTITY 
has the &%SymbolicString ?STRING as its name.  Note that &%names and &%represents 
are the two immediate &%subrelations of &%refers.  The predicate &%names is used 
when the referring item is merely a tag without connotative content, while the 
predicate &%represents is used for referring items that have such content.")

(subrelation uniqueIdentifier names)
(instance uniqueIdentifier SingleValuedRelation)
(documentation uniqueIdentifier EnglishLanguage "The class of &%names that uniquely identify 
an instance of &%Entity.  Some examples of &%uniqueIdentifiers are the keys 
of tables in database applications and the ISBN (International Standard Book 
Number).")

(subrelation represents refers)
(documentation represents EnglishLanguage "A very general semiotics &%Predicate.  
(&%represents ?THING ?ENTITY) means that ?THING in some way indicates, 
expresses, connotes, pictures, describes, etc. ?ENTITY.  The &%Predicates 
&%containsInformation and &%realization are subrelations of &%represents.  
Note that &%represents is a subrelation of &%refers, since something can 
represent something else only if it refers to this other thing.  See the 
documentation string for &%names.") 

(instance representsForAgent TernaryPredicate)
(domain representsForAgent 1 Entity)
(domain representsForAgent 2 Entity)
(domain representsForAgent 3 Agent)
(documentation representsForAgent EnglishLanguage "A very general predicate.  
(&%representsForAgent ?ENTITY1 ?ENTITY2 ?AGENT) means that the ?AGENT 
chooses to use ?ENTITY1 to 'stand for' ?ENTITY2.")

(=>
   (representsForAgent ?REP ?ENTITY ?AGENT)
   (represents ?REP ?ENTITY))

(instance representsInLanguage TernaryPredicate)
(domain representsInLanguage 1 LinguisticExpression)
(domain representsInLanguage 2 Entity)
(domain representsInLanguage 3 Language)
(documentation representsInLanguage EnglishLanguage "A very general predicate.  
(&%representsInLanguage ?THING ?ENTITY ?LANGUAGE) means that the 
&%LinguisticExpression ?THING stands for ?ENTITY in the &%Language 
?LANGUAGE.")

(=>
   (representsInLanguage ?REP ?ENTITY ?LANGUAGE)
   (exists (?AGENT)
      (representsForAgent ?REP ?ENTITY ?AGENT)))

(subrelation equivalentContentClass subsumesContentClass)
(instance equivalentContentClass EquivalenceRelation)
(domainSubclass equivalentContentClass 1 ContentBearingPhysical)
(domainSubclass equivalentContentClass 2 ContentBearingPhysical)
(documentation equivalentContentClass EnglishLanguage "A &%BinaryPredicate that relates two 
subclasses of &%ContentBearingPhysical.  (&%equivalentContentClass ?CLASS1 
?CLASS2) means that the content expressed by each instance of ?CLASS1 is 
also expressed by each instance of ?CLASS2, and vice versa.  An example 
would be the relationship between English and Russian editions of Agatha 
Christie's 'Murder on the Orient Express'.  Note that 
(&%equivalentContentClass ?CLASS1 ?CLASS2) implies (&%subsumesContentClass 
?CLASS1 ?CLASS2) and (&%subsumesContentClass ?CLASS2 ?CLASS1).")

(<=>
   (and
      (subsumesContentClass ?CLASS1 ?CLASS2)
      (subsumesContentClass ?CLASS2 ?CLASS1))
   (equivalentContentClass ?CLASS1 ?CLASS2))

(instance subsumesContentClass BinaryPredicate)
(instance subsumesContentClass PartialOrderingRelation)
(domainSubclass subsumesContentClass 1 ContentBearingPhysical)
(domainSubclass subsumesContentClass 2 ContentBearingPhysical)
(documentation subsumesContentClass EnglishLanguage "A &%BinaryPredicate that relates two 
subclasses of &%ContentBearingPhysical.  (&%subsumesContentClass ?CLASS1 
?CLASS2) means that the content expressed by each instance of ?CLASS2 is 
also expressed by each instance of ?CLASS1.  Examples include the 
relationship between a poem and one of its stanzas or between a book and 
one of its chapters.  Note that this is a relation between subclasses of 
&%ContentBearingObject, rather than instances.  If one wants to relate 
instances, the &%Predicate &%subsumesContentInstance can be used.  Note 
that &%subsumesContentClass is needed in many cases.  Consider, for 
example, the relation between the King James edition of the Bible and its 
Book of Genesis.  This relation holds for every copy of this edition and 
not just for a single instance.")

(=>
  (subsumesContentClass ?CLASS1 ?CLASS2)
  (forall (?OBJ2 ?INFO)
    (=>
      (and
        (instance ?OBJ2 ?CLASS2)
        (containsInformation ?OBJ2 ?INFO))
      (exists (?OBJ1)
        (and
          (instance ?OBJ1 ?CLASS1)
          (containsInformation ?OBJ1 ?INFO))))))

(subrelation equivalentContentInstance subsumesContentInstance)
(instance equivalentContentInstance EquivalenceRelation)
(domain equivalentContentInstance 1 ContentBearingPhysical)
(domain equivalentContentInstance 2 ContentBearingPhysical)
(relatedInternalConcept equivalentContentInstance equivalentContentClass)
(documentation equivalentContentInstance EnglishLanguage "A &%BinaryPredicate relating two 
instances of &%ContentBearingPhysical.  (&%equivalentContentInstance 
?OBJ1 ?OBJ2) means that the content expressed by ?OBJ1 is identical to 
the content expressed by ?OBJ2.  An example would be the relationship 
between a handwritten draft of a letter to one's lawyer and a typed 
copy of the same letter.  Note that (&%equivalentContentInstance ?OBJ1 
?OBJ2) implies (&%subsumesContentInstance ?OBJ1 ?OBJ2) and 
(&%subsumesContentInstance ?OBJ2 ?OBJ2).")

(<=>
   (and
      (subsumesContentInstance ?OBJ1 ?OBJ2)
      (subsumesContentInstance ?OBJ2 ?OBJ1))
   (equivalentContentInstance ?OBJ1 ?OBJ2))

(instance subsumesContentInstance BinaryPredicate)
(instance subsumesContentInstance PartialOrderingRelation)
(domain subsumesContentInstance 1 ContentBearingPhysical)
(domain subsumesContentInstance 2 ContentBearingPhysical)
(relatedInternalConcept subsumesContentInstance subsumesContentClass)
(documentation subsumesContentInstance EnglishLanguage "A &%BinaryPredicate relating two 
instances of &%ContentBearingPhysical.  (&%subsumesContentInstance ?OBJ1 ?OBJ2) 
means that the content expressed by ?OBJ2 is part of the content expressed 
by ?OBJ1.  An example is the relationship between a handwritten poem and 
one of its stanzas.  Note that this is a relation between instances, 
rather than &%Classes.  If one wants to assert a content relationship 
between &%Classes, e.g. between the version of an intellectual work and a 
part of that work, the relation &%subsumesContentClass should be used.")

(=>
   (subsumesContentInstance ?OBJ1 ?OBJ2)
   (forall (?INFO)
      (=>
         (containsInformation ?OBJ2 ?INFO)
         (containsInformation ?OBJ1 ?INFO))))

(subrelation realization represents)
(instance realization AsymmetricRelation)
(domain realization 1 Process)
(domain realization 2 Proposition)
(relatedInternalConcept realization equivalentContentInstance)
(relatedInternalConcept realization containsInformation)
(documentation realization EnglishLanguage "A subrelation of &%represents.  
(&%realization ?PROCESS ?PROP) means that ?PROCESS is a Process which 
expresses the content of ?PROP. Examples include a particular musical 
performance, which realizes the content of a musical score, or the 
reading of a poem.")

(=>
   (realization ?PROCESS ?PROP)
   (exists (?OBJ)
      (and
         (instance ?OBJ ContentBearingObject)
         (containsInformation ?OBJ ?PROP))))

(instance expressedInLanguage BinaryPredicate)
(instance expressedInLanguage AsymmetricRelation)
(domain expressedInLanguage 1 LinguisticExpression)
(domain expressedInLanguage 2 Language)
(documentation expressedInLanguage EnglishLanguage "(&%expressedInLanguage ?EXPRESS ?LANG) 
means that the &%LinguisticExpression ?EXPRESS is part of the &%Language 
?LANG.")

(<=> 
  (expressedInLanguage ?EXPRESS ?LANGUAGE) 
  (exists (?PROP) 
    (representsInLanguage ?EXPRESS ?PROP ?LANGUAGE)))

(instance subProposition BinaryPredicate)
(instance subProposition TransitiveRelation)
(instance subProposition IrreflexiveRelation)
(domain subProposition 1 Proposition)
(domain subProposition 2 Proposition)
(documentation subProposition EnglishLanguage "(&%subProposition ?PROP1 ?PROP2) means that 
?PROP1 is a &%Proposition which is a proper part of the &%Proposition ?PROP2.  
In other words, &%subProposition is the analogue of &%properPart for chunks 
of abstract content.")

(=>
   (subProposition ?PROP1 ?PROP2)
   (forall (?OBJ1 ?OBJ2)
      (=>
         (and
            (containsInformation ?OBJ1 ?PROP1)
            (containsInformation ?OBJ2 ?PROP2))
         (subsumesContentInstance ?OBJ2 ?OBJ1))))

(subrelation subPlan subProposition)
(instance subPlan TransitiveRelation)
(instance subPlan IrreflexiveRelation)
(domain subPlan 1 Plan)
(domain subPlan 2 Plan)
(documentation subPlan EnglishLanguage "(&%subPlan ?PLAN1 ?PLAN2) means that ?PLAN1 
is a &%Plan which is a proper part of ?PLAN2.  This relation is generally 
used to relate a supporting &%Plan to the overall &%Plan in a particular 
context.")

(instance uses BinaryPredicate)
(instance uses AsymmetricRelation)
(domain uses 1 Object)
(domain uses 2 Agent)
(documentation uses EnglishLanguage "(&%uses ?OBJECT AGENT) means that ?OBJECT is used by 
?AGENT as an instrument in an unspecified &%Process.  This &%Predicate, 
as its corresponding axiom indicates, is a composition of the &%CaseRoles 
&%agent and &%instrument.")

(=>
  (uses ?OBJ ?AGENT)
  (exists (?PROC)
    (and
      (agent ?PROC ?AGENT)
      (instrument ?PROC ?OBJ))))

;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;;;;;;;;
;;  NUMERIC FUNCTIONS   ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'STRUCTURAL ONTOLOGY'
;; INCLUDES 'BASE ONTOLOGY'

(instance MultiplicationFn BinaryFunction)
(instance MultiplicationFn AssociativeFunction)
(instance MultiplicationFn CommutativeFunction)
(instance MultiplicationFn RelationExtendedToQuantities)
(instance MultiplicationFn TotalValuedRelation)
(domain MultiplicationFn 1 Quantity)
(domain MultiplicationFn 2 Quantity)
(range MultiplicationFn Quantity)
(documentation MultiplicationFn EnglishLanguage "If ?NUMBER1 and ?NUMBER2 are &%Numbers, 
then (&%MultiplicationFn ?NUMBER1 ?NUMBER2) is the arithmetical product 
of these numbers.")

(instance AdditionFn BinaryFunction)
(instance AdditionFn AssociativeFunction)
(instance AdditionFn CommutativeFunction)
(instance AdditionFn RelationExtendedToQuantities)
(instance AdditionFn TotalValuedRelation)
(domain AdditionFn 1 Quantity)
(domain AdditionFn 2 Quantity)
(range AdditionFn Quantity)
(documentation AdditionFn EnglishLanguage "If ?NUMBER1 and ?NUMBER2 are &%Numbers, then 
(&%AdditionFn ?NUMBER1 ?NUMBER2) is the arithmetical sum of these 
numbers.")

(forall (?NUMBER)
  (equal (SuccessorFn ?NUMBER) (AdditionFn ?NUMBER 1)))

(instance SubtractionFn BinaryFunction)
(instance SubtractionFn AssociativeFunction)
(instance SubtractionFn RelationExtendedToQuantities)
(instance SubtractionFn TotalValuedRelation)
(domain SubtractionFn 1 Quantity)
(domain SubtractionFn 2 Quantity)
(range SubtractionFn Quantity)
(documentation SubtractionFn EnglishLanguage "If ?NUMBER1 and ?NUMBER2 are &%Numbers, 
then (&%SubtractionFn ?NUMBER1 ?NUMBER2) is the arithmetical difference 
between ?NUMBER1 and ?NUMBER2, i.e. ?NUMBER1 minus ?NUMBER2.  An 
exception occurs when ?NUMBER1 is equal to 0, in which case 
(&%SubtractionFn ?NUMBER1 ?NUMBER2) is the negation of ?NUMBER2.")

(forall (?NUMBER)
  (equal (PredecessorFn ?NUMBER) (SubtractionFn ?NUMBER 1)))

(instance DivisionFn BinaryFunction)
(instance DivisionFn AssociativeFunction)
(instance DivisionFn RelationExtendedToQuantities)
(instance DivisionFn PartialValuedRelation)
(domain DivisionFn 1 Quantity)
(domain DivisionFn 2 Quantity)
(range DivisionFn Quantity)
(documentation DivisionFn EnglishLanguage "If ?NUMBER1 and ?NUMBER2 are &%Numbers, then 
(&%DivisionFn ?NUMBER1 ?NUMBER2) is the result of dividing ?NUMBER1 by 
?NUMBER2.  Note that when ?NUMBER1 = 1 (&%DivisionFn ?NUMBER1 ?NUMBER2) 
is the reciprocal of ?NUMBER2.  Note too that (&%DivisionFn ?NUMBER1 
?NUMBER2) is undefined when ?NUMBER2 = 0.")

(=>
   (instance ?NUMBER RationalNumber)
   (exists (?INT1 ?INT2)
      (and
         (instance ?INT1 Integer)
         (instance ?INT2 Integer)
         (equal ?NUMBER (DivisionFn ?INT1 ?INT2)))))

(instance AbsoluteValueFn UnaryFunction)
(instance AbsoluteValueFn TotalValuedRelation)
(domain AbsoluteValueFn 1 RealNumber)
(range AbsoluteValueFn NonnegativeRealNumber)
(documentation AbsoluteValueFn EnglishLanguage "The value of (&%AbsoluteValueFn ?NUMBER) 
is the absolute value of the &%RealNumber ?NUMBER.")

(<=>
     (and
         (equal (AbsoluteValueFn ?NUMBER1) ?NUMBER2)
         (instance ?NUMBER1 RealNumber)
         (instance ?NUMBER2 RealNumber))
     (or 
         (and 
              (instance ?NUMBER1 NonnegativeRealNumber)
              (equal ?NUMBER1 ?NUMBER2))     
         (and 
              (instance ?NUMBER1 NegativeRealNumber)
              (equal ?NUMBER2 (SubtractionFn 0 ?NUMBER1)))))

(instance CeilingFn UnaryFunction)
(instance CeilingFn TotalValuedRelation)
(domain CeilingFn 1 RealNumber)
(range CeilingFn Integer)
(documentation CeilingFn EnglishLanguage "(&%CeilingFn ?NUMBER) returns the smallest 
&%Integer greater than or equal to the &%RealNumber ?NUMBER.")

(=>
   (equal (CeilingFn ?NUMBER) ?INT)
   (not
      (exists (?OTHERINT)
         (and
            (instance ?OTHERINT Integer)
            (greaterThanOrEqualTo ?OTHERINT ?NUMBER)
            (lessThan ?OTHERINT ?INT)))))

(instance CosineFn UnaryFunction)
(instance CosineFn TotalValuedRelation)
(domain CosineFn 1 PlaneAngleMeasure)
(range CosineFn RealNumber)
(documentation CosineFn EnglishLanguage "(&%CosineFn ?DEGREE) returns the cosine of the 
&%PlaneAngleMeasure ?DEGREE.  The cosine of ?DEGREE is the ratio of the 
side next to ?DEGREE to the hypotenuse in a right-angled triangle.")

(instance DenominatorFn UnaryFunction)
(instance DenominatorFn TotalValuedRelation)
(domain DenominatorFn 1 RealNumber)
(range DenominatorFn Integer)
(documentation DenominatorFn EnglishLanguage "(&%DenominatorFn ?NUMBER) returns the 
denominator of the canonical reduced form of the &%RealNumber ?NUMBER.")

(instance ExponentiationFn BinaryFunction)
(instance ExponentiationFn RelationExtendedToQuantities)
(instance ExponentiationFn TotalValuedRelation)
(domain ExponentiationFn 1 Quantity)
(domain ExponentiationFn 2 Integer)
(range ExponentiationFn Quantity)
(documentation ExponentiationFn EnglishLanguage "(&%ExponentiationFn ?NUMBER ?INT) returns 
the &%RealNumber ?NUMBER raised to the power of the &%Integer ?INT.")

(instance FloorFn UnaryFunction)
(instance FloorFn TotalValuedRelation)
(domain FloorFn 1 RealNumber)
(range FloorFn Integer)
(documentation FloorFn EnglishLanguage "(&%FloorFn ?NUMBER) returns the largest &%Integer 
less than or equal to the &%RealNumber ?NUMBER.")

(=>
   (equal (FloorFn ?NUMBER) ?INT)
   (not
      (exists (?OTHERINT)
         (and
            (instance ?OTHERINT Integer)
            (lessThanOrEqualTo ?OTHERINT ?NUMBER)
            (greaterThan ?OTHERINT ?INT)))))

(instance GreatestCommonDivisorFn Function)
(instance GreatestCommonDivisorFn VariableArityRelation)
(instance GreatestCommonDivisorFn PartialValuedRelation)
(range GreatestCommonDivisorFn Integer)
(documentation GreatestCommonDivisorFn EnglishLanguage "(&%GreatestCommonDivisorFn 
?NUMBER1 ?NUMBER2 ... ?NUMBER) returns the greatest common divisor of 
?NUMBER1 through ?NUMBER.")

(=>
   (equal (GreatestCommonDivisorFn @ROW) ?NUMBER)
   (forall (?ELEMENT)
      (=>
         (inList ?ELEMENT (ListFn @ROW))
         (equal (RemainderFn ?ELEMENT ?NUMBER) 0))))

(=>
   (equal (GreatestCommonDivisorFn @ROW) ?NUMBER)
   (not (exists (?GREATER)
      (and
         (greaterThan ?GREATER ?NUMBER)
         (forall (?ELEMENT)
            (=>
               (inList ?ELEMENT (ListFn @ROW))
               (equal (RemainderFn ?ELEMENT ?GREATER) 0)))))))

(documentation multiplicativeFactor EnglishLanguage "(multiplicativeFactor ?NUMBER1 ?NUMBER2) 
means that ?NUMBER1 is a factor of ?NUMBER2, i.e. ?NUMBER1 can be multiplied by 
some &%Integer to give ?NUMBER2 as a result.")
(instance multiplicativeFactor BinaryPredicate)
(instance multiplicativeFactor TransitiveRelation)
(domain multiplicativeFactor 1 Integer)
(domain multiplicativeFactor 2 Integer)

(=>
  (multiplicativeFactor ?N1 ?N2)
  (exists (?I)
    (and
      (instance ?I Integer)
      (equal ?N2 (MultiplicationFn ?N1 ?I)))))

(instance ImaginaryPartFn UnaryFunction)
(instance ImaginaryPartFn TotalValuedRelation)
(domain ImaginaryPartFn 1 ComplexNumber)
(range ImaginaryPartFn ImaginaryNumber)
(documentation ImaginaryPartFn EnglishLanguage "(&%ImaginaryPartFn ?NUMBER) returns 
the part of ?NUMBER that has the square root of -1 as its factor.")

(=>
   (instance ?NUMBER ComplexNumber)
   (exists (?PART1 ?PART2)
      (and
         (equal ?PART1 (RealNumberFn ?NUMBER))
         (equal ?PART2 (ImaginaryPartFn ?NUMBER)))))

(instance IntegerSquareRootFn UnaryFunction)
(instance IntegerSquareRootFn PartialValuedRelation)
(domain IntegerSquareRootFn 1 RealNumber)
(range IntegerSquareRootFn NonnegativeInteger)
(documentation IntegerSquareRootFn EnglishLanguage "(&%IntegerSquareRootFn ?NUMBER) 
returns the integer square root of ?NUMBER.")

(instance LeastCommonMultipleFn Function)
(instance LeastCommonMultipleFn PartialValuedRelation)     
(instance LeastCommonMultipleFn VariableArityRelation)
(range LeastCommonMultipleFn Integer)
(documentation LeastCommonMultipleFn EnglishLanguage "(&%LeastCommonMultipleFn 
?NUMBER1 ?NUMBER2 ... ?NUMBER) returns the least common multiple of 
?NUMBER1 through ?NUMBER.")

(=>
   (equal (LeastCommonMultipleFn @ROW) ?NUMBER)
   (forall (?ELEMENT)
      (=>
         (inList ?ELEMENT (ListFn @ROW))
         (equal (RemainderFn ?NUMBER ?ELEMENT) 0))))

(=>
   (equal (LeastCommonMultipleFn @ROW) ?NUMBER)
   (not (exists (?LESS)
      (and
         (lessThan ?LESS ?NUMBER)
         (forall (?ELEMENT)
            (=>
               (inList ?ELEMENT (ListFn @ROW))
               (equal (RemainderFn ?LESS ?ELEMENT) 0)))))))

(instance LogFn BinaryFunction)
(domain LogFn 1 RealNumber)
(domain LogFn 2 PositiveInteger)
(range LogFn RealNumber)
(documentation LogFn EnglishLanguage "(LogFn ?NUMBER ?INT) returns the logarithm of the 
&%RealNumber ?NUMBER in the base denoted by the &%Integer ?INT.")

(instance MaxFn BinaryFunction)
(instance MaxFn AssociativeFunction)
(instance MaxFn CommutativeFunction)
(instance MaxFn RelationExtendedToQuantities)
(instance MaxFn TotalValuedRelation)
(domain MaxFn 1 Quantity)
(domain MaxFn 2 Quantity)
(range MaxFn Quantity)
(documentation MaxFn EnglishLanguage "(&%MaxFn ?NUMBER1 ?NUMBER2) is the largest of 
?NUMBER1 and ?NUMBER2.  In cases where ?NUMBER1 is equal to ?NUMBER2, 
&%MaxFn returns one of its arguments.")

(=>
   (equal (MaxFn ?NUMBER1 ?NUMBER2) ?NUMBER)
   (or
      (and
         (equal ?NUMBER ?NUMBER1)
         (greaterThan ?NUMBER1 ?NUMBER2))
      (and
         (equal ?NUMBER ?NUMBER2)
         (greaterThan ?NUMBER2 ?NUMBER1))
      (and
         (equal ?NUMBER ?NUMBER1)
         (equal ?NUMBER ?NUMBER2))))

(instance MinFn BinaryFunction)
(instance MinFn AssociativeFunction)
(instance MinFn CommutativeFunction)
(instance MinFn RelationExtendedToQuantities)
(instance MinFn TotalValuedRelation)
(domain MinFn 1 Quantity)
(domain MinFn 2 Quantity)
(range MinFn Quantity)
(documentation MinFn EnglishLanguage "(&%MinFn ?NUMBER1 ?NUMBER2) is the smallest of 
?NUMBER1 and ?NUMBER2.  In cases where ?NUMBER1 is equal to ?NUMBER2, 
&%MinFn returns one of its arguments.")

(=>
   (equal (MinFn ?NUMBER1 ?NUMBER2) ?NUMBER)
   (or
      (and
         (equal ?NUMBER ?NUMBER1)
         (lessThan ?NUMBER1 ?NUMBER2))
      (and
         (equal ?NUMBER ?NUMBER2)
         (lessThan ?NUMBER2 ?NUMBER1))
      (and
         (equal ?NUMBER ?NUMBER1)
         (equal ?NUMBER ?NUMBER2))))

(instance NumeratorFn UnaryFunction)
(instance NumeratorFn TotalValuedRelation)
(domain NumeratorFn 1 RealNumber)
(range NumeratorFn Integer)
(documentation NumeratorFn EnglishLanguage "(&%NumeratorFn ?NUMBER) returns the numerator 
of the canonical reduced form ?NUMBER.")

(instance Pi PositiveRealNumber)
(documentation Pi EnglishLanguage "&%Pi is the &%RealNumber that 
is the ratio of the perimeter of a circle to its diameter.  It is 
approximately equal to 3.141592653589793.")

(instance NumberE PositiveRealNumber)
(documentation NumberE EnglishLanguage "&%NumberE is the &%RealNumber that is the base for 
natural logarithms.  It is approximately equal to 2.718282.")

(instance RationalNumberFn UnaryFunction)
(domain RationalNumberFn 1 Number)
(range RationalNumberFn RationalNumber)
(documentation RationalNumberFn EnglishLanguage "(&%RationalNumberFn ?NUMBER) returns 
the rational representation of ?NUMBER.")

(instance RealNumberFn UnaryFunction)
(domain RealNumberFn 1 Number)
(range RealNumberFn RealNumber)
(documentation RealNumberFn EnglishLanguage "(RealNumberFn ?NUMBER) returns the part of 
?NUMBER that is a &%RealNumber.")

(instance ReciprocalFn UnaryFunction)
(instance ReciprocalFn RelationExtendedToQuantities)
(instance ReciprocalFn TotalValuedRelation)
(domain ReciprocalFn 1 Quantity)
(range ReciprocalFn Quantity)
(documentation ReciprocalFn EnglishLanguage "(ReciprocalFn ?NUMBER) is the reciprocal 
element of ?NUMBER with respect to the multiplication operator 
(&%MultiplicationFn), i.e. 1/?NUMBER.  Not all numbers have a reciprocal 
element.  For example the number 0 does not.  If a number ?NUMBER has a 
reciprocal ?RECIP, then the product of ?NUMBER and ?RECIP will be 
1, e.g. 3*1/3 = 1.  The reciprocal of an element is &%equal to 
applying the &%ExponentiationFn function to the element to the power 
-1.")

(=>
   (instance ?NUMBER Quantity)
   (equal (ReciprocalFn ?NUMBER) (ExponentiationFn ?NUMBER -1)))

(=>
   (instance ?NUMBER Quantity)
   (equal 1 (MultiplicationFn ?NUMBER (ReciprocalFn ?NUMBER))))

(instance RemainderFn BinaryFunction)
(instance RemainderFn RelationExtendedToQuantities)
(instance RemainderFn PartialValuedRelation)
(domain RemainderFn 1 Quantity)
(domain RemainderFn 2 Quantity)
(range RemainderFn Quantity)
(documentation RemainderFn EnglishLanguage "(RemainderFn ?NUMBER ?DIVISOR) is the 
remainder of the number ?NUMBER divided by the number ?DIVISOR.  
The result has the same sign as ?DIVISOR.")

(<=>
   (equal (RemainderFn ?NUMBER1 ?NUMBER2) ?NUMBER)
   (equal (AdditionFn (MultiplicationFn (FloorFn (DivisionFn ?NUMBER1 ?NUMBER2)) ?NUMBER2) ?NUMBER) ?NUMBER1))

(=>
   (equal (RemainderFn ?NUMBER1 ?NUMBER2) ?NUMBER)
   (equal (SignumFn ?NUMBER2) (SignumFn ?NUMBER)))


(=>
  (instance ?NUMBER EvenInteger)
  (equal (RemainderFn ?NUMBER 2) 0))

(=>
  (instance ?NUMBER OddInteger)
  (equal (RemainderFn ?NUMBER 2) 1))

(=>
   (instance ?PRIME PrimeNumber)
   (forall (?NUMBER)
      (=>
         (equal (RemainderFn ?PRIME ?NUMBER) 0)
         (or
            (equal ?NUMBER 1)
            (equal ?NUMBER ?PRIME)))))

(instance RoundFn UnaryFunction)
(instance RoundFn RelationExtendedToQuantities)
(instance RoundFn TotalValuedRelation)
(domain RoundFn 1 Quantity)
(range RoundFn Quantity)
(documentation RoundFn EnglishLanguage "(&%RoundFn ?NUMBER) is the &%Integer closest 
to ?NUMBER on the number line.  If ?NUMBER is halfway between two 
&%Integers (for example 3.5), it denotes the larger &%Integer.")

(=>
   (equal (RoundFn ?NUMBER1) ?NUMBER2)
   (or
      (=>
         (lessThan (SubtractionFn ?NUMBER1 (FloorFn ?NUMBER1)) 0.5)
         (equal ?NUMBER2 (FloorFn ?NUMBER1)))
      (=>
         (greaterThanOrEqualTo (SubtractionFn ?NUMBER1 (FloorFn ?NUMBER1)) 0.5)
         (equal ?NUMBER2 (CeilingFn ?NUMBER1)))))
         
(instance SignumFn UnaryFunction)
(instance SignumFn TotalValuedRelation)
(domain SignumFn 1 RealNumber)
(range SignumFn Integer)
(documentation SignumFn EnglishLanguage "(SignumFn ?NUMBER) denotes the sign of ?NUMBER.  
This is one of the following values:  -1, 1, or 0.")

(=>
   (instance ?NUMBER NonnegativeRealNumber)
   (or
      (equal (SignumFn ?NUMBER) 1)
      (equal (SignumFn ?NUMBER) 0)))

(=>
   (instance ?NUMBER PositiveRealNumber)
   (equal (SignumFn ?NUMBER) 1))

(=>
   (instance ?NUMBER NegativeRealNumber)
   (equal (SignumFn ?NUMBER) -1))

(instance SineFn UnaryFunction)
(instance SineFn TotalValuedRelation)
(domain SineFn 1 PlaneAngleMeasure)
(range SineFn RealNumber)
(documentation SineFn EnglishLanguage "(&%SineFn ?DEGREE) is the sine of the 
&%PlaneAngleMeasure ?DEGREE.  The sine of ?DEGREE is the ratio of the side 
opposite ?DEGREE to the hypotenuse in a right-angled triangle.")

(instance SquareRootFn UnaryFunction)
(domain SquareRootFn 1 RealNumber)
(range SquareRootFn Number)
(documentation SquareRootFn EnglishLanguage "(SquareRootFn ?NUMBER) is the principal 
square root of ?NUMBER.")

(=>
   (equal (SquareRootFn ?NUMBER1) ?NUMBER2)
   (equal (MultiplicationFn ?NUMBER2 ?NUMBER2) ?NUMBER1))

(instance TangentFn UnaryFunction)
(instance TangentFn TotalValuedRelation)
(domain TangentFn 1 PlaneAngleMeasure)
(range TangentFn RealNumber)
(documentation TangentFn EnglishLanguage "(&%TangentFn ?DEGREE) is the tangent of the 
&%PlaneAngleMeasure ?DEGREE.  The tangent of ?DEGREE is the ratio of 
the side opposite ?DEGREE to the side next to ?DEGREE in a right-angled 
triangle.")

(=>
   (instance ?DEGREE PlaneAngleMeasure)
   (equal (TangentFn ?DEGREE) (DivisionFn (SineFn ?DEGREE) (CosineFn ?DEGREE))))

(instance identityElement BinaryPredicate)
(instance identityElement AsymmetricRelation)
(domain identityElement 1 BinaryFunction)
(domain identityElement 2 Entity)
(documentation identityElement EnglishLanguage "An object ?ID is the identity element 
for BinaryFunction ?FUNCTION just in case, for every instance ?INST, 
applying ?FUNCTION to ?INST and ?ID results in ?INST.")

(=>
   (identityElement ?FUNCTION ?ID)
   (forall (?INST)
      (=>
         (and
            (domain ?FUNCTION 1 ?CLASS)
            (instance ?INST ?CLASS))
         (equal (AssignmentFn ?FUNCTION ?ID ?INST) ?INST))))

(identityElement MultiplicationFn 1)
(identityElement AdditionFn 0)
(identityElement SubtractionFn 0)
(identityElement DivisionFn 1)

(instance SuccessorFn UnaryFunction)
(instance SuccessorFn TotalValuedRelation)
(domain SuccessorFn 1 Integer)
(range SuccessorFn Integer)
(documentation SuccessorFn EnglishLanguage "A &%UnaryFunction that maps an &%Integer to 
its successor, e.g. the successor of 5 is 6.")

(=>
   (equal (SuccessorFn ?INT1) (SuccessorFn ?INT2))
   (equal ?INT1 ?INT2))

(=>
   (instance ?INT Integer)
   (lessThan ?INT (SuccessorFn ?INT)))

(=>
   (and
      (instance ?INT1 Integer)
      (instance ?INT2 Integer))
   (not
      (and
         (lessThan ?INT1 ?INT2)
         (lessThan ?INT2 (SuccessorFn ?INT1)))))

(=>
   (instance ?INT Integer)
   (equal ?INT (SuccessorFn (PredecessorFn ?INT))))

(=>
   (instance ?INT Integer)
   (equal ?INT (PredecessorFn (SuccessorFn ?INT))))

(instance PredecessorFn UnaryFunction)
(instance PredecessorFn TotalValuedRelation)
(domain PredecessorFn 1 Integer)
(range PredecessorFn Integer)
(documentation PredecessorFn EnglishLanguage "A &%UnaryFunction that maps an &%Integer to 
its predecessor, e.g. the predecessor of 5 is 4.")

(=>
   (equal (PredecessorFn ?INT1) (PredecessorFn ?INT2))
   (equal ?INT1 ?INT2))

(=>
   (instance ?INT Integer)
   (greaterThan ?INT (PredecessorFn ?INT)))

(=>
   (and
      (instance ?INT1 Integer)
      (instance ?INT2 Integer))
   (not
      (and
         (lessThan ?INT2 ?INT1)
         (lessThan (PredecessorFn ?INT1) ?INT2))))

(instance average PartialValuedRelation)
(instance average BinaryPredicate)
(instance average SingleValuedRelation)
(domain average 1 List)
(domain average 2 RealNumber)
(termFormat EnglishLanguage average "average")
(documentation average EnglishLanguage "A partial function that relates a &%List to a 
&%RealNumber, provided that the &%List only has list elements that are 
&%RealNumbers. The &%RealNumber associated with the &%List is equal to the 
mathematical average of the &%RealNumbers in the &%List divided by the total
number of list elements.")

(=>
  (average ?LIST ?AVERAGE)
        (forall (?LISTITEM)
    (=>
      (inList ?LISTITEM ?LIST)
      (instance ?LISTITEM RealNumber))))

;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;     SET/CLASS THEORY      ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'STRUCTURAL ONTOLOGY'
;; INCLUDES 'BASE ONTOLOGY'

;; The following part of the ontology covers set-theoretic predicates 
;; and functions.  Most of the content here is taken from the kif-sets 
;; ontology (available on the Ontolingua server).

(subrelation subset subclass)
(domain subset 1 Set)
(domain subset 2 Set)
(documentation subset EnglishLanguage "(subset ?SET1 ?SET2) is true just in case the 
&%elements of the &%Set ?SET1 are also &%elements of the &%Set ?SET2.")

(=> 
   (subset ?SUBSET ?SET)
   (forall (?ELEMENT)
      (=> 
         (element ?ELEMENT ?SUBSET)
         (element ?ELEMENT ?SET))))

(instance element BinaryPredicate)
(instance element AsymmetricRelation)
(subrelation element instance)
(domain element 1 Entity)
(domain element 2 Set)
(documentation element EnglishLanguage "(element ?ENTITY ?SET) is true just in case 
?ENTITY is contained in the &%Set ?SET.  An &%Entity can be an &%element 
of another &%Entity only if the latter is a &%Set.")

(=>
  (forall (?ELEMENT)
    (<=>
      (element ?ELEMENT ?SET1)
      (element ?ELEMENT ?SET2)))
  (equal ?SET1 ?SET2))

(instance UnionFn BinaryFunction)
(instance UnionFn TotalValuedRelation)
(domain UnionFn 1 SetOrClass)
(domain UnionFn 2 SetOrClass)
(range UnionFn SetOrClass)
(documentation UnionFn EnglishLanguage "A &%BinaryFunction that maps two &%SetOrClasses to 
the union of these &%SetOrClasses.  An object is an &%element of the union 
of two &%SetOrClasses just in case it is an &%instance of either &%SetOrClass.")

;; TODO: this appears to be a contradiction in inference
;(<=>
;  (equal ?U (UnionFn ?C1 ?C2))
;  (forall (?I1 ?I2 ?I3)
;    (=>
;      (and
;        (instance ?I1 ?C1)
;        (instance ?I2 ?C2)
;        (instance ?I3 ?U))
;      (and 
;        (instance ?I1 ?U)
;        (instance ?I2 ?U)
;        (or
;          (instance ?I3 ?C1)
;          (instance ?I3 ?C2))))))

(instance IntersectionFn BinaryFunction)
(instance IntersectionFn TotalValuedRelation)
(domain IntersectionFn 1 SetOrClass)
(domain IntersectionFn 2 SetOrClass)
(range IntersectionFn SetOrClass)
(documentation IntersectionFn EnglishLanguage "A &%BinaryFunction that maps two 
&%SetOrClasses to the intersection of these &%SetOrClasses.  An object is 
an instance of the intersection of two &%SetOrClasses just in case it is 
an instance of both of those &%SetOrClasses.")

(instance RelativeComplementFn BinaryFunction)
(instance RelativeComplementFn TotalValuedRelation)
(domain RelativeComplementFn 1 SetOrClass)
(domain RelativeComplementFn 2 SetOrClass)
(range RelativeComplementFn SetOrClass)
(documentation RelativeComplementFn EnglishLanguage "A &%BinaryFunction that maps two 
&%SetOrClasses to the difference between these &%SetOrClasses.  More 
precisely, (&%RelativeComplementFn ?CLASS1 ?CLASS2) denotes the instances 
of ?CLASS1 that are not also instances of ?CLASS2.")

(instance ComplementFn UnaryFunction)
(instance ComplementFn TotalValuedRelation)
(domain ComplementFn 1 SetOrClass)
(range ComplementFn SetOrClass)
(documentation ComplementFn EnglishLanguage "The complement of a given &%SetOrClass C is the 
&%SetOrClass of all things that are not instances of C.  In other words, an 
object is an instance of the complement of a &%SetOrClass C just in case it 
is not an instance of C.")

(instance GeneralizedUnionFn UnaryFunction)
(instance GeneralizedUnionFn TotalValuedRelation)
(domainSubclass GeneralizedUnionFn 1 SetOrClass)
(range GeneralizedUnionFn SetOrClass)
(documentation GeneralizedUnionFn EnglishLanguage "A &%UnaryFunction that takes a &%SetOrClass 
of &%Classes as its single argument and returns a &%SetOrClass which is the 
merge of all of the &%Classes in the original &%SetOrClass, i.e. the &%SetOrClass 
containing just those instances which are instances of an instance of the 
original &%SetOrClass.")

(instance GeneralizedIntersectionFn UnaryFunction)
(instance GeneralizedIntersectionFn TotalValuedRelation)
(domainSubclass GeneralizedIntersectionFn 1 SetOrClass)
(range GeneralizedIntersectionFn SetOrClass)
(documentation GeneralizedIntersectionFn EnglishLanguage "A &%UnaryFunction that takes a 
&%SetOrClass of &%Classes as its single argument and returns a &%SetOrClass which 
is the intersection of all of the &%Classes in the original &%SetOrClass, i.e. 
the &%SetOrClass containing just those instances which are instances of all 
instances of the original &%SetOrClass.")

(instance CardinalityFn UnaryFunction)
(instance CardinalityFn TotalValuedRelation)
(instance CardinalityFn AsymmetricRelation)
(domain CardinalityFn 1 (UnionFn SetOrClass Collection))
(range CardinalityFn Number)
(documentation CardinalityFn EnglishLanguage "(CardinalityFn ?CLASS) returns the 
number of instances in the &%SetOrClass ?CLASS or the number of 
members in the ?CLASS &%Collection.")

;; comment it out to avoid (instance SetOrClass SetOrClass) 
;(subclass NullSet SetOrClass)
(documentation NullSet EnglishLanguage "Any &%SetOrClass that contains no instances.")

(=>
   (instance ?SET NullSet)
   (not (exists (?INST) (instance ?INST ?SET))))

;; comment it out to avoid (instance SetOrClass SetOrClass) 
;(subclass NonNullSet SetOrClass)
(documentation NonNullSet EnglishLanguage "Any &%SetOrClass that contains at least one 
instance.")

(=>
   (instance ?SET NonNullSet)
   (exists (?INST) (instance ?INST ?SET)))

(subclass FiniteSet Set)
(documentation FiniteSet EnglishLanguage "A &%Set containing a finite number of elements.")

(=>
   (instance ?SET FiniteSet)
   (exists (?NUMBER)
      (and
         (instance ?NUMBER NonnegativeInteger)
         (equal ?NUMBER (CardinalityFn ?SET)))))

;; comment it out to avoid (instance SetOrClass SetOrClass) 
;(subclass PairwiseDisjointClass SetOrClass)/
(documentation PairwiseDisjointClass EnglishLanguage "A &%SetOrClass is a &%PairwiseDisjointClass 
just in case every instance of the &%SetOrClass is either &%equal to or &%disjoint 
from every other instance of the &%SetOrClass.")

(=>
   (instance ?SUPERCLASS PairwiseDisjointClass)
   (forall (?CLASS1 ?CLASS2)
      (=>
         (and
            (instance ?CLASS1 ?SUPERCLASS)
            (instance ?CLASS2 ?SUPERCLASS))
         (or
            (equal ?CLASS1 ?CLASS2)
            (disjoint ?CLASS1 ?CLASS2)))))

;; comment it out to avoid (instance SetOrClass SetOrClass) 
;(subclass MutuallyDisjointClass SetOrClass)
(documentation MutuallyDisjointClass EnglishLanguage "A &%SetOrClass is a &%MutuallyDisjointClass 
just in case there exists nothing which is an instance of all of the instances of 
the original &%SetOrClass.")

(=>
   (instance ?CLASS MutuallyDisjointClass)
   (forall (?INST1 ?INST2)
      (=>
         (and
            (instance ?INST1 ?CLASS)
            (instance ?INST2 ?INST1))
         (exists (?INST3)
            (and
               (instance ?INST3 ?CLASS)
               (not (instance ?INST2 ?INST3)))))))

(instance KappaFn BinaryFunction)
(domain KappaFn 1 SymbolicString)
(domain KappaFn 2 Formula)
(range KappaFn Class)
(documentation KappaFn EnglishLanguage "A class-forming operator that takes two 
arguments:  a variable and a formula containing at least one unbound 
occurrence of the variable.  The result of applying &%KappaFn to a 
variable and a formula is the &%SetOrClass of things that satisfy the formula.  
For example, we can denote the &%SetOrClass of prime numbers that are less 
than 100 with the following expression:  (KappaFn ?NUMBER 
(and (instance ?NUMBER PrimeNumber) (lessThan ?NUMBER 100))).  Note that 
the use of this function is discouraged, since there is currently no 
axiomatic support for it.")

;; At some point we may be able to make use of 'KappaFn' by implementing a macro 
;; that decomposes every occurrence of 'KappaFn' into a complex formula.  For 
;; example the macro might replace every instance of Schema 1 with an instance 
;; of Schema 2. 
;;
;; Schema 1:  (KappaFn <variable> <formula>)
;;
;; Schema 2: (exists (?LIST)
;;             (and
;;               (instance ?LIST UniqueList)
;;               (forall (<variable>)
;;                 (<=>
;;                   (inList <variable> ?LIST)
;;                   <formula>))))
;;


;; END FILE

;; BEGIN FILE

;;;;;;;;;;;;;;;;;;;;;
;;  GRAPH THEORY   ;;
;;;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'NUMERIC FUNCTIONS'

(subclass Graph Abstract)
(documentation Graph EnglishLanguage "The &%Class of graphs, where a graph is understood 
to be a set of &%GraphNodes connected by &%GraphArcs.  Note that this 
&%Class includes only connected graphs, i.e. graphs in which there is a 
&%GraphPath between any two &%GraphNodes.  Note too that every &%Graph 
is required to contain at least two &%GraphArcs and three &%GraphNodes.")

(=>
   (and
      (instance ?GRAPH Graph)
      (instance ?NODE1 GraphNode)
      (instance ?NODE2 GraphNode)
      (graphPart ?NODE1 ?GRAPH)
      (graphPart ?NODE2 ?GRAPH)
      (not (equal ?NODE1 ?NODE2)))
   (exists (?ARC ?PATH)
      (or
         (links ?NODE1 ?NODE2 ?ARC)
         (and
            (subGraph ?PATH ?GRAPH)
            (instance ?PATH GraphPath)
            (or
               (and
                  (equal (BeginNodeFn ?PATH) ?NODE1)
                  (equal (EndNodeFn ?PATH) ?NODE2))
               (and
                  (equal (BeginNodeFn ?PATH) ?NODE2)
                  (equal (EndNodeFn ?PATH) ?NODE1)))))))

(=>
   (instance ?GRAPH Graph)
   (exists (?NODE1 ?NODE2 ?NODE3 ?ARC1 ?ARC2)
      (and
         (graphPart ?NODE1 ?GRAPH)
         (graphPart ?NODE2 ?GRAPH)
         (graphPart ?NODE3 ?GRAPH)
         (graphPart ?ARC1 ?GRAPH)
         (graphPart ?ARC2 ?GRAPH)
         (links ?NODE1 ?NODE2 ?ARC1)
         (links ?NODE2 ?NODE3 ?ARC2)
         (not (equal ?NODE1 ?NODE2))
         (not (equal ?NODE2 ?NODE3))
         (not (equal ?NODE1 ?NODE3))
         (not (equal ?ARC1 ?ARC2)))))

(subclass DirectedGraph Graph)
(documentation DirectedGraph EnglishLanguage "The &%Class of directed graphs.  A 
directed graph is a &%Graph in which all &%GraphArcs
have direction, i.e. every &%GraphArc has an initial node (see 
&%InitialNodeFn) and a terminal node (see &%TerminalNodeFn).")

(=>
   (and
      (instance ?GRAPH DirectedGraph)
      (instance ?ARC GraphArc)
      (graphPart ?ARC ?GRAPH))
   (exists (?NODE1 ?NODE2)
      (and
         (equal (InitialNodeFn ?ARC) ?NODE1)
         (equal (TerminalNodeFn ?ARC) ?NODE2))))

(subclass Tree DirectedGraph)
(documentation Tree EnglishLanguage "A Tree is a &%DirectedGraph that has no 
&%GraphLoops.")

(=>
  (instance ?GRAPH Tree)
  (not 
    (exists (?LOOP)
      (and
        (instance ?LOOP GraphLoop)
        (graphPart ?LOOP ?GRAPH)))))

(=>
  (instance ?GRAPH Tree)
  (not 
    (exists (?LOOP)
      (and
        (instance ?LOOP GraphCircuit)
        (graphPart ?LOOP ?GRAPH)))))

(=>
  (instance ?GRAPH Tree)
  (not 
    (exists (?ARC1 ?ARC2 ?NODE)
      (and
        (graphPart ?ARC1 ?GRAPH)
        (graphPart ?ARC2 ?GRAPH)
        (graphPart ?NODE ?GRAPH)
        (equal (TerminalNodeFn ?ARC1) ?NODE)
        (equal (TerminalNodeFn ?ARC2) ?NODE)
        (not (equal ?ARC1 ?ARC2))))))

(subclass GraphPath DirectedGraph)
(documentation GraphPath EnglishLanguage "Informally, a single, directed route between 
two &%GraphNodes in a &%Graph.  Formally, a &%DirectedGraph that is a 
&%subGraph of the original &%Graph and such that no two &%GraphArcs in 
the &%DirectedGraph have the same intial node (see &%InitialNodeFn) or 
the same terminal node (see &%TerminalNodeFn).")

(=>
   (and
      (instance ?GRAPH GraphPath)
      (instance ?ARC GraphArc)
      (graphPart ?ARC ?GRAPH))
   (=>
      (equal (InitialNodeFn ?ARC) ?NODE)
      (not (exists (?OTHER)
         (and
            (equal (InitialNodeFn ?OTHER) ?NODE)
            (not (equal ?OTHER ?ARC)))))))

(=>
   (and
      (instance ?GRAPH GraphPath)
      (instance ?ARC GraphArc)
      (graphPart ?ARC ?GRAPH))
   (=>
      (equal (TerminalNodeFn ?ARC) ?NODE)
      (not (exists (?OTHER)
         (and
            (equal (TerminalNodeFn ?OTHER) ?NODE)
            (not (equal ?OTHER ?ARC)))))))

(subclass GraphCircuit GraphPath)
(documentation GraphCircuit EnglishLanguage "A &%GraphPath that begins (see 
&%BeginNodeFn) and ends (see &%EndNodeFn) at the same 
&%GraphNode.")

(<=>
   (instance ?GRAPH GraphCircuit)
   (exists (?NODE)
      (and
         (equal (BeginNodeFn ?GRAPH) ?NODE)
         (equal (EndNodeFn ?GRAPH) ?NODE))))

(subclass MultiGraph Graph)
(documentation MultiGraph EnglishLanguage "The &%Class of multigraphs.  A multigraph 
is a &%Graph containing at least one pair of &%GraphNodes that are 
connected by more than one &%GraphArc.")

(<=>
   (instance ?GRAPH MultiGraph)
   (exists (?ARC1 ?ARC2 ?NODE1 ?NODE2)
      (and
         (graphPart ?ARC1 ?GRAPH)
         (graphPart ?ARC2 ?GRAPH)
         (graphPart ?NODE1 ?GRAPH)
         (graphPart ?NODE2 ?GRAPH)
         (links ?NODE1 ?NODE2 ?ARC1)
         (links ?NODE1 ?NODE2 ?ARC2)
         (not (equal ?ARC1 ?ARC2)))))

(subclass PseudoGraph Graph)
(documentation PseudoGraph EnglishLanguage "The &%Class of pseudographs.  A pseudograph 
is a &%Graph containing at least one &%GraphLoop.")

(<=>
   (instance ?GRAPH PseudoGraph)
   (exists (?LOOP)
      (and
         (instance ?LOOP GraphLoop)
         (graphPart ?LOOP ?GRAPH))))

(subclass GraphElement Abstract)
(partition GraphElement GraphNode GraphArc)
(documentation GraphElement EnglishLanguage "Noncompositional parts of &%Graphs.  
These parts are restricted to &%GraphNodes and &%GraphArcs.")

(=>
   (instance ?PART GraphElement)
   (exists (?GRAPH)
      (and
         (instance ?GRAPH Graph)
         (graphPart ?PART ?GRAPH))))

(subclass GraphNode GraphElement)
(documentation GraphNode EnglishLanguage "&%Graphs are comprised of &%GraphNodes 
and &%GraphArcs.  Every &%GraphNode is linked by a &%GraphArc.")

(=>
   (instance ?NODE GraphNode)
   (exists (?OTHER ?ARC)
      (links ?NODE ?OTHER ?ARC)))

(subclass GraphArc GraphElement)
(documentation GraphArc EnglishLanguage "&%Graphs are comprised of &%GraphNodes 
and &%GraphArcs.  Every &%GraphArc links two &%GraphNodes.")

(=>
   (instance ?ARC GraphArc)
   (exists (?NODE1 ?NODE2)
      (links ?NODE1 ?NODE2 ?ARC)))

(subclass GraphLoop GraphArc)
(documentation GraphLoop EnglishLanguage "A &%GraphArc in which a &%GraphNode is 
linked to itself.")

(<=>
   (instance ?LOOP GraphLoop)
   (exists (?NODE)
      (links ?NODE ?NODE ?LOOP)))

(=>
   (and
      (equal (InitialNodeFn ?ARC) ?NODE)
      (equal (TerminalNodeFn ?ARC) ?NODE))
   (instance ?ARC GraphLoop))

(instance links TernaryPredicate)
(domain links 1 GraphNode)
(domain links 2 GraphNode)
(domain links 3 GraphArc)
(documentation links EnglishLanguage "a &%TernaryPredicate that specifies the 
&%GraphArc connecting two &%GraphNodes.")

(=>
   (links ?NODE1 ?NODE2 ?ARC)
   (links ?NODE2 ?NODE1 ?ARC))

(instance graphPart BinaryPredicate)
(instance graphPart AsymmetricRelation)
(instance graphPart IrreflexiveRelation)
(domain graphPart 1 GraphElement)
(domain graphPart 2 Graph)
(documentation graphPart EnglishLanguage "A basic relation for &%Graphs and their 
parts.  (&%graphPart ?PART ?GRAPH) means that ?PART is a &%GraphArc 
or &%GraphNode of the &%Graph ?GRAPH.")

(instance subGraph BinaryPredicate)
(instance subGraph ReflexiveRelation)
(instance subGraph TransitiveRelation)
(domain subGraph 1 Graph)
(domain subGraph 2 Graph)
(documentation subGraph EnglishLanguage "The relation between two &%Graphs when one 
&%Graph is a part of the other. (&%subGraph ?GRAPH1 ?GRAPH2) means 
that ?GRAPH1 is a part of ?GRAPH2.")

(=>
  (and
    (subGraph ?GRAPH1 ?GRAPH2)
    (graphPart ?ELEMENT ?GRAPH1))
  (graphPart ?ELEMENT ?GRAPH2))

(instance pathLength BinaryPredicate)
(instance pathLength AsymmetricRelation)
(instance pathLength IrreflexiveRelation)
(domain pathLength 1 GraphPath)
(domain pathLength 2 PositiveInteger)
(documentation pathLength EnglishLanguage "A &%BinaryPredicate that specifies the 
length (in number of &%GraphNodes) of a &%GraphPath.
(&%pathLength ?PATH ?NUMBER) means that there are ?NUMBER nodes in 
the &%GraphPath ?PATH.")

(instance InitialNodeFn UnaryFunction)
(instance InitialNodeFn PartialValuedRelation)
(domain InitialNodeFn 1 GraphArc)
(range InitialNodeFn GraphNode)
(documentation InitialNodeFn EnglishLanguage "A &%UnaryFunction that maps a 
&%GraphArc to the initial node of the &%GraphArc.  Note
that this is a partial function.  In particular, the function is 
undefined for &%GraphArcs that are not part of a &%DirectedGraph.")

(instance TerminalNodeFn UnaryFunction)
(instance TerminalNodeFn PartialValuedRelation)
(domain TerminalNodeFn 1 GraphArc)
(range TerminalNodeFn GraphNode)
(documentation TerminalNodeFn EnglishLanguage "A &%UnaryFunction that maps a 
&%GraphArc to the terminal node of the &%GraphArc.  Note that this 
is a partial function.  In particular, the function is undefined 
for &%GraphArcs that are not part of a &%DirectedGraph.")

(instance BeginNodeFn UnaryFunction)
(instance BeginNodeFn TotalValuedRelation)
(domain BeginNodeFn 1 GraphPath)
(range BeginNodeFn GraphNode)  
(relatedInternalConcept BeginNodeFn InitialNodeFn)
(documentation BeginNodeFn EnglishLanguage "A &%UnaryFunction that maps a &%GraphPath 
to the &%GraphNode that is the beginning of the &%GraphPath.  Note that, 
unlike &%InitialNodeFn (which relates a &%GraphArc to a &%GraphNode),  
&%BeginNodeFn is a total function - every &%GraphPath has a beginning.")

(instance EndNodeFn UnaryFunction)
(instance EndNodeFn TotalValuedRelation)
(domain EndNodeFn 1 GraphPath)
(range EndNodeFn GraphNode) 
(relatedInternalConcept EndNodeFn TerminalNodeFn)
(documentation EndNodeFn EnglishLanguage "A &%UnaryFunction that maps a &%GraphPath 
to the &%GraphNode that is the end of the &%GraphPath.  Note that, unlike 
&%TerminalNodeFn (which relates a &%GraphArc to a &%GraphNode),  
&%EndNodeFn is a total function - every &%GraphPath has a end.")

(instance arcWeight BinaryPredicate)
(instance arcWeight SingleValuedRelation)
(domain arcWeight 1 GraphArc)
(domain arcWeight 2 Quantity)
(documentation arcWeight EnglishLanguage "This predicate indicates the value of a 
&%GraphArc in a &%Graph.  This could map to the length of a road in 
a road network or the flow rate of a pipe in a plumbing system.")

(instance PathWeightFn UnaryFunction)
(domain PathWeightFn 1 GraphPath)
(range PathWeightFn Quantity)
(documentation PathWeightFn EnglishLanguage "A &%UnaryFunction that maps a 
&%GraphPath to the sum of the &%arcWeights on the &%GraphArcs in 
the &%GraphPath.")

(=>
   (and
      (equal (PathWeightFn ?PATH) ?SUM)
      (subGraph ?SUBPATH ?PATH)
      (graphPart ?ARC1 ?PATH)
      (arcWeight ?ARC1 ?NUMBER1)
      (forall (?ARC2)
         (=>
            (graphPart ?ARC2 ?PATH)
            (or
               (graphPart ?ARC2 ?SUBPATH)
               (equal ?ARC2 ?ARC1)))))
   (equal ?SUM (AdditionFn (PathWeightFn ?SUBPATH) ?NUMBER1)))

(=>
   (and
      (equal (PathWeightFn ?PATH) ?SUM)
      (graphPart ?ARC1 ?PATH)
      (graphPart ?ARC2 ?PATH)
      (arcWeight ?ARC1 ?NUMBER1)
      (arcWeight ?ARC2 ?NUMBER2) 
      (forall (?ARC3)
         (=>
            (graphPart ?ARC3 ?PATH)
            (or
               (equal ?ARC3 ?ARC1)
               (equal ?ARC3 ?ARC2)))))
   (equal (PathWeightFn ?PATH) (AdditionFn ?NUMBER1 ?NUMBER2)))

(instance MinimalWeightedPathFn BinaryFunction)
(domain MinimalWeightedPathFn 1 GraphNode)
(domain MinimalWeightedPathFn 2 GraphNode)
(range MinimalWeightedPathFn GraphPath)
(documentation MinimalWeightedPathFn EnglishLanguage "This &%BinaryFunction assigns two 
&%GraphNodes to the &%GraphPath with the smallest sum of weighted arcs 
between the two &%GraphNodes.")

(=>
   (equal (MinimalWeightedPathFn ?NODE1 ?NODE2) ?PATH)
   (instance ?PATH (GraphPathFn ?NODE1 ?NODE2)))

(=>
   (and
      (equal (MinimalWeightedPathFn ?NODE1 ?NODE2) ?PATH)
      (equal (PathWeightFn ?PATH) ?NUMBER))
   (forall (?PATH2)
      (=>
         (and
            (instance ?PATH2 (GraphPathFn ?NODE1 ?NODE2))
            (equal (PathWeightFn ?PATH2) ?NUMBER2))
         (greaterThanOrEqualTo ?NUMBER2 ?NUMBER1))))

(instance MaximalWeightedPathFn BinaryFunction)
(domain MaximalWeightedPathFn 1 GraphNode)
(domain MaximalWeightedPathFn 2 GraphNode)
(range MaximalWeightedPathFn GraphPath)
(documentation MaximalWeightedPathFn EnglishLanguage "This &%BinaryFunction assigns two 
&%GraphNodes to the &%GraphPath with the largest sum of weighted arcs 
between the two &%GraphNodes.")

(=>
   (equal (MaximalWeightedPathFn ?NODE1 ?NODE2) ?PATH)
   (instance ?PATH (GraphPathFn ?NODE1 ?NODE2)))

(=>
   (and
      (equal (MaximalWeightedPathFn ?NODE1 ?NODE2) ?PATH)
      (equal (PathWeightFn ?PATH) ?NUMBER))
   (forall (?PATH2)
      (=>
         (and
            (instance ?PATH2 (GraphPathFn ?NODE1 ?NODE2))
            (equal (PathWeightFn ?PATH2) ?NUMBER2))
         (lessThanOrEqualTo ?NUMBER2 ?NUMBER1))))

(instance GraphPathFn BinaryFunction)
(instance GraphPathFn TotalValuedRelation)
(domain GraphPathFn 1 GraphNode)
(domain GraphPathFn 2 GraphNode)
(rangeSubclass GraphPathFn GraphPath)
(documentation GraphPathFn EnglishLanguage "A &%BinaryFunction that maps two &%GraphNodes 
to the &%Class of &%GraphPaths between those two nodes.  Note that the two 
&%GraphNodes must belong to the same &%Graph.")

(=>
   (and
      (graphPart ?PATH ?GRAPH)
      (not (instance ?GRAPH DirectedGraph)))
   (<=>
      (equal (GraphPathFn ?NODE1 ?NODE2) ?PATH)
      (equal (GraphPathFn ?NODE2 ?NODE1) ?PATH)))

(instance CutSetFn UnaryFunction)
(domain CutSetFn 1 Graph)
(rangeSubclass CutSetFn GraphPath)
(documentation CutSetFn EnglishLanguage "A &%UnaryFunction that assigns a &%Graph the 
&%Class of &%GraphPaths that partition the graph into two separate 
graphs if cut.  There may be more than one cutset for a given graph.")

(instance MinimalCutSetFn UnaryFunction)
(domain MinimalCutSetFn 1 Graph)
(rangeSubclass MinimalCutSetFn GraphPath)
(relatedInternalConcept MinimalCutSetFn CutSetFn)
(documentation MinimalCutSetFn EnglishLanguage "A &%UnaryFunction that assigns a &%Graph 
the &%Class of &%GraphPaths which comprise cutsets for the &%Graph and 
which have the least number of &%GraphArcs.")

(=>
   (instance ?GRAPH Graph)
   (subclass (MinimalCutSetFn ?GRAPH) (CutSetFn ?GRAPH)))

(=>
   (equal (MinimalCutSetFn ?GRAPH) ?PATHCLASS)
   (exists (?NUMBER)
      (forall (?PATH)
         (=>
            (instance ?PATH ?PATHCLASS)
            (pathLength ?PATH ?NUMBER)))))

(not 
  (exists (?PATH1 ?PATH2)
    (and
      (instance ?PATH1 (CutSetFn ?GRAPH))
      (instance ?PATH2 (MinimalCutSetFn ?GRAPH))
      (pathLength ?PATH1 ?NUMBER1)
      (pathLength ?PATH2 ?NUMBER2)
      (lessThan ?NUMBER1 ?NUMBER2))))

;; link the physical system to the abstract graph

(instance abstractCounterpart BinaryPredicate)
(domain abstractCounterpart 1 Abstract)
(domain abstractCounterpart 2 Physical)
(subrelation abstractCounterpart represents)
(documentation abstractCounterpart EnglishLanguage "(abstractCounterpart ?AB ?PHYS
relates a &%Physical entity to an &%Abstract one which is an idealized
model in some dimension of the &%Physical entity.  For example, an
&%Abstract &%GraphNode could be stated to be the counterpart of an 
actual &%Computer in a &%ComputerNetwork.")

(subclass PhysicalSystem Physical)
(documentation PhysicalSystem EnglishLanguage "&%PhysicalSystem is the class of complex 
&%Physical things.  A &%PhysicalSystem may have one or more 
corresponding abstract &%Graph representations.")

(instance subSystem BinaryPredicate)
(domain subSystem 1 PhysicalSystem)
(domain subSystem 2 PhysicalSystem)

(documentation subSystem EnglishLanguage "(&%subSystem ?SUB ?SYSTEM) means that the 
&%PhysicalSystem ?SUB is a part of the &%PhysicalSystem ?SYSTEM.")

(instance systemPart BinaryPredicate)
(domain systemPart 1 Physical)
(domain systemPart 2 PhysicalSystem)

(documentation systemPart EnglishLanguage "(&%systemPart ?PART ?SYSTEM) means that 
the &%Physical thing ?PART is a &%SystemElement in the &%PhysicalSystem 
?SYSTEM.")

(=>
  (and
    (subSystem ?SUB ?SYSTEM)
    (systemPart ?PART ?SUB))
  (systemPart ?PART ?SYSTEM))

(instance graphMeasure BinaryPredicate)
(domain graphMeasure 1 Graph)
(domain graphMeasure 2 UnitOfMeasure)
(documentation graphMeasure EnglishLanguage "(graphMeasure ?GRAPH ?MEAS) fixes a 
&%UnitOfMeasure that is used for the &%arcWeight of a given &%Graph.  Stating 
such a relationship entails that the components of given graph are the 
&%abstractCounterparts of sets of &%Physical &%Entity(ies).")
(=>
  (graphMeasure ?G ?M)
  (forall (?AC)
    (and
      (graphPart ?AC ?G)
      (exists (?PC)
        (abstractCounterpart ?AC ?PC)))))
(=>
  (and
    (graphMeasure ?G ?M)
    (instance ?AN GraphNode)
    (instance ?AA GraphArc)
    (abstractCounterpart ?AN ?PN)
    (abstractCounterpart ?AA ?PA)
    (arcWeight ?AA (MeasureFn ?N ?M)))
  (measure ?PA (MeasureFn ?N ?M)))  

;; END FILE

;; BEGIN FILE

;;;;;;;;;;;;;;;;;;;;;;;;;
;;  UNITS OF MEASURE   ;;
;;;;;;;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'NUMERIC FUNCTIONS'

;; This section was originally based on the relations in the Quantities 
;; ontology (developed by ITBM-CNR) and the units of measure in the 
;; "Standard Units" and "Standard Dimensions" ontologies on the Ontolingua 
;; server.  This content has been extensively revised by Helena Sofia Pinto 
;; of the Instituto Superior Tecnico in Portugal.  The sources for these 
;; revisions were: 
;; - Barry Taylor, NIST Special Publication 811, Guide for the Use of the
;;   International System of Units (SI), 1995.
;; - Encyclopaedia Britannica (on-line version at http://www.britannica.com)

(subclass UnitOfMeasure PhysicalQuantity)
(documentation UnitOfMeasure EnglishLanguage "A standard of measurement for some dimension. 
For example, the &%Meter is a &%UnitOfMeasure for the dimension of length, 
as is the &%Inch.  There is no intrinsic property of a &%UnitOfMeasure that 
makes it primitive or fundamental, rather, a system of units (e.g. 
&%SystemeInternationalUnit) defines a set of orthogonal dimensions and 
assigns units for each.") 

(subclass CompositeUnitOfMeasure UnitOfMeasure)
(documentation CompositeUnitOfMeasure EnglishLanguage "Instances
of this &%Class are &%UnitsOfMeasure defined by the functional
composition of other units, each of which might be a
&%CompositeUnitOfMeasure or a &%NonCompositeUnitOfMeasure.")

(subclass NonCompositeUnitOfMeasure UnitOfMeasure)
(documentation NonCompositeUnitOfMeasure EnglishLanguage "Instances of
this &%Class are &%UnitsOfMeasure that are applied to a single
dimension, and so are not intrinsically defined by the functional
composition of other units.")

(partition UnitOfMeasure CompositeUnitOfMeasure NonCompositeUnitOfMeasure)

(=>
  (and
    (instance ?QUANT (MeasureFn ?N ?UNIT))
    (instance ?UNIT CompositeUnitOfMeasure))
  (instance ?QUANT FunctionQuantity))

(=>
  (and
    (instance ?QUANT (MeasureFn ?N ?UNIT))
    (instance ?UNIT NonCompositeUnitOfMeasure))
  (instance ?QUANT ConstantQuantity))


(subclass SystemeInternationalUnit UnitOfMeasure)
(documentation SystemeInternationalUnit EnglishLanguage "The &%Class of Systeme 
International (SI) units.")

(subclass LengthMeasure ConstantQuantity)
(documentation LengthMeasure EnglishLanguage "A &%subclass of
&%ConstantQuantity, instances of which are measures of length.")

(subclass UnitOfLength NonCompositeUnitOfMeasure)
(documentation UnitOfLength EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%LengthMeasure.")

(subclass MassMeasure ConstantQuantity)
(documentation MassMeasure EnglishLanguage "A &%subclass of
&%ConstantQuantity, instances of which are measures of the amount of
matter in an &%Object.")

(subclass UnitOfMass NonCompositeUnitOfMeasure)
(documentation UnitOfMass EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%MassMeasure, which denote the amount of matter in
&%PhysicalObjects.")

(subclass AreaMeasure FunctionQuantity)
(documentation AreaMeasure EnglishLanguage "Measures of the amount of space in two 
dimensions.")

(subclass UnitOfArea CompositeUnitOfMeasure)
(documentation UnitOfArea EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%AreaMeasure.")

(subclass VolumeMeasure FunctionQuantity)
(documentation VolumeMeasure EnglishLanguage "Measures of the amount of space in three 
dimensions.")

(subclass UnitOfVolume CompositeUnitOfMeasure)
(documentation UnitOfVolume EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%VolumeMeasure.")

(subclass TemperatureMeasure ConstantQuantity)
(documentation TemperatureMeasure EnglishLanguage "Measures of temperature.  
In scientific circles, the temperature of something is understood as the 
average velocity of the atoms or molecules that make up the thing.")

(subclass UnitOfTemperature NonCompositeUnitOfMeasure)
(documentation UnitOfTemperature EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%TemperatureMeasure.")

(subclass CurrencyMeasure ConstantQuantity)
(documentation CurrencyMeasure EnglishLanguage "Instances of this
&%subclass of &%ConstantQuantity are measures of &%monetaryValue
stated in terms of some &%UnitOfCurrency such as &%UnitedStatesDollar,
&%UnitedStatesCent, Lire, Yen, etc.")

(subclass UnitOfCurrency NonCompositeUnitOfMeasure)
(documentation UnitOfCurrency EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%CurrencyMeasure.")

(subclass AngleMeasure ConstantQuantity)
(documentation AngleMeasure EnglishLanguage "The value of an angle in a plane or in a 
solid.")

(subclass UnitOfAngularMeasure NonCompositeUnitOfMeasure)
(documentation UnitOfAngularMeasure EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%AngleMeasure.")

(subclass PlaneAngleMeasure AngleMeasure)
(documentation PlaneAngleMeasure EnglishLanguage "The value of an angle in a plane.")

(subclass SolidAngleMeasure AngleMeasure)
(disjoint SolidAngleMeasure PlaneAngleMeasure)
(documentation SolidAngleMeasure EnglishLanguage "The value of an angle in a solid.")

(subclass UnitOfInformation NonCompositeUnitOfMeasure)
(documentation UnitOfInformation EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%InformationMeasure.")

(subclass UnitOfDuration NonCompositeUnitOfMeasure)
(documentation UnitOfDuration EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%TimeDuration.  Note that &%TimeDuration is a &%subclass
of &%TimeMeasure.")

(instance MeasureFn BinaryFunction)
(instance MeasureFn TotalValuedRelation)
(domain MeasureFn 1 RealNumber)
(domain MeasureFn 2 UnitOfMeasure)
(range MeasureFn PhysicalQuantity)
(documentation MeasureFn EnglishLanguage "This &%BinaryFunction maps a
&%RealNumber and a &%UnitOfMeasure to that &%Number of units.  It is
used to express `measured' instances of &%PhysicalQuantity.  Example:
the concept of three meters is represented as (&%MeasureFn 3
&%Meter).")

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfLength))
   (instance ?QUANT LengthMeasure))

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfMass))
   (instance ?QUANT MassMeasure))

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfArea))
   (instance ?QUANT AreaMeasure))

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfVolume))
   (instance ?QUANT VolumeMeasure))

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfTemperature))
   (instance ?QUANT TemperatureMeasure))

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfCurrency))
   (instance ?QUANT CurrencyMeasure))

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfAngularMeasure))
   (instance ?QUANT AngleMeasure))

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfDuration))
   (instance ?QUANT TimeDuration))

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfInformation))
   (instance ?QUANT InformationMeasure))

; AP - this axiom below doesn't look right, what about functions that
; return unitless ratios

;(=>
;   (and
;      (instance ?REL RelationExtendedToQuantities)
;      (instance ?REL TernaryRelation)
;      (instance ?NUMBER1 RealNumber)
;      (instance ?NUMBER2 RealNumber)
;      (?REL ?NUMBER1 ?NUMBER2 ?VALUE))
;   (forall (?UNIT)
;      (=>
;         (instance ?UNIT UnitOfMeasure)
;         (?REL (MeasureFn ?NUMBER1 ?UNIT) (MeasureFn ?NUMBER2 ?UNIT) (MeasureFn ?VALUE ?UNIT)))))


(=>
   (and
      (instance ?REL RelationExtendedToQuantities)
      (instance ?REL BinaryRelation)
      (instance ?NUMBER1 RealNumber)
      (instance ?NUMBER2 RealNumber)
      (?REL ?NUMBER1 ?NUMBER2))
   (forall (?UNIT)
      (=>
         (instance ?UNIT UnitOfMeasure)
         (?REL (MeasureFn ?NUMBER1 ?UNIT) (MeasureFn ?NUMBER2 ?UNIT)))))

(subclass UnitOfMeasureMultiplier UnaryFunction)
(subclass UnitOfMeasureMultiplier TotalValuedRelation)
(documentation UnitOfMeasureMultiplier EnglishLanguage "Each
&%instance of this &%Class is a &%UnaryFunction that, when evaluated
on its single argument, a &%UnitOfMeasure, produces another
&%UnitOfMeasure that is a numeric multiple of the argument.")

(=>
  (and
    (instance ?FUNCTION UnitOfMeasureMultiplier)
    (instance ?UNIT CompositeUnitOfMeasure))
  (instance (?FUNCTION ?UNIT) CompositeUnitOfMeasure))

(=>
  (and
    (instance ?FUNCTION UnitOfMeasureMultiplier)
    (instance ?UNIT NonCompositeUnitOfMeasure))
  (instance (?FUNCTION ?UNIT) NonCompositeUnitOfMeasure))

(instance KiloFn UnitOfMeasureMultiplier)
(domain KiloFn 1 UnitOfMeasure)
(range KiloFn UnitOfMeasure)
(documentation KiloFn EnglishLanguage "A &%UnaryFunction that maps a &%UnitOfMeasure into 
a &%UnitOfMeasure that is equal to 1,000 units of the original &%UnitOfMeasure.  
For example, (&%KiloFn &%Gram) is 1,000 &%Grams.")

(=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?KILOUNIT (KiloFn ?UNIT)))
  (equal (MeasureFn 1 ?KILOUNIT) (MeasureFn 1000 ?UNIT)))

(instance MegaFn UnitOfMeasureMultiplier)
(domain MegaFn 1 UnitOfMeasure)
(range MegaFn UnitOfMeasure)
(documentation MegaFn EnglishLanguage "A &%UnaryFunction that maps a &%UnitOfMeasure into 
a &%UnitOfMeasure that is equal to 1,000,000 units of the original 
&%UnitOfMeasure.  For example, (&%MegaFn &%Hertz) is 1,000,000 &%Hertz.")

(=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?MEGAUNIT (MegaFn ?UNIT)))
  (equal (MeasureFn 1 ?MEGAUNIT) (MeasureFn 1000000 ?UNIT)))

(instance GigaFn UnitOfMeasureMultiplier)
(domain GigaFn 1 UnitOfMeasure)
(range GigaFn UnitOfMeasure)
(documentation GigaFn EnglishLanguage "A &%UnaryFunction that maps a &%UnitOfMeasure into 
a &%UnitOfMeasure that is equal to 1,000,000,000 units of the original 
&%UnitOfMeasure.  For example, (&%GigaFn &%Hertz) is 1,000,000,000 &%Hertz.")

(=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?GIGAUNIT (GigaFn ?UNIT)))
  (equal (MeasureFn 1 ?GIGAUNIT) (MeasureFn 1000000000 ?UNIT)))

(instance TeraFn UnitOfMeasureMultiplier)
(domain TeraFn 1 UnitOfMeasure)
(range TeraFn UnitOfMeasure)
(documentation TeraFn EnglishLanguage "A &%UnaryFunction that maps a &%UnitOfMeasure 
into a &%UnitOfMeasure that is equal to 1,000,000,000,000 units of the original 
&%UnitOfMeasure.  For example, (&%TeraFn &%Hertz) is 1,000,000,000,000 &%Hertz.")

(=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?TERAUNIT (TeraFn ?UNIT)))
  (equal (MeasureFn 1 ?TERAUNIT) (MeasureFn 1000000000000 ?UNIT)))

(instance MilliFn UnitOfMeasureMultiplier)
(domain MilliFn 1 UnitOfMeasure)
(range MilliFn UnitOfMeasure)
(documentation MilliFn EnglishLanguage "A &%UnaryFunction that maps a &%UnitOfMeasure into 
a &%UnitOfMeasure that is equal to .001 units of the original &%UnitOfMeasure.  
For example, (&%MilliFn &%Gram) is .001 &%Grams.")

(=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?MILLIUNIT (MilliFn ?UNIT)))
  (equal (MeasureFn 1 ?MILLIUNIT) (MeasureFn 0.001 ?UNIT)))

(instance MicroFn UnitOfMeasureMultiplier)
(domain MicroFn 1 UnitOfMeasure)
(range MicroFn UnitOfMeasure)
(documentation MicroFn EnglishLanguage "A &%UnaryFunction that maps a &%UnitOfMeasure into 
a &%UnitOfMeasure that is equal to .000001 units of the original &%UnitOfMeasure.  
For example, (&%MicroFn &%Meter) is .000001 &%Meters.")

(=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?MICROUNIT (MicroFn ?UNIT)))
  (equal (MeasureFn 1 ?MICROUNIT) (MeasureFn 0.000001 ?UNIT)))

(instance NanoFn UnitOfMeasureMultiplier)
(domain NanoFn 1 UnitOfMeasure)
(range NanoFn UnitOfMeasure)
(documentation NanoFn EnglishLanguage "A &%UnaryFunction that maps a &%UnitOfMeasure into 
a &%UnitOfMeasure that is equal to .000000001 units of the original 
&%UnitOfMeasure.  For example, (&%MicroFn &%SecondDuration) is .000000001 
&%SecondDurations.")

(=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?NANOUNIT (NanoFn ?UNIT)))
  (equal (MeasureFn 1 ?NANOUNIT) (MeasureFn 0.000000001 ?UNIT)))

(instance PicoFn UnitOfMeasureMultiplier)
(domain PicoFn 1 UnitOfMeasure)
(range PicoFn UnitOfMeasure)
(documentation PicoFn EnglishLanguage "A &%UnaryFunction that maps a &%UnitOfMeasure into 
a &%UnitOfMeasure that is equal to .000000000001 units of the original 
&%UnitOfMeasure.  For example, (&%PicoFn &%SecondDuration) is .000000000001 
&%SecondDurations.")

(=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?PICOUNIT (PicoFn ?UNIT)))
  (equal (MeasureFn 1 ?PICOUNIT) (MeasureFn 0.000000000001 ?UNIT)))

(instance IntervalFn BinaryFunction)
(domain IntervalFn 1 ConstantQuantity)
(domain IntervalFn 2 ConstantQuantity)
(rangeSubclass IntervalFn ConstantQuantity)
(relatedInternalConcept IntervalFn RecurrentTimeIntervalFn)
(documentation IntervalFn EnglishLanguage "A &%BinaryFunction that
maps two instances of &%ConstantQuantity to the &%subclass of
&%ConstantQuantity that comprises the interval from the first
&%ConstantQuantity to the second &%ConstantQuantity.  For
example, (&%IntervalFn (&%MeasureFn 8 &%Meter) (&%MeasureFn 14 &%Meter)) 
would return the &%subclass of &%ConstantQuantity comprising quantities 
between 8 and 14 meters in length.")

(=>
  (and
    (instance ?QUANTITY (IntervalFn ?FROM ?TO))
    (instance ?FROM ?CLASS)
    (instance ?TO ?CLASS))
  (instance ?QUANTITY ?CLASS))

(<=>
   (instance ?QUANTITY (IntervalFn ?FROM ?TO))
   (and
        (greaterThanOrEqualTo ?QUANTITY ?FROM)
        (lessThanOrEqualTo ?QUANTITY ?TO)))

(instance MagnitudeFn UnaryFunction)

(domain MagnitudeFn 1 PhysicalQuantity)
(range MagnitudeFn RealNumber)
(documentation MagnitudeFn EnglishLanguage "The magnitude of a &%PhysicalQuantity is the 
numeric value for the quantity.  In other words, &%MagnitudeFn converts 
a &%PhysicalQuantity with an associated &%UnitOfMeasure into an ordinary 
&%RealNumber.  For example, the magnitude of the &%ConstantQuantity 2 
&%Kilometers is the &%RealNumber 2.   Note that the magnitude of a 
quantity in a given unit times that unit is equal to the original 
quantity.")

(=>
  (and
    (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
    (instance ?UNIT UnitOfMeasure)
    (equal ?QUANT (MeasureFn ?NUMBER ?UNIT)))
  (equal (MagnitudeFn ?QUANT) ?NUMBER))


(instance UnitFn UnaryFunction)
(domain UnitFn 1 PhysicalQuantity)
(range UnitFn UnitOfMeasure)

(documentation UnitFn EnglishLanguage "&%UnitFn returns just the
&%UnitOfMeasure of a &%PhysicalQuantity with an associated
&%UnitOfMeasure and &%RealNumber magnitude.  For example, the unit of
the &%ConstantQuantity (&%MeasureFn 2 &%Kilometer) is the
&%UnitOfMeasure &%Kilometer.")

(=>
   (and
      (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
      (instance ?UNIT UnitOfMeasure)
      (equal ?QUANT (MeasureFn ?NUMBER ?UNIT)))
   (equal (UnitFn ?QUANT) ?UNIT))

(instance PerFn BinaryFunction)
(instance PerFn TotalValuedRelation)
(domain PerFn 1 PhysicalQuantity)
(domain PerFn 2 PhysicalQuantity)

(range PerFn FunctionQuantity)

(documentation PerFn EnglishLanguage "&%PerFn maps two instances of &%PhysicalQuantity to 
the &%FunctionQuantity composed of these two instances.  For example, 
(&%PerFn (&%MeasureFn 2 (&%MicroFn &%Gram)) (&%MeasureFn 1 (&%KiloFn 
&%Gram))) denotes the &%FunctionQuantity of 2 micrograms per kiogram.  
This function is useful, because it allows the knowledge engineer to 
dynamically generate instances of &%FunctionQuantity.") 

(subrelation DensityFn PerFn)
(instance DensityFn TotalValuedRelation)
(domain DensityFn 1 MassMeasure)
(domain DensityFn 2 VolumeMeasure)
(range DensityFn FunctionQuantity)
(documentation DensityFn EnglishLanguage "&%DensityFn maps an instance of &%MassMeasure 
and an instance of &%VolumeMeasure to the density represented by this 
proportion of mass and volume.  For example, (&%DensityFn (&%MeasureFn 3 &%Gram) 
(&%MeasureFn 1 &%Liter)) represents the density of 3 grams per liter.")

(subrelation SpeedFn PerFn)
(instance SpeedFn TotalValuedRelation)
(domain SpeedFn 1 LengthMeasure)
(domain SpeedFn 2 TimeDuration)
(range SpeedFn FunctionQuantity)
(documentation SpeedFn EnglishLanguage "Maps an instance of &%LengthMeasure and an instance of 
&%TimeDuration to the speed represented by this proportion of distance and time.  
For example, (&%SpeedFn (&%MeasureFn 55 &%Mile)(&%MeasureFn 1 &%HourDuration)) 
represents the velocity of 55 miles per hour.")

(instance VelocityFn QuaternaryFunction)
(instance VelocityFn TotalValuedRelation)
(domain VelocityFn 1 LengthMeasure)
(domain VelocityFn 2 TimeDuration)
(domain VelocityFn 3 Region)
(domain VelocityFn 4 DirectionalAttribute)
(range VelocityFn FunctionQuantity)
(documentation VelocityFn EnglishLanguage "Specifies the velocity of an object, i.e. the speed 
and the direction of the speed.  For example (&%VelocityFn (&%MeasureFn 55 &%Mile) 
(&%MeasureFn 2 &%HourDuration) ?REFERENCE &%North) denotes the velocity of 55 miles 
per hour North of the given reference point ?REFERENCE.")

(=>
   (measure ?OBJECT (VelocityFn ?DISTANCE ?TIME ?REF ?DIRECTION))
   (measure ?OBJECT (SpeedFn ?DISTANCE ?TIME)))

;; Now the units of measure:

;; First base units for the SI system. No conversion functions are
;; provided for these units. 

;; Length Base Unit

(instance Meter UnitOfLength)
(instance Meter SystemeInternationalUnit)
(documentation Meter EnglishLanguage "SI &%UnitOfLength.  Symbol:  m. It is one of the
base units in SI, and it is currently defined as follows: the &%Meter 
is the length of the path traveled by light in a vacuum during a time 
interval of 1/299792458 of a &%SecondDuration.")

;; Mass Base Unit

(instance Gram UnitOfMass)
(instance Gram SystemeInternationalUnit)
(documentation Gram EnglishLanguage "Submultiple of kilogram.  Symbol: g. 
1 kilogram = 1000 &%Grams.")

;; Time Base Unit

(instance SecondDuration UnitOfDuration)
(instance SecondDuration SystemeInternationalUnit)
(documentation SecondDuration EnglishLanguage "SI &%UnitOfDuration.  Symbol: s. 
It is one of the base units in SI, and it is currently defined as 
follows: the &%SecondDuration is the duration of 9192631770 periods of 
the radiation corresponding to the transition between the two hyperfine 
levels of the ground state of the cesium 133 atom.")

;; Electric Current Base Unit

(instance Ampere CompositeUnitOfMeasure)
(instance Ampere SystemeInternationalUnit)
(documentation Ampere EnglishLanguage "SI electric current measure.  Symbol: A. It is 
one of the base units in SI. It is defined as follows: the &%Ampere is 
that constant current which, if maintained in two straight parallel 
conductors of infinite length, of negligible circular cross-section, and 
placed 1 &%Meter apart in a vacuum, would produce between these conductors 
a force equal to 2*10^(-7) &%Newton per &%Meter of length.") 

;; Thermodynamic Temperature Base Unit

(instance KelvinDegree UnitOfTemperature)
(instance KelvinDegree SystemeInternationalUnit)
(documentation KelvinDegree EnglishLanguage "SI &%UnitOfMeasure used
with &%MeasureFn to produce terms denoting instances of
&%TemperatureMeasure.  Symbol: K.  It is one of the base units in
SI (it is also a unit in the ITS system).  Kelvin differs from the
Celsius scale in that the triple point of water is defined to be
273.16 &%KelvinDegrees while it is 0 &%CelsiusDegrees.  The magnitudes
of intervals in the two scales are the same.  By definition the
conversion constant is 273.15.")

;; Amount Of Substance Base Unit

(instance Mole UnitOfMass)
(instance Mole SystemeInternationalUnit)
(documentation Mole EnglishLanguage "SI amount of substance
unit. symbol: mol. It is one of the base units in SI. It is defined as
follows: the &%Mole is the amount of substance of a system which
contains as many elementary entities as there are atoms in 0.012
&%Kilograms of carbon 12.  Note that, when this &%UnitOfMeasure is
used, the elementary entities must be specified - they may be atoms,
molecules, ions, electrons, etc. or groups of such particles.")

;; Luminosity Intensity Base Unit

(instance Candela CompositeUnitOfMeasure)
(instance Candela SystemeInternationalUnit)
(documentation Candela EnglishLanguage "SI luminosity intensity measure.  Symbol: cd. 
It is one of the base units in SI, and it is currently defined as 
follows:  the &%Candela is the luminous intensity, in a given direction, 
of a source that emits monochromatic radiation of frequency 540*10^12 
&%Hertz and that has a radiant intensity in that direction of 1/683 
&%Watt per &%Steradian.")

(instance Liter UnitOfVolume)
(documentation Liter EnglishLanguage "Unit of volume in the metric
system.  It is currently defined to be equal to one cubic
decimeter (0.001 cubic meter).  Symbol: l.")

(instance Centimeter UnitOfLength)
(documentation Centimeter EnglishLanguage "Submultiple of &%Meter.  Symbol: cm. It is 
the 100th part of a &%Meter")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Centimeter)
        (MeasureFn (MultiplicationFn ?NUMBER 0.01) Meter)))

(documentation Millimeter EnglishLanguage "Submultiple of Meter. Symbol: mm. A millimeter
is the 1000th part of a meter")
(instance Millimeter UnitOfLength)

(=>
 (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
 (equal
   (MeasureFn ?NUMBER Millimeter)
   (MeasureFn
     (MultiplicationFn ?NUMBER 0.001) Meter)))

(instance Kilometer UnitOfLength)
(documentation Kilometer EnglishLanguage "Supermultiple of &%Meter. Symbol: km. A
&%Meter is the 1000th part of a &%Kilometer")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER Kilometer)
    (MeasureFn
      (MultiplicationFn ?NUMBER 1000) Meter)))


;; What follows are derived SI units with special names and symbols
;; (multiples and submultiples are together since they represent 
;; quantities of the same kind).

;; Plane angle unit

(instance Radian UnitOfAngularMeasure)
(instance Radian SystemeInternationalUnit)
(documentation Radian EnglishLanguage "SI plane angle measure.  Symbol: rad.  It is the 
angle of a circle subtended by an arc equal in length to the circle's 
radius. Another definition is:  the plane angle between two radii of a 
circle which cut off on the circumference an arc equal in length to the 
radius.  &%Radian = m/m = 1.")

;; Solid angle unit

(instance Steradian UnitOfAngularMeasure)
(instance Steradian SystemeInternationalUnit)
(documentation Steradian EnglishLanguage "SI solid angle measure.  Symbol: sr.  It is 
the solid angle of a sphere subtended by a portion of the surface whose 
area is equal to the square of the sphere's radius.  Another definition 
is: the solid angle which, having its vertex in the center of the sphere, 
cuts off an area of the surface of the sphere equal to that of a square 
with sides of length equal to the radius of the sphere.  &%Steradian = 
m^2/m^2 = 1.")

;; Frequency units

(subclass FrequencyMeasure TimeDependentQuantity)
(documentation FrequencyMeasure EnglishLanguage "A &%subclass of
&%TimeDependentQuantity, instances of which are measures of the
frequency with which some &%Process occurs.")

(subclass UnitOfFrequency CompositeUnitOfMeasure)
(documentation UnitOfFrequency EnglishLanguage "Every instance of this
&%Class is a &%UnitOfMeasure that can be used with &%MeasureFn to form
instances of &%FrequencyMeasure.")

(=>
   (and
      (equal (MeasureFn ?NUMBER ?UNIT) ?QUANT)
      (instance ?UNIT UnitOfFrequency))
   (instance ?QUANT FrequencyMeasure))

(instance Hertz UnitOfFrequency)
(instance Hertz SystemeInternationalUnit)
(documentation Hertz EnglishLanguage "SI frequency measure.  Symbol: Hz. It is the 
number of cycles per second.  &%Hertz = s^(-1).  Note that &%Hertz 
does not have a conversion function.")


; Force Unit

(instance Newton CompositeUnitOfMeasure)
(instance Newton SystemeInternationalUnit)
(documentation Newton EnglishLanguage "SI force measure.  Symbol: N. It is that force 
which gives to a mass of 1 kilogram an acceleration of 1 &%Meter per 
&%SecondDuration.  &%Newton = m*kg*s^(-2).")


; Pressure unit

(instance Pascal CompositeUnitOfMeasure)
(instance Pascal SystemeInternationalUnit)
(documentation Pascal EnglishLanguage "SI pressure measure.  Symbol:Pa. It is the 
pressure of one &%Newton per square &%Meter.  &%Pascal = N/m^2 
= m^(-1)*kg*s^(-2).")


; Energy Unit

(instance Joule CompositeUnitOfMeasure)
(instance Joule SystemeInternationalUnit)
(documentation Joule EnglishLanguage "SI energy measure.  Symbol: J.  It is the work 
done when the point of application of 1 &%Newton is displaced a distance 
of 1 &%Meter in the direction of the force.  &%Joule = N*m = 
m^2*kg*s^(-2).")


; Power Units

(instance Watt CompositeUnitOfMeasure)
(instance Watt SystemeInternationalUnit)
(documentation Watt EnglishLanguage "SI power measure.  Symbol: W.  A &%UnitOfMeasure 
that measures power, i.e. energy produced or expended divided by 
&%TimeDuration. It is the power which gives rise to the production 
of energy (or work) at the rate of one &%Joule per &%SecondDuration.  
&%Watt = J/s = m^2*kg*s^(-3).")

(instance Horsepower CompositeUnitOfMeasure)
(documentation Horsepower EnglishLanguage "A power measure that is equal to 746 &%Watts.")

(=>
  (instance ?N RealNumber)
  (equal
    (MeasureFn ?N Horsepower)
    (MeasureFn (MultiplicationFn ?N 746) Watt)))

;;; Note: According to SI one should not use the expression "per unit of." 


; Electric Charge Units

(instance Coulomb CompositeUnitOfMeasure)
(instance Coulomb SystemeInternationalUnit)
(documentation Coulomb EnglishLanguage "SI electric charge measure.  Symbol: C. It is 
the quantity of electric charge transported through a cross section of 
a conductor in an electric circuit during each &%SecondDuration by a 
current of 1 &%Ampere.  Coulomb = s*A.")

(=>
  (equal ?QUANTITY (MeasureFn ?NUMBER Coulomb))
  (instance ?QUANTITY TimeDependentQuantity))


; Electric Potential Units

(instance Volt CompositeUnitOfMeasure)
(instance Volt SystemeInternationalUnit)
(documentation Volt EnglishLanguage "SI electric potential measure.  Symbol: V.  It is 
the difference of electric potential between two points of a conducting 
wire carrying a constant current of 1 &%Ampere, when the power dissipated 
between these points is equal to 1 &%Watt.  &%Volt = W/A = 
m^2*kg*s^(-3)*A^(-1).")


; Capacitance Units

(instance Farad CompositeUnitOfMeasure)
(instance Farad SystemeInternationalUnit)
(documentation Farad EnglishLanguage "SI capacitance measure.  Symbol: F.  It is the 
capacitance of a capacitator between the plates of which there appears 
a difference of potential of 1 &%Volt when it is charged by a quantity 
of electricity equal to 1 Coulomb.  &%Farad = C/V = 
m^(-2)*kg(-1)*s^4*A^2.")


;Electric Resistance Units

(instance Ohm CompositeUnitOfMeasure)
(instance Ohm SystemeInternationalUnit)
(documentation Ohm EnglishLanguage "SI electric resistance measure. It is the electric
resistance between two points of a conductor when a constant difference 
of potential of 1 &%Volt, applied between these two points,
produces in this conductor a current of 1 &%Ampere, this conductor not
being the force of any electromotive force.  &%Ohm = V/A = 
m^2*kg*s^(-3)*A^(-2).")

; Electric Conductance Units

(instance Siemens CompositeUnitOfMeasure)
(instance Siemens SystemeInternationalUnit)
(documentation Siemens EnglishLanguage "SI electric conductance measure.  Symbol:  S.  
In the case of direct current, the conductance in &%Siemens is the 
reciprocal of the resistance in &%Ohms, in the case of alternating current, 
it is the reciprocal of the impedance in ohms.  siemens = A/V = 
m^(-2)*kg(-1)*s^(3)*A^2.")

; Magnetic Flux Units

(instance Weber CompositeUnitOfMeasure)
(instance  Weber SystemeInternationalUnit)
(documentation Weber EnglishLanguage "SI magnetic flux measure.  Symbol: Wb. It is the 
magnetic flux which, linking a circuit of one turn, produces in it an
electromotive force of 1 &%Volt as it is reduced to zero at a uniform
rate in 1 &%SecondDuration.  &%Weber = V*s = m^2*kg*s^(-2)*A^(-1)." )

; Magnetic Flux Density Units

(instance Tesla CompositeUnitOfMeasure)
(instance Tesla SystemeInternationalUnit)
(documentation Tesla EnglishLanguage "SI magnetic flux density measure.  Symbol:  T.
One &%Tesla equals one &%Weber per square &%Meter.  &%Tesla = Wb/m^2 = 
kg*s^(-2)*A^(-1).")

; Inductance Units

(instance Henry CompositeUnitOfMeasure)
(instance Henry SystemeInternationalUnit)
(documentation Henry EnglishLanguage "SI inductance measure.  Symbol: H.  One &%Henry 
is equivalent to one &%Volt divided by one &%Ampere per &%SecondDuration. 
If a current changing at the rate of one &%Ampere per &%SecondDuration 
induces an electromotive force of one &%Volt, the circuit has an 
inductance of one &%Henry.  &%Henry = Wb/A = m^2*kg*s^(-2)*A^(-2).")

; Celsius Temperature unit

(instance CelsiusDegree UnitOfTemperature)
(instance CelsiusDegree SystemeInternationalUnit)
(documentation CelsiusDegree EnglishLanguage "A &%TemperatureMeasure.  The freezing point 
and the boiling point of water are, respectively, 0 &%CelsiusDegrees and 100 
&%CelsiusDegrees.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER CelsiusDegree)
        (MeasureFn (SubtractionFn ?NUMBER 273.15) KelvinDegree)))

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal 
        (MeasureFn ?NUMBER CelsiusDegree)
        (MeasureFn (DivisionFn (SubtractionFn ?NUMBER 32) 1.8) FahrenheitDegree)))


; Luminous Flux Units

(instance Lumen CompositeUnitOfMeasure)
(instance Lumen SystemeInternationalUnit)
(documentation Lumen EnglishLanguage "SI luminous flux measure.  Symbol: lm.  It is the 
amount streaming outward through one solid angle of 1 &%Steradian from a 
uniform point source having an intensity of one &%Candela.  &%Lumen = 
cd*sr = cd * 1.")

; Illuminance Units

(instance Lux CompositeUnitOfMeasure)
(instance Lux SystemeInternationalUnit)
(documentation Lux EnglishLanguage "SI illuminance measure.  Symbol: lx.  It is the 
amount of illumination provided when one &%Lumen is evenly distributed 
over an area of 1 square &%Meter. This is also equivalent to the 
illumination that would exist on a surface all points of which are one 
&%Meter from a point source of one &%Candela.  &%Lux = lm/m^2 = 
m^(-2)*cd.")

; Activity Units

(instance Becquerel CompositeUnitOfMeasure)
(instance Becquerel SystemeInternationalUnit)
(documentation Becquerel EnglishLanguage "SI activity measure.  Symbol: Bq.  It measures 
the amount of radioactivity contained in a given sample of matter. It is 
that quantity of a radioactive element in which there is one atomic 
disintegration per &%SecondDuration.  &%Becquerel = s^(-1).")

(=>
  (equal ?QUANTITY (MeasureFn ?NUMBER Becquerel))
  (instance ?QUANTITY TimeDependentQuantity))


; Absorbed Dose Units

(instance Gray CompositeUnitOfMeasure)
(instance Gray SystemeInternationalUnit)
(documentation Gray EnglishLanguage "SI absorbed dose measure.  Symbol: Gy.  It measures 
the dose of radiation absorbed in living tissue. It is equal approximately 
to the absorbed dose delivered when the energy per unit mass imparted to
matter by ionizing radiation is 1 &%Joule per kilogram.  &%Gray = J/kg 
= m^2*s^(-2).")

; Dose Equivalent Units

(instance Sievert CompositeUnitOfMeasure)
(instance Sievert SystemeInternationalUnit)
(documentation Sievert EnglishLanguage "SI dose equivalent measure.  Symbol: Sv.  It is 
a unit of biologic dose of ionizing radiation.  The &%Sievert makes it 
possible to normalize doses of different types of radiation. It takes 
into account the relative biologic effectiveness of ionizing radiation, 
since each form of such radiation--e.g., X rays, gamma rays, neutrons--
has a slightly different effect on living tissue for a given absorbed 
dose. The dose equivalent of a given type of radiation (in &%Sievert) is 
the dose of the radiation in &%Gray multiplied by a quality factor that 
is based on the relative biologic effectiveness of the radiation. 
Accordingly, one &%Sievert is generally defined as the amount of radiation 
roughly equivalent in biologic effectiveness to one &%Gray of gamma 
radiation.  &%Sievert = J/kg = m^2*s^(-2)")


; Units that are accepted for -use- with SI

(instance DayDuration UnitOfDuration)
(documentation DayDuration EnglishLanguage "Time unit. 1 day = 24 hours.")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER DayDuration)
    (MeasureFn (MultiplicationFn ?NUMBER 24) HourDuration)))


(instance HourDuration UnitOfDuration)
(documentation HourDuration EnglishLanguage "Time unit. 1 hour = 60 minutes.")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER HourDuration)
    (MeasureFn (MultiplicationFn ?NUMBER 60) MinuteDuration)))

(instance MinuteDuration UnitOfDuration)
(documentation MinuteDuration EnglishLanguage "Time unit. 1 minute = 60 seconds. ")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER MinuteDuration)
    (MeasureFn (MultiplicationFn ?NUMBER 60) SecondDuration)))

(instance WeekDuration UnitOfDuration)
(documentation WeekDuration EnglishLanguage "Time unit.  A week's duration is seven days.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER WeekDuration)
        (MeasureFn (MultiplicationFn ?NUMBER 7) DayDuration)))

(instance MonthDuration UnitOfDuration)
(documentation MonthDuration EnglishLanguage "Time unit.  A month's duration is at least
28 days, and no more than 31 days.  Note that this unit is a range, rather
than an exact amount, unlike most other units.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (greaterThanOrEqualTo
        (MeasureFn ?NUMBER MonthDuration)
        (MeasureFn (MultiplicationFn ?NUMBER 28) DayDuration)))

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (lessThanOrEqualTo
        (MeasureFn ?NUMBER MonthDuration)
        (MeasureFn (MultiplicationFn ?NUMBER 31) DayDuration)))
        
(instance YearDuration UnitOfDuration)
(documentation YearDuration EnglishLanguage "Time unit. one calendar year. 1 year =
365 days = 31536000 seconds.")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER YearDuration)
    (MeasureFn (MultiplicationFn ?NUMBER 365) DayDuration)))

        
;; What follows are units that are also accepted for use with SI.  The 
;; SI equivalents for these units are obtained experimentally.

(instance Amu UnitOfMass)
(documentation Amu EnglishLanguage "Atomic mass unit.  Symbol: u. It is the mass of 
the twelfth part of an atom of the Carbon 12 isotope.")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER Amu)
    (MeasureFn (MultiplicationFn ?NUMBER 1.6605402E-24) Gram)))

(instance ElectronVolt CompositeUnitOfMeasure)
(documentation ElectronVolt EnglishLanguage "The &%ElectronVolt is an energy measure.  
Symbol: eV.  It is the kinetic energy acquired by an electron in passing 
through a potential difference of 1 &%Volt in a vacuum.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER ElectronVolt)
        (MeasureFn (MultiplicationFn ?NUMBER 1.60217733E-19) Joule)))


;; The following units have been temporarily accepted for use with 
;; SI units.

(instance Angstrom UnitOfLength)
(documentation Angstrom EnglishLanguage "The &%Angstrom is a &%LengthMeasure. 
1 &%Angstrom = 10^(-10) m")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Angstrom)
        (MeasureFn (MultiplicationFn ?NUMBER 1.0E-10) Meter)))


;; The following units are unacceptable in SI but are part of other 
;; systems of measurement that are widely used.

;; More Length units

(instance FootLength UnitOfLength)
(documentation FootLength EnglishLanguage "English length unit of feet.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER FootLength)
        (MeasureFn (MultiplicationFn ?NUMBER 0.3048) Meter)))

(instance Inch UnitOfLength)
(documentation Inch EnglishLanguage "English length unit of inches.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Inch)
        (MeasureFn (MultiplicationFn ?NUMBER 0.0254) Meter)))

(instance Mile UnitOfLength)
(documentation Mile EnglishLanguage "English length unit of miles.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Mile)
        (MeasureFn (MultiplicationFn ?NUMBER 1609.344) Meter)))


;; More Volume units

(instance UnitedStatesGallon UnitOfVolume)
(relatedInternalConcept UnitedStatesGallon UnitedKingdomGallon)
(documentation UnitedStatesGallon EnglishLanguage "Unit of volume commonly used in the 
United States.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER UnitedStatesGallon)
        (MeasureFn (MultiplicationFn ?NUMBER 3.785411784) Liter))) 

(instance Quart UnitOfVolume)
(documentation Quart EnglishLanguage "English unit of volume equal to 1/4 of a 
&%UnitedStatesGallon.") 

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Quart)
        (MeasureFn (DivisionFn ?NUMBER 4) UnitedStatesGallon)))

(instance Pint UnitOfVolume)
(documentation Pint EnglishLanguage "English unit of volume equal to 1/2 of a 
&%Quart.") 

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Pint)
        (MeasureFn (DivisionFn ?NUMBER 2) Quart))) 

(instance Cup UnitOfVolume)
(documentation Cup EnglishLanguage "English unit of volume equal to 1/2 of a 
&%Pint.") 

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Cup)
        (MeasureFn (DivisionFn ?NUMBER 2) Pint)))

(instance Ounce UnitOfVolume)
(documentation Ounce EnglishLanguage "English unit of volume equal to 1/8 of a 
&%Cup.") 

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Ounce)
        (MeasureFn (DivisionFn ?NUMBER 8) Cup)))

(instance UnitedKingdomGallon UnitOfVolume)
(documentation UnitedKingdomGallon EnglishLanguage "Unit of volume commonly used in the 
United Kingdom.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER UnitedKingdomGallon)
        (MeasureFn (MultiplicationFn ?NUMBER 4.54609) Liter))) 

;; More Mass units

(instance AtomGram UnitOfMass)
(documentation AtomGram EnglishLanguage "&%MassMeasure that is also known as the gram-atom.  
Defined as the mass in grams of 1 &%Mole of pure substance.  For example, 
1 &%AtomGram of Carbon 12 will be 12 &%Grams of pure Carbon 12.  2 &%AtomGrams 
of the same substance will be 24 &%Grams of it.  This is an unusual unit in 
that it is essentially 1 &%Mole of 'stuff' measured in grams, so that the 
actual value (i.e. mass) depends on the type of substance.")

(documentation Kilogram EnglishLanguage "Supermultiple of &%Gramm. Symbol: kg. 1 &%Kilogram
= 1000 Grams.")
(instance Kilogram SystemeInternationalUnit)
(instance Kilogram UnitOfMass)

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER Kilogram)
    (MeasureFn
      (MultiplicationFn ?NUMBER 1000) Gram)))

(domain weight 1 SelfConnectedObject)
(domain weight 2 MassMeasure)
(instance weight BinaryPredicate)
(subrelation weight measure)
(documentation weight EnglishLanguage "(&%weight ?O ?MM) means that on planet earth
the &%SelfConnectedObject ?O has the weight ?MM.")

(instance PoundMass UnitOfMass)
(documentation PoundMass EnglishLanguage "English mass unit of pounds.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER PoundMass)
        (MeasureFn (MultiplicationFn ?NUMBER 453.59237) Gram)))

(instance Slug UnitOfMass)
(documentation Slug EnglishLanguage "English mass unit of slugs.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Slug)
        (MeasureFn (MultiplicationFn ?NUMBER 14593.90) Gram)))


;; More Temperature units

(instance RankineDegree UnitOfTemperature)
(documentation RankineDegree EnglishLanguage "A &%TemperatureMeasure.  Note 
that 0 &%RankineDegrees is the same as the absolute zero (i.e. 0 
&%KelvinDegrees).")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER RankineDegree)
        (MeasureFn (MultiplicationFn ?NUMBER 1.8) KelvinDegree)))

(instance FahrenheitDegree UnitOfTemperature)
(documentation FahrenheitDegree EnglishLanguage "A &%UnitOfTemperature that is commonly 
used in the United States.  On the Fahrenheit scale, the freezing point 
of water is 32 &%FahrenheitDegrees, and the boiling point of water is 
212 &%FahrenheitDegrees.")

;; More Force units

(instance PoundForce CompositeUnitOfMeasure)
(documentation PoundForce EnglishLanguage "English pound of force. The conversion
factor depends on the local value of the acceleration of free fall. A
mean value is used in the conversion axiom associated with this 
constant.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER PoundForce)
        (MeasureFn (MultiplicationFn ?NUMBER 4.448222) Newton)))


;; More Energy units

(instance Calorie CompositeUnitOfMeasure)
(documentation Calorie EnglishLanguage "A &%Calorie is an energy measure.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Calorie)
        (MeasureFn (MultiplicationFn ?NUMBER 4.1868) Joule)))

(instance BritishThermalUnit CompositeUnitOfMeasure)
(documentation BritishThermalUnit EnglishLanguage "An energy measure.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER BritishThermalUnit)
        (MeasureFn (MultiplicationFn ?NUMBER 1055.05585262) Joule)))


;; More plane angle units

(instance AngularDegree UnitOfAngularMeasure)
(documentation AngularDegree EnglishLanguage "A plane angle measure.")

(=>
  (equal ?QUANT (MeasureFn ?N AngularDegree))
  (instance ?QUANT PlaneAngleMeasure))

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER AngularDegree)
    (MeasureFn (MultiplicationFn ?NUMBER (DivisionFn Pi 180)) Radian)))

(=> 
   (measure ?ANGLE (MeasureFn ?NUMBER AngularDegree)) 
   (and  
      (greaterThanOrEqualTo ?NUMBER 0)
      (lessThanOrEqualTo ?NUMBER 360)))

(equal (MeasureFn 0 AngularDegree) (MeasureFn 360 AngularDegree))

; Other interesting units of measure

; Currency units

(instance UnitedStatesDollar UnitOfCurrency)
(documentation UnitedStatesDollar EnglishLanguage "A currency measure.")

(instance UnitedStatesCent UnitOfCurrency)
(documentation UnitedStatesCent EnglishLanguage "A currency measure.  1 &%UnitedStatesCent is 
equal to .01 &%UnitedStatesDollars.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER UnitedStatesCent)
        (MeasureFn (MultiplicationFn ?NUMBER 0.01) UnitedStatesDollar)))

(instance EuroDollar UnitOfCurrency)
(documentation EuroDollar EnglishLanguage "A currency measure of most European Union countries.")

(instance EuroCent UnitOfCurrency)
(documentation EuroCent EnglishLanguage "A currency measure.  1 &%EuroCent is equal to .01 
&%EuroDollars.")  

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER EuroCent)
        (MeasureFn (MultiplicationFn ?NUMBER 0.01) EuroDollar)))


; Information units

(subclass InformationMeasure ConstantQuantity)
(documentation InformationMeasure EnglishLanguage "Measures of the amount of information.  
Includes &%Bit, &%Byte, and multiples of these, e.g. &%KiloByte and 
&%MegaByte.")

(instance Bit UnitOfInformation)
(documentation Bit EnglishLanguage "One &%Bit of information.  A one or a zero.")

(instance Byte UnitOfInformation)
(documentation Byte EnglishLanguage "One &%Byte of information.  A &%Byte is eight 
&%Bits.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER Byte)
        (MeasureFn (MultiplicationFn ?NUMBER 8) Bit)))

(instance KiloByte UnitOfInformation)
(documentation KiloByte EnglishLanguage "One &%KiloByte (KB) of information.  One 
&%KiloByte is 1024 &%Bytes.  Note that this sense of 'kilo' is 
different from the one accepted in the SI system.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER KiloByte)
        (MeasureFn (MultiplicationFn ?NUMBER 1024) Byte)))

(instance MegaByte UnitOfInformation)
(documentation MegaByte EnglishLanguage "One &%MegaByte (MB) of information.  One 
&%MegaByte is 1024 &%KiloBytes.  Note that this sense of 'mega' is 
different from the one accepted in the SI system.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER MegaByte)
        (MeasureFn (MultiplicationFn ?NUMBER 1024) KiloByte)))


;; The following content was inspired by the Quantities ontology 
;; developed by ITBM-CNR.

(instance measure BinaryPredicate)
(instance measure AsymmetricRelation)
(domain measure 1 Object)
(domain measure 2 PhysicalQuantity)
(documentation measure EnglishLanguage "A very general &%Predicate for
asserting that a particular &%Object is measured by a particular
&%PhysicalQuantity.  In general, the second argument of this
&%Predicate will be a term produced with the &%Function &%MeasureFn.")

(instance age SingleValuedRelation)
(subrelation age measure)
(domain age 2 TimeDuration)
(documentation age EnglishLanguage "Simply relates an &%Object to a &%ConstantQuantity 
specifying the age of the &%Object.")

(=>
   (and
      (instance ?TIME TimePoint)
      (holdsDuring ?TIME (age ?OBJ ?DURATION)))
   (duration (TimeIntervalFn (BeginFn (WhenFn ?OBJ)) ?TIME) ?DURATION))

(subrelation linearExtent measure)
(domain linearExtent 2 LengthMeasure)
(documentation linearExtent EnglishLanguage "&%BinaryPredicate that is used to state the measure 
of an &%Object from one point to another point along its surface.  Note 
that the difference between the predicates &%length and &%distance is that 
the &%length is used to state the &%LengthMeasure of one of the dimensions of 
a single object, while &%distance is used to state the &%LengthMeasure that 
separates two distinct objects.")

(instance width SingleValuedRelation)
(subrelation width linearExtent)
(documentation width EnglishLanguage "&%BinaryPredicate that is used to state the measure 
of an &%Object from side to side at its widest span.")

(subrelation height linearExtent)
(domain height 1 SelfConnectedObject)
(domain height 2 LengthMeasure)
(documentation height EnglishLanguage "The height of an &%Object is the distance between 
its &%top and its &%bottom.")

(instance length SingleValuedRelation)
(subrelation length linearExtent)
(documentation length EnglishLanguage "&%BinaryPredicate that is used to state the measure 
of an &%Object along its longest span.")
(=>
  (length ?O ?M)
  (not
    (exists (?M2)
      (and
        (linearExtent ?O ?M2)
	(greaterThan ?M2 ?M)))))

(subclass Oval ClosedTwoDimensionalFigure)
(documentation Oval EnglishLanguage "The class of &%ClosedTwoDimensionalFigures that are 
produced by the intersection of a &%Cone with a &%ClosedTwoDimensionalFigure.")

(subclass Circle Oval)
(documentation Circle EnglishLanguage "The class of &%Ovals such that all &%GeometricPoints 
that make up the &%Circle are equidistant from a single &%GeometricPoint, 
known as the center of the &%Circle.")

(=>
  (instance ?C Circle)
  (exists (?R)
    (radius ?C ?R)))

(=>
  (instance ?C Circle)
  (exists (?P)
    (equal (CenterOfCircleFn ?C) ?P)))

(documentation CenterOfCircleFn EnglishLanguage "(CenterOfCircleFn ?CIRCLE) denotes the 
&%GeometricPoint that is the center of the &%Circle ?CIRCLE.")
(instance CenterOfCircleFn UnaryFunction)
(instance CenterOfCircleFn TotalValuedRelation)
(domain CenterOfCircleFn 1 Circle)
(range CenterOfCircleFn GeometricPoint)

(instance radius BinaryPredicate)
(instance radius SingleValuedRelation)
(instance radius TotalValuedRelation)
(domain radius 1 Circle)
(domain radius 2 LengthMeasure)
(documentation radius EnglishLanguage "(&%radius ?CIRCLE ?LENGTH) means that the radius of 
the &%Circle ?CIRCLE has a length of ?LENGTH.")

(=>
   (radius ?CIRCLE ?RADIUS)
   (exists (?POINT)
      (forall (?PART)
         (=>
            (pointOfFigure ?PART ?CIRCLE)
            (geometricDistance ?PART ?POINT ?RADIUS)))))

;(subrelation diameter width) causing domain of 1st argument inconsistency
(instance diameter BinaryPredicate)
(instance diameter SingleValuedRelation)
(instance diameter TotalValuedRelation)
(domain diameter 1 Circle)
(domain diameter 2 LengthMeasure) 
(documentation diameter EnglishLanguage "(&%diameter ?CIRCLE ?LENGTH) means that the diameter 
of the &%Circle ?CIRCLE has a length of ?LENGTH.")

(=>
   (diameter ?CIRCLE ?LENGTH)
   (exists (?HALF)
      (and
         (radius ?CIRCLE ?HALF)
         (equal (MultiplicationFn ?HALF 2) ?LENGTH))))

(instance distance SingleValuedRelation)
(instance distance SpatialRelation)
(instance distance TernaryPredicate)
(domain distance 1 Physical)
(domain distance 2 Physical)
(domain distance 3 LengthMeasure)
(documentation distance EnglishLanguage "(&%distance ?OBJ1 ?OBJ2 ?QUANT) means that the 
shortest distance between the two objects ?OBJ1 and ?OBJ2 is ?QUANT.  Note 
that the difference between the predicates &%length and &%distance is that 
the &%length is used to state the &%LengthMeasure of one of the dimensions of 
a single object, while &%distance is used to state the &%LengthMeasure that 
separates two distinct objects.")

(=>
   (distance ?OBJ1 ?OBJ2 ?QUANT)
   (distance ?OBJ2 ?OBJ1 ?QUANT))

(subrelation altitude distance)
(instance altitude SingleValuedRelation)
(documentation altitude EnglishLanguage "A &%TernaryPredicate that is
used to state the &%distance between the &%top of an &%Object and
another point that is below the &%top of the &%Object (often this
other point will be sea level).  Note that this &%Predicate can be
used to specify, for example, the height of geographic features,
e.g. mountains, the altitude of aircraft, and the orbit of satellites
around the Earth.")

(=>
   (altitude ?OBJ1 ?OBJ2 ?HEIGHT)
   (orientation ?OBJ1 ?OBJ2 Above))

(=>
   (altitude ?OBJ1 ?OBJ2 ?HEIGHT)
   (exists (?TOP)
      (and
         (top ?TOP ?OBJ1)
         (distance ?TOP ?OBJ2 ?HEIGHT))))

(subrelation depth distance)
(instance depth SingleValuedRelation)
(documentation depth EnglishLanguage "A &%TernaryPredicate that is
used to state the &%distance between the &%top of an &%Object and
another point that is above the &%top of the &%Object (often this
other point will be sea level).  Note that this &%Predicate can be
used to specify, for example, the depth of marine life or submarines,
for example.")

(=>
   (depth ?OBJ1 ?OBJ2 ?DEPTH)
   (orientation ?OBJ1 ?OBJ2 Below))

(=>
   (depth ?OBJ1 ?OBJ2 ?DEPTH)
   (exists (?BOTTOM)
      (and
         (bottom ?BOTTOM ?OBJ1)
         (distance ?BOTTOM ?OBJ2 ?DEPTH))))

(instance larger BinaryPredicate)
(instance larger SpatialRelation)
(instance larger TransitiveRelation)
(instance larger IrreflexiveRelation)
(domain larger 1 Object)
(domain larger 2 Object)
(documentation larger EnglishLanguage "(&%larger ?OBJ1 ?OBJ2) means that ?OBJ1 is 
larger, with respect to all &%LengthMeasures, than ?OBJ2.")

(<=>
  (larger ?OBJ1 ?OBJ2)
  (forall (?QUANT1 ?QUANT2 ?UNIT)
    (=>
      (and
        (measure ?OBJ1 (MeasureFn ?QUANT1 ?UNIT))
        (measure ?OBJ2 (MeasureFn ?QUANT2 ?UNIT))
        (instance ?UNIT UnitOfLength))
      (greaterThan ?QUANT1 ?QUANT2))))

(instance smaller BinaryPredicate)
(instance smaller SpatialRelation)
(instance smaller TransitiveRelation)
(instance smaller IrreflexiveRelation)
(domain smaller 1 Object)
(domain smaller 2 Object)
(inverse smaller larger)
(documentation smaller EnglishLanguage "(&%smaller ?OBJ1 ?OBJ2) means that ?OBJ1 
is smaller, with respect to all &%LengthMeasures, than ?OBJ2.")

(instance monetaryValue SingleValuedRelation)
(instance monetaryValue AsymmetricRelation)
(instance monetaryValue BinaryPredicate)
(domain monetaryValue 1 Physical)
(domain monetaryValue 2 CurrencyMeasure)
(documentation monetaryValue EnglishLanguage "A &%BinaryPredicate that associates an 
&%Object or &%Process with its value expressed as an instance of 
&%CurrencyMeasure.")

(instance WealthFn UnaryFunction)
(domain WealthFn 1 Agent)
(range WealthFn CurrencyMeasure)
(documentation WealthFn EnglishLanguage "A &%UnaryFunction that maps an &%Agent to a 
&%CurrencyMeasure specifying the value of the property owned by the &%Agent.  
Note that this &%Function is generally used in conjunction with the 
&%Function &%PropertyFn, e.g. (&%WealthFn (&%PropertyFn BillGates)) would 
return the monetary value of the sum of Bill Gates' holdings.") 

(<=>
   (equal (WealthFn ?PERSON) ?AMOUNT)
   (monetaryValue (PropertyFn ?PERSON) ?AMOUNT))

(instance barometricPressure BinaryPredicate)
(instance barometricPressure AsymmetricRelation)
(subrelation barometricPressure measure)
(domain barometricPressure 1 Object)
(domain barometricPressure 2 UnitOfAtmosphericPressure)
(documentation barometricPressure EnglishLanguage 
"(&%barometricPressure ?AREA ?PRESSURE) means that the atmospheric 
pressure measured at ?AREA is ?PRESSURE.  Barometric pressure is 
typically expressed in units of &%InchMercury or &%MmMercury.  For 
example, standard sea level pressure is 29.92 inches (760 mm) of mercury: 
(&%barometricPressure &%SeaLevel (&%MeasureFn 29.92 &%InchMercury)).")

(subclass UnitOfAtmosphericPressure CompositeUnitOfMeasure)
(documentation UnitOfAtmosphericPressure
EnglishLanguage "&%UnitOfAtmosphericPressure includes those instances of
&%UnitOfMeasure used to measure atmospheric pressure (&%barometricPressure),
e.g., &%InchMercury.")

(instance InchMercury UnitOfAtmosphericPressure)
(documentation InchMercury EnglishLanguage "&%InchMercury is a &%UnitOfMeasure 
for &%barometricPressure.  It is used to express the number of 
inches of mercury supported in a mercurial barometer by the 
surrounding air pressure.")

(instance MmMercury UnitOfAtmosphericPressure)
(documentation MmMercury EnglishLanguage "&%MmMercury is a &%UnitOfMeasure 
for &%barometricPressure.  It is used to express the number 
of millimeters of mercury supported in a mercurial barometer
 by the surrounding air pressure.")

;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;;;;;
;; TEMPORAL CONCEPTS ;;
;;;;;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'STRUCTURAL ONTOLOGY'
;; INCLUDES 'BASE ONTOLOGY'

;; The first part of this section contains definitions relations involving 
;; temporal notions.  Most of these definitions and axioms were derived from 
;; the work of James Allen.  This part of the section was extensively revised on 
;; the basis of comments from Pat Hayes.  The second part of this section 
;; is an attempt to incorporate the Simple-Time ontology from the 
;; Ontolingua server into the SUMO.

(instance PositiveInfinity TimePoint)
(documentation PositiveInfinity EnglishLanguage "The &%TimePoint that is after 
all other &%TimePoints.")

(=> 
   (and 
      (instance ?POINT TimePoint) 
      (not (equal ?POINT PositiveInfinity)))
   (before ?POINT PositiveInfinity))

(=>   
   (and   
      (instance ?POINT TimePoint) 
      (not (equal ?POINT PositiveInfinity)))
   (exists (?OTHERPOINT) 
      (temporallyBetween ?POINT ?OTHERPOINT PositiveInfinity)))

(instance NegativeInfinity TimePoint)
(documentation NegativeInfinity EnglishLanguage "The &%TimePoint that is before 
all other &%TimePoints.")

(=> 
   (and 
      (instance ?POINT TimePoint) 
      (not (equal ?POINT NegativeInfinity)))
   (before NegativeInfinity ?POINT))

(=>   
   (and   
      (instance ?POINT TimePoint) 
      (not (equal ?POINT NegativeInfinity)))
   (exists (?OTHERPOINT) 
      (temporallyBetween NegativeInfinity ?OTHERPOINT ?POINT)))

(instance duration BinaryPredicate)
(instance duration AsymmetricRelation)
(instance duration TotalValuedRelation)
(domain duration 1 TimeInterval)
(domain duration 2 TimeDuration)
(documentation duration EnglishLanguage "(&%duration ?POS ?TIME) means that the 
duration of the &%TimePosition ?POS is ?TIME.  Note that this 
&%Predicate can be used in conjunction with the &%Function &%WhenFn 
to specify the duration of any instance of &%Physical.")

(instance frequency BinaryPredicate)
(instance frequency AsymmetricRelation)
(domainSubclass frequency 1 Process)
(domain frequency 2 TimeDuration)
(documentation frequency EnglishLanguage "(&%frequency ?PROC ?TIME) means that the 
&%Process type of ?PROC recurs after every interval of ?TIME.")

(=>
   (frequency ?PROC ?TIME1)
   (forall (?TIME2)
      (=>
         (duration ?TIME2 ?TIME1)
         (exists (?POSITION)
            (and
               (temporalPart ?POSITION ?TIME2)
               (holdsDuring ?POSITION (exists (?INST) (instance ?INST ?PROC))))))))

(instance temporalPart BinaryPredicate)
(instance temporalPart TemporalRelation)
(instance temporalPart PartialOrderingRelation)
(domain temporalPart 1 TimePosition)
(domain temporalPart 2 TimePosition)

(documentation temporalPart EnglishLanguage "The temporal analogue of the spatial &%part 
predicate.  (&%temporalPart ?POS1 ?POS2) means that &%TimePosition ?POS1 
is part of &%TimePosition ?POS2.  Note that since &%temporalPart is a 
&%ReflexiveRelation every &%TimePostion is a &%temporalPart of itself.") 

(=>
   (instance ?POINT TimePoint)
   (exists (?INTERVAL)
      (and
         (instance ?INTERVAL TimeInterval)
         (temporalPart ?POINT ?INTERVAL))))

(=>
   (instance ?INTERVAL TimeInterval)
   (exists (?POINT)
      (and
         (instance ?POINT TimePoint)
         (temporalPart ?POINT ?INTERVAL))))

(=>
   (and
      (holdsDuring ?TIME1 ?SITUATION)
      (temporalPart ?TIME2 ?TIME1))
   (holdsDuring ?TIME2 ?SITUATION))

(=>
   (and
      (holdsDuring ?INTERVAL (?REL ?INST1 ?INST2))
      (instance ?INST1 Physical)
      (instance ?INST2 Physical))
   (and
      (time ?INST1 ?INTERVAL)
      (time ?INST2 ?INTERVAL)))

(<=>
   (temporalPart ?POS (WhenFn ?THING))
   (time ?THING ?POS))

(instance BeginFn TemporalRelation)
(instance BeginFn UnaryFunction)
(instance BeginFn TotalValuedRelation)
(domain BeginFn 1 TimeInterval)
(range BeginFn TimePoint)
(documentation BeginFn EnglishLanguage "A &%UnaryFunction that maps a &%TimeInterval to 
the &%TimePoint at which the interval begins.")

(=>
   (origin ?PROCESS ?OBJ)
   (eventLocated (WhereFn ?PROCESS (BeginFn (WhenFn ?PROCESS))) (WhereFn ?OBJ (BeginFn (WhenFn ?OBJ)))))

(=>
   (equal (BeginFn ?INTERVAL) ?POINT)
   (forall (?OTHERPOINT)
      (=>
         (and
            (temporalPart ?OTHERPOINT ?INTERVAL)
            (not (equal ?OTHERPOINT ?POINT)))
         (before ?POINT ?OTHERPOINT))))

(instance EndFn TemporalRelation)
(instance EndFn UnaryFunction)
(instance EndFn TotalValuedRelation)
(domain EndFn 1 TimeInterval)
(range EndFn TimePoint)
(documentation EndFn EnglishLanguage "A &%UnaryFunction that maps a &%TimeInterval to 
the &%TimePoint at which the interval ends.")

(=>
   (equal (EndFn ?INTERVAL) ?POINT)
   (forall (?OTHERPOINT)
      (=>
         (and
            (temporalPart ?OTHERPOINT ?INTERVAL)
            (not (equal ?OTHERPOINT ?POINT)))
         (before ?OTHERPOINT ?POINT))))

(=>
     (and
          (resource ?PROC ?OBJ)
          (holdsDuring (BeginFn (WhenFn ?PROC)) (measure ?OBJ ?QUANT1))
          (holdsDuring (EndFn (WhenFn ?PROC)) (measure ?OBJ ?QUANT2)))
     (greaterThan ?QUANT1 ?QUANT2))

(subrelation starts temporalPart)
(instance starts TemporalRelation)
(instance starts TransitiveRelation)
(instance starts IrreflexiveRelation)
(domain starts 1 TimeInterval)
(domain starts 2 TimeInterval)
(documentation starts EnglishLanguage "(&%starts ?INTERVAL1 ?INTERVAL2) means that 
?INTERVAL1 and ?INTERVAL2 are both &%TimeIntervals that have the same 
initial &%TimePoint and that ?INTERVAL1 ends before ?INTERVAL2.")

(<=> 
   (starts ?INTERVAL1 ?INTERVAL2)
   (and 
      (equal
         (BeginFn ?INTERVAL1)
         (BeginFn ?INTERVAL2))
      (before
         (EndFn ?INTERVAL1)
         (EndFn ?INTERVAL2))))

(subrelation finishes temporalPart)
(instance finishes TemporalRelation)
(instance finishes TransitiveRelation)
(instance finishes IrreflexiveRelation)
(domain finishes 1 TimeInterval)
(domain finishes 2 TimeInterval)
(documentation finishes EnglishLanguage "(&%finishes ?INTERVAL1 ?INTERVAL2) means that 
?INTERVAL1 and ?INTERVAL2 are both &%TimeIntervals that have the same 
ending &%TimePoint and that ?INTERVAL2 begins before ?INTERVAL1.")

(<=>
   (finishes ?INTERVAL1 ?INTERVAL2)
   (and
      (before
         (BeginFn ?INTERVAL2)
         (BeginFn ?INTERVAL1))
      (equal
         (EndFn ?INTERVAL2)
         (EndFn ?INTERVAL1))))

(instance before TemporalRelation)
(instance before IrreflexiveRelation)
(instance before TransitiveRelation)
(subrelation before beforeOrEqual)
(relatedInternalConcept before earlier)
(domain before 1 TimePoint)
(domain before 2 TimePoint)
(documentation before EnglishLanguage "(&%before ?POINT1 ?POINT2) means that ?POINT1 
precedes ?POINT2 on the universal timeline.")

;; An Object exists (and, hence, retains its identity) over time, i.e., 
;; an object exists at every point over some interval of time.

(=> 
    (instance ?OBJ Object)
    (exists (?TIME1 ?TIME2)
       (and 
          (instance ?TIME1 TimePoint) 
          (instance ?TIME2 TimePoint) 
          (before ?TIME1 ?TIME2)
          (forall (?TIME)
             (=> 
               (and 
                 (beforeOrEqual ?TIME1 ?TIME) 
                 (beforeOrEqual ?TIME ?TIME2))
               (time ?OBJ ?TIME))))))

(=>
   (result ?PROC ?OBJ)
   (forall (?TIME)
      (=>
         (before ?TIME (BeginFn (WhenFn ?PROC)))
         (not
            (time ?OBJ ?TIME)))))

(=>
   (instance ?INTERVAL TimeInterval)
   (before (BeginFn ?INTERVAL) (EndFn ?INTERVAL)))

(instance beforeOrEqual BinaryPredicate)
(instance beforeOrEqual TemporalRelation)
(instance beforeOrEqual PartialOrderingRelation)
(domain beforeOrEqual 1 TimePoint)
(domain beforeOrEqual 2 TimePoint)
(documentation beforeOrEqual EnglishLanguage "(&%beforeOrEqual ?POINT1 ?POINT2) means that ?POINT1 
is identical with ?POINT2 or occurs before it on the universal timeline.")

(=> 
   (beforeOrEqual ?POINT1 ?POINT2)
   (or 
       (before ?POINT1 ?POINT2) 
       (equal ?POINT1 ?POINT2)))

(instance temporallyBetween TemporalRelation)
(instance temporallyBetween TernaryPredicate)
(subrelation temporallyBetween temporallyBetweenOrEqual)
(domain temporallyBetween 1 TimePoint)
(domain temporallyBetween 2 TimePoint)
(domain temporallyBetween 3 TimePoint)
(documentation temporallyBetween EnglishLanguage "(&%temporallyBetween ?POINT1 ?POINT2 
?POINT3) means that the &%TimePoint ?POINT2 is between the &%TimePoints 
?POINT1 and ?POINT3, i.e. ?POINT1 is before ?POINT2 and ?POINT2 is before 
?POINT3.")

(<=>
   (temporallyBetween ?POINT1 ?POINT2 ?POINT3)
   (and
      (before ?POINT1 ?POINT2)
      (before ?POINT2 ?POINT3))) 

(instance temporallyBetweenOrEqual TemporalRelation)
(instance temporallyBetweenOrEqual TernaryPredicate)
(domain temporallyBetweenOrEqual 1 TimePoint)
(domain temporallyBetweenOrEqual 2 TimePoint)
(domain temporallyBetweenOrEqual 3 TimePoint)
(documentation temporallyBetweenOrEqual EnglishLanguage "(&%temporallyBetweenOrEqual ?POINT1 ?POINT2 
?POINT3) means that the &%TimePoint ?POINT1 is before or equal to the 
&%TimePoint ?POINT2 and ?POINT2 is before or equal to the &%TimePoint 
?POINT3.")

(<=>
   (temporallyBetweenOrEqual ?POINT1 ?POINT2 ?POINT3)
   (and
      (beforeOrEqual ?POINT1 ?POINT2)
      (beforeOrEqual ?POINT2 ?POINT3)))

(<=>
   (and
      (time ?PHYS ?TIME)
      (instance ?TIME TimePoint))
   (temporallyBetweenOrEqual (BeginFn (WhenFn ?PHYS)) ?TIME (EndFn (WhenFn ?PHYS))))

(instance overlapsTemporally BinaryPredicate)
(instance overlapsTemporally TemporalRelation)
(instance overlapsTemporally ReflexiveRelation)
(instance overlapsTemporally SymmetricRelation)
(domain overlapsTemporally 1 TimeInterval)
(domain overlapsTemporally 2 TimeInterval)
(documentation overlapsTemporally EnglishLanguage "(&%overlapsTemporally ?INTERVAL1 
?INTERVAL2) means that the &%TimeIntervals ?INTERVAL1 and ?INTERVAL2 
have a &%TimeInterval as a common part.")

(<=>
   (overlapsTemporally ?INTERVAL1 ?INTERVAL2)
   (exists (?INTERVAL3) 
      (and
         (instance ?INTERVAL3 TimeInterval)
         (temporalPart ?INTERVAL3 ?INTERVAL1)
         (temporalPart ?INTERVAL3 ?INTERVAL2))))

(=>
   (and
      (instance ?REL BinaryPredicate)
      (instance ?REL SpatialRelation)
      (?REL ?OBJ1 ?OBJ2))
   (overlapsTemporally (WhenFn ?OBJ1) (WhenFn ?OBJ2)))

(subrelation during temporalPart)
(instance during TransitiveRelation)
(instance during IrreflexiveRelation)
(subrelation during overlapsTemporally)
(domain during 1 TimeInterval)
(domain during 2 TimeInterval)
(documentation during EnglishLanguage "(&%during ?INTERVAL1 ?INTERVAL2) means that 
?INTERVAL1 starts after and ends before ?INTERVAL2.") 

(=> 
   (during ?INTERVAL1 ?INTERVAL2)
   (and 
      (before (EndFn ?INTERVAL1) (EndFn ?INTERVAL2))
      (before (BeginFn ?INTERVAL2) (BeginFn ?INTERVAL1))))

(instance meetsTemporally BinaryPredicate)
(instance meetsTemporally TemporalRelation)
(instance meetsTemporally AsymmetricRelation)
(instance meetsTemporally IntransitiveRelation)
(domain meetsTemporally 1 TimeInterval)
(domain meetsTemporally 2 TimeInterval)
(documentation meetsTemporally EnglishLanguage "(&%meetsTemporally ?INTERVAL1 ?INTERVAL2) 
means that the terminal point of the &%TimeInterval ?INTERVAL1 is the 
initial point of the &%TimeInterval ?INTERVAL2.")

(<=> 
   (meetsTemporally ?INTERVAL1 ?INTERVAL2)
   (equal 
      (EndFn ?INTERVAL1)
      (BeginFn ?INTERVAL2)))

(=>
  (and
    (equal
      (BeginFn ?INTERVAL1)
      (BeginFn ?INTERVAL2))
    (equal
      (EndFn ?INTERVAL1)
      (EndFn ?INTERVAL2)))
    (equal ?INTERVAL1 ?INTERVAL2))

(instance earlier BinaryPredicate)
(instance earlier TemporalRelation)
(instance earlier TransitiveRelation)
(instance earlier IrreflexiveRelation)
(domain earlier 1 TimeInterval)
(domain earlier 2 TimeInterval)
(documentation earlier EnglishLanguage "(&%earlier ?INTERVAL1 ?INTERVAL2) means that 
the &%TimeInterval ?INTERVAL1 ends before the &%TimeInterval ?INTERVAL2 
begins.")

(<=>
    (earlier ?INTERVAL1 ?INTERVAL2)
    (before (EndFn ?INTERVAL1) (BeginFn ?INTERVAL2)))

(instance cooccur BinaryPredicate)
(instance cooccur TemporalRelation)
(instance cooccur EquivalenceRelation)
(domain cooccur 1 Physical)
(domain cooccur 2 Physical)
(documentation cooccur EnglishLanguage "(&%cooccur ?THING1 ?THING2) means that the 
&%Object or &%Process ?THING1 occurs at the same time as, together with, 
or jointly with the &%Object or &%Process ?THING2.  This covers the 
following temporal relations:  is co-incident with, is concurrent with, 
is contemporaneous with, and is concomitant with.")

(<=>
   (cooccur ?PHYS1 ?PHYS2)
   (equal (WhenFn ?PHYS1) (WhenFn ?PHYS2))) 

;; The following functions generate &%TimeIntervals.

(instance TimeIntervalFn BinaryFunction)
(instance TimeIntervalFn TemporalRelation)
(domain TimeIntervalFn 1 TimePoint)
(domain TimeIntervalFn 2 TimePoint)
(range TimeIntervalFn TimeInterval)
(documentation TimeIntervalFn EnglishLanguage "A &%BinaryFunction that takes two &%TimePoints 
as arguments and returns the &%TimeInterval defined by these two &%TimePoints.  
Note that the first &%TimePoint must occur earlier than the second &%TimePoint.")

(=>
   (and
      (instance ?POINT1 TimePoint)
      (instance ?POINT2 TimePoint)
      (instance ?INTERVAL TimeInterval)
      (equal (TimeIntervalFn ?POINT1 ?POINT2) ?INTERVAL))
   (and
      (equal (BeginFn ?INTERVAL) ?POINT1)
      (equal (EndFn ?INTERVAL) ?POINT2)))

(=>
   (and
      (instance ?POINT1 TimePoint)
      (instance ?POINT2 TimePoint)
      (instance ?INTERVAL TimeInterval)
      (equal (TimeIntervalFn ?POINT1 ?POINT2) ?INTERVAL))
   (forall (?POINT)
      (<=>
         (temporallyBetweenOrEqual ?POINT1 ?POINT ?POINT2)
         (temporalPart ?POINT ?INTERVAL))))

(instance RecurrentTimeIntervalFn TemporalRelation)
(instance RecurrentTimeIntervalFn BinaryFunction)
(domainSubclass RecurrentTimeIntervalFn 1 TimeInterval)
(domainSubclass RecurrentTimeIntervalFn 2 TimeInterval)
(rangeSubclass RecurrentTimeIntervalFn TimeInterval)
(documentation RecurrentTimeIntervalFn EnglishLanguage "A function that is useful for generating 
recurring time intervals.  For example, (&%RecurrentTimeIntervalFn (&%HourFn 6 &%Day)  
(&%HourFn 12 &%Day)) returns the &%Class of &%TimeIntervals beginning at 6 in the 
morning and ending at 12 noon.  For another example, (&%RecurrentTimeInterval 
&%Saturday &%Sunday) returns the &%Class of all weekends.  For still another example, 
(&%RecurrentTimeInterval &%June &%August) returns the &%Class containing the academic 
summer period.")

(=>
   (instance ?INTERVAL (RecurrentTimeIntervalFn ?TIMECLASS1 ?TIMECLASS2))
   (exists (?TIME1 ?TIME2)
      (and
         (instance ?TIME1 ?TIMECLASS1)
         (instance ?TIME2 ?TIMECLASS2)
         (starts ?TIME1 ?INTERVAL)
         (finishes ?TIME2 ?INTERVAL))))

(instance WhenFn TemporalRelation)
(instance WhenFn UnaryFunction)
(instance WhenFn TotalValuedRelation)
(domain WhenFn 1 Physical)
(range WhenFn TimeInterval)
(documentation WhenFn EnglishLanguage "A &%UnaryFunction that maps an &%Object or 
&%Process to the exact &%TimeInterval during which it exists.  Note 
that, for every &%TimePoint ?TIME outside of the &%TimeInterval 
(WhenFn ?THING), (time ?THING ?TIME) does not hold.")

(instance PastFn TemporalRelation)
(instance PastFn UnaryFunction)
(instance PastFn TotalValuedRelation)
(domain PastFn 1 TimePosition)
(range PastFn TimeInterval)
(documentation PastFn EnglishLanguage "A &%UnaryFunction that maps a &%TimePosition 
to the &%TimeInterval that meets it and that begins at 
&%NegativeInfinity.")

(=>
   (instance ?INTERVAL TimeInterval)
   (meetsTemporally (PastFn ?INTERVAL) ?INTERVAL))

(=>
   (instance ?INTERVAL TimeInterval)
   (equal (PastFn ?INTERVAL) (TimeIntervalFn NegativeInfinity (BeginFn ?INTERVAL))))

(instance ImmediatePastFn TemporalRelation)
(instance ImmediatePastFn UnaryFunction)
(instance ImmediatePastFn TotalValuedRelation)
(domain ImmediatePastFn 1 TimePosition)
(range ImmediatePastFn TimeInterval)
(documentation ImmediatePastFn EnglishLanguage "A &%UnaryFunction that maps a 
&%TimePosition to a short, indeterminate &%TimeInterval that 
immediately precedes the &%TimePosition.")

(=>
   (instance ?INTERVAL TimeInterval)
   (finishes (ImmediatePastFn ?INTERVAL) (PastFn ?INTERVAL)))

(instance FutureFn TemporalRelation)
(instance FutureFn UnaryFunction)
(instance FutureFn TotalValuedRelation)
(domain FutureFn 1 TimePosition)
(range FutureFn TimeInterval)
(documentation FutureFn EnglishLanguage "A &%UnaryFunction that maps a &%TimePosition 
to the &%TimeInterval which it meets and which ends at 
&%PositiveInfinity.")

(=>
   (instance ?INTERVAL TimeInterval)
   (meetsTemporally ?INTERVAL (FutureFn ?INTERVAL)))

(=>
   (instance ?INTERVAL TimeInterval)
   (equal (FutureFn ?INTERVAL) (TimeIntervalFn (EndFn ?INTERVAL) PositiveInfinity)))

(instance ImmediateFutureFn TemporalRelation)
(instance ImmediateFutureFn UnaryFunction)
(instance ImmediateFutureFn TotalValuedRelation)
(domain ImmediateFutureFn 1 TimePosition)
(range ImmediateFutureFn TimeInterval)
(documentation ImmediateFutureFn EnglishLanguage "A &%UnaryFunction that maps a 
&%TimePosition to a short, indeterminate &%TimeInterval that 
immediately follows the &%TimePosition.")

(=>
   (instance ?INTERVAL TimeInterval)
   (starts (ImmediateFutureFn ?INTERVAL) (FutureFn ?INTERVAL)))

;; The following definitions and axioms (down to the next section break) 
;; cover the content in the Simple-Time ontology on the Ontolingua server.

(instance date BinaryPredicate)
(instance date SingleValuedRelation)
(instance date AsymmetricRelation)
(domain date 1 Physical)
(domain date 2 Day)
(subrelation date time)
(documentation date EnglishLanguage "A &%BinaryPredicate that specifies a 
&%TimePosition in absolute calendar time, at the resolution 
of one day, for a particular &%Object or &%Process.")

(instance YearFn TemporalRelation)
(instance YearFn UnaryFunction)
(domain YearFn 1 Integer)
(rangeSubclass YearFn Year)
(documentation YearFn EnglishLanguage "A &%UnaryFunction that maps a number to the corresponding calendar 
&%Year.  For example, (&%YearFn 1912) returns the &%Class containing just one instance, 
the year of 1912.  As might be expected, positive integers return years in the Common Era, 
while negative integers return years in B.C.E.  Note that this function returns a &%Class 
as a value.  The reason for this is that the related functions, viz. &%MonthFn, &%DayFn, 
&%HourFn, &%MinuteFn, and &%SecondFn, are used to generate both specific &%TimeIntervals 
and recurrent intervals, and the only way to do this is to make the domains and ranges of 
these functions classes rather than individuals.")

(instance MonthFn TemporalRelation)
(instance MonthFn BinaryFunction)
(domainSubclass MonthFn 1 Month)
(domainSubclass MonthFn 2 Year)
(rangeSubclass MonthFn Month)
(documentation MonthFn EnglishLanguage "A &%BinaryFunction that maps a subclass of &%Month and a 
subclass of &%Year to the class containing the &%Months corresponding to thos &%Years. 
For example (&%MonthFn &%January (&%YearFn 1912)) is the class containing the eighth 
&%Month, i.e. August, of the &%Year 1912.  For another example, (&%MonthFn &%August 
&%Year) is equal to &%August, the class of all months of August.  Note that this function 
returns a &%Class as a value.  The reason for this is that the related functions, viz. 
DayFn, HourFn, MinuteFn, and SecondFn, are used to generate both specific &%TimeIntervals 
and recurrent intervals, and the only way to do this is to make the domains and ranges of 
these functions classes rather than individuals.")

(instance DayFn TemporalRelation)
(instance DayFn BinaryFunction)
(domain DayFn 1 PositiveInteger)
(domainSubclass DayFn 2 Month)
(rangeSubclass DayFn Day)
(documentation DayFn EnglishLanguage "A &%BinaryFunction that assigns a &%PositiveRealNumber and 
a subclass of &%Months to the &%Days within each &%Month corresponding to that 
&%PositiveRealNumber.  For example, (&%DayFn 16 &%August) is the &%Class of all 
sixteenth days of August.  For another example, (&%DayFn 9 &%Month) would return 
the class of all ninth days of any month.  For still another example, (&%DayFn 18 
(&%MonthFn &%August (&%YearFn 1912))) denotes the 18th day of August 1912.")

(=>
   (instance ?DAY (DayFn ?NUMBER ?MONTH))
   (lessThanOrEqualTo ?NUMBER 31)) 

(=>
   (and
      (instance ?DAY1 (DayFn ?NUMBER1 ?MONTH))
      (instance ?DAY2 (DayFn ?NUMBER2 ?MONTH))
      (equal (SubtractionFn ?NUMBER2 ?NUMBER1) 1))
   (meetsTemporally ?DAY1 ?DAY2))

(instance HourFn TemporalRelation)
(instance HourFn BinaryFunction)
(domain HourFn 1 NonnegativeInteger)
(domainSubclass HourFn 2 Day)
(rangeSubclass HourFn Hour)
(documentation HourFn EnglishLanguage "A &%BinaryFunction that assigns a &%PositiveRealNumber and 
a subclass of &%Days to the &%Hours within each &%Day corresponding to that 
&%NonnegativeInteger.  For example, (&%HourFn 12 &%Thursday) is the &%Class of all 
instances of noon Thursday.  For another example, (&%HourFn 0 &%Day) would return 
the class of all instances of midnight.  For still another example, (&%HourFn 14 
(&%DayFn 18 (&%MonthFn &%August (&%YearFn 1912)))) denotes 2 PM on the 18th day of 
August 1912.")

(=>
   (instance ?HOUR (HourFn ?NUMBER ?DAY))
   (lessThan ?NUMBER 24))

(=>
   (and
      (instance ?HOUR1 (HourFn ?NUMBER1 ?DAY))
      (instance ?HOUR2 (HourFn ?NUMBER2 ?DAY))
      (equal (SubtractionFn ?NUMBER2 ?NUMBER1) 1))
   (meetsTemporally ?HOUR1 ?HOUR2))

(instance MinuteFn TemporalRelation)
(instance MinuteFn BinaryFunction)
(domain MinuteFn 1 NonnegativeInteger)
(domainSubclass MinuteFn 2 Hour)
(rangeSubclass MinuteFn Minute)
(documentation MinuteFn EnglishLanguage "A &%BinaryFunction that assigns a &%PositiveRealNumber and 
a subclass of &%Hours to the &%Minutes within each &%Hour corresponding to that 
&%NonnegativeInteger.  For example, (&%MinuteFn 30 (&%HourFn 17 &%Day)) is the &%Class 
of all 5:30's in the afternoon.  For another example, (&%MinuteFn 15 &%Hour) would return 
the class of all instances of quarter past the hour.  For still another example, 
(&%MinuteFn 15 (&%HourFn 14 (&%DayFn 18 (&%MonthFn &%August (&%YearFn 1912))))) denotes 
15 minutes after 2 PM on the 18th day of August 1912.")

(=>
   (instance ?MINUTE (MinuteFn ?NUMBER ?HOUR))
   (lessThan ?NUMBER 60)) 

(=>
   (and
      (instance ?MINUTE1 (MinuteFn ?NUMBER1 ?HOUR))
      (instance ?MINUTE2 (MinuteFn ?NUMBER2 ?HOUR))
      (equal (SubtractionFn ?NUMBER2 ?NUMBER1) 1))
   (meetsTemporally ?MINUTE1 ?MINUTE2))

(instance SecondFn TemporalRelation)
(instance SecondFn BinaryFunction)
(domain SecondFn 1 PositiveRealNumber)
(domainSubclass SecondFn 2 Minute)
(rangeSubclass SecondFn Second)
(documentation SecondFn EnglishLanguage "A &%BinaryFunction that assigns a &%PositiveRealNumber and a 
subclass of &%Minutes to the &%Seconds within each &%Minute corresponding to that 
&%PositiveRealNumber.  For example, (&%SecondFn 4 (&%MinuteFn 5 &%Hour)) is the &%Class 
of all fourth &%Seconds of every fifth &%Minute of every hour.  For another example, 
(&%SecondFn 8 &%Minute) would return the eighth second of every minute.  For still 
another example, (&%SecondFn 9 (&%MinuteFn 15 (&%HourFn 14 (&%DayFn 18 (&%MonthFn 
&%August (&%YearFn 1912)))))) denotes 9 seconds and 15 minutes after 2 PM on the 18th 
day of August 1912.")

(=>
   (instance ?SECOND (SecondFn ?NUMBER ?MINUTE))
   (lessThan ?NUMBER 60)) 

(=>
   (and
      (instance ?SECOND1 (SecondFn ?NUMBER1 ?MINUTE))
      (instance ?SECOND2 (SecondFn ?NUMBER2 ?MINUTE))
      (equal (SubtractionFn ?NUMBER2 ?NUMBER1) 1))
   (meetsTemporally ?SECOND1 ?SECOND2))

(subclass Year TimeInterval)
(relatedInternalConcept Year YearFn)
(relatedInternalConcept Year YearDuration)
(documentation Year EnglishLanguage "The &%Class of all calendar &%Years.")

(=>
   (instance ?YEAR Year)
   (duration ?YEAR (MeasureFn 1 YearDuration)))

(=>
   (and
      (instance ?YEAR1 Year)
      (instance ?YEAR2 Year)
      (equal (SubtractionFn ?YEAR2 ?YEAR1) 1))
   (meetsTemporally ?YEAR1 ?YEAR2))

(subclass LeapYear Year)
(documentation LeapYear EnglishLanguage "The &%Class of all leap years.  These are years 
which are either (i.) evenly divisible by 4 and not by 100 or (ii.) evenly 
divisible by 400 (this latter case is known as a leap century).")

(=>
   (and
      (instance ?LEAP LeapYear)
      (instance ?LEAP (YearFn ?NUMBER)))
   (or
      (and
         (equal (RemainderFn ?NUMBER 4) 0)
         (not (equal (RemainderFn ?NUMBER 100) 0)))
      (equal (RemainderFn ?NUMBER 400) 0)))

(subclass Month TimeInterval)
(relatedInternalConcept Month MonthFn)
(documentation Month EnglishLanguage "The &%Class of all calendar &%Months.")

(subclass January Month)
(documentation January EnglishLanguage "The &%Class of all &%Months which are January.")

(=>
   (instance ?MONTH January)
   (duration ?MONTH (MeasureFn 31 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn January ?YEAR))
      (instance ?MONTH2 (MonthFn February ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass February Month)
(documentation February EnglishLanguage "The &%Class of all &%Months which are February.")

(=>
   (and
      (instance ?MONTH (MonthFn February ?YEAR))
      (instance ?Y ?YEAR)
      (not (instance ?Y LeapYear)))
   (duration ?MONTH (MeasureFn 28 DayDuration)))

(=>
   (and
      (instance ?MONTH (MonthFn February ?YEAR))
      (instance ?Y ?YEAR)
      (instance ?Y LeapYear))
   (duration ?MONTH (MeasureFn 29 DayDuration))) 

(=>
   (and
      (instance ?MONTH1 (MonthFn February ?YEAR))
      (instance ?MONTH2 (MonthFn March ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass March Month)
(documentation March EnglishLanguage "The &%Class of all &%Months which are March.")

(=>
   (instance ?MONTH March)
   (duration ?MONTH (MeasureFn 31 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn March ?YEAR))
      (instance ?MONTH2 (MonthFn April ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass April Month)
(documentation April EnglishLanguage "The &%Class of all &%Months which are April.")

(=>
   (instance ?MONTH April)
   (duration ?MONTH (MeasureFn 30 DayDuration)))

(=>
   (and
      (equal ?MONTH1 (MonthFn April ?YEAR))
      (equal ?MONTH2 (MonthFn May ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass May Month)
(documentation May EnglishLanguage "The &%Class of all &%Months which are May.")

(=>
   (instance ?MONTH May)
   (duration ?MONTH (MeasureFn 31 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn May ?YEAR))
      (instance ?MONTH2 (MonthFn June ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass June Month)
(documentation June EnglishLanguage "The &%Class of all &%Months which are June.")

(=>
   (instance ?MONTH June)
   (duration ?MONTH (MeasureFn 30 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn June ?YEAR))
      (instance ?MONTH2 (MonthFn July ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass July Month)
(documentation July EnglishLanguage "The &%Class of all &%Months which are July.")

(=>
   (instance ?MONTH July)
   (duration ?MONTH (MeasureFn 31 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn July ?YEAR))
      (instance ?MONTH2 (MonthFn August ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass August Month)
(documentation August EnglishLanguage "The &%Class of all &%Months which are August.")

(=>
   (instance ?MONTH August)
   (duration ?MONTH (MeasureFn 31 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn August ?YEAR))
      (instance ?MONTH2 (MonthFn September ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))


(subclass September Month)
(documentation September EnglishLanguage "The &%Class of all &%Months which are September.")

(=>
   (instance ?MONTH September)
   (duration ?MONTH (MeasureFn 30 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn September ?YEAR))
      (instance ?MONTH2 (MonthFn October ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass October Month)
(documentation October EnglishLanguage "The &%Class of all &%Months which are October.")

(=>
   (instance ?MONTH October)
   (duration ?MONTH (MeasureFn 31 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn October ?YEAR))
      (instance ?MONTH2 (MonthFn November ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass November Month)
(documentation November EnglishLanguage "The &%Class of all &%Months which are November.")

(=>
   (instance ?MONTH November)
   (duration ?MONTH (MeasureFn 30 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn November ?YEAR))
      (instance ?MONTH2 (MonthFn December ?YEAR)))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass December Month)
(documentation December EnglishLanguage "The &%Class of all &%Months which are December.")

(=>
   (instance ?MONTH December)
   (duration ?MONTH (MeasureFn 31 DayDuration)))

(=>
   (and
      (instance ?MONTH1 (MonthFn December ?YEAR1))
      (instance ?MONTH2 (MonthFn January ?YEAR2))
      (instance ?Y1 ?YEAR1)
      (instance ?Y2 ?YEAR2)
      (meetsTemporally ?Y1 ?Y2))
   (meetsTemporally ?MONTH1 ?MONTH2))

(subclass Day TimeInterval)
(relatedInternalConcept Day DayFn)
(relatedInternalConcept Day DayDuration)
(documentation Day EnglishLanguage "The &%Class of all calendar &%Days.")

(=>
   (instance ?DAY Day)
   (duration ?DAY (MeasureFn 1 DayDuration)))

(subclass Monday Day)
(documentation Monday EnglishLanguage "The &%Class of all calendar Mondays.")

(subclass Tuesday Day)
(documentation Tuesday EnglishLanguage "The &%Class of all calendar Tuesdays.")

(=>
   (and
      (instance ?DAY1 Monday)
      (instance ?DAY2 Tuesday)
      (instance ?WEEK Week)
      (temporalPart ?DAY1 ?WEEK)
      (temporalPart ?DAY2 ?WEEK))
   (meetsTemporally ?DAY1 ?DAY2))

(subclass Wednesday Day)
(documentation Wednesday EnglishLanguage "The &%Class of all calendar Wednesdays.")

(=>
   (and
      (instance ?DAY1 Tuesday)
      (instance ?DAY2 Wednesday)
      (instance ?WEEK Week)
      (temporalPart ?DAY1 ?WEEK)
      (temporalPart ?DAY2 ?WEEK))
   (meetsTemporally ?DAY1 ?DAY2))

(subclass Thursday Day)
(documentation Thursday EnglishLanguage "The &%Class of all calendar Thursdays.")

(=>
   (and
      (instance ?DAY1 Wednesday)
      (instance ?DAY2 Thursday)
      (instance ?WEEK Week)
      (temporalPart ?DAY1 ?WEEK)
      (temporalPart ?DAY2 ?WEEK))
   (meetsTemporally ?DAY1 ?DAY2))

(subclass Friday Day)
(documentation Friday EnglishLanguage "The &%Class of all calendar Fridays.")

(=>
   (and
      (instance ?DAY1 Thursday)
      (instance ?DAY2 Friday)
      (instance ?WEEK Week)
      (temporalPart ?DAY1 ?WEEK)
      (temporalPart ?DAY2 ?WEEK))
   (meetsTemporally ?DAY1 ?DAY2))

(subclass Saturday Day)
(documentation Saturday EnglishLanguage "The &%Class of all calendar Saturdays.")

(=>
   (and
      (instance ?DAY1 Friday)
      (instance ?DAY2 Saturday)
      (instance ?WEEK Week)
      (temporalPart ?DAY1 ?WEEK)
      (temporalPart ?DAY2 ?WEEK))
   (meetsTemporally ?DAY1 ?DAY2))

(subclass Sunday Day)
(documentation Sunday EnglishLanguage "The &%Class of all calendar Sundays.")

(=>
   (and
      (instance ?DAY1 Saturday)
      (instance ?DAY2 Sunday)
      (instance ?WEEK Week)
      (temporalPart ?DAY1 ?WEEK)
      (temporalPart ?DAY2 ?WEEK))
   (meetsTemporally ?DAY1 ?DAY2))

(=>
   (and
      (instance ?DAY1 Sunday)
      (instance ?DAY2 Monday)
      (instance ?WEEK1 Week)
      (instance ?WEEK2 Week)
      (temporalPart ?DAY1 ?WEEK1)
      (temporalPart ?DAY2 ?WEEK2)
      (meetsTemporally ?WEEK1 ?WEEK2))
   (meetsTemporally ?DAY1 ?DAY2))

(subclass Week TimeInterval)
(documentation Week EnglishLanguage "The &%Class of all calendar weeks.")

(=>
   (instance ?WEEK Week)
   (duration ?WEEK (MeasureFn 1 WeekDuration)))

(subclass Hour TimeInterval)
(relatedInternalConcept Hour HourFn)
(relatedInternalConcept Hour HourDuration)
(documentation Hour EnglishLanguage "The &%Class of all clock &%Hours.")

(=>
   (instance ?HOUR Hour)
   (duration ?HOUR (MeasureFn 1 HourDuration)))

(subclass Minute TimeInterval)
(relatedInternalConcept Minute MinuteFn)
(relatedInternalConcept Minute MinuteDuration)
(documentation Minute EnglishLanguage "The &%Class of all clock &%Minutes.")

(=>
   (instance ?MINUTE Minute)
   (duration ?MINUTE (MeasureFn 1 MinuteDuration)))

(subclass Second TimeInterval)
(relatedInternalConcept Second SecondDuration)
(relatedInternalConcept Second SecondFn)
(documentation Second EnglishLanguage "The &%Class of all clock &%Seconds.")

(=>
   (instance ?SECOND Second)
   (duration ?SECOND (MeasureFn 1 SecondDuration)))

(instance TemporalCompositionFn TemporalRelation)
(instance TemporalCompositionFn BinaryFunction)
(domain TemporalCompositionFn 1 TimeInterval)
(domainSubclass TemporalCompositionFn 2 TimeInterval)
(rangeSubclass TemporalCompositionFn TimeInterval)
(documentation TemporalCompositionFn EnglishLanguage "The basic &%Function for expressing 
the composition of larger &%TimeIntervals out of smaller &%TimeIntervals.  
For example, if &%ThisSeptember is an &%instance of &%September, 
(&%TemporalCompositionFn &%ThisSeptember &%Day) denotes the &%Class of 
consecutive days that make up &%ThisSeptember.  Note that one can obtain 
the number of instances of this &%Class by using the function &%CardinalityFn.")

(=>
   (equal (TemporalCompositionFn ?INTERVAL ?INTERVAL-TYPE) ?CLASS)
   (forall (?TIME1 ?TIME2)
      (=>
         (and
            (instance ?TIME1 ?INTERVAL-TYPE)
            (instance ?TIME2 ?CLASS))
         (exists (?DURATION)
            (and 
               (duration ?TIME1 ?DURATION)
               (duration ?TIME2 ?DURATION))))))

(=>
   (equal (TemporalCompositionFn ?INTERVAL ?INTERVAL-TYPE) ?CLASS)
   (forall (?TIME1 ?TIME2)
      (=>
         (and
            (instance ?TIME1 ?CLASS)
            (instance ?TIME2 ?CLASS)
            (not (equal ?TIME1 ?TIME2)))
         (or
            (meetsTemporally ?TIME1 ?TIME2)
            (meetsTemporally ?TIME2 ?TIME1)
            (earlier ?TIME1 ?TIME2)
            (earlier ?TIME2 ?TIME1)))))

(=>
   (equal (TemporalCompositionFn ?INTERVAL ?INTERVAL-TYPE) ?CLASS)
   (exists (?TIME)
      (and
         (instance ?TIME ?CLASS)
         (starts ?TIME ?INTERVAL))))

(=>
   (equal (TemporalCompositionFn ?INTERVAL ?INTERVAL-TYPE) ?CLASS)
   (exists (?TIME)
      (and
         (instance ?TIME ?CLASS)
         (finishes ?TIME ?INTERVAL))))

(=>
   (equal (TemporalCompositionFn ?INTERVAL ?INTERVAL-TYPE) ?CLASS)
   (forall (?TIME1)
      (=>
         (and
            (instance ?TIME1 ?CLASS)
            (not (finishes ?TIME1 ?INTERVAL)))
         (exists (?TIME2)
            (and
               (instance ?TIME2 ?CLASS)
               (meetsTemporally ?TIME1 ?TIME2))))))

(=>
   (equal (TemporalCompositionFn ?INTERVAL ?INTERVAL-TYPE) ?CLASS)
   (forall (?TIME1)
      (=>
         (and
            (instance ?TIME1 ?CLASS)
            (not (starts ?TIME1 ?INTERVAL)))
         (exists (?TIME2)
            (and
               (instance ?TIME2 ?CLASS)
               (meetsTemporally ?TIME2 ?TIME1))))))

(=>
   (equal (TemporalCompositionFn ?INTERVAL ?INTERVAL-TYPE) ?CLASS)
   (forall (?TIME)
      (=>
         (and
            (instance ?TIME TimePoint)
            (temporalPart ?TIME ?INTERVAL))
         (exists (?INSTANCE)
            (and
               (instance ?INSTANCE ?CLASS)
               (temporalPart ?TIME ?INSTANCE)))))) 

(=>
   (instance ?YEAR Year)
   (equal (CardinalityFn (TemporalCompositionFn ?YEAR Month)) 12))

(=>
   (and
      (instance ?MONTH Month)
      (duration ?MONTH (MeasureFn ?NUMBER DayDuration)))
   (equal (CardinalityFn (TemporalCompositionFn ?MONTH Day)) ?NUMBER))

(=>
   (instance ?WEEK Week)
   (equal (CardinalityFn (TemporalCompositionFn ?WEEK Day)) 7))

(=>
   (instance ?DAY Day)
   (equal (CardinalityFn (TemporalCompositionFn ?DAY Hour)) 24))

(=>
   (instance ?HOUR Hour)
   (equal (CardinalityFn (TemporalCompositionFn ?HOUR Minute)) 60))

(=>
   (instance ?MINUTE Minute)
   (equal (CardinalityFn (TemporalCompositionFn ?MINUTE Second)) 60))


;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;
;; MEREOTOPOLOGY ;;
;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'STRUCTURAL ONTOLOGY'
;; INCLUDES 'BASE ONTOLOGY'

;; Most of this content is taken from Barry Smith's and Nicola Guarino's 
;; papers on the subject.

(instance connected BinaryPredicate)
(instance connected SpatialRelation)
(instance connected ReflexiveRelation)
(instance connected SymmetricRelation)
(domain connected 1 Object)
(domain connected 2 Object)
(documentation connected EnglishLanguage "(connected ?OBJ1 ?OBJ2) means that ?OBJ1 
&%meetsSpatially ?OBJ2 or that ?OBJ1 &%overlapsSpatially ?OBJ2.")

(=>
     (connected ?OBJ1 ?OBJ2)
     (or
          (meetsSpatially ?OBJ1 ?OBJ2)
          (overlapsSpatially ?OBJ1 ?OBJ2)))

(<=> 
  (instance ?OBJ SelfConnectedObject)
  (forall (?PART1 ?PART2)
    (=> 
      (equal ?OBJ (MereologicalSumFn ?PART1 ?PART2))
      (connected ?PART1 ?PART2))))

(instance connects SpatialRelation)
(instance connects TernaryPredicate)
(domain connects 1 Object)
(domain connects 2 Object)
(domain connects 3 Object)
(documentation connects EnglishLanguage "The relationship between three things, when one of 
the three things connects the other two.  More formally, (&%connects ?OBJ1 
?OBJ2 ?OBJ3) means that (&%connected ?OBJ1 ?OBJ2) and (&%connected ?OBJ1 ?OBJ3) 
and not (&%connected ?OBJ2 ?OBJ3).")

(<=>
  (connects ?OBJ1 ?OBJ2 ?OBJ3)
  (between ?OBJ2 ?OBJ1 ?OBJ3))

(<=>
  (connects ?OBJ1 ?OBJ2 ?OBJ3)
  (and
    (connected ?OBJ1 ?OBJ2)
    (connected ?OBJ1 ?OBJ3)
    (not
      (connected ?OBJ2 ?OBJ3))))

(=>
  (connects ?ARC ?NODE1 ?NODE2)
  (connects ?ARC ?NODE2 ?NODE1))

(subrelation meetsSpatially connected)
(instance meetsSpatially IrreflexiveRelation)
(instance meetsSpatially SymmetricRelation)
(disjointRelation meetsSpatially overlapsSpatially)
(documentation meetsSpatially EnglishLanguage "(&%meetsSpatially ?OBJ1 ?OBJ2) means that 
?OBJ1 and ?OBJ2 are &%connected but that neither ?OBJ1 nor ?OBJ2 
&%overlapsSpatially the other.")

(subrelation overlapsSpatially connected)
(instance overlapsSpatially ReflexiveRelation)
(instance overlapsSpatially SymmetricRelation)
(documentation overlapsSpatially EnglishLanguage "(&%overlapsSpatially ?OBJ1 ?OBJ2) means 
that the &%Objects ?OBJ1 and ?OBJ2 have some parts in common.  This is a 
reflexive and symmetric (but not transitive) relation.")

(<=>
  (overlapsSpatially ?OBJ1 ?OBJ2)
       (exists (?OBJ3)
            (and
                 (part ?OBJ3 ?OBJ1)
                 (part ?OBJ3 ?OBJ2))))

(=>
   (and
      (member ?OBJ1 ?COLL)
      (member ?OBJ2 ?COLL)
      (not (equal ?OBJ1 ?OBJ2)))
   (not
      (overlapsSpatially ?OBJ1 ?OBJ2)))

(=> 
   (and 
      (instance ?REL CaseRole) 
      (instance ?OBJ Object)
      (?REL ?PROCESS ?OBJ)) 
   (exists (?TIME) 
      (overlapsSpatially (WhereFn ?PROCESS ?TIME) ?OBJ)))

(instance overlapsPartially SymmetricRelation)
(instance overlapsPartially IrreflexiveRelation)
(subrelation overlapsPartially overlapsSpatially)
(documentation overlapsPartially EnglishLanguage "(&%overlapsPartially ?OBJ1 ?OBJ2) means 
that ?OBJ1 and ?OBJ2 have part(s) in common, but neither ?OBJ1 nor ?OBJ2 
is a &%part of the other.")

(<=>
   (overlapsPartially ?OBJ1 ?OBJ2)
      (and
         (not (part ?OBJ1 ?OBJ2))
         (not (part ?OBJ2 ?OBJ1))
         (exists (?OBJ3)
            (and
               (part ?OBJ3 ?OBJ1)
               (part ?OBJ3 ?OBJ2)))))

(subrelation superficialPart part)
(instance superficialPart IrreflexiveRelation)
(instance superficialPart TransitiveRelation)
(documentation superficialPart EnglishLanguage "(&%superficialPart ?OBJ1 ?OBJ2) 
means that ?OBJ1 is a part of ?OBJ2 that has no interior parts of its own 
(or, intuitively, that only overlaps those parts of ?OBJ2 that are 
externally connected with the mereological complement of ?OBJ2). This too 
is a transitive relation closed under &%MereologicalSumFn and 
&%MereologicalProductFn.")

(=> 
  (superficialPart ?OBJ1 ?OBJ2)
  (and
    (not
      (interiorPart ?OBJ1 ?OBJ2))
    (not
      (exists (?OBJ3)
        (interiorPart ?OBJ3 ?OBJ1)))))

(instance surface AsymmetricRelation)
(subrelation surface superficialPart)
(domain surface 1 SelfConnectedObject)
(domain surface 2 SelfConnectedObject)
(documentation surface EnglishLanguage "(&%surface ?OBJ1 ?OBJ2) means that ?OBJ1 
is a maximally connected &%superficialPart of ?OBJ2.  Note that some 
&%SelfConnectedObjects have more than one surface, e.g. a hollow 
object like a tennis ball has both an inner and an outer surface.")

(=> 
  (surface ?OBJ1 ?OBJ2)
  (forall (?OBJ3)
    (=>
      (superficialPart ?OBJ3 ?OBJ2)
      (part ?OBJ3 ?OBJ1))))

(subrelation interiorPart part)
(instance interiorPart AsymmetricRelation)
(instance interiorPart TransitiveRelation) 
(documentation interiorPart EnglishLanguage "(&%interiorPart ?OBJ1 ?OBJ2) means 
that ?OBJ1 is part ?OBJ2 and there is no overlap between ?OBJ1 and 
any &%superficialPart ?OBJ2.")

(=>
  (interiorPart ?OBJ1 ?OBJ2)
  (forall (?PART)
    (=> 
      (superficialPart ?PART ?OBJ2)
      (not
        (overlapsSpatially ?OBJ1 ?PART)))))

(subrelation bottom superficialPart)
(instance bottom BinaryPredicate)
(domain bottom 1 SelfConnectedObject)
(domain bottom 2 SelfConnectedObject)
(documentation bottom EnglishLanguage "(&%bottom ?BOTTOM ?OBJECT) holds if ?BOTTOM is the 
lowest or deepest maximal superficial part of ?OBJECT.")

(=>
  (and
    (bottom ?BOTTOM ?OBJECT)
    (part ?PART ?OBJECT)
    (not (connected ?PART ?BOTTOM)))
  (orientation ?PART ?BOTTOM Above))

(subrelation top superficialPart)
(instance top BinaryPredicate)
(domain top 1 SelfConnectedObject)
(domain top 2 SelfConnectedObject)
(documentation top EnglishLanguage "(&%top ?TOP ?OBJECT) means that ?TOP is the highest maximal 
superficial part of ?OBJECT.")

(=>
  (and
    (top ?TOP ?OBJECT)
    (part ?PART ?OBJECT)
    (not (connected ?PART ?TOP)))
  (orientation ?PART ?TOP Below))

(subrelation side superficialPart)
(instance side BinaryPredicate)
(domain side 1 SelfConnectedObject)
(domain side 2 SelfConnectedObject)
(documentation side EnglishLanguage "(&%side ?SIDE ?OBJECT) means that ?SIDE is a side of the object, 
as opposed to the &%top or &%bottom.")

(=>
  (and
    (side ?SIDE ?OBJECT)
    (part ?PART ?OBJECT)
    (not (connected ?PART ?SIDE)))
      (exists (?DIRECT)
        (orientation ?SIDE ?PART ?DIRECT)))

(=>
  (and
    (top ?TOP ?O)
    (side ?S ?O))
  (not
    (equal ?TOP ?S)))

(<=>
  (width ?OBJECT ?WIDTH)
  (exists (?SIDE1 ?SIDE2)
    (and
      (side ?SIDE1 ?OBJECT)
      (side ?SIDE2 ?OBJECT)
      (distance ?SIDE1 ?SIDE2 ?WIDTH))))

(=>
  (and
    (height ?OBJECT ?HEIGHT)
    (top ?TOP ?OBJECT)
    (bottom ?BOTTOM ?OBJECT))
  (distance ?TOP ?BOTTOM ?HEIGHT))

(instance MereologicalSumFn SpatialRelation)
(instance MereologicalSumFn BinaryFunction)
(instance MereologicalSumFn TotalValuedRelation)
(domain MereologicalSumFn 1 Object)
(domain MereologicalSumFn 2 Object)
(range MereologicalSumFn Object)
(relatedInternalConcept MereologicalSumFn MereologicalProductFn)
(relatedInternalConcept MereologicalSumFn MereologicalDifferenceFn)
(documentation MereologicalSumFn EnglishLanguage "(&%MereologicalSumFn ?OBJ1 ?OBJ2) 
denotes the &%Object consisting of the parts which belong to either 
?OBJ1 or ?OBJ2.") 

(=>
  (equal ?OBJ3 (MereologicalSumFn ?OBJ1 ?OBJ2))
  (forall (?PART)
    (<=>
      (part ?PART ?OBJ3)
      (or
        (part ?PART ?OBJ1)
        (part ?PART ?OBJ2)))))

(instance MereologicalProductFn SpatialRelation)
(instance MereologicalProductFn BinaryFunction)
(instance MereologicalProductFn TotalValuedRelation)
(domain MereologicalProductFn 1 Object)
(domain MereologicalProductFn 2 Object)
(range MereologicalProductFn Object)
(relatedInternalConcept MereologicalProductFn MereologicalDifferenceFn)
(documentation MereologicalProductFn EnglishLanguage "(&%MereologicalProductFn ?OBJ1 ?OBJ2) 
denotes the &%Object consisting of the parts which belong to both ?OBJ1 
and ?OBJ2.") 

(=>
  (equal ?OBJ3 (MereologicalProductFn ?OBJ1 ?OBJ2))
  (forall (?PART)
    (<=>
      (part ?PART ?OBJ3)
      (and
        (part ?PART ?OBJ1)
        (part ?PART ?OBJ2)))))

(instance MereologicalDifferenceFn SpatialRelation)
(instance MereologicalDifferenceFn BinaryFunction)
(instance MereologicalDifferenceFn TotalValuedRelation)
(domain MereologicalDifferenceFn 1 Object)
(domain MereologicalDifferenceFn 2 Object)
(range MereologicalDifferenceFn Object)
(documentation MereologicalDifferenceFn EnglishLanguage "(&%MereologicalDifferenceFn ?OBJ1 
?OBJ2) denotes the &%Object consisting of the parts which belong to ?OBJ1 
and not to ?OBJ2.") 

(=>
  (equal ?OBJ3 
    (MereologicalDifferenceFn ?OBJ1 ?OBJ2))
  (forall (?PART)
    (<=>
      (properPart ?PART ?OBJ3)
      (and
        (properPart ?PART ?OBJ1)
        (not
          (properPart ?PART ?OBJ2))))))
    
;; What follows is an alignment of the Casati and Varzi theory of 
;; holes with the SUMO.

(instance hole BinaryPredicate)
(instance hole SpatialRelation)
(instance hole AsymmetricRelation)
(domain hole 1 Hole)
(domain hole 2 SelfConnectedObject)
(documentation hole EnglishLanguage "(&%hole ?HOLE ?OBJ) means that ?HOLE is a 
&%Hole in ?OBJ.  A &%Hole is a fillable body located at the 
&%surface an &%Object.")

(subclass Hole Region)

(documentation Hole EnglishLanguage "A hole is an immaterial body located at the surface 
of an &%Object.  Since every &%Hole is ontologically dependent on its host 
(i.e., the object in which it is a hole), being a &%Hole is defined as 
being a &%hole in something.  Note that two &%Holes may occupy the same 
region, or part of the same region, without sharing any parts.  Any two 
hosts of a hole have a common proper part that entirely hosts the hole.  A 
common host of two holes hosts all parts of the sum of those holes.  Any 
object that includes the host of a hole is a host of that hole, unless its 
parts also include parts of that very hole.  Overlapping holes have 
overlapping hosts.  No hole is atomic.  Holes are connected with their 
hosts.  No hole can have a proper part that is externally connected with 
exactly the same things as the hole itself.") 

(<=> 
  (instance ?HOLE Hole)
  (exists (?OBJ)
    (hole ?HOLE ?OBJ)))

(=> 
  (hole ?HOLE ?OBJ)
  (not 
    (instance ?OBJ Hole)))

(=> 
  (hole ?HOLE ?OBJ)
  (not 
     (overlapsSpatially ?HOLE ?OBJ)))

(=> 
  (and 
    (hole ?HOLE ?OBJ1)
    (hole ?HOLE ?OBJ2))
  (exists (?OBJ3)
    (and 
      (properPart ?OBJ3 (MereologicalProductFn ?OBJ1 ?OBJ2))
      (hole ?HOLE ?OBJ3))))

(=> 
  (and 
    (hole ?HOLE1 ?OBJ)
    (hole ?HOLE2 ?OBJ))
  (forall (?HOLE3)
    (=> 
      (part ?HOLE3 (MereologicalSumFn ?HOLE1 ?HOLE2))
      (hole ?HOLE3 ?OBJ))))

(=> 
  (and 
    (hole ?HOLE ?OBJ1)
    (part ?OBJ1 ?OBJ2))
  (or
    (overlapsSpatially ?HOLE ?OBJ2)
    (hole ?HOLE ?OBJ2)))

(=> 
  (and 
    (hole ?HOLE1 ?OBJ1)
    (hole ?HOLE2 ?OBJ2)
    (overlapsSpatially ?HOLE1 ?HOLE2))
  (overlapsSpatially ?OBJ1 ?OBJ2))

(=> 
  (instance ?HOLE1 Hole)
  (exists (?HOLE2)
    (properPart ?HOLE2 ?HOLE1)))

(instance HoleHostFn SpatialRelation)
(instance HoleHostFn UnaryFunction)
(instance HoleHostFn TotalValuedRelation)
(instance HoleHostFn AsymmetricRelation)
(domain HoleHostFn 1 Hole)
(range HoleHostFn Object)
(documentation HoleHostFn EnglishLanguage "A &%UnaryFunction that maps a &%Hole to 
the &%Object which is its principal host.  The principle host of a &%Hole 
is its maximally connected host (a notion taken here to be defined only 
when the argument is a hole).")

(=> 
  (hole ?HOLE ?OBJ)
  (connected ?HOLE ?OBJ))

(=> 
  (and 
    (instance ?HOLE1 Hole)
    (properPart ?HOLE2 ?HOLE1))
  (exists (?OBJ)
    (and 
      (meetsSpatially ?HOLE1 ?OBJ)
      (not 
        (meetsSpatially ?HOLE2 ?OBJ)))))

(instance Fillable ShapeAttribute)
(documentation Fillable EnglishLanguage "Something is &%Fillable if it can be filled by 
something else.  Note that 'filled' here means perfectly filled.
Something is fillable just in case it is part of a hole, i.e., 
fillability is an exclusive property of holes and their parts.")

(=>
  (exists (?TIME)
    (holdsDuring ?TIME
      (fills ?OBJ ?HOLE)))
  (attribute ?HOLE Fillable))

(<=> 
  (attribute ?HOLE1 Fillable)
  (exists (?HOLE2)
    (and 
      (instance ?HOLE2 Hole)
      (part ?HOLE1 ?HOLE2))))

(subrelation partiallyFills located)
(instance partiallyFills SpatialRelation)
(instance partiallyFills AsymmetricRelation)
(domain partiallyFills 1 Object)
(domain partiallyFills 2 Hole)
(documentation partiallyFills EnglishLanguage "(&%partiallyFills ?OBJ ?HOLE) means that 
?OBJ &%completelyFills some part of ?HOLE. Note that if (&%partiallyFills 
?OBJ1 ?HOLE) and (&%part ?OBJ1 ?OBJ2), then (&%partiallyFills ?OBJ2 ?HOLE). 
Note too that a partial filler need not be wholly inside a hole (it may 
stick out), which means that every complete filler also qualifies as 
(is a limit case of) a partial one.")

(=> 
  (partiallyFills ?OBJ ?HOLE1)
  (exists (?HOLE2)
    (and 
      (part ?HOLE2 ?HOLE1)
      (completelyFills ?OBJ ?HOLE2))))

(instance properlyFills AsymmetricRelation)
(subrelation properlyFills partiallyFills)
(domain properlyFills 1 Object)
(domain properlyFills 2 Hole)
(documentation properlyFills EnglishLanguage "(&%properlyFills ?OBJ ?HOLE) 
means that ?HOLE is properly (though perhaps incompletely) filled by 
?OBJ, i.e. some part of ?HOLE is perfectly filled by ?OBJ.  Note that 
&%properlyFills is the dual of &%completelyFills, and is so 
related to &%partiallyFills that ?OBJ &%properlyFills ?HOLE just in 
case ?OBJ &%partiallyFills every part of ?HOLE.  (Thus, every perfect 
filler is both complete and proper in this sense). 
Every hole is connected with everything with which a proper filler 
of the hole is connected. Every proper part of a perfect filler of (a part of) a hole properly 
fills (that part of) that hole.")

(=> 
  (properlyFills ?OBJ ?HOLE1)
  (exists (?HOLE2)
    (and 
      (part ?HOLE2 ?HOLE1)
      (fills ?OBJ ?HOLE2))))

(instance completelyFills AsymmetricRelation)
(subrelation completelyFills partiallyFills)
(documentation completelyFills EnglishLanguage "(&%completelyFills ?OBJ ?HOLE) 
means that some &%part of the &%Object ?OBJ fills the &%Hole ?HOLE.  
Note that if (&%completelyFills ?OBJ1 ?HOLE) and (&%part 
?OBJ1 ?OBJ2), then (&%completelyFills ?OBJ2 ?HOLE). 
A complete filler of (a part of) a hole is connected with everything 
with which (that part of) the hole itself is connected. 
A perfect filler of (a part of) a hole completely fills every proper 
part of (that part of) that hole.")

(=> 
  (completelyFills ?OBJ1 ?HOLE)
  (exists (?OBJ2)
    (and 
      (part ?OBJ2 ?OBJ1)
      (fills ?OBJ2 ?HOLE))))

(instance fills AsymmetricRelation)
(subrelation fills completelyFills)
(subrelation fills properlyFills)
(domain fills 1 Object)
(domain fills 2 Hole)
(relatedInternalConcept fills Fillable)
(documentation fills EnglishLanguage "Holes can be filled.  (&%fills ?OBJ ?HOLE) 
means that the &%Object ?OBJ fills the &%Hole ?HOLE.  Note that 
&%fills here means perfectly filled. Perfect fillers and fillable entities have no parts in common (rather, 
they may occupy the same spatial region).")

(=> 
  (and 
    (fills ?OBJ1 ?HOLE)
    (attribute ?OBJ2 Fillable))
  (not 
    (overlapsSpatially ?OBJ1 ?OBJ2)))

(=> 
   (completelyFills ?OBJ1 ?HOLE)
   (forall (?OBJ2)
     (=> 
        (connected ?OBJ2 ?HOLE)
            (connected ?OBJ2 ?OBJ1))))

(=> 
  (and 
    (properlyFills ?OBJ1 ?HOLE)
    (connected ?OBJ2 ?OBJ1))
  (connected ?HOLE ?OBJ2))

(=> 
  (and 
    (fills ?OBJ ?HOLE1)
    (properPart ?HOLE2 ?HOLE1))
  (completelyFills ?OBJ ?HOLE2))

(=> 
  (and 
    (fills ?OBJ1 ?HOLE)
    (properPart ?OBJ2 ?OBJ1))
  (properlyFills ?OBJ2 ?HOLE))

(instance HoleSkinFn SpatialRelation)
(instance HoleSkinFn UnaryFunction)
(instance HoleSkinFn TotalValuedRelation)
(instance HoleSkinFn AsymmetricRelation)
(domain HoleSkinFn 1 Hole)
(range HoleSkinFn Object)
(documentation HoleSkinFn EnglishLanguage "A &%UnaryFunction that maps a &%Hole to the skin 
of the &%Hole.  The skin of a &%Hole is the fusion of those superficial 
parts (see &%superficialPart) of the &%Hole's principal host (see 
&%HoleHostFn) with which the &%Hole is externally connected.")

(=>
  (equal ?OBJ1 (HoleSkinFn ?HOLE))
  (forall (?OBJ2)
    (<=> 
      (overlapsSpatially ?OBJ2 ?OBJ1)
      (exists (?OBJ3)
        (and 
          (superficialPart ?OBJ3 (HoleHostFn ?HOLE))
          (meetsSpatially ?HOLE ?OBJ3)
          (overlapsSpatially ?OBJ2 ?OBJ3))))))

;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;;;
;;    PROCESSES    ;;
;;;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'TEMPORAL CONCEPTS'
;; INCLUDES 'OBJECTS'
;; INCLUDES 'QUALITIES'

(instance subProcess BinaryPredicate)
(instance subProcess PartialOrderingRelation)
(domain subProcess 1 Process)
(domain subProcess 2 Process)
(documentation subProcess EnglishLanguage "(&%subProcess ?SUBPROC ?PROC) means that ?SUBPROC 
is a subprocess of ?PROC.  A subprocess is here understood as a temporally 
distinguished part (proper or not) of a &%Process.")

(=>
   (subProcess ?SUBPROC ?PROC)
   (temporalPart (WhenFn ?SUBPROC) (WhenFn ?PROC)))

;; NS: delete.  This rule is stated above with different (but
;; equivalent) antecedent order.
;; (=>
;;    (subProcess ?SUBPROC ?PROC)
;;    (forall (?REGION)
;;       (=>
;;          (located ?PROC ?REGION)
;;          (located ?SUBPROC ?REGION))))

;; NS: delete.  Redundant ... we've already stated elsewhere that
;; every Physical exists at some time and at some location.
;; (=> 
;;   (and 
;;     (instance ?PROC Process)
;;     (subProcess ?SUBPROC ?PROC))
;;   (exists (?TIME)
;;     (time ?SUBPROC ?TIME)))




;; The following formulas cover the hierarchy of &%Classes under 
;; &%BiologicalProcess.

(subclass BiologicalProcess InternalChange)
(documentation BiologicalProcess EnglishLanguage "A &%Process embodied in an &%Organism.")

(=>
   (instance ?PROC BiologicalProcess)
   (exists (?OBJ)
      (and
         (instance ?OBJ Organism)
         (eventLocated ?PROC ?OBJ))))

(=>
   (and
      (instance ?PROC BiologicalProcess)
      (experiencer ?PROC ?ORG))
   (instance ?ORG Organism))

(subclass PhysiologicProcess BiologicalProcess)
(documentation PhysiologicProcess EnglishLanguage "A normal process of an &%Organism 
or part of an &%Organism.")

(subclass AutonomicProcess PhysiologicProcess)
(disjoint AutonomicProcess IntentionalProcess)
(documentation AutonomicProcess EnglishLanguage "The class of &%PhysiologicProcesses of 
which there is not conscious awareness and control.")

(subclass OrganOrTissueProcess AutonomicProcess)
(disjoint OrganOrTissueProcess OrganismProcess)
(documentation OrganOrTissueProcess EnglishLanguage "A &%PhysiologicProcess of a 
particular &%Organ or &%Tissue.")

(=>
    (instance ?PROC OrganOrTissueProcess)
    (exists (?THING)
        (and
            (eventLocated ?PROC ?THING)
            (or
                (instance ?THING Organ)
                (instance ?THING Tissue)))))

(subclass OrganismProcess PhysiologicProcess)
(documentation OrganismProcess EnglishLanguage "A physiologic function of the 
&%Organism as a whole, of multiple organ systems or of multiple 
&%Organs or &%Tissues.")

(subclass Birth OrganismProcess)
(documentation Birth EnglishLanguage "The &%Process of being born.")

;; NS: We need to provide more explanation of the intended meaning of
;;     &%Birth.

(=>
   (and
      (instance ?BIRTH Birth)
      (experiencer ?BIRTH ?AGENT))
   (exists (?DEATH)
      (and
         (instance ?DEATH Death)
         (experiencer ?DEATH ?AGENT))))

(subclass Death OrganismProcess)
(documentation Death EnglishLanguage "The &%Process of dying.")

;; NS: delete.  Organisms cannot be Dead.
;; (=>
;;    (and
;;       (instance ?DEATH Death)
;;       (experiencer ?DEATH ?AGENT))
;;    (holdsDuring (FutureFn (WhenFn ?DEATH)) (attribute ?AGENT Dead)))

;; NS: add.  The result of an Organism's Death is a Dead
;; OrganicObject, the parts of which were parts of the Organism
;; immediately before its Death.  This rule should be considered true
;; only by default, since it is not really accurate for an organism
;; that dies, e.g., by being instantaneously vaporized.
(=>
  (and
    (instance ?DEATH Death)
    (instance ?ORG Organism)
    (experiencer ?DEATH ?ORG))
  (exists (?REM)
    (and
      (result ?DEATH ?REM)
      (instance ?REM OrganicObject)
      (holdsDuring (FutureFn (WhenFn ?DEATH))
        (attribute ?REM Dead))
      (=>
        (holdsDuring (ImmediateFutureFn (WhenFn ?DEATH))
          (part ?OBJ ?REM))
        (holdsDuring (ImmediatePastFn (WhenFn ?DEATH))
          (part ?OBJ ?ORG))))))

(subclass Breathing OrganismProcess)
(subclass Breathing AutonomicProcess)
(documentation Breathing EnglishLanguage "The &%Process of respiration, by which oxygen 
is made available to an &%Animal.  This covers processes of inhalation, 
exhalation, and alternations between the two.")

(subclass Ingesting OrganismProcess)
(documentation Ingesting EnglishLanguage "The &%Process by which food is 
taken into an &%Animal.")

(=>
   (and
      (instance ?ACT Ingesting)
      (resource ?ACT ?FOOD))
   (instance ?FOOD (FoodForFn Organism)))

(subclass Eating Ingesting)
(documentation Eating EnglishLanguage "The &%Process by which solid food is 
incorporated into an &%Animal.")

(=>
   (and
      (instance ?ACT Eating)
      (resource ?ACT ?FOOD))
   (attribute ?FOOD Solid))

(subclass Drinking Ingesting)
(documentation Drinking EnglishLanguage "The &%Process by which liquid food, i.e. 
&%Beverages, are incorporated into an &%Animal.")

(=>
   (and
      (instance ?ACT Drinking)
      (resource ?ACT ?FOOD))
   (attribute ?FOOD Liquid))

(subclass Digesting OrganismProcess)
(subclass Digesting AutonomicProcess)
(documentation Digesting EnglishLanguage "The &%Process by which &%Food that has been 
ingested is broken down into simpler chemical compounds and absorbed by 
the &%Organism.")

(=>
   (and
      (instance ?DIGEST Digesting)
      (agent ?DIGEST ?ORGANISM))
   (exists (?INGEST)
      (and
         (instance ?INGEST Ingesting)
         (agent ?INGEST ?ORGANISM)
         (overlapsTemporally (WhenFn ?INGEST) (WhenFn ?DIGEST)))))

(=>
   (instance ?DIGEST Digesting)
   (exists (?DECOMP)
      (and
         (instance ?DECOMP ChemicalDecomposition)
         (subProcess ?DECOMP ?DIGEST))))

(subclass Growth AutonomicProcess)
(documentation Growth EnglishLanguage "The &%Process of biological development in which 
an &%Organism or part of an &%Organism changes its form or its size.")

(subclass Replication OrganismProcess)
(documentation Replication EnglishLanguage "The &%Process of biological reproduction.  
This can be either a sexual or an asexual process.")

(=>
   (and
      (instance ?REP Replication)
      (agent ?REP ?PARENT)
      (result ?REP ?CHILD))
   (parent ?CHILD ?PARENT)) 

(=>
   (instance ?REP Replication)
   (exists (?BODY)
      (and
         (instance ?BODY ReproductiveBody)
         (result ?REP ?BODY))))

(subclass SexualReproduction Replication)
(disjoint SexualReproduction AsexualReproduction)
(documentation SexualReproduction EnglishLanguage "Sexual &%Processes of biological 
reproduction.")

(=>
   (and
      (instance ?REP SexualReproduction)
      (result ?REP ?ORGANISM)) 
   (exists (?MOTHER ?FATHER)
      (and
         (mother ?ORGANISM ?MOTHER)
         (father ?ORGANISM ?FATHER)))) 

(subclass AsexualReproduction Replication)
(documentation AsexualReproduction EnglishLanguage "Asexual &%Processes of biological 
reproduction.")

;; NS: delete.
;; (=>
;;    (and
;;       (instance ?REP AsexualReproduction)
;;       (result ?REP ?ORGANISM)) 
;;    (not 
;;       (exists (?PARENT1 ?PARENT2)
;;          (and
;;             (parent ?ORGANISM ?PARENT1)
;;             (parent ?ORGANISM ?PARENT2)
;;             (not (equal ?PARENT1 ?PARENT2))))))

;; NS: add.
(=>
  (and
    (instance ?REP AsexualReproduction)
    (result ?REP ?ORGANISM)
    (parent ?ORGANISM ?PARENT1)
    (parent ?ORGANISM ?PARENT2))
  (equal ?PARENT1 ?PARENT2))

(subclass PsychologicalProcess BiologicalProcess)
(documentation PsychologicalProcess EnglishLanguage "A &%BiologicalProcess which takes place in 
the mind or brain of an &%Organism and which may be manifested in the behavior 
of the &%Organism.")

(=>
    (instance ?PROCESS PsychologicalProcess)
    (exists (?ANIMAL)
        (and
            (instance ?ANIMAL Animal)
            (experiencer ?PROCESS ?ANIMAL))))

(subclass PathologicProcess BiologicalProcess)
(disjoint PathologicProcess PhysiologicProcess)
(documentation PathologicProcess EnglishLanguage "A disordered process, activity, or 
state of the &%Organism as a whole, of a body system or systems, or of 
multiple &%Organs or &%Tissues. Included here are normal responses to a 
negative stimulus as well as patholologic conditions or states that are 
less specific than a disease. Pathologic functions frequently have 
systemic effects.")

(=>
   (and
      (instance ?PATH PathologicProcess)
      (experiencer ?PATH ?ORG))
   (exists (?PART ?DISEASE)
      (and
         (part ?PART ?ORG)
         (instance ?DISEASE DiseaseOrSyndrome)
         (attribute ?PART ?DISEASE))))

(subclass Injuring PathologicProcess)
(subclass Injuring Damaging)
(documentation Injuring EnglishLanguage "The process of creating a traumatic wound or 
injury.  Since &%Injuring is not possible without some biologic function 
of the organism being injured, it is a subclass of &%BiologicalProcess.")

(=>
    (instance ?INJ Injuring)
    (exists (?STRUCT)
        (and
            (instance ?STRUCT AnatomicalStructure)
            (patient ?INJ ?STRUCT))))

(<=>
   (instance ?INJ Injuring)
   (and
      (instance ?INJ Damaging)
      (exists (?ORGANISM)
         (and
            (instance ?ORGANISM Organism)
            (patient ?INJ ?ORGANISM)))))

(subclass Poisoning Injuring)
(documentation Poisoning EnglishLanguage "A &%Poisoning is caused by an external 
substance.  Since &%Poisoning is not possible without some biologic 
function which affects the &%Organism being injured, it is a subclass 
of &%BiologicalProcess.")

(=>
    (instance ?POISON Poisoning)
    (exists (?THING)
        (and
            (patient ?POISON ?THING)
            (or
                (instance ?THING Organism)
                (instance ?THING AnatomicalStructure)))))

(=>
  (instance ?POISON Poisoning)
  (exists (?SUBSTANCE)
    (and
      (instance ?SUBSTANCE BiologicallyActiveSubstance)
      (instrument ?POISON ?SUBSTANCE))))

(documentation NaturalProcess EnglishLanguage "A &%Process that take place in nature
spontanously.")
(subclass NaturalProcess Process)
(disjoint NaturalProcess IntentionalProcess)

(subclass IntentionalProcess Process)
(documentation IntentionalProcess EnglishLanguage "A &%Process that has a specific 
purpose for the &%Agent who performs it.") 

(=>
   (and
      (instance ?PROC IntentionalProcess)
      (agent ?PROC ?AGENT))
   (exists (?PURP)
      (hasPurposeForAgent ?PROC ?PURP ?AGENT)))

(=>
   (instance ?PROC IntentionalProcess)
   (exists (?AGENT)
      (and
         (instance ?AGENT CognitiveAgent)
         (agent ?PROC ?AGENT))))

(=>
   (and
      (instance ?PROC IntentionalProcess)
      (agent ?PROC ?HUMAN)
      (instance ?HUMAN Animal))
   (holdsDuring (WhenFn ?PROC) (attribute ?HUMAN Awake)))

(subclass IntentionalPsychologicalProcess IntentionalProcess)
(subclass IntentionalPsychologicalProcess PsychologicalProcess)
(documentation IntentionalPsychologicalProcess EnglishLanguage "An &%IntentionalProcess that 
can be realized entirely within the mind or brain of an &%Organism.  Thus, 
for example, &%Reasoning is a subclass of &%IntentionalPsychologicalProcess, 
because one can reason simply by exercising one's mind/brain.  On the other 
hand, &%RecreationOrExercise is not a subclass of &%IntentionalPsychologicalProcess,
because many instances of &%RecreationOrExercise necessarily have &%subProcesses 
of &%BodyMotion.")

(subclass RecreationOrExercise IntentionalProcess)
(documentation RecreationOrExercise EnglishLanguage "A &%Process that is carried out for 
the purpose of recreation or exercise.  Since &%RecreationOrExercise is a 
subclass of &%IntentionalProcess, the intent of a process determines whether 
or not it is an instance of the class.  Hence, if John and Bill watch the same 
program on television, and John watches it to relax while Bill watches it solely 
to satisfy an educational requirement, then John's watching the movie is an 
instance of &%RecreationOrExercise, while Bill's is not (both cases of 
watching the television program would however be in the class of &%Seeing, since 
being an instance of this latter class is not determined by intention).")

(subclass OrganizationalProcess IntentionalProcess)
(documentation OrganizationalProcess EnglishLanguage "An &%IntentionalProcess that 
involves an &%Organization.")

(=>
   (and
      (instance ?ACT OrganizationalProcess)
      (agent ?ACT ?AGENT))
   (or
      (instance ?AGENT Organization)
      (exists (?ORG)
         (and
            (instance ?ORG Organization)
            (member ?AGENT ?ORG)))))

(subclass Election OrganizationalProcess)
(documentation Election EnglishLanguage "&%Election is the class of events conducted by an 
organization, in which qualified participants vote for officers, adopt 
resolutions, or settle other issues in that &%Organization.") 

(subclass ReligiousProcess OrganizationalProcess)
(documentation ReligiousProcess EnglishLanguage "An
&%OrganizationalProcess that is carried out within or by a
&%ReligiousOrganization.")

(=>
   (and
      (instance ?ACT ReligiousProcess)
      (agent ?ACT ?AGENT))
   (or
      (instance ?AGENT ReligiousOrganization)
      (exists (?ORG)
         (and
            (member ?AGENT ?ORG)
            (instance ?ORG ReligiousOrganization)))))

(subclass JoiningAnOrganization OrganizationalProcess)
(documentation JoiningAnOrganization EnglishLanguage "The
&%OrganizationalProcess of becoming a &%member of an &%Organization.")

(=>
   (and
      (instance ?JOIN JoiningAnOrganization)
      (instance ?ORG Organization)
      (agent ?JOIN ?PERSON)
      (patient ?JOIN ?ORG))
   (and
      (holdsDuring (BeginFn (WhenFn ?JOIN)) (not (member ?PERSON ?ORG)))
      (holdsDuring (EndFn (WhenFn ?JOIN)) (member ?PERSON ?ORG))))

(subclass LeavingAnOrganization OrganizationalProcess)
(disjoint LeavingAnOrganization JoiningAnOrganization)
(documentation LeavingAnOrganization EnglishLanguage "The &%OrganizationalProcess of 
leaving an &%Organization, whether voluntarily or involuntarily.")

(=>
   (and
      (instance ?LEAVE LeavingAnOrganization)
      (instance ?ORG Organization)
      (agent ?LEAVE ?PERSON)
      (patient ?LEAVE ?ORG))
   (and
      (holdsDuring (BeginFn (WhenFn ?LEAVE)) (member ?PERSON ?ORG))
      (holdsDuring (EndFn (WhenFn ?LEAVE)) (not (member ?PERSON ?ORG)))))

(subclass Graduation LeavingAnOrganization)
(documentation Graduation EnglishLanguage "The &%OrganizationalProcess of graduating 
from an &%EducationalOrganization.")

(=>
  (and
    (instance ?GRAD Graduation)
    (agent ?GRAD ?ORG))
  (instance ?ORG EducationalOrganization))

(subclass Matriculation JoiningAnOrganization)
(documentation Matriculation EnglishLanguage "The &%OrganizationalProcess of joining an 
&%EducationalOrganization as a student.")

(=>
  (and
    (instance ?MAT Matriculation)
    (agent ?MAT ?ORG))
  (instance ?ORG EducationalOrganization))

(subclass Hiring JoiningAnOrganization)
(documentation Hiring EnglishLanguage "&%OrganizationalProcesses where someone is made an 
employee of an &%Organization.")

(=>
   (and
      (instance ?HIRE Hiring)
      (instance ?ORG Organization)
      (agent ?HIRE ?ORG)
      (patient ?HIRE ?PERSON))
   (and
      (holdsDuring (BeginFn (WhenFn ?HIRE)) (not (employs ?ORG ?PERSON)))
      (holdsDuring (EndFn (WhenFn ?HIRE)) (employs ?ORG ?PERSON))))

(subclass TerminatingEmployment LeavingAnOrganization)
(documentation TerminatingEmployment EnglishLanguage "&%OrganizationalProcesses where someone 
ceases to be an employee of an &%Organization.  Note that this covers being 
laid off, being fired, and voluntarily leaving a job.")

(=>
   (and
      (instance ?FIRE TerminatingEmployment)
      (instance ?ORG Organization)
      (agent ?FIRE ?ORG)
      (patient ?FIRE ?PERSON))
   (and
      (holdsDuring (BeginFn (WhenFn ?FIRE)) (employs ?ORG ?PERSON))
      (holdsDuring (EndFn (WhenFn ?FIRE)) (not (employs ?ORG ?PERSON)))))

(subclass PoliticalProcess OrganizationalProcess)
(documentation PoliticalProcess EnglishLanguage "An &%OrganizationalProcess carried 
out by, for or against officially constituted governments.  Some examples 
would be voting on proposed legislation, electing a government representative, 
or even overthrowing a government in a revolution.") 

(=>
   (instance ?PROC PoliticalProcess)
   (exists (?POL)
      (and
         (or
            (instance ?POL Government)
            (exists (?GOV)
               (and
                  (instance ?GOV Government)
                  (member ?POL ?GOV))))
         (or
            (agent ?PROC ?POL)
            (patient ?PROC ?POL)))))

(subclass JudicialProcess PoliticalProcess)
(documentation JudicialProcess EnglishLanguage "Any legal proceeding which is conducted 
by a &%JudicialOrganization.  Note that there is an important difference 
between the concepts &%LegalAction and &%JudicialProcess.  The former 
refers to legal claims that are brought by a plaintiff, e.g. law suits, 
while the second refers to trials and other sorts of judicial hearings 
where the merits of a &%LegalAction are decided.")

(=>
   (and
      (instance ?PROCESS JudicialProcess)
      (agent ?PROCESS ?ORG)
      (instance ?ORG Organization))
   (instance ?ORG JudicialOrganization))

(subclass LegalDecision JudicialProcess)
(subclass LegalDecision Declaring)
(documentation LegalDecision EnglishLanguage "A decision issued by a court with respect to 
a &%LegalAction.  Note that a &%LegalDecision is the act of &%Declaring a 
decision of a court, it is not the act of judge or jury &%Deciding the merits 
of a particular &%LegalAction.")

(=>
   (instance ?DECISION LegalDecision)
   (exists (?ACTION)
      (and
         (instance ?ACTION LegalAction)
         (refers ?DECISION ?ACTION))))

(=>
   (instance ?DECISION LegalDecision)
   (exists (?DECIDE)
      (and
         (instance ?DECIDE Deciding)
         (earlier (WhenFn ?DECIDE) (WhenFn ?DECISION)))))

(subclass MilitaryProcess PoliticalProcess)
(subclass MilitaryProcess OrganizationalProcess)
(documentation MilitaryProcess EnglishLanguage "Any &%Process that is carried out by a 
military organization.  Note that this class covers &%Processes, e.g. 
military operations, that are the result of careful planning, as well as 
those which are unscripted.")

(subclass RegulatoryProcess Guiding)
(documentation RegulatoryProcess EnglishLanguage "an &%Guiding whose aim is the enforcement 
of rules or regulations.  Note the key differences between &%RegulatoryProcess 
and the related concept &%Managing.  The latter implies a long-term relationship 
between a single manager and limited number of agents who are managed, while the 
former implies a normative standard to which the activities of the regulated are 
referred.")

(subclass Managing OrganizationalProcess)
(subclass Managing Guiding)
(documentation Managing EnglishLanguage "&%OrganizationalProcesses that involve overseeing 
the activities of others.  Note the key differences between &%RegulatoryProcess 
and its sibling &%Managing.  The latter implies a long-term relationship between 
the manager and the managed, while the former implies a normative standard to which 
the activities of the regulated are referred.")

(subclass Planning IntentionalPsychologicalProcess)
(documentation Planning EnglishLanguage "Specifying a set of actions in order to meet a 
set of goals or objectives.")

(=>
  (and
    (instance ?EVENT Planning)
    (result ?EVENT ?CBO)
    (instance ?CBO ContentBearingObject))
  (exists (?PLAN)
    (and
      (instance ?PLAN Plan)
      (containsInformation ?CBO ?PLAN))))

(subclass Designing IntentionalPsychologicalProcess)
(documentation Designing EnglishLanguage "The spatial analogue of &%Planning.  &%Designing a 
&%Collection of &%Objects involves determining a placement of the &%Objects 
with respect to one another and perhaps other &%Objects as well, in order to 
satisfy a particular purpose.")

(subclass Interpreting IntentionalPsychologicalProcess)
(documentation Interpreting EnglishLanguage "Any &%Process of assigning a &%Proposition to 
a &%Text, i.e. understanding the &%Text.")

(=>
   (and
      (instance ?INTERPRET Interpreting)
      (agent ?INTERPRET ?AGENT)
      (patient ?INTERPRET ?CONTENT)
      (instance ?CONTENT ContentBearingObject))
   (exists (?PROP)
      (holdsDuring (EndFn (WhenFn ?INTERPRET)) (believes ?AGENT (containsInformation ?CONTENT ?PROP)))))

(subclass QuantityChange InternalChange)
(partition QuantityChange Increasing Decreasing)
(documentation QuantityChange EnglishLanguage "Any &%InternalChange where a &%PhysicalQuantity 
associated with the &%patient is altered.")

(subclass Increasing QuantityChange)
(relatedInternalConcept Increasing Putting)
(documentation Increasing EnglishLanguage "Any &%QuantityChange where the &%PhysicalQuantity 
is increased.")

(=>
  (and
    (instance ?INCREASE Increasing)
    (patient ?INCREASE ?OBJ))
  (exists (?UNIT ?QUANT1 ?QUANT2)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?INCREASE)) 
        (equal (MeasureFn ?OBJ ?UNIT) ?QUANT1))
      (holdsDuring 
        (EndFn (WhenFn ?INCREASE)) 
        (equal (MeasureFn ?OBJ ?UNIT) ?QUANT2))
      (greaterThan ?QUANT2 ?QUANT1))))

(subclass Heating Increasing)
(disjoint Heating Cooling)
(documentation Heating EnglishLanguage "Any &%Increasing &%Process where the &%PhysicalQuantity 
increased is a &%TemperatureMeasure.") 

(=>
   (and
      (instance ?HEAT Heating)
      (patient ?HEAT ?OBJ))
   (exists (?UNIT ?QUANT1 ?QUANT2)
     (and
         (instance ?UNIT TemperatureMeasure)
         (holdsDuring 
           (BeginFn (WhenFn ?HEAT)) 
           (equal (MeasureFn ?OBJ ?UNIT) ?QUANT1))
         (holdsDuring 
           (EndFn (WhenFn ?HEAT)) 
           (equal (MeasureFn ?OBJ ?UNIT) ?QUANT2))
         (greaterThan ?QUANT2 ?QUANT1))))

(subclass Decreasing QuantityChange)
(relatedInternalConcept Decreasing Removing)
(documentation Decreasing EnglishLanguage "Any &%QuantityChange where the &%PhysicalQuantity 
is decreased.")

(=>
   (and
      (instance ?DECREASE Decreasing)
      (patient ?DECREASE ?OBJ))
   (exists (?UNIT ?QUANT1 ?QUANT2)
     (and
       (holdsDuring 
         (BeginFn 
           (WhenFn ?DECREASE)) 
           (equal (MeasureFn ?OBJ ?UNIT) ?QUANT1))
       (holdsDuring 
         (EndFn (WhenFn ?DECREASE)) 
         (equal (MeasureFn ?OBJ ?UNIT) ?QUANT2))
       (lessThan ?QUANT2 ?QUANT1)))) 

(subclass Cooling Decreasing)
(documentation Cooling EnglishLanguage "Any &%Decreasing &%Process where the &%PhysicalQuantity 
decreased is a &%TemperatureMeasure.") 

(=>
   (and
      (instance ?COOL Cooling)
      (patient ?COOL ?OBJ))
   (exists (?UNIT ?QUANT1 ?QUANT2)
     (and
       (instance ?UNIT TemperatureMeasure)
       (holdsDuring 
         (BeginFn (WhenFn ?COOL)) 
         (equal (MeasureFn ?OBJ ?UNIT) ?QUANT1))
       (holdsDuring 
         (EndFn (WhenFn ?COOL)) 
         (equal (MeasureFn ?OBJ ?UNIT) ?QUANT2))
       (lessThan ?QUANT2 ?QUANT1)))) 

;; NS: moved from Mid-level-ontology.kif
(instance moves CaseRole)
(domain moves 1 Motion)
(domain moves 2 Object)
(documentation moves EnglishLanguage "(&%moves ?MOTION ?OBJECT) means that during
the &%Motion event ?MOTION, ?OBJECT moves.  This does not
necessarily imply that the location of ?OBJECT changes during
?MOTION.  See also &%changesLocation and &%Translocation.")
(subrelation moves involvedInEvent)

;; NS: moved from Mid-level-ontology.kif
(instance changesLocation CaseRole)
(domain changesLocation 1 Translocation)
(domain changesLocation 2 Object)
(documentation changesLocation EnglishLanguage "(&%changesLocation ?EVENT
?OBJECT) means that during the &%Translocation event ?EVENT,
?OBJECT's location changes.  ?OBJECT might also be the &%agent,
&%patient, or &%experiencer of ?EVENT.")
(subrelation changesLocation moves)
;; MS: added rule.
(=>
  (changesLocation ?EVENT ?OBJ)
  (and
    (instance ?EVENT Translocation)
    (instance ?OBJ Object)
    (or
      (patient ?EVENT ?OBJ)
      (agent ?EVENT ?OBJ)
      (experiencer ?EVENT ?OBJ))))

(subclass Motion Process)
(documentation Motion EnglishLanguage "Any &%Process of movement.")

;; NS: add.
(=>
  (instance ?MOTION Motion)
  (exists (?OBJ)
    (and
      (instance ?OBJ Object)
      (moves ?MOTION ?OBJ))))

;; NS: delete.  The imprecision of &%patient here will be a problem if
;; this rule is ever used in inference, given the number and variety
;; of subclasses of Motion.
;; (=>
;;    (and
;;       (instance ?MOTION Motion)
;;       (patient ?MOTION ?OBJ)
;;       (origin ?MOTION ?PLACE))
;;    (holdsDuring (BeginFn (WhenFn ?MOTION)) (located ?OBJ ?PLACE)))

;; NS: add.
(=>
   (and
      (instance ?MOTION Motion)
      (moves ?MOTION ?OBJ)
      (origin ?MOTION ?PLACE))
   (holdsDuring (BeginFn (WhenFn ?MOTION)) (located ?OBJ ?PLACE)))

;; NS: delete.
;; (=>
;;    (and
;;       (instance ?MOTION Motion)
;;       (patient ?MOTION ?OBJ)
;;       (destination ?MOTION ?PLACE))
;;    (holdsDuring (EndFn (WhenFn ?MOTION)) (located ?OBJ ?PLACE)))

;; NS: add.
(=>
   (and
      (instance ?MOTION Motion)
      (moves ?MOTION ?OBJ)
      (destination ?MOTION ?PLACE))
   (holdsDuring (EndFn (WhenFn ?MOTION)) (located ?OBJ ?PLACE)))


(subclass MotionUpward Motion)
(disjoint MotionUpward MotionDownward)
(documentation MotionUpward EnglishLanguage "&%Motion where an &%Object is moving away 
from the ground.")

(subclass MotionDownward Motion)
(documentation MotionDownward EnglishLanguage "&%Motion where an &%Object is moving toward the 
ground.")

(instance path CaseRole)
;; KJN: Deleting this as it is redundant.
;;(subrelation path involvedInEvent)
(subrelation path eventPartlyLocated)
(domain path 1 Motion)
(domain path 2 Object)
(documentation path EnglishLanguage "(&%path ?MOTION ?PATH) means that ?PATH is a route 
along which ?MOTION occurs.  For example, Highway 101 is the path in the 
following proposition:  the car drove up Highway 101.")

(=>
   (and
      (path ?PROCESS ?PATH1)
      (origin ?PROCESS ?SOURCE)
      (destination ?PROCESS ?DEST)
      (length ?PATH1 ?MEASURE1)
      (distance ?SOURCE ?DEST ?DISTANCE)
      (not (greaterThan ?MEASURE1 ?DISTANCE)))
   (forall (?OBJ)
      (=>
         (part ?OBJ ?PATH1)
         (between ?SOURCE ?OBJ ?DEST))))

(subclass BodyMotion Motion)
(documentation BodyMotion EnglishLanguage "Any &%Motion where the
&%agent is an &%Organism and the &%patient is a &%BodyPart.")

;; NS: delete.
;; (=>
;;    (instance ?MOTION BodyMotion)
;;    (exists (?OBJ ?AGENT)
;;       (and
;;          (instance ?OBJ BodyPart)
;;          (patient ?MOTION ?OBJ)
;;          (instance ?AGENT Organism)
;;          (agent ?MOTION ?AGENT))))

;; NS: add.
(=>
  (and
    (instance ?MOTION BodyMotion)
    (moves ?MOTION ?OBJ))
  (and
    (instance ?OBJ BodyPart)
    (patient ?MOTION ?OBJ)))

;; NS: add.
(=>
  (instance ?MOTION BodyMotion)
  (exists (?AGENT)
    (and
      (instance ?AGENT Organism)
      (agent ?MOTION ?AGENT))))

(subclass VocalCords Organ)
(documentation VocalCords EnglishLanguage "The vocal cords, are composed
of two folds of mucous membrane stretched horizontally across the
larynx. They vibrate, modulating the flow of air being expelled from the
lungs during &%Vocalizing. ")

(typicalPart VocalCords Human)
(typicallyContainsPart VocalCords Human)
(initialPart VocalCords Human)
;; NS: delete.
;; (=>
;;    (instance ?VOCAL Vocalizing)
;;    (exists (?HUMAN)
;;       (and
;;          (instance ?HUMAN Human)
;;          (agent ?VOCAL ?HUMAN)
;;          (instrument ?VOCAL ?HUMAN))))

;; NS: add.  This probably is too restrictive, given that primates and
;; many other types of mammals, as well as birds, also vocalize.
;; Create VocalCord, and add the instrument part of the rule above, in
;; Mid-level-ontology.kif.

(subclass Vocalizing RadiatingSound)
(documentation Vocalizing EnglishLanguage "Any instance of &%RadiatingSound where
the instrument is the vocal cord.  This covers grunts, screams, raors, as well as
&%Speaking.")

(=>
  (instance ?VOCAL Vocalizing)
  (exists (?CORD ?ORGANISM)
    (and
      (instance ?CORD VocalCords)
      (instrument ?VOCAL ?CORD)
      (part ?VOCAL ?ORGANISM)
      (instance ?ORGANISM Organism))))

(subclass Speaking LinguisticCommunication)
(subclass Speaking Vocalizing)

;; NS: delete.  &%LinguisticGeneration does not exist.  
;; (documentation Speaking EnglishLanguage "Any &%LinguisticGeneration
;; which is also a &%Vocalizing, i.e. any &%LinguisticCommunication by a
;; &%Human which involves his/her vocal cords.")

;; NS: add.
(documentation Speaking EnglishLanguage "Any &%LinguisticCommunication
by a &%Human which involves his/her vocal cords.")

;; KJN: Deleting. Fixed Music ontology and replacing it with concepts from that.
;;(subclass Singing Speaking)
;;(subclass Singing Music)
;;(documentation Singing EnglishLanguage "&%Speaking that is also &%Music.")

(subclass Ambulating BodyMotion)
(subclass Ambulating IntentionalProcess)
(subclass Ambulating Translocation)
(partition Ambulating Walking Running)
(documentation Ambulating EnglishLanguage "Any &%BodyMotion which is accomplished by 
means of the legs of an &%Animal for the purpose of moving from one 
point to another.") 

(subclass Walking Ambulating)
(documentation Walking EnglishLanguage "&%Ambulating relatively slowly, i.e. moving in such a 
way that at least one foot is always in contact with the ground.")

(subclass Running Ambulating)
(documentation Running EnglishLanguage "&%Ambulating relatively quickly, i.e. moving in such a 
way that, with each step, neither foot is in contact with the ground for a 
period of time.")

(=>
   (and
      (instance ?WALK Walking)
      (instance ?RUN Running)
      (agent ?WALK ?AGENT)
      (agent ?RUN ?AGENT)
      (holdsDuring (WhenFn ?WALK) (measure ?AGENT (SpeedFn ?LENGTH1 ?TIME)))
      (holdsDuring (WhenFn ?RUN) (measure ?AGENT (SpeedFn ?LENGTH2 ?TIME))))
   (greaterThan ?LENGTH2 ?LENGTH1))

(subclass Swimming BodyMotion)
(subclass Swimming IntentionalProcess)
(documentation Swimming EnglishLanguage "Any deliberate and controlled &%BodyMotion 
through water that is accomplished by an &%Organism.")

(=>
   (and
      (instance ?SWIM Swimming)
      (agent ?SWIM ?AGENT))
   (exists (?AREA)
      (and
         (instance ?AREA WaterArea)
         (located ?AGENT ?AREA))))

(subclass Dancing BodyMotion)
(documentation Dancing EnglishLanguage "Any &%BodyMotion of &%Humans which is 
deliberately coordinated with music.")

(subclass GeologicalProcess Motion)
(subclass GeologicalProcess InternalChange)
(disjoint GeologicalProcess IntentionalProcess)
(documentation GeologicalProcess EnglishLanguage "The class of activities that 
are caused by geological forces and affect geological features, 
and which may affect the biosphere as well.")

(subclass WeatherProcess Motion)
(disjoint WeatherProcess IntentionalProcess)
(documentation WeatherProcess EnglishLanguage "&%WeatherProcess is the broadest class of 
processes that involve weather, including weather seasons (not to be confused 
with instances of &%SeasonOfYear), weather systems, and short-term weather 
events.")

(subclass Precipitation WeatherProcess)
(subclass Precipitation WaterMotion)
(subclass Precipitation Falling)
(documentation Precipitation EnglishLanguage "&%Precipitation is the process of 
water molecules falling from the air to the ground, in either a 
liquid or frozen state.")

(=>
  (instance ?PROCESS Precipitation)
  (exists (?STUFF)
    (and
      (instance ?STUFF Water)
      (patient ?PROCESS ?STUFF))))

(subclass LiquidMotion Motion)
(documentation LiquidMotion EnglishLanguage "Any &%Motion where the &%patient is a 
&%Liquid.  This class would cover, in particular, the flow of 
&%Water.")

(=>
   (and
      (instance ?MOTION LiquidMotion)
      (patient ?MOTION ?OBJ))
   (attribute ?OBJ Liquid))
   
(subclass WaterMotion LiquidMotion)
(documentation WaterMotion EnglishLanguage "Any &%LiquidMotion where the &%Liquid is &%Water.")

(=>
   (instance ?MOTION WaterMotion)
   (exists (?WATER)
      (and
         (patient ?MOTION ?WATER)
         (instance ?WATER Water))))

(subclass GasMotion Motion)
(documentation GasMotion EnglishLanguage "Any &%Motion where the &%patient is a 
&%Gas.  This class would cover, in particular, the motion of 
&%Air, e.g. a breeze or wind.")
 
(=>
   (and
      (instance ?MOTION GasMotion)
      (patient ?MOTION ?OBJ))
   (attribute ?OBJ Gas))

(subclass Wind GasMotion)
(documentation Wind EnglishLanguage "Any &%Motion of &%Air.")

(subclass DirectionChange Motion)
(documentation DirectionChange EnglishLanguage "The act of changing the direction in 
which the &%patient of the act is oriented.")

(=>
   (instance ?PROC DirectionChange)
   (exists (?ATTR)
      (and
         (instance ?ATTR DirectionalAttribute)
         (or
            (and
               (holdsDuring (BeginFn (WhenFn ?PROC)) (manner ?PROC ?ATTR))
               (holdsDuring (EndFn (WhenFn ?PROC)) (not (manner ?PROC ?ATTR))))
            (and
               (holdsDuring (EndFn (WhenFn ?PROC)) (manner ?PROC ?ATTR))
               (holdsDuring (BeginFn (WhenFn ?PROC)) (not (manner ?PROC ?ATTR))))))))

(subclass Transfer Translocation)
(documentation Transfer EnglishLanguage "Any &%instance of &%Translocation where the &%agent 
and the &%patient are not the same thing.")

(=>
   (and
      (instance ?TRANSFER Transfer)
      (agent ?TRANSFER ?AGENT)
      (patient ?TRANSFER ?PATIENT))
   (not
      (equal ?AGENT ?PATIENT)))

(=>
  (and
    (instance ?T1 Translocation)
    (instance ?T2 Translocation)
    (origin ?T1 ?O1)
    (origin ?T2 ?D1)
    (destination ?T1 ?D1)
    (destination ?T2 ?D2)
    (experiencer ?T1 ?P)
    (experiencer ?T2 ?P))
  (exists (?T)
    (and
      (instance ?T Translocation)
      (origin ?T ?O1)
      (destination ?T ?D2)
      (subProcess ?T1 ?T)
      (subProcess ?T2 ?T)
      (experiencer ?T ?P)
      (starts
        (WhenFn ?T1)
        (WhenFn ?T))
      (finishes
        (WhenFn ?T2)
        (WhenFn ?T)))))

(subclass Carrying Transfer)
(documentation Carrying EnglishLanguage "&%Transfer from one point to another by means of 
an &%Animal or &%Human.")

(=>
   (instance ?CARRY Carrying) 
   (exists (?ANIMAL)
      (and
         (instance ?ANIMAL Animal)
         (instrument ?CARRY ?ANIMAL))))

(subclass Removing Transfer)
(documentation Removing EnglishLanguage "The &%Class of &%Processes where something is 
taken away from a location.  Note that the thing removed and the location 
are specified with the &%CaseRoles &%patient and &%origin, respectively.")

(=>
   (and
      (instance ?REMOVE Removing)
      (origin ?REMOVE ?PLACE)
      (patient ?REMOVE ?OBJ))
   (and
      (holdsDuring (BeginFn (WhenFn ?REMOVE)) (located ?OBJ ?PLACE))
      (holdsDuring (EndFn (WhenFn ?REMOVE)) (not (located ?OBJ ?PLACE)))))

(subclass Uncovering Removing) 
(disjoint Uncovering Covering) 
(documentation Uncovering EnglishLanguage "The &%Class of &%Removing processes where the &%agent 
uncovers the &%patient, either completely or only partially.") 

(subclass Putting Transfer)
(documentation Putting EnglishLanguage "The &%Class of &%Processes where something is put 
in a location.  Note that the location is specified with the &%CaseRole 
&%destination.")

(=>
   (and
      (instance ?PUT Putting)
      (destination ?PUT ?PLACE)
      (patient ?PUT ?OBJ))
   (and
      (holdsDuring (BeginFn (WhenFn ?PUT)) (not (located ?OBJ ?PLACE)))
      (holdsDuring (EndFn (WhenFn ?PUT)) (located ?OBJ ?PLACE))))

(subclass Covering Putting) 
(documentation Covering EnglishLanguage "The &%Class of &%Putting processes where the &%agent 
covers the &%patient, either completely or only partially, with something 
else.") 

(subclass Inserting Putting)
(documentation Inserting EnglishLanguage "&%Putting one thing inside of another thing.")

(=>
   (and
      (instance ?INSERT Inserting)
      (patient ?INSERT ?OBJ1)
      (destination ?INSERT ?OBJ2))
   (and
      (holdsDuring (BeginFn (WhenFn ?INSERT)) (not (contains ?OBJ2 ?OBJ1)))
      (holdsDuring (EndFn (WhenFn ?INSERT)) (contains ?OBJ2 ?OBJ1))))

(subclass Injecting Inserting)
(documentation Injecting EnglishLanguage "&%Inserting a &%BiologicallyActiveSubstance into an 
&%Animal or a &%Human with a syringe.")

(=>
   (instance ?INJECT Injecting)
   (exists (?SUBSTANCE ?ANIMAL)
      (and
         (patient ?INJECT ?SUBSTANCE)
         (instance ?SUBSTANCE BiologicallyActiveSubstance)
         (attribute ?SUBSTANCE Liquid)
         (destination ?INJECT ?ANIMAL)
         (instance ?ANIMAL Animal)))) 

(subclass Substituting Transfer)
(subclass Substituting DualObjectProcess)
(documentation Substituting EnglishLanguage "The &%Class of &%Transfers where one thing is 
replaced with something else.")

(=>
   (instance ?SUB Substituting)
   (exists (?PUT ?REMOVE ?OBJ1 ?OBJ2 ?PLACE)
      (and
         (instance ?PUT Putting)
         (instance ?REMOVE Removing)
         (subProcess ?PUT ?SUB)
         (subProcess ?REMOVE ?SUB)
         (patient ?REMOVE ?OBJ1)
         (origin ?REMOVE ?PLACE)
         (patient ?PUT ?OBJ2)
         (destination ?PUT ?PLACE)
         (not (equal ?OBJ1 ?OBJ2)))))

(subclass Impelling Transfer)
(documentation Impelling EnglishLanguage "The &%subclass of &%Transfer where the &%patient 
travels through space by means of a sudden, forceful event.  Some examples 
would be shooting, throwing, tossing, etc.")

(subclass Shooting Impelling)
(documentation Shooting EnglishLanguage "The &%subclass of &%Impelling where the &%patient 
is a projectile that is fired through the air by means of some sort of 
&%Device.")

(subclass Touching Transfer)
(documentation Touching EnglishLanguage "Any &%Transfer where two &%Objects are 
brought into immediate physical contact with one another.")

(=>
   (and
      (instance ?TOUCH Touching)
      (agent ?TOUCH ?OBJ1)
      (patient ?TOUCH ?OBJ2))
   (and
      (holdsDuring (BeginFn (WhenFn ?TOUCH)) (not (connected ?OBJ1 ?OBJ2)))
      (holdsDuring (EndFn (WhenFn ?TOUCH)) (connected ?OBJ1 ?OBJ2))))

(subrelation grasps meetsSpatially)
(domain grasps 1 Animal)
(domain grasps 2 Object)
(documentation grasps EnglishLanguage "The state of grasping an &%Object.  (&%grasps 
?ANIMAL ?OBJ) means that the &%Animal ?ANIMAL is intentionally holding 
on to the &%Object ?OBJ.")

(subclass Grabbing Touching)
(subclass Grabbing Attaching)
(documentation Grabbing EnglishLanguage "Any instance of &%Touching which results in 
a situation where the &%agent &%grasps the &%patient of the &%Touching.")

(=>
   (and
      (instance ?GRAB Grabbing)
      (agent ?GRAB ?AGENT)
      (patient ?GRAB ?THING))
   (and
      (holdsDuring (BeginFn (WhenFn ?GRAB)) (not (grasps ?AGENT ?THING)))
      (holdsDuring (EndFn (WhenFn ?GRAB)) (grasps ?AGENT ?THING))))

(subclass Releasing Transfer)
(documentation Releasing EnglishLanguage "Any instance of &%Transfer which results in 
a situation where it is not the case that the &%agent &%grasps something 
which he/she &%grasps previously.")

(=>
   (and
      (instance ?RELEASE Releasing)
      (agent ?GRAB ?AGENT)
      (patient ?GRAB ?THING))
   (and
      (holdsDuring (BeginFn (WhenFn ?RELEASE)) (grasps ?AGENT ?THING))
      (holdsDuring (EndFn (WhenFn ?RELEASE)) (not (grasps ?AGENT ?THING)))))

(subclass Impacting Touching)
(documentation Impacting EnglishLanguage "Any &%Touching where something comes into 
sudden, forceful, physical contact with something else.  Some examples 
would be striking, knocking, whipping etc.")

(=>
   (and
      (instance ?IMPACT Impacting)
      (patient ?IMPACT ?OBJ))
   (exists (?IMPEL)
      (and
         (instance ?IMPEL Impelling)
         (patient ?IMPEL ?OBJ)
         (earlier (WhenFn ?IMPEL) (WhenFn ?IMPACT)))))

(subclass Translocation Motion)
(documentation Translocation EnglishLanguage "&%Translocation is that class of &%Motions 
in which an object moves from one place to another.  In the case of round 
trips, the &%origin and &%destination are the same, but the intervening 
motion passes through other locations.  &%Translocation represents linear 
motion, in contrast to rotation or other movement in place.  A vehicle is 
not necessary, &%Ambulating is a kind of &%Translocation.")

(=>
  (and
    (instance ?MOVEMENT Translocation)
    (origin ?MOVEMENT ?PLACE1))
  (exists (?PLACE2 ?STAGE)
    (and
      (instance ?PLACE2 Region)
      (not (equal ?PLACE1 ?PLACE2))
      (subProcess ?STAGE ?MOVEMENT)
      (located ?STAGE ?PLACE2))))
      
(=>
  (instance ?T Translocation)
  (exists (?O ?D ?P)
    (and
      (instance ?O Object)
      (instance ?D Object)
      (instance ?P Object)
      (path ?T ?P)
      (origin ?T ?O)
      (destination ?T ?D))))       

(subclass Falling Translocation)
(subclass Falling MotionDownward)
(documentation Falling EnglishLanguage "&%Falling is the class of events in 
which something moves from a higher location to a lower location 
under the force of gravity.")

(=>
  (and
    (instance ?DROP Falling)
    (origin ?DROP ?START)
    (destination ?DROP ?FINISH))
  (orientation ?FINISH ?START Below))

(subclass Transportation Translocation)
(relatedInternalConcept Transportation TransportationDevice)
(documentation Transportation EnglishLanguage "&%Motion from one point to another by means 
of a &%TransportationDevice.")

(=>
   (instance ?TRANS Transportation)
   (exists (?DEVICE)
      (and
         (instance ?DEVICE TransportationDevice)
         (instrument ?TRANS ?DEVICE))))
        
         
(subclass Guiding IntentionalProcess)
(documentation Guiding EnglishLanguage "Any &%IntentionalProcess where the &%agent tries to 
direct the behavior of another &%Object, whether an &%Agent or not.")

(subclass Driving Guiding)
(documentation Driving EnglishLanguage "Controlling the direction and/or speed of a 
&%Vehicle.  This includes navigating a ship, driving a car or truck, 
operating a train, etc.")

(=>
   (instance ?DRIVE Driving)
   (exists (?VEHICLE)
      (and
         (instance ?VEHICLE Vehicle)
         (patient ?DRIVE ?VEHICLE))))

(subclass EducationalProcess Guiding)
(documentation EducationalProcess EnglishLanguage "Any &%Process which is intended to result 
in &%Learning.")

(=>
  (and
    (instance ?EDUCATION EducationalProcess)
    (patient ?EDUCATION ?PERSON))
  (hasPurpose ?EDUCATION 
    (exists (?LEARN) 
      (and 
        (instance ?LEARN Learning) 
        (patient ?LEARN ?PERSON)))))

(subclass ChangeOfPossession SocialInteraction)
(relatedInternalConcept ChangeOfPossession possesses)
(documentation ChangeOfPossession EnglishLanguage "The &%Class of &%Processes where 
ownership of something is transferred from one &%Agent to another.")

(=>
   (and
      (instance ?CHANGE ChangeOfPossession)
      (patient ?CHANGE ?OBJ)
      (holdsDuring (BeginFn (WhenFn ?CHANGE)) (possesses ?AGENT1 ?OBJ))
      (holdsDuring (EndFn (WhenFn ?CHANGE)) (possesses ?AGENT2 ?OBJ)))
   (not
      (equal ?AGENT1 ?AGENT2)))

(=>
   (and
      (instance ?CHANGE ChangeOfPossession)
      (origin ?CHANGE ?AGENT1)
      (destination ?CHANGE ?AGENT2)
      (instance ?AGENT1 Agent)
      (instance ?AGENT2 Agent)
      (patient ?CHANGE ?OBJ))
   (and
      (holdsDuring (BeginFn (WhenFn ?CHANGE)) (possesses ?AGENT1 ?OBJ))
      (holdsDuring (EndFn (WhenFn ?CHANGE)) (possesses ?AGENT2 ?OBJ))))

(subclass Giving ChangeOfPossession)
(documentation Giving EnglishLanguage "The &%subclass of &%ChangeOfPossession where the 
&%agent gives the &%destination something.")

(=>
   (and
      (instance ?GIVE Giving)
      (agent ?GIVE ?AGENT1)
      (destination ?GIVE ?AGENT2)
      (instance ?AGENT2 Agent)
      (patient ?GIVE ?OBJ))
   (exists (?GET)
      (and
         (instance ?GET Getting)
         (agent ?GET ?AGENT2)
         (origin ?GET ?AGENT1)
         (patient ?GET ?OBJ))))

(=>
   (and
      (instance ?GIVE Giving)
      (agent ?GIVE ?AGENT))
   (origin ?GIVE ?AGENT))

(subclass Funding Giving)
(documentation Funding EnglishLanguage "Any instance of &%Giving where the &%patient is an 
instance of &%Currency.  Note that this class covers both financing, e.g. 
where a firm funds a software company with venture capital with the agreement 
that a certain percentage of the profits on the investment will be returned 
to the firm, and instances of &%UnilateralGiving, e.g. providing a tuition 
waiver and/or a stipend to a student as part of scholarship or fellowship.")

(=>
   (instance ?FUND Funding)
   (exists (?MONEY)
      (and
         (instance ?MONEY Currency)
         (patient ?FUND ?MONEY))))

(subclass UnilateralGiving Giving)
(documentation UnilateralGiving EnglishLanguage "Any instance of &%Giving that is not part 
of a &%Transaction.  In other words, any instance of &%Giving where nothing 
is received in return.  Some examples of &%UnilateralGiving are:  honorary 
awards, gifts, and financial grants.")

(=>
   (instance ?GIVE UnilateralGiving)
   (not
      (exists (?TRANS)
         (and
            (instance ?TRANS Transaction)
            (subProcess ?GIVE ?TRANS)))))

(subclass Lending Giving)
(documentation Lending EnglishLanguage "The &%subclass of &%Giving &%Processes where 
the &%agent gives the &%destination something for a limited period of 
time with the expectation that it will be returned later (perhaps with 
interest).")

(<=>
   (exists (?BORROW)
      (and
         (instance ?BORROW Borrowing)
         (agent ?BORROW ?AGENT1)
         (origin ?BORROW ?AGENT2)
         (patient ?BORROW ?OBJECT)))
   (exists (?LEND)
      (and 
         (instance ?LEND Lending)
         (agent ?LEND ?AGENT2)
         (destination ?LEND ?AGENT1)
         (patient ?LEND ?OBJECT))))

(subclass GivingBack Giving)
(documentation GivingBack EnglishLanguage "Any instance of &%Giving where the &%agent gives 
something to the &%destination which was previously given to the &%agent by 
the &%destination, e.g. returing a book that was borrowed from someone.") 

(=>
   (and
      (instance ?RETURN GivingBack)
      (agent ?RETURN ?AGENT)
      (destination ?RETURN ?DEST))
   (exists (?GIVE)
      (and
         (instance ?GIVE Giving)
         (agent ?GIVE ?DEST)
         (destination ?GIVE ?AGENT)
         (earlier (WhenFn ?GIVE) (WhenFn ?RETURN)))))

(subclass Getting ChangeOfPossession)
(documentation Getting EnglishLanguage "The &%subclass of &%ChangeOfPossession where the
&%agent gets something.  Note that the source from which something is 
obtained is specified with the &%origin &%CaseRole.")

(=>
   (and
      (instance ?GET Getting)
      (agent ?GET ?AGENT))
   (destination ?GET ?AGENT))

(subclass UnilateralGetting Getting)
(relatedInternalConcept UnilateralGetting UnilateralGiving)
(documentation UnilateralGetting EnglishLanguage "Any instance of &%Getting that is not part 
of a &%Transaction.  In other words, any instance of &%Getting where nothing 
is given in return.  Some examples of &%UnilateralGetting are:  appropriating, 
commandeering, stealing, etc.")

(=>
   (instance ?GET UnilateralGetting)
   (not
      (exists (?TRANS)
         (and
            (instance ?TRANS Transaction)
            (subProcess ?GET ?TRANS)))))

(subclass Borrowing Getting)
(documentation Borrowing EnglishLanguage "The &%subclass of &%Getting &%Processes where 
the &%agent gets something for a limited period of time with the expectation 
that it will be returned later (perhaps with interest).")

(subclass Transaction ChangeOfPossession)
(subclass Transaction DualObjectProcess)
(documentation Transaction EnglishLanguage "The &%subclass of &%ChangeOfPossession where 
something is exchanged for something else.")

(=>
   (instance ?TRANS Transaction)
   (exists (?AGENT1 ?AGENT2 ?GIVE1 ?GIVE2 ?OBJ1 ?OBJ2)
      (and
         (instance ?GIVE1 Giving)
         (instance ?GIVE2 Giving)
     (subProcess ?GIVE1 ?TRANS)
        (subProcess ?GIVE2 ?TRANS)
         (agent ?GIVE1 ?AGENT1)
         (agent ?GIVE2 ?AGENT2)
         (patient ?GIVE1 ?OBJ1)
         (patient ?GIVE2 ?OBJ2)
         (destination ?GIVE1 ?AGENT2)
         (destination ?GIVE2 ?AGENT1)
         (not
            (equal ?AGENT1 ?AGENT2))
         (not
            (equal ?OBJ1 ?OBJ2)))))

(subclass FinancialTransaction Transaction)
(documentation FinancialTransaction EnglishLanguage "A &%Transaction where an instance 
of &%FinancialInstrument is the subject of the action, and often is exchanged for something else.")

(=>
   (instance ?TRANS FinancialTransaction)
   (exists (?OBJ)
      (and
         (patient ?TRANS ?OBJ)
         (instance ?OBJ FinancialInstrument))))

(instance transactionAmount BinaryPredicate) 
(instance transactionAmount SingleValuedRelation) 
(instance transactionAmount TotalValuedRelation) 
(domain transactionAmount 1 FinancialTransaction)
(domain transactionAmount 2 CurrencyMeasure) 
(documentation transactionAmount EnglishLanguage "(&%transactionAmount ?TRANSACTION 
?AMOUNT) means that ?AMOUNT is an instance of &%CurrencyMeasure being 
exhanged in the &%FinancialTransaction ?TRANSACTION.") 

(=>
   (transactionAmount ?TRANS ?AMOUNT)
   (exists (?OBJ)
      (and
         (patient ?TRANS ?OBJ)
         (monetaryValue ?OBJ ?AMOUNT))))

(subclass ServiceProcess SocialInteraction)
(documentation ServiceProcess EnglishLanguage "&%ServiceProcess denotes the class
of events in which one agent performs a service for another.  The
service need not be commercial, and it need not be the case that
the &%serviceRecipient pays or recompenses the &%serviceProvider
for the service.")

(subclass CommercialService FinancialTransaction)
(documentation CommercialService EnglishLanguage "Any &%FinancialTransaction by a 
&%CommercialAgent where the aim is to produce a profit.")
(subclass CommercialService ServiceProcess)

(=>
   (instance ?BUSINESS CommercialService)
   (exists (?AGENT)
      (and
         (instance ?AGENT CommercialAgent)
         (agent ?BUSINESS ?AGENT))))

(subclass Betting FinancialTransaction)
(documentation Betting EnglishLanguage "A &%FinancialTransaction where an instance of 
&%CurrencyMeasure is exchanged for the possibility of winning a larger 
instance of &%CurrencyMeasure within the context of some sort of 
&%Game.")

(subclass Buying FinancialTransaction)
(relatedInternalConcept Buying Selling)
(documentation Buying EnglishLanguage "A &%FinancialTransaction in which an instance of 
&%CurrencyMeasure is exchanged for an instance of &%Physical.")

(=>
   (and
      (instance ?BUY Buying)
      (agent ?BUY ?AGENT))
   (destination ?BUY ?AGENT))

(subclass Selling FinancialTransaction)
(documentation Selling EnglishLanguage "A &%FinancialTransaction in which an instance of 
&%Physical is exchanged for an instance of &%CurrencyMeasure.")

(<=>
   (exists (?BUY)
      (and
         (instance ?BUY Buying)
         (agent ?BUY ?AGENT1)
         (origin ?BUY ?AGENT2)
         (patient ?BUY ?OBJECT)))
   (exists (?SELL)
      (and 
         (instance ?SELL Selling)
         (agent ?SELL ?AGENT2)
         (destination ?SELL ?AGENT1)
         (patient ?SELL ?OBJECT))))

(=>
   (and
      (instance ?SELL Selling)
      (agent ?SELL ?AGENT))
   (origin ?SELL ?AGENT))

(subclass Learning IntentionalPsychologicalProcess)
(documentation Learning EnglishLanguage "The &%Class of &%Processes which relate to the 
acquisition of information.")

(=>
   (and
      (instance ?LEARN Learning)
      (agent ?LEARN ?AGENT))
   (instance ?AGENT CognitiveAgent))

(=>
   (and
      (instance ?LEARN Learning)
      (agent ?LEARN ?AGENT)
      (patient ?LEARN ?PROP))
   (and
      (holdsDuring (BeginFn (WhenFn ?LEARN)) (not (knows ?AGENT ?PROP)))
      (holdsDuring (EndFn (WhenFn ?LEARN)) (knows ?AGENT ?PROP))))

(subclass Discovering IntentionalPsychologicalProcess)
(documentation Discovering EnglishLanguage "Finding something that was sought.  Note that 
this class is restricted to cases of discovering something &%Physical.  
For cases involving the acquisition of knowledge, the class &%Learning 
should be used.")

(=>
   (and
      (instance ?DISCOVER Discovering)
      (patient ?DISCOVER ?OBJ))
   (exists (?PURSUE)
      (and
         (instance ?PURSUE Pursuing)
         (meetsTemporally (WhenFn ?PURSUE) (WhenFn ?DISCOVER)))))

(=>
   (and
      (instance ?DISCOVER Discovering)
      (patient ?DISCOVER ?OBJ)
      (holdsDuring (WhenFn ?DISCOVER) (located ?OBJ ?PLACE)))
   (exists (?LEARN)
      (and
         (instance ?LEARN Learning)
         (subProcess ?LEARN ?DISCOVER)
         (patient ?LEARN (located ?OBJ ?PLACE)))))

(subclass Classifying IntentionalPsychologicalProcess)
(documentation Classifying EnglishLanguage "The &%Class of &%IntentionalPsychologicalProcesses 
which involve attaching a name or category to a thing or set of things.  
Note that &%Classifying is distinguished from &%Learning by the fact 
that the latter covers the acquisition by a &%CognitiveAgent of any 
&%Proposition, while the former involves the assignment of a label 
or category.")

(subclass Reasoning IntentionalPsychologicalProcess)
(documentation Reasoning EnglishLanguage "The &%Class of &%IntentionalPsychologicalProcesses 
which involve concluding, on the basis of either deductive or inductive 
evidence, that a particular &%Proposition or &%Sentence is true.")

(=>
   (instance ?AGENT CognitiveAgent)
   (capability Reasoning agent ?AGENT))

(subclass Selecting IntentionalPsychologicalProcess)
(documentation Selecting EnglishLanguage "The &%Class of &%IntentionalPsychologicalProcesses 
which involve opting for one or more &%Entity out of a larger set of &%Entities.  
Note that this covers all cases of judging or evaluating.")

(subclass Deciding Selecting)
(documentation Deciding EnglishLanguage "The subclass of &%Selecting where the &%agent 
opts for one course of action out of a set of multiple possibilities 
that are open to him/her.")

(=>
   (and
      (instance ?DECIDE Deciding)
      (agent ?DECIDE ?AGENT)
      (patient ?DECIDE ?PROCESS))
   (and
      (instance ?PROCESS IntentionalProcess)
      (agent ?PROCESS ?AGENT)))

(subclass Voting Deciding)
(documentation Voting EnglishLanguage "&%Voting is the activity of voting in an 
&%Election.  Voting is typically done by individuals, while &%Elections 
are conducted by &%Organizations.  The voting process by an individual 
voter is part of an &%Election process.") 

(=>
  (instance ?VOTE Voting)
  (exists (?ELECT)
    (and
      (instance ?ELECT Election)
      (subProcess ?VOTE ?ELECT))))

(subclass Judging Selecting)
(documentation Judging EnglishLanguage "The subclass of &%Selecting where the &%agent opts 
for one belief out of a set of multiple possibilities that are available to 
him/her.")

(=>
   (and
      (instance ?JUDGE Judging)
      (agent ?JUDGE ?AGENT)
      (patient ?JUDGE ?PROPOSITION))
   (and
      (holdsDuring (BeginFn (WhenFn ?JUDGE)) (not (believes ?AGENT ?PROPOSITION)))
      (holdsDuring (EndFn (WhenFn ?JUDGE)) (believes ?AGENT ?PROPOSITION))))

(subclass Comparing IntentionalPsychologicalProcess)
(subclass Comparing DualObjectProcess)
(documentation Comparing EnglishLanguage "The &%Class of &%IntentionalPsychologicalProcesses 
which involve comparing, relating, contrasting, etc. the properties of 
two or more &%Entities.")

(subclass Calculating IntentionalPsychologicalProcess)
(documentation Calculating EnglishLanguage "&%IntentionalPsychologicalProcesses which involve 
the consideration and/or manipulation of instances of &%Quantity.")

(subclass Measuring Calculating)
(documentation Measuring EnglishLanguage "The &%Class of &%Calculating &%Processes where 
the aim is to determine the &%PhysicalQuantity of some aspect of the &%patient.")

(=>
   (and
      (instance ?MEAS Measuring)
      (agent ?MEAS ?AGENT)
      (patient ?MEAS ?OBJ))
   (exists (?QUANT ?UNIT)
      (holdsDuring (EndFn (WhenFn ?MEAS))
         (knows ?AGENT (measure ?OBJ (MeasureFn ?QUANT ?UNIT))))))

(subclass Counting Calculating)
(documentation Counting EnglishLanguage "Enumerating something.  The &%Class of &%Calculating 
&%Processes where the aim is to determine the &%Number corresponding to the 
&%patient.") 

(=>
   (and
      (instance ?COUNT Counting)
      (agent ?COUNT ?AGENT)
      (patient ?COUNT ?ENTITY))
   (exists (?NUMBER)
      (knows ?AGENT (equal (CardinalityFn ?ENTITY) ?NUMBER))))

(subclass Predicting IntentionalPsychologicalProcess)
(documentation Predicting EnglishLanguage "The &%Class of &%IntentionalPsychologicalProcesses 
which involve the formulation of a &%Proposition about a state of affairs 
which might be realized in the future.")

(=>
   (and
      (instance ?PREDICT Predicting)
      (patient ?PREDICT ?FORMULA))
   (exists (?TIME)
      (and
         (holdsDuring ?TIME ?FORMULA)
         (or
            (before ?TIME (WhenFn ?PREDICT))
            (earlier ?TIME (WhenFn ?PREDICT))))))

(subclass Remembering PsychologicalProcess)
(documentation Remembering EnglishLanguage "The &%Class of &%PsychologicalProcesses which 
involve the recollection of prior experiences and/or of knowledge 
which was previously acquired.")

(=>
   (and
      (instance ?REMEMBER Remembering)
      (patient ?REMEMBER ?FORMULA))
   (exists (?TIME)
      (and
         (holdsDuring ?TIME ?FORMULA)
         (or
            (before ?TIME (WhenFn ?REMEMBER))
            (earlier ?TIME (WhenFn ?REMEMBER))))))

(subclass Keeping IntentionalProcess)
(documentation Keeping EnglishLanguage "The &%Class of &%Processes where the &%agent 
keeps something in a particular location for an extended period of time.")

(=>
   (and
      (instance ?KEEP Keeping)
      (agent ?KEEP ?AGENT)
      (patient ?KEEP ?OBJ))
   (exists (?PUT)
      (and
         (instance ?PUT Putting)
         (agent ?PUT ?AGENT)
         (patient ?PUT ?OBJ)
         (earlier (WhenFn ?PUT) (WhenFn ?KEEP)))))

(=>
   (and
      (instance ?KEEP Keeping)
      (patient ?KEEP ?OBJ))
   (exists (?PLACE)
      (forall (?TIME)
         (=>
            (temporalPart ?TIME (WhenFn ?KEEP))
            (holdsDuring ?TIME (located ?OBJ ?PLACE))))))

(subclass Confining Keeping)
(documentation Confining EnglishLanguage "The &%Class of &%Keeping &%Processes where the 
&%patient is a &%Human or an &%Animal and is kept involuntarily.  This covers 
caging, imprisonment, jailing, etc.")

(=>
   (instance ?CONFINE Confining)
   (exists (?AGENT)
      (and
         (instance ?AGENT Animal)
         (patient ?CONFINE ?AGENT))))

(=>
   (and
      (instance ?CONFINE Confining)
      (patient ?CONFINE ?PERSON)
      (instance ?PERSON Human))
   (not (desires ?PERSON (patient ?CONFINE ?PERSON))))

(subclass Maintaining IntentionalProcess)
(documentation Maintaining EnglishLanguage "The &%Class of &%Processes where the &%agent 
cares for or maintains the &%Object.")

(subclass Repairing IntentionalProcess)
(relatedInternalConcept Repairing Maintaining)
(documentation Repairing EnglishLanguage "The &%Class of &%Processes where the &%agent 
makes a modification or series of modifications to an &%Object that is not 
functioning as intended so that it works properly.")

(=>
   (and
      (instance ?REPAIR Repairing)
      (patient ?REPAIR ?OBJ))
   (exists (?DAMAGE)
      (and
         (instance ?DAMAGE Damaging)
         (patient ?DAMAGE ?OBJ)
         (earlier (WhenFn ?DAMAGE) (WhenFn ?REPAIR)))))

(subclass TherapeuticProcess Repairing)
(documentation TherapeuticProcess EnglishLanguage "A &%Process that is carried out 
for the purpose of curing, improving or reducing the pain associated 
with a &%DiseaseOrSyndrome.")

(=>
   (and
      (instance ?PROC TherapeuticProcess) 
      (patient ?PROC ?BIO))
   (or
      (instance ?BIO Organism)
      (exists (?ORG)
         (and
            (instance ?ORG Organism)
            (part ?BIO ?ORG)))))

(subclass Surgery TherapeuticProcess)
(documentation Surgery EnglishLanguage "Any &%TherapeuticProcess that involves making an 
incision in the &%Animal that is the &%patient of the &%TherapeuticProcess.")

(=>
   (and
      (instance ?ACT Surgery)
      (patient ?ACT ?ANIMAL))
   (exists (?SUBACT)
      (and
         (instance ?SUBACT Cutting)
         (instance ?ANIMAL Animal)
         (patient ?SUBACT ?ANIMAL)
         (subProcess ?SUBACT ?ACT))))

(subclass Damaging InternalChange)
(disjoint Damaging Repairing)
(documentation Damaging EnglishLanguage "The &%Class of &%Processes where the &%agent 
brings about a situation where the &%patient no longer functions normally 
or as intended.")

(subclass Destruction Damaging)
(documentation Destruction EnglishLanguage "The &%subclass of &%Damagings in which 
the &%patient (or an essential element of the &%patient) is destroyed.  
Note that the difference between this concept and its superclass is solely 
one of extent.")

(<=>
   (instance ?PROCESS Destruction)
   (exists (?PATIENT)
      (and 
         (patient ?PROCESS ?PATIENT)
         (time ?PATIENT (BeginFn (WhenFn ?PROCESS))) 
         (not 
            (time ?PATIENT (EndFn (WhenFn ?PROCESS)))))))

(subclass Killing Destruction)
(documentation Killing EnglishLanguage "The &%subclass of &%Destruction in which the 
death of an &%Organism is caused by an &%Organism.  Note that in cases 
of suicide the &%Organism would be the same in both cases.")

(=>
   (and
      (instance ?KILL Killing)
      (agent ?KILL ?AGENT)
      (patient ?KILL ?PATIENT))
   (and
      (instance ?AGENT Organism)
      (instance ?PATIENT Organism)))

(=>
   (and
      (instance ?KILL Killing)
      (patient ?KILL ?PATIENT))
   (and
      (holdsDuring (BeginFn (WhenFn ?KILL)) (attribute ?PATIENT Living))
      (holdsDuring (FutureFn (WhenFn ?KILL)) (attribute ?PATIENT Dead))))

(=>
   (and
      (instance ?KILL Killing)
      (patient ?KILL ?OBJ))
   (exists (?DEATH)
      (and
         (instance ?DEATH Death)
         (experiencer ?DEATH ?OBJ)
         (causes ?KILL ?DEATH))))

(subclass Poking IntentionalProcess)
(documentation Poking EnglishLanguage "The &%Class of &%Processes where the &%agent
pierces the surface of the &%Object with an &%instrument.")

(=>
   (and
      (instance ?POKE Poking)
      (agent ?POKE ?AGENT)
      (patient ?POKE ?OBJ)
      (instrument ?POKE ?INST))
   (holdsDuring (WhenFn ?POKE) (connects ?INST ?AGENT ?OBJ)))

(subclass Cutting Poking)
(documentation Cutting EnglishLanguage "The &%subclass of &%Poking &%Processes which 
involve a sharp &%instrument.") 

(subclass Attaching DualObjectProcess)
(disjoint Attaching Detaching)
(relatedInternalConcept Attaching Putting)
(documentation Attaching EnglishLanguage "A &%Process where one &%Object becomes attached 
to another &%Object.  Note that this differs from &%Putting in that two 
things which are attached may already be in the same location.  Note that 
&%Combining is different from &%Attaching in that the former applies to 
&%Substances, while the latter applies to &%CorpuscularObjects.  Note too 
that &%Attaching is different from &%Putting in that one or both of the 
two things which are attached may or may not be moved from the location 
where they were combined.")

(=>
   (and 
      (instance ?ATTACH Attaching)
      (patient ?ATTACH ?OBJ1)
      (patient ?ATTACH ?OBJ2))
   (and
      (holdsDuring (BeginFn (WhenFn ?ATTACH)) (not (connected ?OBJ1 ?OBJ2)))
      (holdsDuring (EndFn (WhenFn ?ATTACH)) (connected ?OBJ1 ?OBJ2)))) 

(=>
   (instance ?ATTACH Attaching)
   (exists (?OBJ)
      (and
         (instance ?OBJ CorpuscularObject)
         (patient ?ATTACH ?OBJ))))

(subclass Detaching DualObjectProcess)

(documentation Detaching EnglishLanguage "A &%Process where the &%agent detaches one thing 
from something else.  Note that &%Detaching is different from &%Separating 
in that the latter applies to &%Substances, while the former applies to 
&%CorpuscularObjects.  Note too that &%Detaching is different from 
&%Removing in that one or both of the two things which are detached may or 
may not be moved from the location where they were attached.") 

 (=>
   (and 
      (instance ?DETACH Detaching)
      (patient ?DETACH ?OBJ1)
      (patient ?DETACH ?OBJ2))
   (and
      (holdsDuring (BeginFn (WhenFn ?DETACH)) (connected ?OBJ1 ?OBJ2))
      (holdsDuring (EndFn (WhenFn ?DETACH)) (not (connected ?OBJ1 ?OBJ2)))))

(=>
   (instance ?DETACH Detaching)
   (exists (?OBJ)
      (and
         (instance ?OBJ CorpuscularObject)
         (patient ?DETACH ?OBJ))))

(subclass Ungrasping Detaching)
(documentation Ungrasping EnglishLanguage "Any instance of &%Detaching which results in 
a situation where it is not the case that the &%agent &%grasps something 
which he/she &%grasps previously.")

(=>
   (and
      (instance ?RELEASE Ungrasping)
      (agent ?GRAB ?AGENT)
      (patient ?GRAB ?THING))
   (and
      (holdsDuring (BeginFn (WhenFn ?RELEASE)) (grasps ?AGENT ?THING))
      (holdsDuring (EndFn (WhenFn ?RELEASE)) (not (grasps ?AGENT ?THING)))))

(subclass Combining DualObjectProcess)
(documentation Combining EnglishLanguage "A &%Process where two or more &%SelfConnectedObjects 
are incorporated into a single &%SelfConnectedObject.  Note that &%Combining 
is different from &%Attaching in that the former results in one of the objects 
being &%part of the other, while &%Attaching only results in the two objects 
being &%connected with one another.  Note too that &%Combining is different 
from &%Putting in that one or both of the two things which are combined may or 
may not be moved from the location where they were combined.")

(<=>
   (and 
      (instance ?COMBINE Combining)
      (resource ?COMBINE ?OBJ1)
      (result ?COMBINE ?OBJ2))
   (and
      (holdsDuring (BeginFn (WhenFn ?COMBINE)) (not (part ?OBJ1 ?OBJ2)))
      (holdsDuring (EndFn (WhenFn ?COMBINE)) (part ?OBJ1 ?OBJ2))))

(=>
   (instance ?COMBINE Combining)
   (exists (?OBJ)
      (and
         (instance ?OBJ SelfConnectedObject)
         (patient ?COMBINE ?OBJ))))

(subclass Separating DualObjectProcess)
(disjoint Separating Combining)
(documentation Separating EnglishLanguage "A &%Process where a &%SelfConnectedObject is 
separated into (some of) its &%parts.  Note that &%Separating is different 
from &%Detaching in that the latter only results in the two objects not 
being &%connected.  Note too that &%Separating is different from 
&%Removing in that one or both of the two things which are separated 
may or may not be moved from the location where they were separated.")

(=>
   (instance ?SEPARATE Separating)
   (exists (?OBJ)
      (and
         (instance ?OBJ SelfConnectedObject)
         (patient ?SEPARATE ?OBJ))))

(subclass ChemicalProcess InternalChange) 
(partition ChemicalProcess ChemicalSynthesis ChemicalDecomposition)
(documentation ChemicalProcess EnglishLanguage "A &%ChemicalProcess occurs whenever 
chemical compounds (&%CompoundSubstances) are formed or decomposed.  
For example, reactants disappear as chemical change occurs, and products 
appear as chemical change occurs.  In a chemical change a chemical 
reaction takes place.  Catalysts in a &%ChemicalProcess may speed up the 
reaction, but aren't themselves produced or consumed.  Examples: rusting of 
iron and the decomposition of water, induced by an electric current, to 
gaseous hydrogen and gaseous oxygen.") 

(=>
   (and
      (instance ?PROC ChemicalProcess)
      (or
         (resource ?PROC ?STUFF)
         (result ?PROC ?STUFF)))
   (instance ?STUFF PureSubstance))
   
(subclass ChemicalSynthesis ChemicalProcess)
(subclass ChemicalSynthesis Combining) 
(documentation ChemicalSynthesis EnglishLanguage "The &%Class of &%ChemicalProcesses in 
which a &%CompoundSubstance is formed from simpler reactants.") 

(=>
   (and
      (resource ?PROC ?SUBSTANCE1)
      (result ?PROC ?SUBSTANCE2)
      (instance ?SUBSTANCE1 ElementalSubstance)
      (instance ?SUBSTANCE2 CompoundSubstance))
   (instance ?PROC ChemicalSynthesis))

(<=> 
   (instance ?COMPOUND CompoundSubstance) 
   (exists (?ELEMENT1 ?ELEMENT2 ?PROCESS) 
      (and 
         (instance ?ELEMENT1 ElementalSubstance) 
         (instance ?ELEMENT2 ElementalSubstance) 
         (not (equal ?ELEMENT1 ?ELEMENT2)) 
         (instance ?PROCESS ChemicalSynthesis)
         (resource ?PROCESS ?ELEMENT1)
         (resource ?PROCESS ?ELEMENT2)
         (result ?PROCESS ?COMPOUND))))

(subclass ChemicalDecomposition ChemicalProcess) 
(subclass ChemicalDecomposition Separating)
(documentation ChemicalDecomposition EnglishLanguage "The &%Class of &%ChemicalProcesses 
in which a &%CompoundSubstance breaks down into simpler products.")

(=>
   (and
      (resource ?PROC ?SUBSTANCE1)
      (result ?PROC ?SUBSTANCE2)
      (instance ?SUBSTANCE1 CompoundSubstance)
      (instance ?SUBSTANCE2 ElementalSubstance))
   (instance ?PROC ChemicalDecomposition))

(subclass Combustion ChemicalDecomposition)
(documentation Combustion EnglishLanguage "The &%Class of &%ChemicalProcesses in which an &%Object 
reacts with oxygen and gives off heat.  This includes all &%Processes in which 
something is burning.")

(=>
   (instance ?COMBUSTION Combustion)
   (exists (?HEAT ?LIGHT)
      (and
         (instance ?HEAT Heating)
         (instance ?LIGHT RadiatingLight)
         (subProcess ?HEAT ?COMBUSTION)
         (subProcess ?LIGHT ?COMBUSTION))))

(instance Flammable PhysicalAttribute)
(documentation Flammable EnglishLanguage "The &%Attribute of being flammable at normal temperatures
(i.e. not while a &%Plasma).")
(=>
  (attribute ?X Flammable)
  (capability Combustion patient ?X))

(subclass InternalChange Process)
(documentation InternalChange EnglishLanguage "&%Processes which involve altering an internal 
property of an &%Object, e.g. the shape of the &%Object, its coloring, its 
structure, etc.  &%Processes that are not instances of this class include 
changes that only affect the relationship to other objects, e.g. changes in 
spatial or temporal location.") 

(=>
   (and
      (instance ?CHANGE InternalChange)
      (patient ?CHANGE ?OBJ))
   (exists (?PROPERTY)
      (or
         (and
            (holdsDuring (BeginFn (WhenFn ?CHANGE)) (attribute ?OBJ ?PROPERTY))
            (holdsDuring (EndFn (WhenFn ?CHANGE)) (not (attribute ?OBJ ?PROPERTY))))
         (and
            (holdsDuring (BeginFn (WhenFn ?CHANGE)) (not (attribute ?OBJ ?PROPERTY)))
            (holdsDuring (EndFn (WhenFn ?CHANGE)) (attribute ?OBJ ?PROPERTY))))))

(subclass SurfaceChange InternalChange)
(documentation SurfaceChange EnglishLanguage "&%Processes which involve altering 
the properties that apply to the surface of an &%Object.")

(=>
   (and
      (instance ?ALT SurfaceChange)
      (patient ?ALT ?OBJ))
   (exists (?PART ?PROPERTY)
      (and
         (superficialPart ?PART ?OBJ)
         (or
            (and
               (holdsDuring (BeginFn (WhenFn ?ALT)) (attribute ?PART ?PROPERTY))
               (holdsDuring (EndFn (WhenFn ?ALT)) (not (attribute ?PART ?PROPERTY))))
            (and 
               (holdsDuring (BeginFn (WhenFn ?ALT)) (not (attribute ?PART ?PROPERTY)))
               (holdsDuring (EndFn (WhenFn ?ALT)) (attribute ?PART ?PROPERTY)))))))

(subclass Coloring SurfaceChange)
(documentation Coloring EnglishLanguage "The &%subclass of &%SurfaceChange where a 
&%ColorAttribute of the &%patient is altered.  Note that the change in
color may apply to just part of the object.")

(=>
   (and
      (instance ?COLORING Coloring)
      (patient ?COLORING ?OBJ))
   (exists (?PROPERTY ?PART)
      (and
         (part ?PART ?OBJ)
         (instance ?PROPERTY ColorAttribute)
         (or
            (and
               (holdsDuring (BeginFn (WhenFn ?COLORING)) (attribute ?PART ?PROPERTY))
               (holdsDuring (EndFn (WhenFn ?COLORING)) (not (attribute ?PART ?PROPERTY))))
            (and 
               (holdsDuring (BeginFn (WhenFn ?COLORING)) (not (attribute ?PART ?PROPERTY)))
               (holdsDuring (EndFn (WhenFn ?COLORING)) (attribute ?PART ?PROPERTY)))))))

(subclass ShapeChange InternalChange) 
(documentation ShapeChange EnglishLanguage "The &%Process of changing the shape of an &%Object.") 

(=> 
   (and 
      (instance ?ALT ShapeChange) 
      (patient ?ALT ?OBJ)) 
   (exists (?PROPERTY) 
      (and 
         (instance ?PROPERTY ShapeAttribute) 
         (or 
            (and 
               (holdsDuring (BeginFn (WhenFn ?ALT)) (attribute ?OBJ ?PROPERTY)) 
               (holdsDuring (EndFn (WhenFn ?ALT)) (not (attribute ?OBJ ?PROPERTY)))) 
            (and 
               (holdsDuring (BeginFn (WhenFn ?ALT)) (not (attribute ?OBJ ?PROPERTY))) 
               (holdsDuring (EndFn (WhenFn ?ALT)) (attribute ?OBJ ?PROPERTY))))))) 

(subclass ContentDevelopment IntentionalProcess)
(documentation ContentDevelopment EnglishLanguage "A &%subclass of &%IntentionalProcess in 
which content is modified, its form is altered or it is created anew.")

(=>
   (instance ?DEVELOP ContentDevelopment)
   (exists (?OBJ)
      (and
         (instance ?OBJ ContentBearingObject)
         (result ?DEVELOP ?OBJ))))

(subclass Reading ContentDevelopment)
(relatedInternalConcept Reading Interpreting)
(documentation Reading EnglishLanguage "A &%subclass of &%ContentDevelopment in which 
content is converted from a written form into a spoken representation.  
Note that the class &%Interpreting should be used in cases where a 
&%Text is read silently.")

(=>
   (instance ?READ Reading)
   (exists (?TEXT ?PROP)
      (and
         (instance ?TEXT Text)
         (containsInformation ?TEXT ?PROP)
         (realization ?READ ?PROP))))

(subclass Writing ContentDevelopment)
(documentation Writing EnglishLanguage "A &%subclass of &%ContentDevelopment in which 
content is converted from one form (e.g. uttered, written or represented 
mentally) into a written form.  Note that this class covers both 
transcription and original creation of written &%Texts.")

(subclass Encoding Writing)
(documentation Encoding EnglishLanguage "Converting a document or message into a formal 
language or into a code that can be understood only by a relatively small 
body of &%Agents.  Generally speaking, this hinders wide dissemination of 
the content in the original document or message.")

(subclass Decoding Writing)
(disjoint Decoding Encoding)
(documentation Decoding EnglishLanguage "Converting a document or message that has previously 
been encoded (see &%Encoding) into a &%Language that can be understood by a 
relatively large number of speakers.")

(=>
   (and
      (instance ?DECODE Decoding)
      (patient ?DECODE ?DOC1)) 
   (exists (?ENCODE ?DOC2 ?TIME)
      (and
         (containsInformation ?DOC2 ?PROP)
         (containsInformation ?DOC1 ?PROP)
      (temporalPart ?TIME (PastFn (WhenFn ?DECODE))) 
         (holdsDuring ?TIME 
            (and
               (instance ?ENCODE Encoding) 
               (patient ?ENCODE ?DOC2))))))

(subclass Translating ContentDevelopment)
(subclass Translating DualObjectProcess)
(documentation Translating EnglishLanguage "Converting content from one &%Language into another.  
This covers oral translation (i.e. interpreting) as well as written translation.")

(=>
   (and
      (instance ?TRANSLATE Translating)
      (patient ?TRANSLATE ?EXPRESSION1)
      (result ?TRANSLATE ?EXPRESSION2))
   (exists (?LANGUAGE1 ?LANGUAGE2 ?ENTITY)
      (and
         (representsInLanguage ?EXPRESSION1 ?ENTITY ?LANGUAGE1)
         (representsInLanguage ?EXPRESSION2 ?ENTITY ?LANGUAGE2)
         (not (equal ?LANGUAGE1 ?LANGUAGE2)))))

(subclass Wetting Putting)
(documentation Wetting EnglishLanguage "The &%Class of &%Processes where a &%Liquid is 
added to an &%Object.")

(=>
  (instance ?WET Wetting)
  (exists (?OBJ)
    (and
      (patient ?WET ?OBJ)
      (holdsDuring
        (BeginFn
          (WhenFn ?WET))
        (not
          (attribute ?OBJ Damp)))
      (holdsDuring
        (EndFn
          (WhenFn ?WET))
        (attribute ?OBJ Damp)))))

(=>
   (instance ?WET Wetting)
   (exists (?OBJ)
      (and
         (attribute ?OBJ Liquid)
         (patient ?WET ?OBJ))))

(subclass Drying Removing)
(documentation Drying EnglishLanguage "The &%Class of &%Processes where a &%Liquid is removed 
from an &%Object.")

(=>
   (and
      (instance ?DRY Drying)
      (patient ?DRY ?OBJ))
   (holdsDuring (EndFn (WhenFn ?DRY))
      (attribute ?OBJ Dry)))

(subclass Creation InternalChange)
(relatedInternalConcept Creation Destruction)
(documentation Creation EnglishLanguage "The &%subclass of &%Process in which 
something is created.  Note that the thing created is specified 
with the &%result &%CaseRole.")

(=>
   (instance ?ACTION Creation)
   (exists (?RESULT)
      (result ?ACTION ?RESULT)))

(<=>
   (instance ?PROCESS Creation)
   (exists (?PATIENT)
      (and 
         (patient ?PROCESS ?PATIENT)
         (time ?PATIENT (EndFn (WhenFn ?PROCESS))) 
         (not 
            (time ?PATIENT (BeginFn (WhenFn ?PROCESS)))))))

(subclass Making Creation)
(subclass Making IntentionalProcess)
(documentation Making EnglishLanguage "The &%subclass of &%Creation in which an individual 
&%Artifact or a type of &%Artifact is made.")

(subclass Constructing Making)
(documentation Constructing EnglishLanguage "The &%subclass of &%Making in which a 
&%StationaryArtifact is built.")

(<=>
   (exists (?BUILD)
      (and
         (instance ?BUILD Constructing)
         (result ?BUILD ?ARTIFACT)))
   (instance ?ARTIFACT StationaryArtifact))

(subclass Manufacture Making)
(documentation Manufacture EnglishLanguage "The &%Making of &%Artifacts on a mass 
scale.")

(subclass Publication Manufacture)
(subclass Publication ContentDevelopment)
(documentation Publication EnglishLanguage "The &%Manufacture of &%Texts.  Note that 
there is no implication that the &%Texts are distributed.  Such 
distribution, when it occurs, is an instance of &%Dissemination.")

(=>
   (and
      (instance ?PUB Publication)
      (patient ?PUB ?TEXT))
   (subclass ?TEXT Text))

(subclass Cooking Making)
(documentation Cooking EnglishLanguage "The &%Making of an &%instance of &%Food.  Note 
that this can cover any preparation of &%Food, e.g. making a salad, 
cutting up fruit, etc.  It does not necessarily involve the application 
of heat.")

(=>
   (instance ?COOK Cooking)
   (exists (?FOOD)
      (and
         (instance ?FOOD (FoodForFn Organism))
         (result ?COOK ?FOOD))))
         
(subclass Pursuing IntentionalProcess)
(documentation Pursuing EnglishLanguage "The class of &%IntentionalProcesses where something is 
sought.  Some examples would be hunting, shopping, trawling, and stalking.")

(=>
   (instance ?PURSUE Pursuing)
   (exists (?OBJ)
      (and
         (instance ?OBJ Object)
         (patient ?PURSUE ?OBJ))))

(=>
   (and
      (instance ?PURSUE Pursuing)
      (agent ?PURSUE ?AGENT)
      (patient ?PURSUE ?OBJ))
   (holdsDuring ?PURSUE (wants ?AGENT ?OBJ)))

(=>
   (and
      (instance ?PURSUE Pursuing)
      (agent ?PURSUE ?AGENT)
      (patient ?PURSUE ?OBJ))
   (holdsDuring ?PURSUE (not (possesses ?AGENT ?OBJ))))

(subclass Hunting Pursuing)
(documentation Hunting EnglishLanguage "Hunting is the class of &%Processes in which 
an animal or animals are pursued and sometimes captured and/or killed.")
(=>
  (instance ?H Hunting)
  (exists (?T)
    (and
      (instance ?T Animal)
      (patient ?H ?T))))

(=>
  (and
    (instance ?H Hunting)
    (patient ?H ?P))
  (hasPurpose ?H 
    (exists (?PROC)
      (and
        (patient ?PROC ?P)
        (or
          (instance ?PROC Confining)
          (instance ?PROC Killing))))))

;(subclass Investigating IntentionalPsychologicalProcess)
(subclass Investigating IntentionalProcess)
(documentation Investigating EnglishLanguage "The class of &%IntentionalPsychologicalProcesses 
where the &%agent attempts to obtaina information (i.e. a &%Proposition denoted 
by a &%Formula).") 

(=>
   (and
      (instance ?INVESTIGATE Investigating)
      (patient ?INVESTIGATE ?PROP))
   (instance ?PROP Formula))

(=>
   (and
      (instance ?INVESTIGATE Investigating)
      (agent ?INVESTIGATE ?AGENT)
      (patient ?INVESTIGATE ?PROP))
   (holdsDuring (WhenFn ?INVESTIGATE) (not (knows ?AGENT ?PROP))))

(=>
    (and
        (instance ?INVESTIGATE Investigating)
        (agent ?INVESTIGATE ?AGENT)
        (patient ?INVESTIGATE ?PROP))
    (hasPurposeForAgent ?INVESTIGATE
        (knows ?AGENT ?PROP) ?AGENT))
        
(subclass Experimenting Investigating)
(documentation Experimenting EnglishLanguage "&%Investigating the truth of a &%Proposition 
by constructing and observing a trial.  Note that the trial may be either 
controlled or uncontrolled, blind or not blind.")

(subclass DiagnosticProcess Investigating)
(documentation DiagnosticProcess EnglishLanguage "A &%Process that is carried out for 
the purpose of determining the nature of a &%DiseaseOrSyndrome.")

(=>
   (and
      (instance ?PROC DiagnosticProcess)
      (agent ?PROC ?AGENT))
   (exists (?CAUSE)
      (hasPurposeForAgent ?PROC (knows ?AGENT (causes ?CAUSE ?PROC)) ?AGENT)))

      
(subclass Searching Investigating)
(documentation Searching EnglishLanguage "An &%IntentionalProcess which has the purpose for a &%CognitiveAgent to learn the location of a &%Physical.")

(=>
  (instance ?S Searching)
  (exists (?AGENT ?OBJ ?LOC)
    (and
      (instance ?AGENT CognitiveAgent)
      (agent ?S ?AGENT)
      (instance ?OBJ Physical)
      (patient ?S ?OBJ)
      (instance ?LOC Object)
      (located ?OBJ ?LOC)
      (hasPurposeForAgent ?S
        (knows ?AGENT 
          (located ?OBJ ?LOC)) ?AGENT))))
          
(=>
  (and
    (instance ?S Searching)
    (patient ?S ?OBJ)
    (instance ?OBJ Physical))
  (exists (?LOC ?AGENT)
    (and
      (instance ?AGENT CognitiveAgent)
      (agent ?S ?AGENT)
      (instance ?LOC Object)
      (located ?OBJ ?LOC)
      (hasPurposeForAgent ?S
        (knows ?AGENT 
          (located ?OBJ ?LOC)) ?AGENT))))
          
(subclass SocialInteraction IntentionalProcess)
(documentation SocialInteraction EnglishLanguage "The &%subclass of 
&%IntentionalProcess that involves interactions between 
&%CognitiveAgents.")

(=>
   (instance ?INTERACTION SocialInteraction)
   (exists (?AGENT1 ?AGENT2)
      (and
         (involvedInEvent ?INTERACTION ?AGENT1)
         (involvedInEvent ?INTERACTION ?AGENT2)
         (instance ?AGENT1 Agent)
         (instance ?AGENT2 Agent)
         (not
            (equal ?AGENT1 ?AGENT2)))))

(subclass Pretending SocialInteraction)
(documentation Pretending EnglishLanguage "Any &%SocialInteraction where a 
&%CognitiveAgent or &%Group of &%CognitiveAgents attempts to make 
another &%CognitiveAgent or &%Group of &%CognitiveAgents believe 
something that is false.  This covers deceit, affectation, 
impersonation, and entertainment productions, to give just a few 
examples.")

(=>
   (instance ?PRETEND Pretending)
   (exists (?PERSON ?PROP)
      (and
         (hasPurpose ?PRETEND (believes ?PERSON ?PROP))
         (truth ?PROP False))))

(subclass Communication SocialInteraction)
(subclass Communication ContentBearingProcess)
(partition Communication Stating Supposing Directing Committing Expressing Declaring)
(relatedInternalConcept Communication ContentDevelopment)
(documentation Communication EnglishLanguage "A &%SocialInteraction that involves 
the transfer of information between two or more &%CognitiveAgents.  
Note that &%Communication is closely related to, but essentially 
different from, &%ContentDevelopment.  The latter involves the creation 
or modification of a &%ContentBearingObject, while &%Communication is 
the transfer of information for the purpose of conveying a message.")

(=>
   (instance ?COMMUNICATE Communication)
   (exists (?PHYS ?ENTITY ?AGENT1 ?AGENT2)
      (and
         (refers ?PHYS ?ENTITY)
         (patient ?COMMUNICATE ?PHYS)
         (instance ?AGENT1 CognitiveAgent)
         (agent ?COMMUNICATE ?AGENT1)
         (instance ?AGENT2 CognitiveAgent)
         (destination ?COMMUNICATE ?AGENT2))))

(subclass Disseminating Communication)
(documentation Disseminating EnglishLanguage "Any &%Communication that involves a 
single &%agent and many &%destinations.  This covers the release 
of a published book, broadcasting, a theatrical performance, giving 
orders to assembled troops, delivering a public lecture, etc.")

(=>
   (instance ?DISSEMINATE Disseminating)
   (exists (?AGENT1 ?AGENT2)
      (and
         (destination ?DISSEMINATE ?AGENT1)
         (instance ?AGENT1 CognitiveAgent)
         (destination ?DISSEMINATE ?AGENT2)
         (instance ?AGENT2 CognitiveAgent)
         (not (equal ?AGENT1 ?AGENT2))))) 

(subclass Demonstrating Disseminating)
(documentation Demonstrating EnglishLanguage "Exhibiting something or a range of things 
before the public in a particular location.  This would cover software 
demos, theatrical plays, lectures, dance and music recitals, museum 
exhibitions, etc.")

(=>
   (instance ?DEMO Demonstrating)
   (exists (?PERSON)
      (attends ?DEMO ?PERSON)))

(subrelation attends experiencer)
(instance attends CaseRole)
(domain attends 1 Demonstrating)
(domain attends 2 Human)
(documentation attends EnglishLanguage "(&%attends ?DEMO ?PERSON) means that ?PERSON attends, 
i.e. is a member of the audience, of the performance event ?DEMO.")

(subclass Gesture Communication)
(subclass Gesture BodyMotion)
(documentation Gesture EnglishLanguage "Any &%BodyMotion, e.g. a hand wave, a nod of the 
head, a smile, which is also an instance of &%Communication.")

(subclass Advertising Disseminating)
(documentation Advertising EnglishLanguage "A &%Disseminating whose purpose is to 
promote the sale of an &%Object represented in a &%Text or &%Icon 
(the advertisement).")

(=>
   (instance ?ADVERT Advertising)
   (exists (?OBJ)
      (and
         (refers ?ADVERT ?OBJ)
         (hasPurpose ?ADVERT (exists (?SALE) (and (instance ?SALE Selling) (patient ?SALE ?OBJ)))))))

(subclass Expressing Communication)
(documentation Expressing EnglishLanguage "Instances of this &%Class express a state of the &%agent. 
For example, Jane thanked Barbara for the present she had given her.  The thanking 
in this case expresses the gratitude of Jane towards Barbara.  Note that &%Expressing, 
unlike the other speech act types, is not a subclass of &%LinguisticCommunication.  
This is because emotions, for example, can be expressed without language, e.g. by 
smiling.")

(=>
   (and
      (instance ?EXPRESS Expressing)
      (agent ?EXPRESS ?AGENT))
   (exists (?STATE)
      (and
         (instance ?STATE StateOfMind)
         (attribute ?AGENT ?STATE)
         (represents ?EXPRESS ?STATE))))

(subclass LinguisticCommunication Communication)
(documentation LinguisticCommunication EnglishLanguage "A &%Communication that involves 
the transfer of information via a &%LinguisticExpression.")

(=>
   (instance ?COMMUNICATE LinguisticCommunication)
   (exists (?OBJ)
      (and
         (represents ?COMMUNICATE ?OBJ)
         (instance ?OBJ LinguisticExpression)
         (patient ?COMMUNICATE ?OBJ))))

(subclass Stating LinguisticCommunication)
(documentation Stating EnglishLanguage "Instances of this &%Class commit the &%agent to some truth. 
For example, John claimed that the moon is made of green cheese.")

(=>
   (and
      (instance ?STATE Stating)
      (agent ?STATE ?AGENT)
      (patient ?STATE ?FORMULA)
      (instance ?FORMULA Formula))
   (holdsDuring (WhenFn ?STATE) (believes ?AGENT ?FORMULA)))

(subclass Disagreeing Stating)
(documentation Disagreeing EnglishLanguage "A &%Stating in which two &%Agents have
contradictory statements.  This is distinguished from &%Arguing in
that the statement in dispute may be a simple assertion, rather than
a chain of deduction, and that two entities must be disagreeing with
each other, whereas a single entity may craft an argument for a given
point of view, without the need for another agent to disagree with.")
(=>
  (instance ?DIS Disagreeing)
  (exists (?A1 ?A2 ?STATE1 ?STATE2 ?STMT1 ?STMT2)
    (and
      (subProcess ?STATE1 ?DIS)
      (subProcess ?STATE2 ?DIS)
      (agent ?STATE1 ?A1)
      (agent ?STATE2 ?A2)
      (not
        (equal ?A1 ?A2))
      (containsInformation ?STATE1 ?STMT1)
      (containsInformation ?STATE2 ?STMT2)
      (not
        (consistent ?STMT1 ?STMT2)))))

(subclass Supposing LinguisticCommunication)
(documentation Supposing EnglishLanguage "Instances of this &%Class suppose, for the sake of 
argument, that a proposition is true.  For example, John considered what he 
would do if he won the lottery.")
   
(subclass Directing LinguisticCommunication)
(documentation Directing EnglishLanguage "Instances of this &%Class urge some further action 
among the receivers.  A &%Directing can be an &%Ordering, a &%Requesting or 
a &%Questioning.") 

(subclass Ordering Directing)
(documentation Ordering EnglishLanguage "A &%Directing in which the receiver is 
commanded to realize the content of a &%ContentBearingObject.  Orders 
are injunctions, the disobedience of which involves sanctions, or 
which express an obligation upon the part of the orderee.")

(=>
   (and
      (instance ?ORDER Ordering)
      (patient ?ORDER ?FORMULA))
   (modalAttribute ?FORMULA Obligation))

(subclass Requesting Directing)
(documentation Requesting EnglishLanguage "A request expresses a desire that some future 
action be performed.  For example, the 5th Battalion requested air support 
from the 3rd Bomber Group.  Note that this class covers proposals, 
recommendations, suggestions, etc.")

(=>
   (and
      (instance ?REQUEST Requesting)
      (agent ?REQUEST ?AGENT)
      (patient ?REQUEST ?FORMULA)
      (instance ?FORMULA Formula))
   (desires ?AGENT ?FORMULA)) 

(subclass Questioning Directing)
(documentation Questioning EnglishLanguage "A request for information.  For example, John asked 
Bill if the President had said anything about taxes in his State of the Union 
address.")

(=>
   (and
      (instance ?QUESTION Questioning)
      (agent ?QUESTION ?AGENT)
      (patient ?QUESTION ?FORMULA)
      (instance ?FORMULA Formula))
   (holdsDuring (WhenFn ?QUESTION) (not (knows ?AGENT ?FORMULA)))) 

(subclass Committing LinguisticCommunication)
(documentation Committing EnglishLanguage "Instances of this &%Class commit the &%agent to some 
future course.  For example, Bob promised Susan that he would be home by 11pm.") 

(=>
   (and
      (instance ?COMMIT Committing)
      (patient ?COMMIT ?FORMULA)
      (instance ?FORMULA Formula))
   (modalAttribute ?FORMULA Promise))

(subclass Offering Committing)

(documentation Offering EnglishLanguage "The subclass of &%Committing in which a 
&%CognitiveAgent offers something &%Physical to another agent.  Offerings 
may be unconditional (in which case they are a promise to effect a 
&%UnilateralGiving) or conditional (in which case they are a promise to 
effect a &%Transaction of some sort).") 
   
(subclass Declaring LinguisticCommunication)
(documentation Declaring EnglishLanguage "The &%Class of &%LinguisticCommunications that 
effect an institutional alteration when performed by competent authority.  
Some examples are nominating, marrying, and excommunicating.")

(=>
   (instance ?DECLARE Declaring)
   (exists (?PROP ?NORM)
      (or
         (confersNorm ?DECLARE ?PROP ?NORM)
         (deprivesNorm ?DECLARE ?PROP ?NORM)))) 

(subclass Naming Declaring)
(documentation Naming EnglishLanguage "The &%Process of assigning a name to someone or something.")

(=>
   (and
      (instance ?PROCESS Naming)
      (patient ?PROCESS ?THING)
      (destination ?PROCESS ?NAME))
   (holdsDuring (FutureFn (WhenFn ?PROCESS)) (names ?NAME ?THING)))

(subclass Cooperation SocialInteraction)
(documentation Cooperation EnglishLanguage "The &%subclass of &%SocialInteraction where 
the participants involved work together for the achievement of a common 
goal.")

(=>
   (instance ?COOPERATE Cooperation)
   (exists (?PURP)
      (forall (?AGENT)
         (=>
            (agent ?COOPERATE ?AGENT)
            (hasPurposeForAgent ?COOPERATE ?PURP ?AGENT)))))

(subclass Meeting SocialInteraction)
(documentation Meeting EnglishLanguage "The coming together of two or more 
&%CognitiveAgents for the purpose of &%Communication.  This covers informal 
meetings, e.g. visits with family members, and formal meetings, e.g. a board 
of directors meeting.")

(=>
   (and
      (instance ?MEET Meeting)
      (agent ?MEET ?AGENT1)
      (agent ?MEET ?AGENT2))
   (holdsDuring (WhenFn ?MEET) (orientation ?AGENT1 ?AGENT2 Near)))

(=>
   (instance ?MEET Meeting)
   (exists (?AGENT1 ?AGENT2)
      (and
         (agent ?MEET ?AGENT1)
         (agent ?MEET ?AGENT2)
         (hasPurpose ?MEET 
           (exists (?COMM) 
             (and 
               (instance ?COMM Communication) 
               (agent ?COMM ?AGENT1) 
               (agent ?COMM ?AGENT2)))))))
 
(subclass Contest SocialInteraction)
(documentation Contest EnglishLanguage "A &%SocialInteraction where the &%agent and 
&%patient are &%CognitiveAgents who are trying to defeat one another.  
Note that this concept is often applied in a metaphorical sense in natural 
language, when we speak, e.g., of the struggle of plants for space or 
sunlight, or of bacteria for food resources in some environment.")

(=>
   (instance ?CONTEST Contest)
   (exists (?AGENT1 ?AGENT2 ?PURP1 ?PURP2)
      (and
         (agent ?CONTEST ?AGENT1)
         (agent ?CONTEST ?AGENT2)
         (hasPurposeForAgent ?CONTEST ?PURP1 ?AGENT1)
         (hasPurposeForAgent ?CONTEST ?PURP2 ?AGENT2)
         (not
            (equal ?AGENT1 ?AGENT2))
         (not
            (equal ?PURP1 ?PURP2)))))

(subclass ViolentContest Contest)
(documentation ViolentContest EnglishLanguage "A &%Contest where one participant attempts to 
physically injure another participant.")

(subclass War ViolentContest)
(documentation War EnglishLanguage "A military confrontation between two or more 
&%GeopoliticalAreas or &%Organizations whose members are &%GeopoliticalAreas.  
As the corresponding axiom specifies, a &%War is made up of &%Battles.")

(=>
   (instance ?WAR War)
   (exists (?BATTLE)
      (and
         (instance ?BATTLE Battle)
         (subProcess ?BATTLE ?WAR))))

(=>
   (and
      (instance ?WAR War)
      (agent ?WAR ?AGENT))
   (or
      (instance ?AGENT GeopoliticalArea)
      (and
         (instance ?AGENT Organization)
         (forall (?MEMBER)
            (=>
               (member ?MEMBER ?AGENT)
               (instance ?MEMBER GeopoliticalArea))))))

(subclass Battle ViolentContest)
(documentation Battle EnglishLanguage "A &%ViolentContest between two or more military 
units within the context of a war.  Note that this does not cover the 
metaphorical sense of 'battle', which simply means a struggle of some 
sort.  This sense should be represented with the more general concept of 
&%Contest.")

(=>
   (instance ?BATTLE Battle)
   (exists (?WAR)
      (and
         (instance ?WAR War)
         (subProcess ?BATTLE ?WAR))))

(=>
   (instance ?BATTLE Battle)
   (exists (?ATTACK)
      (and
         (instance ?ATTACK ViolentContest)
         (subProcess ?ATTACK ?BATTLE))))

(subclass Game Contest)
(subclass Game RecreationOrExercise)
(documentation Game EnglishLanguage "A &%Contest whose purpose is the 
enjoyment/stimulation of the participants or spectators of the &%Game.")

(subclass Sport Game)
(documentation Sport EnglishLanguage "A &%Game which requires some degree of physical 
exercion from the participants of the game.")

(subclass LegalAction Contest)
(documentation LegalAction EnglishLanguage "Any &%Process where a &%CognitiveAgent seeks 
to obtain something through a court of law.")

(subclass Maneuver IntentionalProcess)
(documentation Maneuver EnglishLanguage "An intentional move or play within a &%Contest.  
In many cases, a &%Maneuver is a realization of part of a strategy for 
winning the &%Contest, but it also may be just an arbitrary or semi-arbitrary 
division of the overarching &%Contest, e.g. innings in a baseball game.")

(=>
   (instance ?MOVE Maneuver)
   (exists (?CONTEST)
      (and
         (instance ?CONTEST Contest)
         (subProcess ?MOVE ?CONTEST))))

(subclass Attack Maneuver)
(documentation Attack EnglishLanguage "A &%Maneuver in a &%ViolentContest where the 
&%agent attempts to inflict damage on the &%patient.")

(=>
   (instance ?ATTACK Attack)
   (exists (?CONTEST)
      (and
         (instance ?CONTEST ViolentContest)
         (subProcess ?ATTACK ?CONTEST))))

(=>
   (and
      (instance ?ATTACK Attack)
      (agent ?ATTACK ?AGENT)
      (patient ?ATTACK ?OBJ))
   (hasPurposeForAgent ?ATTACK 
     (exists (?DAMAGE)
       (and
         (instance ?DAMAGE Damaging)
         (patient ?DAMAGE ?OBJ))) ?AGENT))

(subclass DefensiveManeuver Maneuver)
(documentation DefensiveManeuver EnglishLanguage "A &%Maneuver in a &%ViolentContest 
where the &%agent attempts to avoid being damaged.")

(=>
   (instance ?DEFENSE DefensiveManeuver)
   (exists (?CONTEST)
      (and
         (instance ?CONTEST ViolentContest)
         (subProcess ?DEFENSE ?CONTEST))))

(=>
  (and
    (instance ?DEFENSE DefensiveManeuver)
    (agent ?DEFENSE ?AGENT))
  (hasPurposeForAgent ?DEFENSE 
    (not 
      (exists (?DAMAGE)
        (and
          (instance ?DAMAGE Damaging)
          (patient ?DAMAGE ?AGENT)))) ?AGENT))

(=>
   (and
      (instance ?MANEUVER Maneuver)
      (instance ?CONTEST ViolentContest)
      (subProcess ?MANEUVER ?CONTEST))
   (or
      (instance ?MANEUVER Attack)
      (instance ?MANEUVER DefensiveManeuver)))

(subclass Perception PsychologicalProcess)
(documentation Perception EnglishLanguage "Sensing some aspect of the material world.  
Note that the &%agent of this sensing is assumed to be an &%Animal.")

(=>
   (and
      (instance ?PERCEPT Perception)
      (agent ?PERCEPT ?AGENT))
   (instance ?AGENT Animal))

(=>
   (instance ?AGENT SentientAgent)
   (capability Perception experiencer ?AGENT))

(subclass Seeing Perception)
(documentation Seeing EnglishLanguage "The &%subclass of &%Perception in which the 
sensing is done by an ocular &%Organ.")

(=>
   (and
      (instance ?SEE Seeing)
      (agent ?SEE ?AGENT)
      (patient ?SEE ?OBJ))
    (exists (?PROP)
       (and
          (instance ?PROP ColorAttribute)
          (knows ?AGENT (attribute ?OBJ ?PROP)))))

(=>
  (and
    (instance ?SEE Seeing)
    (patient ?SEE ?OBJ))
  (holdsDuring (WhenFn ?SEE)
    (attribute ?OBJ Illuminated)))

(=>
  (and
    (instance ?SEE Seeing)
    (patient ?SEE ?OBJ))
  (exists (?ATTR)
    (and
      (instance ?ATTR ColorAttribute)
      (holdsDuring (WhenFn ?SEE)
        (attribute ?OBJ ?ATTR)))))

(subclass Looking Seeing)
(subclass Looking IntentionalProcess)
(documentation Looking EnglishLanguage "Any instance of &%Seeing which is intentional.")

(subclass Smelling Perception)
(documentation Smelling EnglishLanguage "The &%subclass of &%Perception in which the 
sensing is done by an olefactory &%Organ.")

(=>
   (and
      (instance ?SMELL Smelling)
      (patient ?SMELL ?OBJ))
   (exists (?ATTR)
      (and
         (instance ?ATTR OlfactoryAttribute)
         (attribute ?OBJ ?ATTR))))

(subclass Tasting Perception)
(documentation Tasting EnglishLanguage "The &%subclass of &%Perception in which the 
sensing is done by of an &%Organ which can discriminate various tastes.")

(=>
   (and
      (instance ?TASTE Tasting)
      (patient ?TASTE ?OBJ))
   (exists (?ATTR)
      (and
         (instance ?ATTR TasteAttribute)
         (attribute ?OBJ ?ATTR))))

(subclass Hearing Perception)
(documentation Hearing EnglishLanguage "The &%subclass of &%Perception in which the 
sensing is done by an auditory &%Organ.")

(=>
   (and
      (instance ?HEAR Hearing)
      (patient ?HEAR ?OBJ))
   (exists (?ATTR)
      (and
         (instance ?ATTR SoundAttribute)
         (attribute ?OBJ ?ATTR))))

;; NS: add.
(subclass SoundAttribute PerceptualAttribute)

;MSv: delete since PerceptualAttribute is now subclass of RelationalAttribute
;(subclass SoundAttribute RelationalAttribute)
(documentation SoundAttribute EnglishLanguage "The volume of sound relative to a listener.")
(instance Audible SoundAttribute)
(documentation Audible EnglishLanguage "A sound level capable of being heard by a &%Human.")
(=>
  (and
    (instance ?SOUND RadiatingSound)
    (agent ?SOUND ?OBJ)
    (attribute ?SOUND Audible))
  (exists (?HUMAN)
    (and
      (instance ?HUMAN Human)
      (capability 
        (KappaFn ?HEAR
          (and
            (instance ?HEAR Hearing)
            (agent ?HEAR ?HUMAN)
            (destination ?HEAR ?HUMAN)
            (origin ?HEAR ?OBJ))) agent ?HUMAN))))
            
(subclass Listening Hearing)
(subclass Listening IntentionalProcess)
(documentation Listening EnglishLanguage "Any instance of &%Hearing which is intentional.")

(subclass TactilePerception Perception)
(documentation TactilePerception EnglishLanguage "The &%subclass of &%Perception in which 
the sensing is done by &%Touching.  Note that &%Touching need not involve 
&%TactilePerception.  For example, a person who has lost all sensation in 
both of his legs would have no &%TactilePerception of anything his legs 
were &%Touching.")

(=>
   (instance ?TACTILE TactilePerception)
   (exists (?TOUCH)
      (and
         (instance ?TOUCH Touching)
         (subProcess ?TOUCH ?TACTILE))))

(subclass Radiating Motion) 
(documentation Radiating EnglishLanguage "Processes in which some form of electromagnetic 
radiation, e.g. radio waves, light waves, electrical energy, etc., is given 
off or absorbed by something else.")

(subclass RadiatingLight RadiatingElectromagnetic)
(documentation RadiatingLight EnglishLanguage "The &%subclass of &%Radiating in which 
light is given off or absorbed.  Some examples include blinking, flashing, 
and glittering.")

(<=>
   (exists (?EMIT)
      (and
         (instance ?EMIT RadiatingLight)
         (patient ?EMIT ?REGION)
         (instance ?REGION Region)))
   (attribute ?REGION Illuminated))

(subclass RadiatingInfrared RadiatingElectromagnetic)
(subclass RadiatingXRay RadiatingElectromagnetic)

(subclass RadiatingSound Radiating)
(documentation RadiatingSound EnglishLanguage "The &%subclass of &%Radiating in which 
sound waves are given off or absorbed.  Some examples include creaking, 
roaring, and whistling.")

(=>
   (and
      (instance ?EMIT RadiatingSound)
      (agent ?EMIT ?SOUND))
   (exists (?ATTR)
      (and
         (instance ?ATTR SoundAttribute)
         (attribute ?SOUND ?ATTR))))

;; KJN: Removing this and renaming it to MakingMusic to be consistent with the Verb
;; form of most Processes
;;(subclass Music RadiatingSound)
;;(documentation Music EnglishLanguage "The &%subclass of &%RadiatingSound where the 
;;sound is intended to be melodic and is produced deliberately.")  

(subclass MakingMusic RadiatingSound)
(documentation MakingMusic EnglishLanguage "&%MakingMusic is a type of &%RadiatingSound
where the &%result is intended to be melodic and is produced delibrately")
(termFormat EnglishLanguage MakingMusic "making music")
(comment MakingMusic "Changing the old Music to &%MakingMusic to be more consistent with
the verb-form that &%Process seem to take. (09-14-2011)" "KJN")

(partition MakingMusic MakingInstrumentalMusic MakingVocalMusic)
(subclass MakingInstrumentalMusic MakingMusic)
(documentation MakingInstrumentalMusic EnglishLanguage "&%MakingInstrumentalMusic is a type
of &%MakingMusic which is produced using some kind of &%MusicalInstrument")
(termFormat EnglishLanguage MakingInstrumentalMusic "instrumental music")

(=>
  (instance ?M MakingInstrumentalMusic)
  (exists (?I)
    (and
      (instance ?I MusicalInstrument)
      (instrument ?M ?I))))

(subclass MakingVocalMusic MakingMusic)
(subclass MakingVocalMusic Vocalizing)
(documentation MakingVocalMusic EnglishLanguage "&%MakingVocalMusic is a type of
&%MakingMusic which is produced by using the vocal cords")
(termFormat EnglishLanguage MakingVocalMusic "singing")
(comment MakingVocalMusic "Currently, &%VocalMusic also inherits from &%Speaking.  Changing
this to more general &%Vocalizing.  Acapella groups today use their &%VocalCord to create
music in ways that are more than just speaking. (09-14-2011)" "KJN")

(subclass Singing MakingVocalMusic)
(documentation Singing EnglishLanguage "&%Singing is a type of &%MakingVocalMusic wherein
words are produced by the singer. This is different from other forms of &%MakingVocalMusic
such as humming or scatting or beatboxing , where the vocal cords are used to create 
the music but no words are formed.")

(=>
  (instance ?S Singing)
  (exists (?W)
    (and
      (patient ?S ?W)
      (instance ?W Word))))
    
(subclass RadiatingElectromagnetic Radiating)
(documentation RadiatingElectromagnetic EnglishLanguage "&%RadiatingElectromagnetic 
is the subclass of &%Radiating processes in which electromagnetic 
radiation is transmitted or absorbed.")

(subclass RadiatingNuclear Radiating)
(documentation RadiatingNuclear EnglishLanguage "Releasing atomic energy, i.e. energy from 
a nuclear reaction.")

(subclass StateChange InternalChange)
(documentation StateChange EnglishLanguage "Any &%Process where the &%PhysicalState 
of &%part of the &%patient of the &%Process changes.")

(=>
   (and
      (instance ?PROCESS StateChange)
      (patient ?PROCESS ?OBJ))
   (exists (?PART ?STATE1 ?STATE2)
      (and
         (part ?PART ?OBJ)
         (instance ?STATE1 PhysicalState)
         (instance ?STATE2 PhysicalState)
         (not (equal ?STATE1 ?STATE2))
         (holdsDuring (BeginFn (WhenFn ?PROCESS)) (attribute ?PART ?STATE1))
         (holdsDuring (EndFn (WhenFn ?PROCESS)) (attribute ?PART ?STATE2)))))

(instance atomicNumber BinaryPredicate)
(instance atomicNumber AsymmetricRelation)
(domainSubclass atomicNumber 1 ElementalSubstance)
(domain atomicNumber 2 PositiveInteger)
(documentation atomicNumber EnglishLanguage "(&%atomicNumber ?ELEMENT ?NUMBER) means that 
the &%ElementalSubstance ?ELEMENT has the atomic number ?NUMBER.  The 
atomic number is the number of &%Protons in the nucleus of an &%Atom.") 

(=>
  (atomicNumber ?TYPE ?NUMBER)
  (=>
    (and
      (instance ?SUBSTANCE ?TYPE)
      (part ?ATOM ?SUBSTANCE)
      (instance ?ATOM Atom))
    (equal ?NUMBER
      (CardinalityFn
        (KappaFn ?PROTON
          (and
            (part ?PROTON ?ATOM)
            (instance ?PROTON Proton)))))))

(instance boilingPoint BinaryPredicate)
(domainSubclass boilingPoint 1 PureSubstance)
(domain boilingPoint 2 TemperatureMeasure)
(documentation boilingPoint EnglishLanguage "The temperature at which a &%PureSubstance changes
state from a &%Liquid to a &%Gas.")

(=>
  (and
    (instance ?X ?Y)
    (subclass ?Y PureSubstance)
    (barometricPressure ?X (MeasureFn ?PRES InchMercury))
    (greaterThan 29.92 ?PRES)
    (boilingPoint ?Y (MeasureFn ?BOIL KelvinDegree))
    (measure ?X (MeasureFn ?TEMP KelvinDegree))
    (greaterThan ?TEMP ?BOIL))
  (attribute ?X Gas))
     
 (=>
   (and
     (instance ?X ?Y)
     (subclass ?Y PureSubstance)
     (boilingPoint ?Y (MeasureFn ?BOIL KelvinDegree))
     (meltingPoint ?Y (MeasureFn ?MELT KelvinDegree))
     (measure ?X (MeasureFn ?TEMP KelvinDegree))
     (greaterThan ?TEMP ?MELT)
     (lessThan ?TEMP ?BOIL))
   (attribute ?X Liquid))

(=>
  (and
    (instance ?X ?Y)
    (subclass ?Y PureSubstance)
    (meltingPoint ?Y (MeasureFn ?MELT KelvinDegree))
    (barometricPressure ?X (MeasureFn ?PRES InchMercury))
    (greaterThan ?PRES 29.92)
    (measure ?X (MeasureFn ?TEMP KelvinDegree))
    (lessThan ?TEMP ?MELT))
  (attribute ?X Solid))

(=>
   (and
      (instance ?BOILING Boiling)
      (boilingPoint ?TYPE (MeasureFn ?TEMP1 ?MEASURE))
      (instance ?SUBSTANCE ?TYPE)
      (patient ?BOILING ?SUBSTANCE)
      (holdsDuring (WhenFn ?BOILING) (measure ?SUBSTANCE (MeasureFn ?TEMP2 ?MEASURE)))
      (instance ?MEASURE UnitOfTemperature))
   (greaterThanOrEqualTo ?TEMP2 ?TEMP1))

(=>
   (and
      (boilingPoint ?TYPE (MeasureFn ?TEMP1 ?MEASURE))
      (instance ?SUBSTANCE ?TYPE)
      (holdsDuring ?TIME (measure ?SUBSTANCE (MeasureFn ?TEMP2 ?MEASURE)))
      (instance ?MEASURE UnitOfTemperature)
      (greaterThanOrEqualTo ?TEMP2 ?TEMP1))
   (or
      (holdsDuring ?TIME (attribute ?SUBSTANCE Gas)) 
      (exists (?BOIL)
         (and
            (overlapsTemporally (WhenFn ?BOIL) ?TIME)
            (instance ?BOIL Boiling)
            (patient ?BOIL ?SUBSTANCE)))))
   
(instance meltingPoint BinaryPredicate)
(domainSubclass meltingPoint 1 PureSubstance)
(domain meltingPoint 2 TemperatureMeasure)
(documentation meltingPoint EnglishLanguage "The temperature at which a &%PureSubstance changes
state from a &%Solid to a &%Liquid.  Note that &%Arsenic can sublimate directly
from &%Solid to &%Gas which means that its melting and boiling points are equal.")

(=>
  (and
    (instance ?SUBSTANCE ?TYPE)
    (boilingPoint ?TYPE (MeasureFn ?TEMP1 ?MEASURE))
    (meltingPoint ?TYPE (MeasureFn ?TEMP2 ?MEASURE))
    (instance ?MEASURE UnitOfTemperature)
    (holdsDuring ?TIME (measure ?SUBSTANCE (MeasureFn ?TEMP3 ?MEASURE)))
    (greaterThan ?TEMP3 ?TEMP2)
    (lessThan ?TEMP3 ?TEMP1))
  (or
    (holdsDuring ?TIME (attribute ?SUBSTANCE Liquid)) 
    (exists (?MELT)
      (and
        (overlapsTemporally (WhenFn ?MELT) ?TIME)
        (instance ?MELT Melting)
        (patient ?BOIL ?SUBSTANCE)))))
  
(=>
  (and
    (instance ?SUBSTANCE ?TYPE)
    (meltingPoint ?TYPE (MeasureFn ?TEMP1 ?MEASURE))
    (holdsDuring ?TIME (measure ?SUBSTANCE (MeasureFn ?TEMP2 ?MEASURE)))
    (instance ?MEASURE UnitOfTemperature)
    (lessThan ?TEMP2 ?TEMP1))
  (or
    (holdsDuring ?TIME (attribute ?SUBSTANCE Solid)) 
    (exists (?FREEZE)
      (and
        (overlapsTemporally (WhenFn ?FREEZE) ?TIME)
        (instance ?FREEZE Freezing)
        (patient ?FREEZE ?SUBSTANCE)))))
                     
(=>
  (and
    (meltingPoint ?TYPE ?MELT)
    (boilingPoint ?TYPE ?BOIL))
  (greaterThanOrEqualTo ?BOIL ?MELT))

(subclass Melting StateChange)
(documentation Melting EnglishLanguage "The &%Class of &%Processes where an &%Object is 
heated and converted from a &%Solid to a &%Liquid.")

(=>
   (instance ?MELT Melting)
   (exists (?HEAT)
      (and
         (instance ?HEAT Heating)
         (subProcess ?HEAT ?MELT))))

(=>
   (and
      (instance ?MELT Melting)
      (patient ?MELT ?OBJ))
   (exists (?PART)
      (and
         (part ?PART ?OBJ)
         (holdsDuring (BeginFn (WhenFn ?MELT)) (attribute ?PART Solid))
         (holdsDuring (EndFn (WhenFn ?MELT)) (attribute ?PART Liquid)))))

(subclass Boiling StateChange)
(documentation Boiling EnglishLanguage "The &%Class of &%Processes where a &%Substance is 
heated and converted from a &%Liquid to a &%Gas.")

(=>
   (instance ?BOIL Boiling)
   (exists (?HEAT)
      (and
         (instance ?HEAT Heating)
         (subProcess ?HEAT ?BOIL))))

(=>
   (and
      (instance ?BOIL Boiling)
      (patient ?BOIL ?OBJ))
   (exists (?PART)
      (and
         (part ?PART ?OBJ)
         (holdsDuring (BeginFn (WhenFn ?BOIL)) (attribute ?PART Liquid))
         (holdsDuring (EndFn (WhenFn ?BOIL)) (attribute ?PART Gas)))))

(subclass Evaporating StateChange)
(documentation Evaporating EnglishLanguage "The &%Class of &%Processes where a &%Substance is 
converted from a &%Liquid to a &%Gas at a temperature below its
&%Boiling point.")

(=>
   (and
      (instance ?EVAP Evaporating)
      (boilingPoint ?OBJ (MeasureFn ?BOILVAL ?MEAS))
      (measure ?OBJ (MeasureFn ?VAL ?MEAS))
      (instance ?MEAS UnitOfTemperature)
      (patient ?EVAP ?OBJ))
   (exists (?PART)
      (and
         (part ?PART ?OBJ)
         (greaterThan ?BOILVAL ?VAL)
         (holdsDuring (BeginFn (WhenFn ?EVAP)) (attribute ?PART Liquid))
         (holdsDuring (EndFn (WhenFn ?EVAP)) (attribute ?PART Gas)))))

(subclass Condensing StateChange)
(documentation Condensing EnglishLanguage "The &%Class of &%Processes where an &%Object is 
cooled and converted from a &%Gas to a &%Liquid.")

(=>
   (instance ?COND Condensing)
   (exists (?COOL)
      (and
         (instance ?COOL Cooling)
         (subProcess ?COOL ?COND))))

(=>
   (and
      (instance ?COND Condensing)
      (patient ?COND ?OBJ))
   (exists (?PART)
      (and
         (part ?PART ?OBJ)
         (holdsDuring (BeginFn (WhenFn ?COND)) (attribute ?PART Gas))
         (holdsDuring (EndFn (WhenFn ?COND)) (attribute ?PART Liquid)))))

(subclass Freezing StateChange)
(documentation Freezing EnglishLanguage "The &%Class of &%Processes where an &%Object is 
cooled and converted from a &%Liquid to a &%Solid.")

(=>
   (instance ?FREEZE Freezing)
   (exists (?COOL)
      (and
         (instance ?COOL Cooling)
         (subProcess ?COOL ?FREEZE))))

(=>
   (and
      (instance ?FREEZE Freezing)
      (patient ?FREEZE ?OBJ))
   (exists (?PART)
      (and
         (part ?PART ?OBJ)
         (holdsDuring (BeginFn (WhenFn ?FREEZE)) (attribute ?PART Liquid))
         (holdsDuring (EndFn (WhenFn ?FREEZE)) (attribute ?PART Solid)))))



;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;
;;    OBJECTS    ;;
;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'MEREOTOPOLOGY'
;; INCLUDES 'PROCESSES'
;; INCLUDES 'QUALITIES'

(subclass AstronomicalBody Object)
(disjoint AstronomicalBody GeographicArea)
(documentation AstronomicalBody EnglishLanguage "The &%Class of all astronomical 
objects of significant size.  It includes &%SelfConnectedObjects 
like planets, stars, and asteroids, as well as &%Collections like 
nebulae, galaxies, and constellations.  Note that the planet Earth 
is an &%AstronomicalBody, but every &%Region of Earth is a 
&%GeographicArea.")

(subclass GeographicArea Region)
(partition GeographicArea WaterArea LandArea)
(documentation GeographicArea EnglishLanguage "A geographic location, generally having 
definite boundaries.  Note that this differs from its immediate superclass 
&%Region in that a &%GeographicArea is a three-dimensional &%Region of the 
earth.  Accordingly, all astronomical objects other than earth and all 
one-dimensional and two-dimensional &%Regions are not classed under 
&%GeographicArea.") 

(subclass LocalizablePlace GeographicArea)

(instance geographicSubregion BinaryPredicate)
(instance geographicSubregion TransitiveRelation)
(instance geographicSubregion AsymmetricRelation)
(subrelation geographicSubregion properPart)
(subrelation geographicSubregion located)
(domain geographicSubregion 1 GeographicArea)
(domain geographicSubregion 2 GeographicArea)
(documentation geographicSubregion EnglishLanguage "(&%geographicSubregion ?PART ?WHOLE) 
means that the &%GeographicArea ?PART is part of the &%GeographicArea 
?WHOLE.")

(subclass GeopoliticalArea GeographicArea)
(subclass GeopoliticalArea Agent)
(documentation GeopoliticalArea EnglishLanguage "Any &%GeographicArea which is associated 
with some sort of political structure.  This class includes &%Lands, 
&%Cities, districts of cities, counties, etc.  Note that the identity 
of a &%GeopoliticalArea may remain constant after a change in borders.")

(=>
   (and
      (instance ?AREA GeopoliticalArea)
  (leader (GovernmentFn ?AREA) ?PERSON))
   (leader ?AREA ?PERSON))

(=>
   (and
      (instance ?AREA GeopoliticalArea)
  (leader ?AREA ?PERSON))
(leader (GovernmentFn ?AREA) ?PERSON))

(=>
  (and
    (instance ?EVENT Election)
    (agent ?EVENT ?AGENT)
    (instance ?AGENT GeopoliticalArea))
  (instance ?EVENT PoliticalProcess))

(=>
  (and
    (instance ?EVENT Election)
    (agent ?EVENT ?AGENT)
    (instance ?AREA GeopoliticalArea)
    (instance ?AGENT (GovernmentFn ?AREA)))
  (instance ?EVENT PoliticalProcess))

(instance geopoliticalSubdivision AsymmetricRelation) 
(instance geopoliticalSubdivision TransitiveRelation) 
(subrelation geopoliticalSubdivision geographicSubregion) 
(domain geopoliticalSubdivision 1 GeopoliticalArea) 
(domain geopoliticalSubdivision 2 GeopoliticalArea) 
(documentation geopoliticalSubdivision EnglishLanguage "(&%geopoliticalSubdivision 
?AREA1 ?AREA2) means that ?AREA1 is any geopolitical part of ?AREA2, 
that is, ?AREA1 is an integral &%geographicSubregion of ?AREA2 (not a 
&%DependencyOrSpecialSovereigntyArea), having its own associated 
&%GovernmentOrganization which is subordinated to or constrained by 
the government of ?AREA2.  Cf. &%dependentGeopoliticalArea.") 

;; NS: delete.
;; (=>
;;   (geopoliticalSubdivision ?SUB ?AREA)
;;   (not (instance ?SUB Nation)))

;; NS: Note that Government.kif contains the following formulae:
;;
;; (subclass IndependentState Nation)
;; 
;; (=>
;;   (geopoliticalSubdivision ?SUB ?AREA)
;;   (not (instance ?SUB IndependentState)))
;;
;; It would be best to rewrite all rules in which &%Nation is used in
;; the sense of &%IndependentState so that they use
;; &%IndependentState.  This would allow &%Nation to be interpreted in
;; a more general "cultural" or "homeland" sense, as suggested by
;; (subclass IndependentState Nation).  England, Scotland, Wales, and
;; NorthernIreland, for example, would be &%Nations, but not
;; (currently) &%IndependentStates.

(subclass WaterArea GeographicArea)
(documentation WaterArea EnglishLanguage "A body which is made up predominantly of water, 
e.g. rivers, lakes, oceans, etc.")

(=>
   (instance ?AREA WaterArea)
   (exists (?BED ?HOLE ?WATER)
      (and
         (equal (HoleHostFn ?HOLE) ?BED)
         (instance ?WATER Water)
         (properlyFills ?WATER ?HOLE)
         (equal (MereologicalSumFn ?BED ?WATER) ?AREA))))

(subclass SaltWaterArea WaterArea)
(disjoint SaltWaterArea FreshWaterArea)
(documentation SaltWaterArea EnglishLanguage "A &%WaterArea whose &%Water is saline, e.g. 
oceans and seas.")

(subclass FreshWaterArea WaterArea)
(documentation FreshWaterArea EnglishLanguage "A &%WaterArea whose &%Water is not saline, 
e.g. most rivers and lakes.")

;; KJN: Moving this to MILO to remove dependencies
;;(subclass StreamWaterArea WaterArea)
;;(disjoint StreamWaterArea StaticWaterArea)
;;(documentation StreamWaterArea EnglishLanguage "A relatively narrow &%WaterArea where the 
;;water flows constantly and in the same direction, e.g. a river, a stream, 
;;etc.")

;;(subclass StaticWaterArea WaterArea)
;;(documentation StaticWaterArea EnglishLanguage "A &%WaterArea in which water does not flow 
;;constantly or in the same direction, e.g. most lakes and ponds.")

(subclass LandArea GeographicArea)
(documentation LandArea EnglishLanguage "An area which is predominantly solid ground, 
e.g. a &%Nation, a mountain, a desert, etc.  Note that a &%LandArea may 
contain some relatively small &%WaterAreas.  For example, Australia is 
a &%LandArea even though it contains various rivers and lakes.")

(=>
   (instance ?LAND1 LandArea)
   (exists (?LAND2)
      (and
         (part ?LAND1 ?LAND2)
         (or
            (instance ?LAND2 Continent)
            (instance ?LAND2 Island)))))

(subclass ShoreArea LandArea)
(documentation ShoreArea EnglishLanguage "A &%ShoreArea is a &%LandArea approximately 
1-3 km wide bordering a body of water, such as an ocean, bay, river, 
or lake.  A &%ShoreArea may comprise a variety of &%LandForms, such as dunes, 
sloughs, and marshes.")

(=>
   (instance ?BANK ShoreArea)
   (exists (?WATER)
      (and
         (instance ?WATER WaterArea)
         (meetsSpatially ?BANK ?WATER))))

(subclass Continent LandArea)
(equal (CardinalityFn Continent) 7)
(documentation Continent EnglishLanguage "As defined in the CIA World Fact Book, 
&%Continent covers seven land masses: &%Africa, &%NorthAmerica, 
&%SouthAmerica, &%Antarctica, &%Europe, &%Asia, and &%Oceania.  
Note that &%Australia, counted as a continent in some other systems, 
is included in &%Oceania in the Fact Book.  As a consequence, there 
is no &%Nation which is also a &%Continent.")

(subclass Island LandArea)
(documentation Island EnglishLanguage "A &%LandArea that is completely surrounded by a &%WaterArea.")

(=>
   (instance ?ISLAND Island)
   (not
      (exists (?AREA ?PART1 ?PART2)
         (and
            (instance ?AREA LandArea)
            (part ?PART1 ?ISLAND)
            (part ?PART2 ?AREA)
            (not 
               (part ?ISLAND ?AREA))
            (not
               (part ?AREA ?ISLAND))
            (meetsSpatially ?PART1 ?PART2)))))

(=>
  (and 
    (instance ?ISLE Island)
    (instance ?AREA GeographicArea)
    (meetsSpatially ?ISLE ?AREA))
  (not
    (instance ?AREA LandArea)))

(=>
  (instance ?ISLE Island)
  (exists (?WATER)
    (and
      (instance ?WATER WaterArea)
      (meetsSpatially ?ISLE ?WATER))))

(subclass Nation GeopoliticalArea)
(subclass Nation LandArea)
(documentation Nation EnglishLanguage "The broadest &%GeopoliticalArea, i.e. &%Nations are 
&%GeopoliticalAreas that are not part of any other overarching and 
comprehensive governance structure (excepting commonwealths and other sorts 
of loose international organizations).")

(subclass StateOrProvince GeopoliticalArea)
(subclass StateOrProvince LandArea)
(documentation StateOrProvince EnglishLanguage "Administrative subdivisions of a 
&%Nation that are broader than any other political subdivisions that 
may exist.  This &%Class includes the states of the United States, as 
well as the provinces of Canada and European countries.")

(=>
   (instance ?STATE StateOrProvince)
   (exists (?LAND)
      (and
         (instance ?LAND Nation)
         (properPart ?STATE ?LAND))))

(subclass City GeopoliticalArea)
(subclass City LandArea)
(documentation City EnglishLanguage "A &%LandArea of relatively small size, inhabited 
by a community of people, and having some sort of political structure.  
Note that this class includes both large cities and small settlements 
like towns, villages, hamlets, etc.")

(subclass County GeopoliticalArea)
(subclass County LandArea)
(documentation County EnglishLanguage "A &%GeopoliticalArea that is larger than a city, 
usually encompassing several cities, and smaller than a &%StateOrProvince.  
Aside from City, this is the smallest geopolitical subdivision, and it is 
known by various names in various counties, e.g.  parrish, commune, etc.") 

(=>
   (instance ?STATE County)
   (exists (?LAND)
      (and
         (instance ?LAND StateOrProvince)
         (properPart ?STATE ?LAND))))

(subclass Transitway Region)
(subclass Transitway SelfConnectedObject)
(documentation Transitway EnglishLanguage "&%Transitway is the broadest class 
of regions which may be passed through as a &%path in instances 
of &%Translocation.  &%Transitway includes land, air, and sea 
regions, and it includes both natural and artificial transitways.")

(subclass LandTransitway Transitway)
(subclass LandTransitway LandArea)
(documentation LandTransitway EnglishLanguage "&%LandTransitway is the subclass of 
&%Transitway that represents areas intended for motion over the ground.")

(=>
  (instance ?WAY Transitway)
  (hasPurpose ?WAY
    (exists (?TRANSPORT) 
      (and 
        (instance ?TRANSPORT Transportation)
        (path ?TRANSPORT ?WAY)))))

(subclass Roadway LandTransitway)
(documentation Roadway EnglishLanguage "&%Roadway is the subclass of &%LandTransitways 
that are areas intended for surface travel by self-powered, wheeled 
vehicles, excluding those that travel on tracks.  &%Roadways have been 
at least minimally improved to enable the passage of vehicles.  
&%Roadways include dirt and gravelled roads, paved streets, and 
expressways.")

(subclass Water CompoundSubstance)
(documentation Water EnglishLanguage "The &%Class of samples of the compound H20.  Note 
that this &%Class covers both pure and impure &%Water.")

(subclass Mineral Substance)

(documentation Mineral EnglishLanguage "Any of various naturally occurring homogeneous 
substances (such as stone, coal, salt, sulfur, sand, petroleum), or 
synthetic substances having the chemical composition and crystalline form 
and properties of a naturally occurring mineral.") 

(instance developmentalForm BinaryPredicate)
(instance developmentalForm AsymmetricRelation)
(instance developmentalForm TransitiveRelation)
(subrelation developmentalForm attribute)
(domain developmentalForm 1 OrganicObject)
(domain developmentalForm 2 DevelopmentalAttribute)

;; NS: delete.
;; (documentation developmentalForm EnglishLanguage "(&%developmentalForm ?OBJECT ?FORM) 
;; means that ?FORM is an earlier stage in the individual maturation of 
;; ?OBJECT.  For example, tadpole and caterpillar are &%developmentalForms 
;; of frogs and butterflies, respectively.")

;; NS: add.
(documentation developmentalForm EnglishLanguage "(&%developmentalForm
?OBJECT ?FORM) means that ?FORM describes a stage in the individual
maturation of ?OBJECT.  For example, tadpole and caterpillar are
&%developmentalForms of frogs and butterflies, respectively.")

(=>
   (and
      (holdsDuring ?TIME1 (developmentalForm ?OBJ ?ATTR1))
      (successorAttributeClosure ?ATTR2 ?ATTR1))
   (exists (?TIME2)
      (and
         (earlier ?TIME2 ?TIME1)
         (holdsDuring ?TIME2 (developmentalForm ?OBJ ?ATTR2)))))
   
(subclass OrganicObject CorpuscularObject)
(subclass OrganicObject OrganicThing)
(partition OrganicObject Organism AnatomicalStructure)
(documentation OrganicObject EnglishLanguage "This class encompasses &%Organisms, 
&%CorpuscularObjects that are parts of &%Organisms, i.e. &%BodyParts, 
and &%CorpuscularObjects that are nonintentionally produced by 
&%Organisms, e.g. &%ReproductiveBodies.")

(subclass Organism OrganicObject)
(subclass Organism Agent)
(disjoint Organism Artifact)
(partition Organism Animal Plant Microorganism)
(documentation Organism EnglishLanguage "Generally, a living individual, including all 
&%Plants and &%Animals.")

(=>
   (instance ?ORGANISM Organism)
   (exists (?BIRTH)
      (and
         (instance ?BIRTH Birth)
         (experiencer ?BIRTH ?ORGANISM))))

(instance inhabits BinaryPredicate)
(instance inhabits AsymmetricRelation)
(domain inhabits 1 Organism)
(domain inhabits 2 Object)
(documentation inhabits EnglishLanguage "A very basic notion of living within something 
else.  (&%inhabits ?ORGANISM ?OBJECT) means that ?OBJECT is the residence 
(either permanent or temporary), nest, etc. of ?ORGANISM.")

(=>
  (holdsDuring ?T1 (inhabits ?ORGANISM ?OBJ))
  (exists (?TIME)
    (and 
      (instance ?TIME TimeInterval)
      (temporalPart ?TIME ?T1)
      (holdsDuring ?TIME (located ?ORGANISM ?OBJ)))))

(subrelation home inhabits)
(domain home 1 Human)
(domain home 2 PermanentResidence)
(documentation home EnglishLanguage "The relation between a &%Human and a &%PermanentResidence 
of the &%Human.")

(subrelation stays inhabits)
(disjointRelation stays home)
(domain stays 1 Human)
(domain stays 2 TemporaryResidence)
(documentation stays EnglishLanguage "The relation between a &%Human and a &%TemporaryResidence 
of the &%Human.")

(subclass Plant Organism)
(documentation Plant EnglishLanguage "An &%Organism having cellulose cell walls, growing 
by synthesis of &%Substances, generally distinguished by the presence of 
chlorophyll, and lacking the power of locomotion.")

(subclass FloweringPlant Plant)
(documentation FloweringPlant EnglishLanguage "A &%Plant that produces seeds and flowers.  
This class includes trees, shrubs, herbs, and flowers.")

(subclass NonFloweringPlant Plant)
(disjoint NonFloweringPlant FloweringPlant)
(disjointDecomposition NonFloweringPlant Alga Fern Moss)
(documentation NonFloweringPlant EnglishLanguage "A &%Plant that reproduces with spores and 
does not produce flowers.")

(subclass Alga NonFloweringPlant)
(documentation Alga EnglishLanguage "A chiefly aquatic plant that contains chlorophyll, 
but does not form embryos during development and lacks vascular tissue.")

(=>
  (instance ?ALGA Alga)
  (exists (?WATER)
    (and
      (inhabits ?ALGA ?WATER)
      (instance ?WATER Water))))

(subclass Fungus Organism)
(documentation Fungus EnglishLanguage "A eukaryotic &%Organism characterized by the 
absence of chlorophyll and the presence of rigid cell walls. Included 
here are both slime molds and true fungi such as yeasts, molds, mildews, 
and mushrooms.")

(=>
  (and
    (instance ?FUNGUS Fungus)
    (inhabits ?FUNGUS ?OBJ))
  (instance ?OBJ Organism))

(subclass Moss NonFloweringPlant)
(documentation Moss EnglishLanguage "A &%NonFloweringPlant without true roots and little 
if any vascular tissue.")

(subclass Fern NonFloweringPlant)
(documentation Fern EnglishLanguage "A &%NonFloweringPlant that contains vascular tissue.  
This class includes true ferns, as well as horsetails, club mosses, and 
whisk ferns.")

(subclass Animal Organism)
(partition Animal Vertebrate Invertebrate)
(documentation Animal EnglishLanguage "An &%Organism with eukaryotic &%Cells, and lacking 
stiff cell walls, plastids, and photosynthetic pigments.")

(subclass Microorganism Organism)
(documentation Microorganism EnglishLanguage "An &%Organism that can be seen only with 
the aid of a microscope.")

(subclass Bacterium Microorganism)
(documentation Bacterium EnglishLanguage "A small, typically one-celled, prokaryotic 
&%Microorganism.")

(=>
   (instance ?BACTERIUM Bacterium)
   (exists (?CELL1)
      (and
         (component ?CELL1 ?BACTERIUM)
         (instance ?CELL1 Cell)
         (forall (?CELL2)
            (=>
               (and
                  (component ?CELL2 ?BACTERIUM)
                  (instance ?CELL2 Cell))
               (equal ?CELL1 ?CELL2))))))

(=>
  (and
    (instance ?BACTERIUM Bacterium)
    (inhabits ?BACTERIUM ?OBJ))
  (instance ?OBJ Organism))

(subclass Virus Microorganism)
(documentation Virus EnglishLanguage "An &%Organism consisting of a core of a single 
nucleic acid enclosed in a protective coat of protein. A virus may replicate 
only inside a host living cell. A virus exhibits some but not all of the 
usual characteristics of living things.")

(=>
  (and
    (instance ?VIRUS Virus)
    (inhabits ?VIRUS ?OBJ))
  (instance ?OBJ Organism))

(=>
  (and
    (instance ?VIRUS Virus)
    (instance ?PROC Replication)
    (agent ?PROC ?VIRUS))
  (exists (?CELL)
    (and
      (located ?PROC ?CELL)
      (instance ?CELL Cell))))
       
(subclass Vertebrate Animal)
(documentation Vertebrate EnglishLanguage "An &%Animal which has a spinal column.")

(subclass Invertebrate Animal)
(disjointDecomposition Invertebrate Worm Mollusk Arthropod)
(documentation Invertebrate EnglishLanguage "An &%Animal which has no spinal column.")

(subclass Worm Invertebrate)
(documentation Worm EnglishLanguage "Long, narrow, soft-bodied &%Invertebrates.")

(subclass Mollusk Invertebrate)
(documentation Mollusk EnglishLanguage "Soft-bodied &%Invertebrate that is usually 
contained in a shell.  Includes oysters, clams, mussels, snails, slugs, 
octopi, and squid.")

(subclass Arthropod Invertebrate)
(disjointDecomposition Arthropod Arachnid Myriapod Insect Crustacean)
(documentation Arthropod EnglishLanguage "A &%Class of &%Invertebrate that includes 
&%Arachnids and &%Insects.")

(subclass Arachnid Arthropod)
(documentation Arachnid EnglishLanguage "A &%Class of &%Arthropods that includes 
ticks and spiders.")

(subclass Myriapod Arthropod)
(documentation Myriapod EnglishLanguage "A &%Class of &%Arthropods that includes 
centipedes and millipedes.")

(subclass Insect Arthropod)
(documentation Insect EnglishLanguage "A &%Class of small &%Arthropods that are 
air-breathing and that are distinguished by appearance.")

(subclass Crustacean Arthropod)
(documentation Crustacean EnglishLanguage "A &%Class of &%Arthropods that mainly dwells 
in water and has a segmented body and a chitinous exoskeleton.  Includes 
lobsters, crabs, shrimp, and barnacles.")

(subclass ColdBloodedVertebrate Vertebrate)
(disjointDecomposition ColdBloodedVertebrate Amphibian Fish Reptile)
(documentation ColdBloodedVertebrate EnglishLanguage "&%Vertebrates whose body temperature 
is not internally regulated.") 

(subclass WarmBloodedVertebrate Vertebrate)
(disjoint WarmBloodedVertebrate ColdBloodedVertebrate)
(documentation WarmBloodedVertebrate EnglishLanguage "&%Vertebrates whose body temperature 
is internally regulated.")

(subclass Amphibian ColdBloodedVertebrate)
(documentation Amphibian EnglishLanguage "A cold-blooded, smooth-skinned &%Vertebrate 
which characteristically hatches as an aquatic larva, breathing by 
gills.  When mature, the &%Amphibian breathes with &%Lungs.")

(subclass Bird WarmBloodedVertebrate)
(disjoint Bird Mammal)
(documentation Bird EnglishLanguage "A &%Vertebrate having a constant body temperature 
and characterized by the presence of feathers.")

(subclass Fish ColdBloodedVertebrate)
(documentation Fish EnglishLanguage "A cold-blooded aquatic &%Vertebrate characterized by 
fins and breathing by gills. Included here are &%Fish having either a bony 
skeleton, such as a perch, or a cartilaginous skeleton, such as a shark.  
Also included are those &%Fish lacking a jaw, such as a lamprey or 
hagfish.")

(=>
  (instance ?FISH Fish)
  (exists (?WATER)
    (and
      (inhabits ?FISH ?WATER)
      (instance ?WATER Water))))

(subclass Mammal WarmBloodedVertebrate)
(disjointDecomposition Mammal AquaticMammal HoofedMammal Marsupial Rodent Primate)
(documentation Mammal EnglishLanguage "A &%Vertebrate having a constant body temperature 
and characterized by the presence of hair, mammary glands, and sweat 
glands.")

(subclass AquaticMammal Mammal)
(documentation AquaticMammal EnglishLanguage "The &%Class of &%Mammals that dwell chiefly 
in the water.  Includes whales, dolphins, manatees, seals, and walruses.")

(subclass HoofedMammal Mammal)
(documentation HoofedMammal EnglishLanguage "The &%Class of quadruped &%Mammals with hooves.  
Includes horses, cows, sheep, pigs, antelope, etc.")

(subclass Marsupial Mammal)
(documentation Marsupial EnglishLanguage "The &%Class of &%Mammals which have a pouch for 
their young.")

(subclass Carnivore Mammal)
(documentation Carnivore EnglishLanguage "The &%Class of flesh-eating &%Mammals.  Members 
of this &%Class typically have four or five claws on each paw.  Includes 
cats, dogs, bears, racoons, and skunks.")

(=>
   (and
      (instance ?CARNIVORE Carnivore)
      (instance ?EAT Eating)
      (agent ?EAT ?CARNIVORE)
      (patient ?EAT ?PREY))
   (instance ?PREY Animal))

(subclass Canine Carnivore)
(disjoint Canine Feline)
(documentation Canine EnglishLanguage "The &%Class of &%Carnivores with completely 
separable toes, nonretractable claws, and long muzzles.")

(subclass Feline Carnivore)
(documentation Feline EnglishLanguage "The &%Class of &%Carnivores with completely
separable toes, slim bodies, and rounded heads.  All felines other than
the cheetah have retractable claws.")

(subclass Rodent Mammal)
(documentation Rodent EnglishLanguage "The &%Class of &%Mammals with one or two pairs 
of incisors for gnawing.  Includes rats, mice, guinea pigs, and 
rabbits.")

(subclass Primate Mammal)
(disjointDecomposition Primate Ape Monkey Hominid)
(documentation Primate EnglishLanguage "The &%Class of &%Mammals which are 
&%Primates.")

(subclass Ape Primate)
(documentation Ape EnglishLanguage "Various &%Primates with no tails or only short 
tails.")

(subclass Monkey Primate)
(documentation Monkey EnglishLanguage "Various &%Primates with relatively long 
tails.")

(subclass Hominid Primate)
(documentation Hominid EnglishLanguage "Includes &%Humans and relatively recent 
ancestors of &%Humans.")

(subclass Human Hominid)
(subclass Human CognitiveAgent)
(partition Human Man Woman)
(documentation Human EnglishLanguage "Modern man, the only remaining species of the Homo 
genus.")

(subclass Man Human)
(documentation Man EnglishLanguage "The class of &%Male &%Humans.")

(=>
   (instance ?MAN Man) 
   (attribute ?MAN Male))
   
(subclass Woman Human)
(documentation Woman EnglishLanguage "The class of &%Female &%Humans.")

(=>
   (instance ?WOMAN Woman) 
   (attribute ?WOMAN Female))
   
(subclass Reptile ColdBloodedVertebrate)
(documentation Reptile EnglishLanguage "A &%ColdBloodedVertebrate having an external 
covering of scales or horny plates.  &%Reptiles breathe by means of 
&%Lungs and generally lay eggs.")

;; The following formulas cover biologically related &%Classes under 
;; &%Substance.

(subclass BiologicallyActiveSubstance Substance)
(documentation BiologicallyActiveSubstance EnglishLanguage "A &%Substance that is 
capable of inducing a change in the structure or functioning of an 
&%Organism.  This &%Class includes &%Substances used in the treatment, 
diagnosis, prevention or analysis of normal and abnormal body function.  
This &%Class also includes &%Substances that occur naturally in the body 
and are administered therapeutically.  Finally, &%BiologicallyActiveSubstance 
includes &%Nutrients, most drugs of abuse, and agents that require special 
handling because of their toxicity.")

(subclass Nutrient BiologicallyActiveSubstance)
(disjointDecomposition Nutrient Protein Carbohydrate Vitamin)
(documentation Nutrient EnglishLanguage "A &%BiologicallyActiveSubstance required by an &%Organism.  
It is generally ingested as &%Food, and it is of primary interest because of its role 
in the biologic functioning of the &%Organism.")

(subclass Protein Nutrient)
(documentation Protein EnglishLanguage "A &%Nutrient made up of amino acids joined by 
peptide bonds.")

(subclass Enzyme Protein)
(documentation Enzyme EnglishLanguage "A complex &%Protein that is produced by living 
cells and which catalyzes specific biochemical reactions. There are six 
main types of enzymes:  oxidoreductases, transferases, hydrolases, 
lyases, isomerases, and ligases.")
(subclass Carbohydrate Nutrient)
(documentation Carbohydrate EnglishLanguage "An element of living cells and a source of 
energy for &%Animals.  This class includes both simple &%Carbohydrates, 
i.e. sugars, and complex &%Carbohydrates, i.e. starches.")

(subclass Vitamin Nutrient)
(documentation Vitamin EnglishLanguage "A &%Nutrient present in natural products or made 
synthetically, which is essential in the diet of &%Humans and other higher 
&%Animals.  Included here are &%Vitamin precursors and provitamins.")

(subclass LiquidMixture Mixture)
(partition LiquidMixture Solution Suspension)
(documentation LiquidMixture EnglishLanguage "Any &%Mixture that satisfies two conditions, 
viz. it is made up predominantly of things which are a &%Liquid and any 
component other than &%Liquid in the &%Mixture is in the form of fine particles 
which are suspended in the &%Liquid.")

(=>  
   (instance ?MIX LiquidMixture)
   (exists (?PART)
      (and
         (part ?PART ?MIX)
         (attribute ?PART Liquid))))

(subclass Solution LiquidMixture) 
(documentation Solution EnglishLanguage "A liquid mixture. The most abundant component in 
a solution is called the solvent. Other components are called solutes. 
A solution, though homogeneous, may nonetheless have variable composition. 
Any amount of salt, up to a maximum limit, can be dissolved in a given 
amount of water.")

(subclass Suspension LiquidMixture)
(documentation Suspension EnglishLanguage "A &%LiquidMixture where at least one of the 
components of the &%Mixture is equally distributed throughout the &%Mixture 
but is not dissolved in it.") 

(subclass GasMixture Mixture)
(disjoint GasMixture LiquidMixture)
(documentation GasMixture EnglishLanguage "Any &%Mixture that satisfies two conditions, 
viz. it is made up predominantly of things which are a &%Gas and any 
component other than &%Gas in the &%Mixture is in the form of fine particles 
which are suspended in the &%Gas.") 

(=>  
   (instance ?MIX GasMixture)
   (exists (?PART)
      (and
         (part ?PART ?MIX)
         (attribute ?PART Gas))))

(subclass Cloud GasMixture)
(documentation Cloud EnglishLanguage "Any &%GasMixture that is visible, e.g. &%Smoke produced 
by a fire or clouds of water vapor in the sky.")

(=>
   (instance ?CLOUD Cloud)
   (capability Seeing patient ?CLOUD))

(subclass Smoke Cloud)
(documentation Smoke EnglishLanguage "A mixture of fine particles suspended in a gas that is 
produced by &%Combustion.")

(=>
   (instance ?SMOKE Smoke)
   (exists (?BURNING)
      (and
         (instance ?BURNING Combustion)
         (result ?BURNING ?SMOKE))))

(subclass WaterCloud Cloud)
(documentation WaterCloud EnglishLanguage "Any &%Cloud that is composed primarily of water vapor.")

(=>
   (instance ?CLOUD WaterCloud)
   (exists (?WATER)
      (and
         (instance ?WATER Water)
         (part ?WATER ?CLOUD))))

(=>
   (instance ?CLOUD WaterCloud)
   (forall (?PART)
      (=>
         (and
            (part ?PART ?CLOUD)
            (not (instance ?PART Water)))
         (exists (?WATER)
            (and
               (instance ?WATER Water)
               (part ?WATER ?CLOUD)
               (measure ?WATER ?MEASURE1)
               (measure ?PART ?MEASURE2)
               (greaterThan ?MEASURE1 ?MEASURE2))))))

(subclass Air GasMixture)
(documentation Air EnglishLanguage "&%Air is the gaseous stuff that makes up the 
atmosphere surrounding Earth.")

(=>
   (instance ?WIND Wind)
   (exists (?AIR)
      (and
         (patient ?WIND ?AIR)
         (instance ?AIR Air)))) 

(subclass BodySubstance Substance)
(documentation BodySubstance EnglishLanguage "Extracellular material and mixtures of 
cells and extracellular material that are produced, excreted or accreted 
by an &%Organism.  Included here are &%Substances such as saliva, dental 
enamel, sweat, hormones, and gastric acid.")

(subclass AnimalSubstance BodySubstance)
(documentation AnimalSubstance EnglishLanguage "&%BodySubstances that are produced 
exclusively by &%Animals.")

(=>
   (and
      (instance ?SUBSTANCE AnimalSubstance)
      (instance ?ANIMAL Organism)
      (part ?SUBSTANCE ?ANIMAL))
   (instance ?ANIMAL Animal))

(subclass PlantSubstance BodySubstance)
(documentation PlantSubstance EnglishLanguage "&%BodySubstances that are produced 
exclusively by &%Plants.")

(=>
   (and
      (instance ?SUBSTANCE PlantSubstance)
      (instance ?PLANT Organism)
      (part ?SUBSTANCE ?PLANT))
   (instance ?PLANT Plant))

(subclass Hormone BodySubstance)
(subclass Hormone BiologicallyActiveSubstance)
(documentation Hormone EnglishLanguage "In &%Animals, a chemical secreted by an 
endocrine gland whose products are released into the circulating fluid.  
&%Plant hormones or synthetic hormones which are used only to alter or 
control various physiologic processes, e.g., reproductive control agents, 
are assigned to the &%Class &%BiologicallyActiveSubstance. &%Hormones act as 
chemical messengers and regulate various physiologic processes such as 
growth, reproduction, metabolism, etc.  They usually fall into two broad 
categories, viz. steroid hormones and peptide hormones.")

(=>
   (instance ?HORMONE Hormone)
   (exists (?PROCESS ?GLAND)
      (and
         (instance ?GLAND Gland)
         (instrument ?PROCESS ?GLAND)
         (result ?PROCESS ?HORMONE))))

(subclass Blood BodySubstance)
(documentation Blood EnglishLanguage "A fluid present in &%Animals that transports 
&%Nutrients to and waste products away from various &%BodyParts.")

(instance FoodForFn UnaryFunction)
(domainSubclass FoodForFn 1 Organism)
(rangeSubclass FoodForFn SelfConnectedObject)
(documentation FoodForFn EnglishLanguage "A &%Function that denotes 
&%SelfConnectedObject containing &%Nutrients, such as carbohydrates, 
proteins, and fats, that can be ingested by a the given class of living 
&%Animal and metabolized into energy and body tissue.") 

(=>
  (instance ?FOOD (FoodForFn ?A))
  (exists (?NUTRIENT)
    (and
      (instance ?NUTRIENT Nutrient)
      (part ?NUTRIENT ?FOOD))))

(subclass Meat SelfConnectedObject)
(documentation Meat EnglishLanguage "Any food which was originally part of an 
&%Animal and is not ingested by drinking, including eggs and animal 
blood that is eaten as food.  Note that this class covers both raw 
meat and meat that has been prepared in some way, e.g. by cooking.  
Note too that preparations involving &%Meat and &%FruitOrVegetable 
are classed directly under &%Food.")

(=>
   (instance ?MEAT Meat)
   (forall (?PART)
      (=>
         (part ?PART ?MEAT)
         (exists (?SUBPART ?TIME ?ANIMAL)
            (and
               (part ?SUBPART ?PART)
               (holdsDuring ?TIME 
                 (and 
                   (instance ?ANIMAL Animal) 
                   (part ?SUBPART ?ANIMAL))))))))

;; KJN: Moving this to Mid-level-ontology.kif as it is causing dependency errors.                   
;;(subclass Beverage Substance)
;;(disjoint Meat Beverage)
;;(documentation Beverage EnglishLanguage "Any food that is ingested by &%Drinking.  
;;Note that this class is disjoint &%Meat and &%FruitOrVegetable.")

;;(=>
;;   (instance ?BEV Beverage)
;;   (attribute ?BEV Liquid))

;;(=>
;;   (and
;;      (instance ?DRINK Drinking)
;;      (patient ?DRINK ?BEV))
;;   (instance ?BEV Beverage))

(subclass AnatomicalStructure OrganicObject)
(partition AnatomicalStructure BodyPart AbnormalAnatomicalStructure)
(partition AnatomicalStructure AnimalAnatomicalStructure PlantAnatomicalStructure)
(documentation AnatomicalStructure EnglishLanguage "A normal or pathological part 
of the anatomy or structural organization of an &%Organism.  This 
class covers &%BodyParts, as well as structures that are given off 
by &%Organisms, e.g. &%ReproductiveBodies.")

(=>
    (instance ?ANAT AnatomicalStructure)
    (exists (?ORGANISM ?TIME)
        (and
            (instance ?ORGANISM Organism)
            (temporalPart ?TIME (WhenFn ?ORGANISM))
            (holdsDuring ?TIME (part ?ANAT ?ORGANISM)))))

(=>
    (instance ?PART AnatomicalStructure)
    (exists (?CELL)
        (and
            (instance ?CELL Cell)
            (part ?CELL ?PART))))

(subclass AbnormalAnatomicalStructure AnatomicalStructure)
(documentation AbnormalAnatomicalStructure EnglishLanguage "Any &%AnatomicalStructure which 
is not normally found in the &%Organism of which it is a part, i.e. it is 
the result of a &%PathologicProcess.  This class covers tumors, birth marks, 
goiters, etc.")

(=>
   (instance ?STRUCTURE AbnormalAnatomicalStructure)
   (exists (?PROC)
      (and
         (instance ?PROC PathologicProcess)
         (result ?PROC ?STRUCTURE))))

(subclass BodyPart AnatomicalStructure)
(documentation BodyPart EnglishLanguage "A collection of &%Cells and &%Tissues which 
are localized to a specific area of an &%Organism and which are not 
pathological. The instances of this &%Class range from gross structures 
to small components of complex &%Organs.")

(=>
    (instance ?PART BodyPart)
    (exists (?ORGANISM ?TIME)
        (and
            (instance ?ORGANISM Organism)
            (temporalPart ?TIME (WhenFn ?ORGANISM))
            (holdsDuring ?TIME (component ?PART ?ORGANISM)))))

(=>
   (instance ?PART BodyPart)
   (exists (?PROC)
      (and
         (instance ?PROC PhysiologicProcess)
         (result ?PROC ?PART))))

(subclass AnimalAnatomicalStructure AnatomicalStructure)
(documentation AnimalAnatomicalStructure EnglishLanguage "&%AnatomicalStructures that 
are possessed exclusively by &%Animals.")

(=>
   (and
      (instance ?STRUCTURE AnimalAnatomicalStructure)
      (instance ?ANIMAL Organism)
      (part ?STRUCTURE ?ANIMAL))
   (instance ?ANIMAL Animal))

(subclass PlantAnatomicalStructure AnatomicalStructure)
(documentation PlantAnatomicalStructure EnglishLanguage "&%AnatomicalStructures that 
are possessed exclusively by &%Plants.")

(=>
   (and
      (instance ?STRUCTURE PlantAnatomicalStructure)
      (instance ?PLANT Organism)
      (part ?STRUCTURE ?PLANT))
   (instance ?PLANT Plant))

(subclass ReproductiveBody BodyPart)
(documentation ReproductiveBody EnglishLanguage "Reproductive structure of &%Organisms.  
Consists of an &%Embryonic &%Object and a nutritive/protective envelope.  
Note that this class includes seeds, spores, and &%FruitOrVegetables, as 
well as the eggs produced by &%Animals.")

(subclass Egg ReproductiveBody)
(subclass Egg AnimalAnatomicalStructure)
(documentation Egg EnglishLanguage "The fertilized or unfertilized female &%ReproductiveBody 
of an &%Animal.  This includes &%Bird and &%Reptile eggs, as well as mammalian 
ova.") 

;; KJN: This is moved from Economy.kif.  Seed being subclassed from FruitOrVegetable
;; seems incorrect, though, as FruitOrVegetable talks about a ripened Reproductive
;; Body (although no formal rule states it) while a seed may not necessarily be so.
;; commenting it out for now.
;;(subclass Seed FruitOrVegetable)
(subclass Seed ReproductiveBody)
(subclass Seed PlantAnatomicalStructure)
(documentation Seed EnglishLanguage "The fertilized or unfertilized female &%ReproductiveBody 
of a &%FloweringPlant.")

(=>
   (instance ?SEED Seed)
   (exists (?PLANT ?TIME)
      (and
         (instance ?PLANT FloweringPlant)
         (holdsDuring ?TIME (part ?SEED ?PLANT))))) 

(subclass Pollen ReproductiveBody)
(subclass Pollen PlantAnatomicalStructure)
(documentation Pollen EnglishLanguage "A powder produced by &%FloweringPlants that contains male 
gametes and is capable of fertilizing the seeds of &%FloweringPlants of the same 
species.")

(subclass FruitOrVegetable PlantAnatomicalStructure)
(subclass FruitOrVegetable ReproductiveBody)
(documentation FruitOrVegetable EnglishLanguage "Any fruit or vegetable, i.e. a 
ripened &%ReproductiveBody of a &%Plant.  Note that &%FruitOrVegetable 
is not a subclass of &%Food, because some fruits, e.g. poisonous 
berries, are not edible.") 

(subclass Spore ReproductiveBody)
(subclass Spore PlantAnatomicalStructure)
(documentation Spore EnglishLanguage "Any &%ReproductiveBody of a &%NonFloweringPlant.")

(=>
   (instance ?SPORE Spore)
   (exists (?PLANT ?TIME)
      (and
         (instance ?PLANT NonFloweringPlant)
         (holdsDuring ?TIME (part ?SPORE ?PLANT))))) 

(subclass BodyCovering BodyPart)
(documentation BodyCovering EnglishLanguage "Any &%BodyPart which is a covering of another 
&%BodyPart or of an entire &%Organism.  This would include the rinds of 
&%FruitOrVegetables and the skins of &%Animals.")

(=>
   (instance ?COVER BodyCovering)
   (exists (?BODY)
      (and
         (superficialPart ?COVER ?BODY)
         (or
            (instance ?BODY Organism)
            (instance ?BODY BodyPart)))))

(subclass BodyJunction BodyPart)
(documentation BodyJunction EnglishLanguage "The place where two &%BodyParts 
meet or connect.")

(=>
    (instance ?JUNCT BodyJunction)
    (exists (?OBJ1 ?OBJ2)
        (and
            (instance ?OBJ1 BodyPart)
            (instance ?OBJ2 BodyPart)
            (connects ?JUNCT ?OBJ1 ?OBJ2))))

(subclass BodyCavity BodyPart)
(documentation BodyCavity EnglishLanguage "Any &%BodyPart which contains an unfilled space, 
e.g. &%BodyVessels, the atria and ventricles of the heart, the lungs, etc.")

(subclass BodyVessel BodyCavity)
(documentation BodyVessel EnglishLanguage "Any tube-like structure which occurs naturally in 
an &%Organism and through which a &%BodySubstance can circulate.")

(subclass Cell BodyPart)
(documentation Cell EnglishLanguage "The fundamental structural and functional unit of 
living &%Organisms.")

(subclass Organ BodyPart)
(documentation Organ EnglishLanguage "A somewhat independent &%BodyPart that performs a 
specialized function.  Note that this functional definition covers bodily 
systems, e.g. the digestive system or the central nervous system.")

(=>
   (instance ?ORGAN Organ)
   (exists (?PURP)
      (hasPurpose ?ORGAN ?PURP)))

(subclass Gland Organ)
(documentation Gland EnglishLanguage "An &%Organ that removes &%Substances from the &%Blood, 
alters them in some way, and then releases them.")

(subclass Tissue BodySubstance)
(disjointDecomposition Tissue Bone Muscle FatTissue)
(documentation Tissue EnglishLanguage "An aggregation of similarly specialized &%Cells 
and the associated intercellular substance. &%Tissues are relatively 
non-localized in comparison to &%BodyParts, &%Organs or &%Organ components.  
The main features of &%Tissues are self-connectivity (see 
&%SelfConnectedObject) and being a homogeneous mass (all parts in the 
same granularity are instances of &%Tissue as well).")

(=>
    (instance ?STUFF Tissue)
    (exists (?PART)
        (and
            (instance ?PART Cell)
            (part ?PART ?STUFF))))

(=>
    (instance ?STUFF Tissue)
    (exists (?ORGANISM)
        (and
            (instance ?ORGANISM Organism)
            (part ?STUFF ?ORGANISM))))

(subclass Bone Tissue)
(subclass Bone AnimalSubstance)
(documentation Bone EnglishLanguage "Rigid &%Tissue composed largely of calcium that makes up 
the skeleton of &%Vertebrates.  Note that this &%Class also includes teeth.")

(=>
   (instance ?BONE Bone)
   (exists (?VERT)
      (and
         (instance ?VERT Vertebrate)
         (part ?BONE ?VERT))))

(subclass Muscle Tissue)
(subclass Muscle AnimalSubstance)
(documentation Muscle EnglishLanguage "Nonrigid &%Tissue appearing only in &%Animals and 
composed largely of contractile cells.")

(subclass FatTissue Tissue)
(documentation FatTissue EnglishLanguage "Nonrigid &%Tissue that is composed largely of 
fat cells.")

(subclass Noun Word)
(partition Word Noun Verb Adjective Adverb ParticleWord)
(documentation Noun EnglishLanguage "One of the parts of speech.  The &%Class of &%Words 
that conventionally denote &%Objects.")

(subclass Verb Word)
(documentation Verb EnglishLanguage "One of the parts of speech.  The &%Class of &%Words 
that conventionally denote &%Processes.")

(subclass Adjective Word)
(documentation Adjective EnglishLanguage "One of the parts of speech.  The &%Class of 
&%Words that conventionally denote &%Attributes of &%Objects.")

(subclass Adverb Word)
(documentation Adverb EnglishLanguage "One of the parts of speech.  The &%Class of &%Words 
that conventionally denote &%Attributes of &%Processes.")

(subclass ParticleWord Word)
(documentation ParticleWord EnglishLanguage "An umbrella &%Class for any &%Word that does not 
fit into the other subclasses of &%Word.  A &%ParticleWord is generally a small 
term that serves a grammatical or logical function, e.g. 'and', 'of', 
'since', etc.  At some point, this class might be broken up into the 
subclasses 'Connective', 'Preposition', etc.  Note that the class &%ParticleWord 
includes both personal and possessive pronouns, e.g. 'she', 'hers', 'it', 'its', 
etc.")

(subclass Morpheme LinguisticExpression)
(documentation Morpheme EnglishLanguage "Part of a &%Word which cannot be subdivided 
and which expresses a meaning.")

(=>
   (instance ?MORPH Morpheme)
   (not
      (exists (?OTHERMORPH)
         (and
            (instance ?OTHERMORPH Morpheme)
            (part ?OTHERMORPH ?MORPH)
            (not (equal ?OTHERMORPH ?MORPH))))))

(=>
   (instance ?MORPH Morpheme)
   (exists (?WORD)
         (and
            (instance ?WORD Word)
            (part ?MORPH ?WORD))))

(=>
    (instance ?WORD Word)
    (exists (?PART)
        (and
            (part ?PART ?WORD)
            (instance ?PART Morpheme)))) 

(subclass Phrase LinguisticExpression)
(disjointDecomposition Phrase VerbPhrase NounPhrase PrepositionalPhrase)
(documentation Phrase EnglishLanguage "A set of &%Words in a &%Language which form a unit, 
i.e. express a meaning in the &%Language.")

(=>
  (instance ?PHRASE Phrase)
  (exists (?PART1 ?PART2)
    (and
      (part ?PART1 ?PHRASE)
      (part ?PART2 ?PHRASE)
      (instance ?PART1 Word)
      (instance ?PART2 Word)
      (not (equal ?PART1 ?PART2)))))

(subclass VerbPhrase Phrase)
(documentation VerbPhrase EnglishLanguage "A &%Phrase that has the same function as a 
&%Verb.")

(=>
   (instance ?PHRASE VerbPhrase)
   (exists (?VERB)
      (and
         (instance ?VERB Verb)
         (part ?VERB ?PHRASE))))

(subclass NounPhrase Phrase)
(disjoint NounPhrase VerbPhrase)
(documentation NounPhrase EnglishLanguage "A &%Phrase that has the same function as a 
&%Noun.")

(=>
    (instance ?SENTENCE Sentence)
    (exists (?PHRASE1 ?PHRASE2)
        (and
           (instance ?PHRASE1 NounPhrase)
           (instance ?PHRASE2 VerbPhrase)
           (part ?PHRASE1 ?SENTENCE)
           (part ?PHRASE2 ?SENTENCE))))

(=>
   (instance ?PHRASE NounPhrase)
   (exists (?NOUN)
      (and
         (instance ?NOUN Noun)
         (part ?NOUN ?PHRASE))))

(subclass PrepositionalPhrase Phrase)
(documentation PrepositionalPhrase EnglishLanguage "A &%Phrase that begins with a 
preposition and that functions as an &%Adjective or an &%Adverb.")

(=>
   (instance ?PHRASE PrepositionalPhrase)
   (exists (?PREP)
      (and
         (instance ?PREP ParticleWord)
         (part ?PREP ?PHRASE))))

(subclass Text LinguisticExpression)
(subclass Text ContentBearingObject)
(subclass Text Artifact)
(documentation Text EnglishLanguage "A &%LinguisticExpression or set of 
&%LinguisticExpressions that perform a specific function related 
to &%Communication, e.g. express a discourse about a particular 
topic, and that are inscribed in a &%CorpuscularObject by &%Humans.")

(=>
    (instance ?TEXT Text)
    (exists (?PART)
        (and
            (part ?PART ?TEXT)
            (instance ?PART LinguisticExpression))))

(=>
   (instance ?TEXT Text)
   (exists (?WRITE)
      (and
         (instance ?WRITE Writing)
         (result ?WRITE ?TEXT))))

(subclass FactualText Text)
(disjoint FactualText FictionalText)
(documentation FactualText EnglishLanguage "The class of &%Texts that purport to 
reveal facts about the world.  Such texts are often known as information 
or as non-fiction.  Note that something can be an instance of 
&%FactualText, even if it is wholly inaccurate.  Whether something 
is a &%FactualText is determined by the beliefs of the agent creating 
the text.")

;; NS: delete.  The 2nd argument to &%authors must be a &%Class.
;; (=>
;;    (and
;;       (instance ?TEXT FactualText)
;;       (authors ?AGENT ?TEXT)
;;       (subsumesContentInstance ?TEXT ?CONTENT)
;;       (instance ?CONTENT Formula))
;;    (believes ?AGENT ?CONTENT))

;; NS: add.
(=>
   (and
      (instance ?TEXT ?CLASS)
      (subclass ?CLASS FactualText)
      (authors ?AGENT ?CLASS)
      (subsumesContentInstance ?TEXT ?CONTENT)
      (instance ?CONTENT Formula))
   (believes ?AGENT ?CONTENT))

(subclass FictionalText Text)
(documentation FictionalText EnglishLanguage "The class of &%Texts that purport to 
be largely a product of the author's imagination, i.e. the author 
does not believe that most of the content conveyed by the text is 
an accurate depiction of the real world.  Note that something can 
be an instance of &%FictionalText, even if it is completely true.  
Whether something is a &%FictionalText is determined by the beliefs 
of the agent creating the text.")

;; NS: delete.  Wrong use of &%authors.  Also, the rule is supposed to
;; be about &%FictionalText, not &%FactualText.
;; (=>
;;    (and
;;       (instance ?TEXT FactualText)
;;       (authors ?AGENT ?TEXT))
;;    (exists (?CONTENT)
;;       (and
;;          (subsumesContentInstance ?TEXT ?CONTENT)
;;          (instance ?CONTENT Formula)
;;          (not (believes ?AGENT ?CONTENT)))))

;; NS: add.
(=>
   (and
      (instance ?TEXT ?CLASS)
      (subclass ?CLASS FictionalText)
      (authors ?AGENT ?CLASS))
   (exists (?CONTENT)
      (and
         (subsumesContentInstance ?TEXT ?CONTENT)
         (instance ?CONTENT Formula)
         (not (believes ?AGENT ?CONTENT)))))

(subclass Sentence LinguisticExpression)
(documentation Sentence EnglishLanguage "A syntactically well-formed formula of a 
&%Language.  It includes, at minimum, a predicate and a subject (which 
may be explicit or implicit), and it expresses a &%Proposition.")

(=>
    (instance ?SENT Sentence)
    (exists (?PROP)
        (and
            (instance ?PROP Proposition)
            (containsInformation ?SENT ?PROP))))

(instance authors BinaryPredicate)
(instance authors AsymmetricRelation)
(domain authors 1 Agent)
(domainSubclass authors 2 ContentBearingObject)

;; NS: edit.
(documentation authors EnglishLanguage "(&%authors ?AGENT ?TEXTCLASS)
means that ?AGENT is creatively responsible for the content of all
instances of ?TEXTCLASS.  For example, Agatha Christie is author of
Murder_on_the_Orient_Express.")

;; NS: edit.
(=>
     (authors ?AGENT ?TEXTCLASS)
     (exists (?PROCESS ?INSTANCE)
          (and
               (agent ?PROCESS ?AGENT)
               (instance ?INSTANCE ?TEXTCLASS)
               (result ?PROCESS ?INSTANCE))))

(instance editor BinaryPredicate)
(instance editor AsymmetricRelation)
(domain editor 1 Agent)
(domainSubclass editor 2 Text)

;; NS: edit.
(documentation editor EnglishLanguage "(&%editor ?AGENT ?TEXTCLASS)
means that ?AGENT is an editor of the content contained (or realized)
in all instances of ?TEXTCLASS.")

(instance publishes BinaryPredicate)
(instance publishes AsymmetricRelation)
(domain publishes 1 Organization)
(domainSubclass publishes 2 Text)

;; NS: edit.
(documentation publishes EnglishLanguage "(&%publishes ?ORG
?TEXTCLASS) means that ?ORG publishes all instances of ?TEXTCLASS.
For example, Bantam Books publishes Agatha Christie's
Murder_on_the_Orient_Express.")

;; NS: edit.
(=>
  (and
    (publishes ?ORG ?TEXTCLASS)
    (instance ?INST ?TEXTCLASS))
  (exists (?PUB)
    (and
      (instance ?PUB Publication)
      (agent ?PUB ?ORG)
      (patient ?PUB ?INST))))

(instance EditionFn BinaryFunction)
(instance EditionFn PartialValuedRelation)
(domainSubclass EditionFn 1 ContentBearingObject)
(domain EditionFn 2 PositiveInteger)
(rangeSubclass EditionFn ContentBearingObject)
(documentation EditionFn EnglishLanguage "A &%BinaryFunction that maps a type of text 
(e.g. Agatha Christie's Murder_on_the_Orient_Express) and a number 
to the edition of the text type corresponding to the number.")

(=>
  (and
    (equal
      (EditionFn ?TEXT ?INT1) ?EDITION1)
    (equal
      (EditionFn ?TEXT ?INT2) ?EDITION2)
    (greaterThan ?INT2 ?INT1)
    (instance ?PUB1 Publication)
    (instance ?PUB2 Publication)
    (instance ?CBO1 ?EDITION1)
    (instance ?CBO2 ?EDITION2)
    (patient ?PUB1 ?CBO1)
    (patient ?PUB2 ?CBO2)
    (date ?PUB1 ?DATE1)
    (date ?PUB2 ?DATE2))
  (before
    (EndFn ?DATE1)
    (EndFn ?DATE2)))

(=>
   (equal (EditionFn ?TEXT1 ?NUMBER) ?TEXT2)
   (subsumesContentClass ?TEXT1 ?TEXT2))

;; KJN: Moving to MILO   
;;(instance SeriesVolumeFn BinaryFunction)
;;(instance SeriesVolumeFn PartialValuedRelation)
;;(domainSubclass SeriesVolumeFn 1 Series)
;;(domain SeriesVolumeFn 2 PositiveInteger)
;;(rangeSubclass SeriesVolumeFn Text)
;;(documentation SeriesVolumeFn EnglishLanguage "A &%BinaryFunction that maps a type of &%Series 
;;(e.g. the Encyclopedia_Britannica or the Popular_Mechanics periodical) and a 
;;number to the volumes of the text type designated by the number.")

;;(=>
;;   (and
;;      (subclass ?TEXT Periodical)
;;      (equal (SeriesVolumeFn ?TEXT ?INT1) ?VOLUME1)
;;      (equal (SeriesVolumeFn ?TEXT ?INT2) ?VOLUME2)
;;      (greaterThan ?INT2 ?INT1)
;;      (instance ?PUB1 Publication)
;;      (instance ?PUB2 Publication)
;;      (instance ?CBO1 ?VOLUME1)
;;      (instance ?CBO2 ?VOLUME2)
;;      (patient ?PUB1 ?CBO1)
;;      (patient ?PUB2 ?CBO2)
;;      (date ?PUB1 ?DATE1)
;;      (date ?PUB2 ?DATE2))
;;   (before (EndFn ?DATE1) (EndFn ?DATE2)))

;;(=>
;;   (equal (SeriesVolumeFn ?SERIES ?NUMBER) ?VOLUME)
;;   (subsumesContentClass ?SERIES ?VOLUME))

;; KJN: Moving to MILO   
;;(instance PeriodicalIssueFn BinaryFunction)
;;(instance PeriodicalIssueFn PartialValuedRelation)
;;(domainSubclass PeriodicalIssueFn 1 Periodical)
;;(domain PeriodicalIssueFn 2 PositiveInteger)
;;(rangeSubclass PeriodicalIssueFn Periodical)
;;(documentation PeriodicalIssueFn EnglishLanguage "A &%BinaryFunction that maps a subclass of 
;;&%Periodical and a number to all of the issues of the &%Periodical corresponding 
;;to the number.") 

;;(=>
;;   (equal (PeriodicalIssueFn ?PERIODICAL ?NUMBER) ?ISSUE)
;;   (subsumesContentClass ?PERIODICAL ?ISSUE))

;; KJN: Moving to MILO   
;;(subclass Book Text)
;;(documentation Book EnglishLanguage "A &%Text that has pages and is bound.")

(subclass Summary Text)
(documentation Summary EnglishLanguage "A short &%Text that is a summary of another, 
longer &%Text.")

(=>
   (instance ?TEXT Summary)
   (exists (?TEXT2)
      (and
         (instance ?TEXT2 Text)
         (subsumesContentInstance ?TEXT2 ?TEXT))))

;; KJN: Moving to MILO
;;(subclass Series Text)
;;(documentation Series EnglishLanguage "A &%Text consisting of multiple self-contained units.  
;;Some examples are an encyclopedia containing a couple dozen volumes, a television 
;;series made up of many episodes, a film serial, etc.")

;;(=>
;;   (instance ?SERIES Series)
;;   (exists (?BOOK1 ?BOOK2)
;;      (and
;;         (instance ?BOOK1 Book)
;;         (instance ?BOOK2 Book)
;;         (subsumesContentInstance ?SERIES ?BOOK1)
;;         (subsumesContentInstance ?SERIES ?BOOK2)
;;         (not (equal ?BOOK1 ?BOOK2)))))

;;(subclass Periodical Series)
;;(documentation Periodical EnglishLanguage "A &%Series whose elements are published separately 
;;and on a periodic basis.")

;;(subclass Article Text)
;;(disjoint Article Book)
;;(documentation Article EnglishLanguage "A relatively short &%Text that either is unbound or is 
;;bound with other &%Articles in a &%Book.") 

;;(=>
;;   (and
;;      (instance ?ARTICLE1 Article)
;;      (instance ?BOOK Book)
;;      (subsumesContentInstance ?BOOK ?ARTICLE1))
;;   (exists (?ARTICLE2)
;;      (and
;;         (instance ?ARTICLE2 Article)
;;         (not (equal ?ARTICLE2 ?ARTICLE1))
;;         (subsumesContentInstance ?BOOK ?ARTICLE2)))) 

(subclass Certificate Text)
(documentation Certificate EnglishLanguage "A &%Text that confers a right or obligation 
on the holder of the &%Certificate.  Note that the right or obligation 
need not be a legal one, as in the case of an academic diploma that grants 
certain privileges in the professional world.")

(=>
   (instance ?DOC Certificate)
   (exists (?PROP ?NORM)
      (or
         (confersNorm ?DOC ?PROP ?NORM)
         (deprivesNorm ?DOC ?PROP ?NORM))))

(subclass FinancialInstrument Certificate)
(documentation FinancialInstrument EnglishLanguage "A document having monetary value 
or recording a monetary transaction") 

(subclass Currency FinancialInstrument)
(documentation Currency EnglishLanguage "Any element of the official currrency of some 
&%Nation.  This covers both &%CurrencyBills and &%CurrencyCoins.")

(=>
   (instance ?CURRENCY Currency)
   (exists (?MEASURE)
      (monetaryValue ?CURRENCY ?MEASURE)))

(subclass Patent Certificate)
(documentation Patent EnglishLanguage "A &%Certificate that expresses the content of an 
invention that has been accorded legal protection by a governemental 
entity.")

(subclass Molecule CompoundSubstance)
(documentation Molecule EnglishLanguage "A molecule is the smallest unit of matter of a 
&%CompoundSubstance that retains all the physical and chemical properties 
of that substance, e.g., Ne, H2, H2O.  A molecule is two or more &%Atoms 
linked by a chemical bond.")

(=>
   (instance ?MOLE Molecule)
   (exists (?ATOM1 ?ATOM2)
      (and
         (instance ?ATOM1 Atom)
         (instance ?ATOM2 Atom)
         (part ?ATOM1 ?MOLE)
         (part ?ATOM2 ?MOLE)
         (not
            (equal ?ATOM1 ?ATOM2)))))

(subclass Artifact Object)
(documentation Artifact EnglishLanguage "An &%Object that is the product of a 
&%Making.")

(<=>
   (instance ?ARTIFACT Artifact)
   (exists (?MAKING)
      (and
         (instance ?MAKING Making)
         (result ?MAKING ?ARTIFACT))))

(subclass Product Artifact)
(documentation Product EnglishLanguage "An &%Artifact that is produced by &%Manufacture.")

(=>
   (instance ?PRODUCT Product)
   (exists (?MANUFACTURE)
      (and
         (instance ?MANUFACTURE Manufacture)
         (result ?MANUFACTURE ?PRODUCT))))

(instance version BinaryPredicate)
(instance version AsymmetricRelation)
(instance version TransitiveRelation)
(domainSubclass version 1 Artifact)
(domainSubclass version 2 Artifact)
(documentation version EnglishLanguage "Some &%Artifacts have a life cycle with discrete 
stages or versions.  (&%version ARTIFACT1 ARTIFACT2) means that ARTIFACT1 
is a version of ARTIFACT2.  Note that this &%Predicate relates subclasses of 
&%Artifact and not instances.")

(=>
    (version ?ARTIFACT1 ?ARTIFACT2)
    (subclass ?ARTIFACT1 ?ARTIFACT2))

;; The following part of the ontology will eventually encompass all 
;; artifacts.  For the time being, it is mostly restricted to the content 
;; of the Ontolingua ontology component-assemblies, which covers the types 
;; of elements used to construct engineering systems.

(subclass StationaryArtifact Artifact)
(documentation StationaryArtifact EnglishLanguage "A &%StationaryArtifact is an &%Artifact 
that has a fixed spatial location.  Most instances of this &%Class are 
architectural works, e.g. the Eiffel Tower, the Great Pyramids, office towers, 
single-family houses, etc.")

(=>
  (instance ?ARTIFACT StationaryArtifact)
  (exists (?PLACE)
    (and
      (holdsDuring (WhenFn ?ARTIFACT) (located ?ARTIFACT ?PLACE))
      (not
        (exists (?P2)
          (and
            (holdsDuring (WhenFn ?ARTIFACT) (located ?ARTIFACT ?P2))
            (not
              (equal ?PLACE ?P2))))))))

(subclass Building StationaryArtifact)
(documentation Building EnglishLanguage "The Class of &%StationaryArtifacts which are 
intended to house &%Humans and their activities.")

(=>
   (instance ?BUILDING Building)
   (exists (?HUMAN)
      (and
         (instance ?HUMAN Human)
         (or
            (inhabits ?HUMAN ?BUILDING)
            (exists (?ACT)
               (and
                  (agent ?ACT ?HUMAN)
                  (located ?ACT ?BUILDING)))))))

(subclass Room StationaryArtifact)
(disjoint Room Building)
(documentation Room EnglishLanguage "A &%properPart of a &%Building which is separated from 
the exterior of the &%Building and/or other &%Rooms of the &%Building by walls. 
Some &%Rooms may have a specific purpose, e.g. sleeping, bathing, cooking, 
entertainment, etc.")

(=>
   (instance ?ROOM Room)
   (exists (?BUILD)
      (and
         (instance ?BUILD Building)
         (properPart ?ROOM ?BUILD))))

(subclass House ResidentialBuilding)
(subclass House SingleFamilyResidence)
(documentation House EnglishLanguage "A &%ResidentialBuilding which is intended to be 
inhabited by members of the same &%SocialUnit.  &%Houses are distinguished 
from temporary housing like hotels and multi-family dwellings like condominium 
and apartment buildings.")

(subclass Residence StationaryArtifact)
(partition Residence PermanentResidence TemporaryResidence)
(documentation Residence EnglishLanguage "A &%Building or part of a &%Building which provides 
some accomodation for sleeping.")

(=>
   (instance ?RESIDENCE Residence)
   (or
      (instance ?RESIDENCE House)
      (exists (?BUILDING)
         (and
            (instance ?BUILDING ResidentialBuilding)
            (part ?RESIDENCE ?BUILDING)))))
         
(subclass PermanentResidence Residence)
(documentation PermanentResidence EnglishLanguage "A &%Residence where people live, i.e. 
where people have a &%home.")

(=>
   (instance ?RESIDENCE PermanentResidence)
   (exists (?PERSON)
      (home ?PERSON ?RESIDENCE)))

(subclass TemporaryResidence Residence)
(documentation TemporaryResidence EnglishLanguage "A &%Residence which is strictly temporary, 
i.e. where no one makes his/her &%home.")

(=>
  (instance ?RESIDENCE TemporaryResidence)
  (not 
    (exists (?PERSON)
      (home ?PERSON ?RESIDENCE))))

(subclass ResidentialBuilding Building)
(subclass ResidentialBuilding Residence)
(documentation ResidentialBuilding EnglishLanguage "A &%Building which provides some 
accomodation for sleeping.  Note that this class does not cover just 
permanent residences, e.g. &%Houses and condominium and apartment buildings, 
but also temporary residences, e.g. hotels and dormitories.  
&%ResidentialBuildings are also distinguished from &%CommercialBuildings, 
which are intended to serve an organizational rather than a residential 
function.")

;; Moved hotel definition to Hotel.kif.  
;;(subclass Hotel ResidentialBuilding)
;;(subclass Hotel TemporaryResidence)
;;(subclass Hotel CommercialAgent)
;;(documentation Hotel EnglishLanguage "A &%ResidentialBuilding which provides temporary 
;;accommodations to guests in exchange for money.")

(subclass SingleFamilyResidence PermanentResidence)
(documentation SingleFamilyResidence EnglishLanguage "A &%PermanentResidence which is 
intended to be the &%home of a single &%SocialUnit.  This class covers 
&%Houses, &%ApartmentUnits, and &%CondominiumUnits.")

(=>
  (instance ?RESIDENCE SingleFamilyResidence)
  (hasPurpose ?RESIDENCE 
  (forall (?AGENT1 ?AGENT2)
    (=>
      (and
        (home ?AGENT1 ?RESIDENCE)
        (home ?AGENT2 ?RESIDENCE))
      (exists (?UNIT)
        (and
          (instance ?UNIT SocialUnit)
          (member ?AGENT1 ?UNIT)
          (member ?AGENT2 ?UNIT)))))))

(subclass ArtWork Artifact)
(documentation ArtWork EnglishLanguage "&%Artifacts that are created primarily for 
aesthetic appreciation.  Note that this &%Class does not include 
most examples of architecture, which belong under &%StationaryArtifact.")

(=>
  (instance ?AW ArtWork)
  (hasPurpose ?AW
    (exists (?H ?P)
      (and
        (instance ?H Human)
        (instance ?P Perception)
        (experiencer ?P ?H)
        (patient ?P ?AW)))))
        
(=>
  (instance ?AW ArtWork)
  (hasPurpose ?AW
    (exists (?P)
      (and
        (instance ?H Human)
        (desires ?H
          (exists (?P)
            (and
              (instance ?P Perception)
              (experiencer ?P ?H)
              (patient ?P ?AW))))))))
                
(subclass RepresentationalArtWork ArtWork)
(subclass RepresentationalArtWork Icon)
(documentation RepresentationalArtWork EnglishLanguage "Any &%ArtWork that &%represents 
something &%Physical.")

(=>
  (instance ?RA RepresentationalArtWork)
  (exists (?P)
    (and
      (instance ?P Physical)
      (represents ?RA ?P))))
      
(subclass Fabric Artifact)
(disjoint Fabric StationaryArtifact)
(documentation Fabric EnglishLanguage "&%Artifacts that are created by weaving together 
natural or synthetic fibers or by treating the skins of certain sorts of 
&%Animals.  Note that this &%Class includes articles that are created by 
stitching together various types of fabrics, e.g. bedspreads.  On the other 
hand, &%Clothing is not a &%subclass of &%Fabric, because many clothing items 
contain elements that are not fabrics.")

(subclass WearableItem Artifact) 
(documentation WearableItem EnglishLanguage "&%WearableItem is the subclass of 
&%Artifacts that are made to be worn on the body.")

(=>
  (instance ?WI WearableItem)
  (hasPurpose ?WI
    (exists (?H)
      (and
        (instance ?H Human)
        (wears ?H ?WI)))))
        
(subclass Clothing WearableItem)
(disjoint Clothing StationaryArtifact)
(documentation Clothing EnglishLanguage "&%Artifact made out of fabrics and possibly other 
materials that are used to cover the bodies of &%Humans.")

(=>
   (instance ?CLOTHING Clothing)
   (exists (?FABRIC)
      (and
         (instance ?FABRIC Fabric)
         (part ?FABRIC ?CLOTHING))))

(instance wears BinaryPredicate)
(domain wears 1 Animal)
(domain wears 2 WearableItem)
(documentation wears EnglishLanguage "(&%wears ?AGENT ?WI) means that ?AGENT is wearing 
the &%WearableItem item ?WI.")

(=>
   (wears ?AGENT ?WI)
   (located ?WI ?AGENT))

(=>
  (and
    (wears ?A ?C)
    (part ?P ?C))
  (wears ?A ?P))

(subclass Device Artifact)
(documentation Device EnglishLanguage "A &%Device is an &%Artifact whose purpose is to 
serve as an &%instrument in a specific subclass of &%Process.")

(=>
   (instance ?DEVICE Device)
   (exists (?PROC)
      (capability ?PROC instrument ?DEVICE)))

(=>
  (instance ?DEVICE Device)
  (exists (?PROC)
    (hasPurpose ?DEVICE 
      (exists (?INST) 
        (and 
          (instance ?INST ?PROC) 
          (instrument ?INST ?DEVICE))))))

(subclass MusicalInstrument Device)
(documentation MusicalInstrument EnglishLanguage "A &%Device which is manipulated by a &%Human 
and whose purpose is &%MakingMusic.")

(=>
   (instance ?INSTRUMENT MusicalInstrument)
   (capability MakingMusic instrument ?INSTRUMENT))

(subclass TransportationDevice Device)
(documentation TransportationDevice EnglishLanguage "A &%TransportationDevice is a &%Device 
which serves as the &%instrument in a &%Transportation &%Process which carries 
the &%patient of the &%Process from one point to another.")

(=>
   (instance ?DEVICE TransportationDevice)
   (capability Transportation instrument ?DEVICE))

(subclass Vehicle TransportationDevice)
(documentation Vehicle EnglishLanguage "&%Vehicle is the subclass of 
&%TransportationDevices that transport passengers or goods 
from one place to another by moving from one place to the other 
with them, e.g., cars, trucks, ferries, and airplanes.  Contrast 
with devices such as pipelines, escalators, or supermarket 
checkout belts, which carry items from one place to another by means 
of a moving part, without the device removing from the origin to 
the destination.")

(=>
  (and
    (instance ?TRANSPORT Vehicle)
    (instance ?MOVE Translocation)
    (instrument ?MOVE ?TRANSPORT)
    (origin ?MOVE ?FROM))
  (holdsDuring (BeginFn (WhenFn ?MOVE)) (located ?TRANSPORT ?FROM)))

(=>
  (and
    (instance ?TRANSPORT Vehicle)
    (instance ?MOVE Translocation)
    (instrument ?MOVE ?TRANSPORT)
    (destination ?MOVE ?TO))
  (holdsDuring (BeginFn (WhenFn ?MOVE)) (located ?TRANSPORT ?TO)))

(subclass MeasuringDevice Device)
(documentation MeasuringDevice EnglishLanguage "Any &%Device whose purpose is to measure a 
&%PhysicalQuantity.")

(=>
  (instance ?DEVICE MeasuringDevice)
  (hasPurpose ?DEVICE 
    (exists (?MEASURE) 
      (and 
        (instance ?MEASURE Measuring) 
        (instrument ?MEASURE ?DEVICE)))))

(subclass AttachingDevice Device)
(documentation AttachingDevice EnglishLanguage "A &%Device whose purpose is to attach one thing 
to something else, e.g. nails, screws, buttons, etc.")

(=>
   (instance ?DEVICE AttachingDevice)
   (exists (?ATTACH)
      (and
         (instance ?ATTACH Attaching)
         (instrument ?ATTACH ?DEVICE))))

(subclass Weapon Device)
(documentation Weapon EnglishLanguage "The &%Class of &%Devices that are designed 
primarily to damage or destroy &%Humans/&%Animals, &%StationaryArtifacts or 
the places inhabited by &%Humans/&%Animals.")

(=>
   (instance ?WEAPON Weapon)
   (capability Damaging instrument ?WEAPON))

(=>
  (instance ?WEAPON Weapon)
  (hasPurpose ?WEAPON 
    (exists (?D ?PATIENT) 
      (and 
        (instance ?D Damaging)
	(instrument ?D ?WEAPON)
        (patient ?D ?PATIENT)))))
                                         
(subclass Machine Device)
(documentation Machine EnglishLanguage "&%Machines are &%Devices that that have a 
well-defined &%resource and &%result and that automatically convert 
the &%resource into the &%result.")

(=>
   (instance ?MACHINE Machine)
   (forall (?PROC)
      (=>
         (instrument ?PROC ?MACHINE)
         (exists (?RESOURCE ?RESULT)
            (and
               (resource ?PROC ?RESOURCE)
               (result ?PROC ?RESULT))))))

(subclass EngineeringComponent Device)
(documentation EngineeringComponent EnglishLanguage "A fundamental concept that applies 
in many engineering domains.  An &%EngineeringComponent is an element of 
a &%Device that is a physically whole object, such as one might 
see listed as standard parts in a catalog.  The main difference betweeen 
&%EngineeringComponents and arbitrary globs of matter is that 
&%EngineeringComponents are object-like in a modeling sense.  Thus, an 
&%EngineeringComponent is not an arbtrary subregion, but a part of a 
system with a stable identity.")

(=>
   (instance ?COMP EngineeringComponent)
   (exists (?DEVICE)
      (and
         (instance ?DEVICE Device)
         (component ?COMP ?DEVICE))))

(=>
   (instance ?MACHINE Machine)
   (exists (?COMP1 ?COMP2)
      (and
         (instance ?COMP1 EngineeringComponent)
         (instance ?COMP2 EngineeringComponent)
         (not (equal ?COMP1 ?COMP2))
         (part ?COMP1 ?MACHINE)
         (part ?COMP2 ?MACHINE))))

(subrelation engineeringSubcomponent properPart)
(domain engineeringSubcomponent 1 EngineeringComponent)
(domain engineeringSubcomponent 2 EngineeringComponent)
(documentation engineeringSubcomponent EnglishLanguage "(&%engineeringSubcomponent ?SUB 
?SUPER) means that the &%EngineeringComponent ?SUB is structurally a 
&%properPart of ?SUPER.  This relation is an &%AsymmetricRelation, since 
two &%EngineeringComponents cannot be subcomponents of each other.")

(instance connectedEngineeringComponents SymmetricRelation)
(instance connectedEngineeringComponents IrreflexiveRelation)
(subrelation connectedEngineeringComponents connected)
(domain connectedEngineeringComponents 1 EngineeringComponent)
(domain connectedEngineeringComponents 2 EngineeringComponent)
(documentation connectedEngineeringComponents EnglishLanguage "This is the most general 
connection relation between &%EngineeringComponents.  If 
(&%connectedEngineeringComponents ?COMP1 ?COMP2), then neither ?COMP1 nor 
?COMP2 can be an &%engineeringSubcomponent of the other.  The relation 
&%connectedEngineeringComponents is a &%SymmetricRelation, there is no 
information in the direction of connection between two components.  It is 
also an &%IrreflexiveRelation, no &%EngineeringComponent bears this relation 
to itself.  Note that this relation does not associate a name or type 
with the connection.")

(=>
   (connectedEngineeringComponents ?COMP1 ?COMP2)
   (and
      (not
         (engineeringSubcomponent ?COMP1 ?COMP2))
      (not
         (engineeringSubcomponent ?COMP2 ?COMP1))))

(subclass EngineeringConnection EngineeringComponent)
(documentation EngineeringConnection EnglishLanguage "An &%EngineeringConnection is an 
&%EngineeringComponent that represents a connection relationship between 
two other &%EngineeringComponents.  It is a reification of the 
&%Predicate &%connectedEngineeringComponents.  That means that whenever 
this &%Predicate holds between two &%EngineeringComponents, there exists an 
&%EngineeringConnection.  The practical reason for reifying a relationship 
is to be able to attach other information about it. For example, one
might want to say that a particular connection is associated with some 
shared parameters, or that it is of a particular type.  
&%EngineeringConnections are &%EngineeringComponents and can therefore be 
an &%engineeringSubcomponent of other &%EngineeringComponents.  However, 
to provide for modular regularity in component systems, 
&%EngineeringConnections cannot be connected.  For each pair of 
&%EngineeringComponents related by &%connectedEngineeringComponents, there 
exists at least one &%EngineeringConnection.  However, that object may not 
be unique, and the same &%EngineeringConnection may be associated with 
several pairs of &%EngineeringComponents.")

(=>
   (instance ?CONNECTION EngineeringConnection)
   (exists (?COMP1 ?COMP2)
      (connectsEngineeringComponents ?CONNECTION ?COMP1 ?COMP2)))

(=> 
   (connectedEngineeringComponents ?COMP1 ?COMP2)
   (not 
      (or 
         (instance ?COMP1 EngineeringConnection) 
         (instance ?COMP2 EngineeringConnection))))

(<=>
   (connectedEngineeringComponents ?COMP1 ?COMP2)
   (exists (?CONNECTION)
      (connectsEngineeringComponents ?CONNECTION ?COMP1 ?COMP2))) 

(subrelation connectsEngineeringComponents connects)
(domain connectsEngineeringComponents 1 EngineeringConnection)
(domain connectsEngineeringComponents 2 EngineeringComponent)
(domain connectsEngineeringComponents 3 EngineeringComponent)
(documentation connectsEngineeringComponents EnglishLanguage "&%connectsEngineeringComponents 
is a &%TernaryPredicate that maps from an &%EngineeringConnection to the 
&%EngineeringComponents it connects.  Since &%EngineeringComponents cannot 
be connected to themselves and there cannot be an &%EngineeringConnection 
without a &%connectedEngineeringComponents &%Predicate, the second and third 
arguments of any &%connectsEngineeringComponents relationship will always be 
distinct for any given first argument.")

;; This following part contains definitions and axioms relating to social 
;; groups and the relations between them. 

(subclass CommercialAgent Agent) 
(documentation CommercialAgent EnglishLanguage "An &%Agent that
provides products and/or services for a fee with the aim of making a
profit.")

;; KJN: Moved from Media.kif
(subclass Business CommercialAgent)
(subclass Business Organization)
(documentation Business EnglishLanguage "An &%instance of
&%Business is an &%Organization that is a &%CommercialAgent.")

;; KJN: Removing this and putting in definition of Corporation that subclasses it from Business
;;(subclass Corporation CommercialAgent)
;;(subclass Corporation Organization)

(subclass Corporation Business)
;; NS: add.
(subclass Corporation LegalAgent)

(documentation Corporation EnglishLanguage "An &%Organization that has
a special legal status that allows a group of persons to act as a
&%CommercialAgent and that insulates the owners (shareholders) from
many liabilities that might result from the corporation's operation.")

(subclass Manufacturer Corporation)
(documentation Manufacturer EnglishLanguage "Any &%Corporation which manufactures &%Products.")

(=>
  (instance ?ORG Manufacturer)
  (hasPurpose ?ORG 
    (exists (?MANUFACTURE)
      (and
        (instance ?MANUFACTURE Manufacture)
        (instance ?MANUFACTURE CommercialService)
        (agent ?MANUFACTURE ?ORG)))))
                       
(subclass MercantileOrganization Corporation)
(documentation MercantileOrganization EnglishLanguage "Any &%Corporation which sells 
goods or services to customers for a profit.")

(=>
  (instance ?ORG MercantileOrganization)
  (hasPurpose ?ORG
    (exists (?SELL)
      (and
        (instance ?SELL Selling)
        (instance ?SELL CommercialService)
        (agent ?SELL ?ORG)))))

(subclass Group Collection) 
(subclass Group Agent) 
(documentation Group EnglishLanguage "A &%Collection of &%Agents, e.g. a flock 
of sheep, a herd of goats, or the local Boy Scout troop.") 

(=> 
  (and 
    (instance ?GROUP Group) 
    (member ?MEMB ?GROUP)) 
  (instance ?MEMB Agent)) 

(subclass GroupOfPeople Group)
(documentation GroupOfPeople EnglishLanguage "Any &%Group whose &%members are 
exclusively &%Humans.")

(=>
  (and
    (instance ?GROUP GroupOfPeople)
    (member ?MEMBER ?GROUP))
  (instance ?MEMBER Human))

(subclass AgeGroup GroupOfPeople) 
(documentation AgeGroup EnglishLanguage "A &%GroupOfPeople whose &%members all have the 
same &%age.")
 
(=> 
  (instance ?GROUP AgeGroup) 
  (forall (?MEMB1 ?MEMB2 ?AGE1 ?AGE2) 
    (=> 
      (and 
        (member ?MEMB1 ?GROUP) 
        (member ?MEMB2 ?GROUP) 
        (age ?MEMB1 ?AGE1) 
        (age ?MEMB2 ?AGE2)) 
      (equal ?AGE1 ?AGE2)))) 

(subclass FamilyGroup GroupOfPeople) 
(documentation FamilyGroup EnglishLanguage "A &%GroupOfPeople whose &%members bear 
&%familyRelations to one another.")
 
(=> 
   (instance ?GROUP FamilyGroup) 
   (forall (?MEMB1 ?MEMB2) 
      (=> 
         (and 
            (member ?MEMB1 ?GROUP) 
            (member ?MEMB2 ?GROUP)) 
         (familyRelation ?MEMB1 ?MEMB2)))) 

(subclass SocialUnit GroupOfPeople)
(documentation SocialUnit EnglishLanguage "A &%GroupOfPeople who all have the same &%home.")

(=>
   (instance ?UNIT SocialUnit)
   (exists (?HOME)
      (=>
         (member ?MEMBER ?UNIT)
         (home ?MEMBER ?HOME))))

(instance ImmediateFamilyFn UnaryFunction)
(domain ImmediateFamilyFn 1 Human)
(range ImmediateFamilyFn FamilyGroup)
(documentation ImmediateFamilyFn EnglishLanguage "(&%ImmediateFamilyFn ?PERSON) denotes the 
immediate family of ?PERSON, i.e. the &%Group consisting of the &%parents of 
?PERSON and anyone of whom ?PERSON is a &%parent.")

(=>
  (equal (ImmediateFamilyFn ?P) ?FAMILY)
  (forall (?MEMBER)
    (=>
      (member ?MEMBER ?FAMILY)
      (exists (?OTHER)
        (or
          (parent ?MEMBER ?OTHER)
          (parent ?OTHER ?MEMBER))))))

(=>
  (equal (ImmediateFamilyFn ?PERSON) ?FAMILY)
  (exists (?MEMBER)
    (and
      (member ?MEMBER ?FAMILY)
      (or
        (parent ?MEMBER ?PERSON)
        (parent ?PERSON ?MEMBER)))))

(instance relative BinaryPredicate)
(instance relative SymmetricRelation)
(domain relative 1 Organism)
(domain relative 2 Organism)

(documentation relative EnglishLanguage "(&%relative ?O1 ?O2) means that ?O1
and ?O2 are relatives, whether through common ancestry (consanguinity),
someone's marriage (affinity), or someone's adoption.  This definition is
intentionally broad, so as to capture a wide array of `familial'
relations.  The notion of who counts as `family' also varies between
cultures, but that aspect of meaning is not addressed here.")

(subrelation familyRelation relative)
(subrelation spouse relative)

(=>
 (and
   (holdsDuring ?T1 (legalRelation ?A1 ?A2))
   (instance ?A1 Organism)
   (instance ?A2 Organism))
 (holdsDuring ?T1  (relative ?A1 ?A2)))


(instance familyRelation BinaryPredicate)
(domain familyRelation 1 Organism) 
(domain familyRelation 2 Organism) 
(documentation familyRelation EnglishLanguage "A very general &%Predicate for biological 
relationships. (&%familyRelation ?ORGANISM1 ?ORGANISM2) means that 
?ORGANISM1 and ?ORGANISM2 are biologically derived from a common ancestor.") 

(=> 
   (familyRelation ?ORGANISM1 ?ORGANISM2) 
   (exists (?ORGANISM3) 
      (and 
         (ancestor ?ORGANISM3 ?ORGANISM1) 
         (ancestor ?ORGANISM3 ?ORGANISM2)))) 

(subrelation ancestor familyRelation)
(instance ancestor TransitiveRelation)
(instance ancestor IrreflexiveRelation)
(domain ancestor 1 Organism)
(domain ancestor 2 Organism)
(documentation ancestor EnglishLanguage "The transitive closure of the &%parent predicate.  
(&%ancestor ?DESCENDANT ?ANCESTOR) means that ?ANCESTOR is either the 
&%parent of ?DESCENDANT or the &%parent of the &%parent of &%DESCENDANT or 
etc.")

(subrelation parent ancestor)

(instance parent BinaryPredicate)
(subrelation parent familyRelation)
(instance parent AsymmetricRelation)
(instance parent IntransitiveRelation)
(domain parent 1 Organism)
(domain parent 2 Organism)
(documentation parent EnglishLanguage "The general relationship of parenthood.  
(&%parent ?CHILD ?PARENT) means that ?PARENT is a biological parent 
of ?CHILD.")

(=>
   (parent ?CHILD ?PARENT)
   (before (BeginFn (WhenFn ?PARENT)) (BeginFn (WhenFn ?CHILD))))

(=>
   (and
      (parent ?CHILD ?PARENT)
      (subclass ?CLASS Organism)
      (instance ?PARENT ?CLASS))
   (instance ?CHILD ?CLASS))

(=>
  (and
    (parent ?CHILD ?PARENT)
    (instance ?REP SexualReproduction)
    (agent ?REP ?PARENT)
    (result ?REP ?CHILD))
  (or
    (mother ?CHILD ?PARENT)
    (father ?CHILD ?PARENT)))

(=>
   (instance ?ORGANISM Organism)
   (exists (?PARENT)
      (parent ?ORGANISM ?PARENT)))

(instance mother SingleValuedRelation)
(subrelation mother parent)
(domain mother 1 Organism)
(domain mother 2 Organism)
(documentation mother EnglishLanguage "The general relationship of motherhood.  
(&%mother ?CHILD ?MOTHER) means that ?MOTHER is the biological mother 
of ?CHILD.")

(=>
   (mother ?CHILD ?MOTHER)
   (attribute ?MOTHER Female))

(instance father SingleValuedRelation)
(subrelation father parent)
(domain father 1 Organism)
(domain father 2 Organism)
(documentation father EnglishLanguage "The general relationship of fatherhood.  
(&%father ?CHILD ?FATHER) means that ?FATHER is the biological father
of ?CHILD.")

(=>
   (father ?CHILD ?FATHER)
   (attribute ?FATHER Male))

(subrelation daughter parent)
(domain daughter 1 Organism)
(domain daughter 2 Organism)
(documentation daughter EnglishLanguage "The general relationship of daughterhood.  
(&%daughter ?CHILD ?PARENT) means that ?CHILD is the biological daughter
of ?PARENT.")

(=>
   (daughter ?CHILD ?PARENT)
   (attribute ?CHILD Female))

(subrelation son parent)
(domain son 1 Organism)
(domain son 2 Organism)
(documentation son EnglishLanguage "The general relationship of being a son.  
(&%son ?CHILD ?PARENT) means that ?CHILD is the biological 
son of ?PARENT.")

(=>
   (son ?CHILD ?PARENT)
   (attribute ?CHILD Male))

(instance sibling BinaryPredicate)
(subrelation sibling familyRelation)
(instance sibling SymmetricRelation)
(instance sibling IrreflexiveRelation)
(domain sibling 1 Organism)
(domain sibling 2 Organism)
(documentation sibling EnglishLanguage "The relationship between two &%Organisms that 
have the same &%mother and &%father.  Note that this relationship does 
not hold between half-brothers, half-sisters, etc.")

(=>
  (and
    (parent ?ORGANISM1 ?PARENT1)
    (parent ?ORGANISM2 ?PARENT1)
    (parent ?ORGANISM1 ?PARENT2)
    (parent ?ORGANISM2 ?PARENT2)
    (not (equal ?ORGANISM1 ?ORGANISM2))
    (not (equal ?PARENT1 ?PARENT2)))
  (sibling ?ORGANISM1 ?ORGANISM2))

(=> 
  (and 
    (sibling ?ORG1 ?ORG2) 
    (parent ?ORG1 ?PARENT)) 
  (parent ?ORG2 ?PARENT))

(=>
  (and
    (parent ?CHILD ?PARENT)
    (attribute ?PARENT Male))
  (father ?CHILD ?PARENT))

(=>
  (and
    (parent ?CHILD ?PARENT)
    (attribute ?PARENT Female))
  (mother ?CHILD ?PARENT))

(subrelation brother sibling)
(instance brother IrreflexiveRelation)
(instance brother TransitiveRelation)
(domain brother 1 Man)
(domain brother 2 Human)
(documentation brother EnglishLanguage "The general relationship of being a brother.  
(&%brother ?MAN ?PERSON) means that ?MAN is the brother of ?PERSON.")

(subrelation sister sibling)
(instance sister IrreflexiveRelation)
(instance sister TransitiveRelation)
(domain sister 1 Woman)
(domain sister 2 Human)
(documentation sister EnglishLanguage "The general relationship of being a sister.  
(&%sister ?WOMAN ?PERSON) means that ?WOMAN is the sister of ?PERSON.")

(instance legalRelation BinaryPredicate)
(instance legalRelation SymmetricRelation)
(domain legalRelation 1 Human)
(domain legalRelation 2 Human)
(documentation legalRelation EnglishLanguage "(&%legalRelation ?AGENT1 ?AGENT2) means 
that ?AGENT1 and ?AGENT2 are relatives by virtue of a legal relationship.  
Some examples include marriage, adoption, etc.")

(=>
   (legalRelation ?AGENT1 ?AGENT2)
   (exists (?DECLARE ?OBLIGATION)
      (and
         (instance ?DECLARE Declaring)
         (confersObligation ?OBLIGATION ?DECLARE ?AGENT1)
         (confersObligation ?OBLIGATION ?DECLARE ?AGENT2))))

(instance acquaintance BinaryPredicate)

(documentation acquaintance EnglishLanguage "(&%acquaintance ?H1 ?H2) means that ?H1 has
met and knows something about ?H2, such as ?H2's name and appearance.
Statements made with this predicate should be temporally specified with
&%holdsDuring.  Note that &%acquaintance is not symmetric.  For the
symmetric version, see &%mutualAcquaintance.")

(domain acquaintance 1 Human)
(domain acquaintance 2 Human)

(instance mutualAcquaintance BinaryPredicate)
(instance mutualAcquaintance SymmetricRelation)

(documentation mutualAcquaintance EnglishLanguage "(&%mutualAcquaintance ?H1 ?H2) means
that ?H1 and ?H2 have met each other and know something about each other,
such as name and appearance.  Statements made with this predicate should
be temporally specified with &%holdsDuring.  See also the weaker,
non-symmetric version of this predicate, &%acquaintance.")

(domain mutualAcquaintance 1 Human)
(domain mutualAcquaintance 2 Human)
(subrelation mutualAcquaintance acquaintance)
(subrelation spouse mutualAcquaintance)

(subrelation spouse legalRelation)
(instance spouse IrreflexiveRelation)
(instance spouse SymmetricRelation)
(domain spouse 1 Human)
(domain spouse 2 Human)
(documentation spouse EnglishLanguage "The relationship of marriage between two &%Humans.")

(subrelation husband spouse)
(instance husband AsymmetricRelation)
(instance husband IrreflexiveRelation)
(domain husband 1 Man)
(domain husband 2 Woman)
(inverse husband wife)
(documentation husband EnglishLanguage "(&%husband ?MAN ?WOMAN) means that ?MAN is the 
husband of ?WOMAN.")

(subrelation wife spouse)
(instance wife AsymmetricRelation)
(instance wife IrreflexiveRelation)
(domain wife 1 Woman)
(domain wife 2 Man)
(documentation wife EnglishLanguage "(&%wife ?WOMAN ?MAN) means that ?WOMAN is the wife of 
?MAN.")

(subclass EthnicGroup GroupOfPeople) 
(documentation EthnicGroup EnglishLanguage "A &%GroupOfPeople whose &%members originate 
from the same &%GeographicArea or share the same &%Language and/or cultural 
practices.") 

(subclass BeliefGroup GroupOfPeople)
(documentation BeliefGroup EnglishLanguage "A &%GroupOfPeople whose &%members share a belief 
or set of beliefs.")

(=> 
   (instance ?GROUP BeliefGroup) 
   (exists (?BELIEF)
      (forall (?MEMB)
         (=>
            (member ?MEMB ?GROUP)
            (believes ?MEMB ?BELIEF)))))

(subclass Organization Group) 

;; NS: delete.
;; (subclass Organization CognitiveAgent)

;; NS: add.
(subclass Organization Agent)

(documentation Organization EnglishLanguage "An &%Organization is a
corporate or similar institution. The &%members of an &%Organization
typically have a common purpose or function. Note that this class also
covers divisions, departments, etc. of organizations.  For example,
both the Shell Corporation and the accounting department at Shell
would both be instances of &%Organization.  Note too that the
existence of an &%Organization is dependent on the existence of at
least one &%member (since &%Organization is a subclass of
&%Collection).  Accordingly, in cases of purely legal organizations, a
fictitious &%member should be assumed.")

(=>
   (instance ?ORG Organization)
   (exists (?PURP)
      (forall (?MEMBER)
         (=>
            (member ?MEMBER ?ORG)
            (hasPurpose ?MEMBER ?PURP)))))

(=>
   (and
      (instance ?ORG Organization) 
      (member ?AGENT ?ORG))
   (instance ?AGENT Agent))

(instance employs BinaryPredicate)
(domain employs 1 Organization)
(domain employs 2 CognitiveAgent)
(documentation employs EnglishLanguage "(&%employs ?ORG ?PERSON) means that ?ORG has 
hired ?PERSON and currently retains ?PERSON, on a salaried, hourly 
or contractual basis, to provide services in exchange for monetary 
compensation.")

(subclass PoliticalOrganization Organization)
(documentation PoliticalOrganization EnglishLanguage "An
&%Organization that is attempting to bring about some sort of
political change.")

(=>
   (instance ?POL PoliticalOrganization)
   (exists (?PROC)
      (and
         (instance ?PROC PoliticalProcess)
         (agent ?PROC ?POL)))) 

(subclass MilitaryForce PoliticalOrganization)
(documentation MilitaryForce EnglishLanguage "&%MilitaryForce is the subclass of 
&%Organizations that are organized along military lines and for the 
purpose of either defensive or offensive combat, whether or not 
the force is an official &%GovernmentOrganization.")

(=>
  (instance ?ORG MilitaryForce)
  (capability ViolentContest agent ?ORG))

(subclass MilitaryOrganization MilitaryForce)
(subclass MilitaryOrganization GovernmentOrganization)
(documentation MilitaryOrganization EnglishLanguage "Any heavily armed &%Organization 
that is part of a &%Government and that is charged with representing the 
&%Government in international conflicts.") 

(subclass ParamilitaryOrganization MilitaryForce)
(disjoint ParamilitaryOrganization GovernmentOrganization)
(documentation ParamilitaryOrganization EnglishLanguage "An &%Organization which is much like 
a &%MilitaryOrganization, e.g. it is made up of armed fighters, except that it 
is not associated with a &%Government.")

(subclass GovernmentOrganization Organization)
(documentation GovernmentOrganization EnglishLanguage "&%GovernmentOrganization is the 
class of official &%Organizations that are concerned with the government 
of a &%GeopoliticalArea at some level.  They may be a &%subOrganization 
of a government.") 

(<=>
   (instance ?ORG GovernmentOrganization)
   (exists (?GOV)
      (and
         (instance ?GOV Government)
         (subOrganization ?ORG ?GOV))))

(=>
   (and
      (subOrganization ?ORG ?GOV)
      (instance ?GOV GovernmentOrganization))
   (instance ?ORG GovernmentOrganization))

(subclass Government GovernmentOrganization)

;; NS: add.
(subclass Government LegalAgent)

(documentation Government EnglishLanguage "The ruling body of a &%GeopoliticalArea.") 

(instance GovernmentFn UnaryFunction)
(domain GovernmentFn 1 GeopoliticalArea)
(range GovernmentFn Government)
(documentation GovernmentFn EnglishLanguage "(&%GovernmentFn ?AREA) denotes the 
&%Government of the &%GeopoliticalArea ?AREA.  For example, 
(&%GovernmentFn &%UnitedStates) denotes the Federal-level government of 
the United States, (&%GovernmentFn &%PuertoRico) denotes the government of 
the Commonwealth of Puerto Rico.") 

(subclass PoliceOrganization GovernmentOrganization)
(documentation PoliceOrganization EnglishLanguage "Any &%GovernmentOrganization  
that is charged with domestic enforcement of the laws of the &%Government.")

(subclass JudicialOrganization Organization)
(documentation JudicialOrganization EnglishLanguage "&%JudicialOrganization is the class 
of &%Organizations whose primary purpose is to render judgments according 
to the statutes or regulations of a government or other organization.  
Judicial bodies are not necessarily government organizations, for example, 
those associated with sporting associations.") 

(subclass EducationalOrganization Organization) 
(documentation EducationalOrganization EnglishLanguage "A &%EducationalOrganization is 
an institution of learning. Some examples are public and private K-12 
schools, and colleges and universities.") 

(subclass ReligiousOrganization Organization) 
(subclass ReligiousOrganization BeliefGroup)
(documentation ReligiousOrganization EnglishLanguage "An &%Organization whose members 
share a set of religious beliefs.") 

(subrelation subOrganization subCollection)
(instance subOrganization PartialOrderingRelation)
(domain subOrganization 1 Organization) 
(domain subOrganization 2 Organization) 
(documentation subOrganization EnglishLanguage "(&%subOrganization ?ORG1 ?ORG2) means 
that ?ORG1 is an &%Organization which is a part of the &%Organization 
?ORG2.  Note that &%subOrganization is a &%ReflexiveRelation, so every 
&%Organization is a &%subOrganization of itself.") 

(instance citizen BinaryPredicate)
(instance citizen AsymmetricRelation) 
(domain citizen 1 Human) 
(domain citizen 2 Nation) 
(documentation citizen EnglishLanguage "(&%citizen ?PERSON ?NATION) means that the 
&%Human ?PERSON is a citizen of &%Nation ?NATION.") 

;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;
;;   QUALITIES   ;;
;;;;;;;;;;;;;;;;;;;

;; INCLUDES 'MEREOTOPOLOGY'
;; INCLUDES 'PROCESSES'
;; INCLUDES 'OBJECTS'

(subclass FieldOfStudy Proposition)
(documentation FieldOfStudy EnglishLanguage "An academic or applied discipline with 
recognized experts and with a core of accepted theory or practice.  Note 
that &%FieldOfStudy is a &%subclass of &%Proposition, because a 
&%FieldOfStudy is understood to be a body of abstract, informational 
content, with varying degrees of certainty attached to each element of 
this content.")  

(subclass Procedure Proposition)
(documentation Procedure EnglishLanguage "A sequence-dependent specification.  Some 
examples are &%ComputerPrograms, finite-state machines, cooking recipes, 
musical scores, conference schedules, driving directions, and the scripts 
of plays and movies.")

(subclass ComputerProgram Procedure)
(documentation ComputerProgram EnglishLanguage "A set of instructions in a computer 
programming language that can be executed by a computer.")

(subclass ComputerProgramming ContentDevelopment)
(documentation ComputerProgramming EnglishLanguage "The process of developing a 
&%ComputerProgram")

(=>
  (instance ?CP ComputerProgramming)
  (exists (?C)
    (and
      (instance ?C ComputerProgram)
      (result ?CP ?C))))

(subclass Plan Procedure)
(documentation Plan EnglishLanguage "A specification of a sequence of &%Processes which 
is intended to satisfy a specified purpose at some future time.")

(=>
    (and
       (instance ?PLAN Plan)
       (instance ?OBJ ContentBearingObject)
       (containsInformation ?OBJ ?PLAN))
    (exists (?PLANNING)
       (and
          (instance ?PLANNING Planning)
          (result ?PLANNING ?OBJ))))

(subclass Argument Proposition)
(partition Argument DeductiveArgument InductiveArgument)
(documentation Argument EnglishLanguage "Any proposition which has the form of a deductive 
or inductive argument, i.e. a set of premises which, it is claimed, imply 
a conclusion.") 

(=>
   (instance ?REASON Reasoning)
   (exists (?ARGUMENT)
      (and
         (instance ?ARGUMENT Argument)
         (realization ?REASON ?ARGUMENT))))

(=>
   (instance ?ARGUMENT Argument)
   (exists (?PREMISES ?CONCLUSION)
      (and
         (equal (PremisesFn ?ARGUMENT) ?PREMISES)
         (conclusion ?CONCLUSION ?ARGUMENT))))

(subclass DeductiveArgument Argument)
(partition DeductiveArgument ValidDeductiveArgument InvalidDeductiveArgument)
(documentation DeductiveArgument EnglishLanguage "An &%Argument which has the form of a 
deduction, i.e. it is claimed that the set of &%premises &%entails the 
&%conclusion.")

(subclass ValidDeductiveArgument DeductiveArgument)
(documentation ValidDeductiveArgument EnglishLanguage "A &%DeductiveArgument which is 
valid, i.e. the set of &%premises in fact &%entails the &%conclusion.")

(=>
   (and
      (instance ?ARGUMENT ValidDeductiveArgument)
      (equal ?PREMISES (PremisesFn ?ARGUMENT))
      (conclusion ?CONCLUSION ?ARGUMENT))
   (exists (?FORMULA1 ?FORMULA2)
      (and
         (containsInformation ?FORMULA1 ?PREMISES)
         (containsInformation ?FORMULA2 ?CONCLUSION)
         (entails ?PREMISES ?CONCLUSION))))

(subclass InvalidDeductiveArgument DeductiveArgument)
(documentation InvalidDeductiveArgument EnglishLanguage "&%DeductiveArguments that are not 
&%ValidDeductiveArguments, i.e. it is not the case that the set of &%premises 
in fact &%entails the &%conclusion.")
     
(subclass Explanation DeductiveArgument)
(documentation Explanation EnglishLanguage "An &%Argument where the conclusion is an 
observed fact and the premises are other facts which collectively imply 
the conclusion.  Note that this is the they hypothetico-deductive model 
of explanation.")

(subclass InductiveArgument Argument)
(documentation InductiveArgument EnglishLanguage "An &%Argument which is inductive, i.e. it is 
claimed that a set of specific cases makes the &%conclusion, which generalizes 
these cases, more likely to be true.")

(instance premise BinaryPredicate)
(instance premise TotalValuedRelation)
(domain premise 1 Argument)
(domain premise 2 Proposition)
(documentation premise EnglishLanguage "(&%premise ?ARGUMENT ?PROPOSITION) means that the 
&%Proposition ?PROPOSITION is an explicit assumption of the &%Argument 
?ARGUMENT.")

(instance PremisesFn UnaryFunction)
(domain PremisesFn 1 Argument)
(range PremisesFn Proposition)
(documentation PremisesFn EnglishLanguage "(&%PremisesFn ?ARGUMENT) returns the complete 
set of &%premises of the &%Argument ?ARGUMENT.")

(=>
   (and
      (instance ?ARGUMENT Argument)
      (equal ?PREMISES (PremisesFn ?ARGUMENT)))
   (<=>
      (subProposition ?PROPOSITION ?PREMISES)
      (premise ?ARGUMENT ?PROPOSITION)))

(instance conclusion BinaryPredicate)
(instance conclusion SingleValuedRelation)
(instance conclusion TotalValuedRelation)
(domain conclusion 1 Argument)
(domain conclusion 2 Proposition)
(documentation conclusion EnglishLanguage "(&%conclusion ?ARGUMENT ?PROPOSITION) means that
the &%Proposition ?PROPOSITION is the conclusion explicitly drawn from the 
&%Argument ?ARGUMENT.  Note that it may or may not be the case that ?ARGUMENT 
&%entails ?PROPOSITION.")

(instance consistent BinaryPredicate)
(instance consistent SymmetricRelation)
(domain consistent 1 Proposition)
(domain consistent 2 Proposition)
(documentation consistent EnglishLanguage "(&%consistent ?PROP1 ?PROP2) means that the two 
&%Propositions ?PROP1 and ?PROP2 are consistent with one another, i.e. it 
is possible for both of them to be true at the same time.")

(instance orientation SpatialRelation)
(instance orientation TernaryPredicate)
(domain orientation 1 Object)
(domain orientation 2 Object)
(domain orientation 3 PositionalAttribute)
(documentation orientation EnglishLanguage "A general &%Predicate for indicating how two 
&%Objects are oriented with respect to one another.  For example, 
(orientation ?OBJ1 ?OBJ2 North) means that ?OBJ1 is north of ?OBJ2, and 
(orientation ?OBJ1 ?OBJ2 Vertical) means that ?OBJ1 is positioned 
vertically with respect to ?OBJ2.")

(=>
   (and
      (orientation ?OBJ1 ?OBJ2 ?ATTR1)
      (contraryAttribute @ROW)
      (inList ?ATTR1 (ListFn @ROW))
      (inList ?ATTR2 (ListFn @ROW))
      (not (equal ?ATTR1 ?ATTR2)))
   (not
      (orientation ?OBJ1 ?OBJ2 ?ATTR2)))

(instance direction CaseRole)
(domain direction 1 Process)
(domain direction 2 PositionalAttribute)
(subrelation direction involvedInEvent)
(documentation direction EnglishLanguage "(&%direction ?PROC ?ATTR) means that the 
&%Process ?PROC is moving in the direction ?ATTR.  For example, one 
would use this &%Predicate to represent the fact that Max is moving 
&%North.")

(=>
   (holdsDuring ?TIME (direction ?PROC ?ATTR1))
   (forall (?ATTR2)
      (=>
         (holdsDuring ?TIME (direction ?PROC ?ATTR2))
         (equal ?ATTR2 ?ATTR1))))

(instance faces BinaryPredicate)
(domain faces 1 Object)
(domain faces 2 DirectionalAttribute)
(documentation faces EnglishLanguage "(&%faces ?OBJ ?DIRECTION) means that the front of 
?OBJ (see &%FrontFn) is positioned towards the compass direction ?DIRECTION.  
More precisely, it means that if a line were extended from the center of 
?DIRECTION, the line would intersect with the front of ?OBJ before it 
intersected with its back (see &%BackFn).")

(=>
   (holdsDuring ?TIME (faces ?PROC ?ATTR1))
   (forall (?ATTR2)
      (=>
         (holdsDuring ?TIME (faces ?PROC ?ATTR2))
         (equal ?ATTR2 ?ATTR1))))

(subclass TruthValue RelationalAttribute)
(documentation TruthValue EnglishLanguage "The &%Class of truth values, e.g. &%True and 
&%False.  These are &%Attributes of &%Sentences and &%Propositions.")

(=>
   (and
      (property ?ITEM ?VALUE)
      (instance ?VALUE TruthValue))
   (or
      (instance ?ITEM Sentence)
      (instance ?ITEM Proposition)))

(instance True TruthValue)
(documentation True EnglishLanguage "The &%TruthValue of being true.")

(instance False TruthValue)
(contraryAttribute False True)
(documentation False EnglishLanguage "The &%TruthValue of being false.")

(subrelation truth property)
(domain truth 1 Sentence)
(domain truth 2 TruthValue)
(documentation truth EnglishLanguage "The &%BinaryPredicate that relates a &%Sentence 
to its &%TruthValue.")

(subclass PositionalAttribute RelationalAttribute)
(documentation PositionalAttribute EnglishLanguage "&%Attributes characterizing the 
orientation of an &%Object, e.g. &%Vertical versus &%Horizontal, &%Left 
versus &%Right etc.")

(subclass DirectionalAttribute PositionalAttribute)
(documentation DirectionalAttribute EnglishLanguage "The subclass of &%PositionalAttributes 
that concern compass directions.") 

(=>
  (and
    (instance ?DIRECT DirectionalAttribute)
    (orientation ?OBJ1 ?OBJ2 ?DIRECT)
    (orientation ?OBJ2 ?OBJ3 ?DIRECT))
  (between ?OBJ1 ?OBJ2 ?OBJ3))

(instance North DirectionalAttribute)
(contraryAttribute North South East West)
(documentation North EnglishLanguage "The compass direction of &%North.")

(instance South DirectionalAttribute)
(documentation South EnglishLanguage "The compass direction of &%South.")

(<=>
   (orientation ?OBJ1 ?OBJ2 North)
   (orientation ?OBJ2 ?OBJ1 South))

(instance East DirectionalAttribute)
(documentation East EnglishLanguage "The compass direction of &%East.")

(instance West DirectionalAttribute)
(documentation West EnglishLanguage "The compass direction of &%West.")

(<=>
   (orientation ?OBJ1 ?OBJ2 East)
   (orientation ?OBJ2 ?OBJ1 West))

(instance Vertical PositionalAttribute)
(documentation Vertical EnglishLanguage "Attribute used to indicate that an &%Object 
is positioned height-wise with respect to another &%Object.")

(<=>
   (orientation ?OBJ1 ?OBJ2 Vertical)
   (orientation ?OBJ2 ?OBJ1 Vertical))

(instance Horizontal PositionalAttribute)
(contraryAttribute Horizontal Vertical)
(documentation Horizontal EnglishLanguage "Attribute used to indicate that an &%Object 
is positioned width-wise with respect to another &%Object.")

(<=>
   (orientation ?OBJ1 ?OBJ2 Horizontal)
   (orientation ?OBJ2 ?OBJ1 Horizontal))

(subclass SymmetricPositionalAttribute PositionalAttribute)
(documentation SymmetricPositionalAttribute EnglishLanguage "&%SymmetricAttribute is the class of 
&%PositionalAttribute that hold between two items regardless of their 
order or orientation.")
(=>
  (and
    (instance ?P SymmetricPositionalAttribute)
    (orientation ?O1 ?O2 ?P))
  (orientation ?O2 ?O1 ?P))

(subclass AntiSymmetricPositionalAttribute PositionalAttribute)
(documentation AntiSymmetricPositionalAttribute EnglishLanguage "&%AntiSymmetricPositionalAttribute is the class of 
&%PositionalAttribute that hold in only one direction.  I.e. two objects cannot
simulataneously be &%On each other.")
(=>
  (and
    (instance ?P AntiSymmetricPositionalAttribute)
    (orientation ?O1 ?O2 ?P))
  (not (orientation ?O2 ?O1 ?P)))

(instance Above PositionalAttribute)
(instance Above AntiSymmetricPositionalAttribute)
(contraryAttribute Above Below)
(documentation Above EnglishLanguage "This is a &%PositionalAttribute derived from the 
up/down schema and not involving contact.  Note that this means directly 
above, i.e., if one object is &%Above another object, then the projections 
of the two objects overlap.")

(=>
   (orientation ?OBJ1 ?OBJ2 Above)
   (not
      (connected ?OBJ1 ?OBJ2)))

(instance Below PositionalAttribute)
(instance Below AntiSymmetricPositionalAttribute)
(documentation Below EnglishLanguage "This &%PositionalAttribute is derived from the 
up/down schema and may or may not involve contact.  Note that this means 
directly below, i.e., if one object is &%Below another object, then the 
projections of the two objects overlap.")

(<=>
   (orientation ?OBJ1 ?OBJ2 Below)
   (or
      (orientation ?OBJ2 ?OBJ1 On)
      (orientation ?OBJ2 ?OBJ1 Above)))

(instance Adjacent SymmetricPositionalAttribute)
(documentation Adjacent EnglishLanguage "Used to assert that an object ?OBJ1 is close 
to, near or abutting ?OBJ2.  This &%PositionalAttribute covers the 
following common sense notions:  adjoins, abuts, is contiguous to, 
is juxtaposed, and is close to.") 

(<=>
   (orientation ?OBJ1 ?OBJ2 Adjacent)
   (or
      (orientation ?OBJ1 ?OBJ2 Near)
      (connected ?OBJ1 ?OBJ2)))

(instance Left PositionalAttribute)
(instance Left AntiSymmetricPositionalAttribute)
(documentation Left EnglishLanguage "This &%PositionalAttribute is derived from the 
left/right schema.  Note that this means directly to the left, so that, 
if one object is to the left of another, then the projections of the 
two objects overlap.")

(instance Right PositionalAttribute)
(instance Right AntiSymmetricPositionalAttribute)
(contraryAttribute Right Left)
(documentation Right EnglishLanguage "This &%PositionalAttribute is derived from the 
left/right schema.  Note that this means directly to the right, so that, 
if one object is to the right of another, then the projections of the 
two objects overlap.")

(<=>
   (orientation ?OBJ1 ?OBJ2 Right)
   (orientation ?OBJ2 ?OBJ1 Left)) 

(instance Near SymmetricPositionalAttribute)
(documentation Near EnglishLanguage "The relation of common sense adjacency.  Note that, if 
an object is &%Near another object, then the objects are not &%connected.")

(=>
   (orientation ?OBJ1 ?OBJ2 Near)
   (not
      (connected ?OBJ1 ?OBJ2)))

(=>
   (orientation ?OBJ1 ?OBJ2 Near)
   (orientation ?OBJ2 ?OBJ1 Near))

(instance On AntiSymmetricPositionalAttribute)
(documentation On EnglishLanguage "This is used to assert that an object is on top of 
another object, and it is derived from the up/down schema and involves 
contact.")

(=>
   (orientation ?OBJ1 ?OBJ2 On)
   (connected ?OBJ1 ?OBJ2))

(=>
   (orientation ?OBJ1 ?OBJ2 On)
   (located ?OBJ1 ?OBJ2))

(=>
   (orientation ?OBJ1 ?OBJ2 On)
   (not
      (orientation ?OBJ2 ?OBJ1 On)))

(subclass TimeZone RelationalAttribute)
(documentation TimeZone EnglishLanguage "An &%Attribute which is used to specify coordinates 
in which time measures are uniform, i.e. all time devices are synchronized to 
the same &%TimePositions.")

(instance CoordinatedUniversalTimeZone TimeZone)
(documentation CoordinatedUniversalTimeZone EnglishLanguage "A &%TimeZone which functions 
as the standard time zone.  It is also known as Zulu time (in the military), 
Greenwich Mean Time, and the Western European time zone.  Note that whenever 
a &%TimeZone is not specified, the &%TimePosition is understood to be with 
respect to the &%CoordinatedUniversalTimeZone.") 

(instance PacificTimeZone TimeZone)
(documentation PacificTimeZone EnglishLanguage "A &%TimeZone that covers much of the 
western part of the United States.")

(=>
   (equal (RelativeTimeFn ?TIME1 PacificTimeZone) ?TIME2) 
   (equal ?TIME2 (AdditionFn ?TIME1 8)))

(instance MountainTimeZone TimeZone)
(documentation MountainTimeZone EnglishLanguage "A &%TimeZone that covers much of the 
Rocky Mountain region of the United States.")

(=>
   (equal (RelativeTimeFn ?TIME1 MountainTimeZone) ?TIME2) 
   (equal ?TIME2 (AdditionFn ?TIME1 7)))

(instance CentralTimeZone TimeZone)
(documentation CentralTimeZone EnglishLanguage "A &%TimeZone that covers much of the 
midwestern United States.")

(=>
   (equal (RelativeTimeFn ?TIME1 CentralTimeZone) ?TIME2) 
   (equal ?TIME2 (AdditionFn ?TIME1 6)))

(instance EasternTimeZone TimeZone)
(documentation EasternTimeZone EnglishLanguage "A &%TimeZone that covers much of the 
eastern United States.")

(=>
   (equal (RelativeTimeFn ?TIME1 EasternTimeZone) ?TIME2) 
   (equal ?TIME2 (AdditionFn ?TIME1 5)))

(instance RelativeTimeFn BinaryFunction)
(instance RelativeTimeFn TemporalRelation)
(instance RelativeTimeFn TotalValuedRelation)
(domain RelativeTimeFn 1 TimePosition)
(domain RelativeTimeFn 2 TimeZone)
(range RelativeTimeFn TimePosition)
(documentation RelativeTimeFn EnglishLanguage "A means of converting &%TimePositions 
between different &%TimeZones.  (&%RelativeTimeFn ?TIME ?ZONE) 
denotes the &%TimePosition in &%CoordinatedUniversalTime that is 
contemporaneous with the &%TimePosition ?TIME in &%TimeZone ?ZONE.
For example, (&%RelativeTimeFn (&%MeasureFn 14 &%HourDuration) &%EasternTimeZone) 
would return the value (&%MeasureFn 19 &%HourDuration).")  

(subclass SocialRole RelationalAttribute) 
(documentation SocialRole EnglishLanguage "The &%Class of all &%Attributes that 
specify the position or status of a &%CognitiveAgent within an 
&%Organization or other &%Group.")

(=>
   (and
      (attribute ?PERSON ?ATTRIBUTE)
      (instance ?ATTRIBUTE SocialRole))
   (instance ?PERSON Human))

(instance Unemployed SocialRole)
(documentation Unemployed EnglishLanguage "The &%Attribute of a &%CognitiveAgent when 
he/she is unemployed.")

(<=>
   (and
      (instance ?PERSON Human)
      (forall (?ORG)
         (not 
            (employs ?ORG ?PERSON))))
   (attribute ?PERSON Unemployed))

(subclass Position SocialRole) 
(documentation Position EnglishLanguage "A formal position of reponsibility within an 
&%Organization. Examples of &%Positions include president, laboratory 
director, senior researcher, sales representative, etc.") 

(instance occupiesPosition TernaryPredicate) 
(domain occupiesPosition 1 Human) 
(domain occupiesPosition 2 Position) 
(domain occupiesPosition 3 Organization) 
(documentation occupiesPosition EnglishLanguage "(&%occupiesPosition ?PERSON ?POSITION ?ORG) 
means that ?PERSON holds the &%Position ?POSITION at &%Organization ?ORG. 
For example, (&%occupiesPosition &%TomSmith &%ResearchDirector 
&%AcmeLaboratory) means that &%TomSmith is a research director at Acme Labs.") 

(=>
  (occupiesPosition ?AGENT ?POSITION ?ORG)
  (attribute ?AGENT ?POSITION))

(=> 
   (employs ?ORG ?PERSON)
   (exists (?POSITION)
      (occupiesPosition ?PERSON ?POSITION ?ORG)))

(=>
   (occupiesPosition ?PERSON ?POSITION ?ORGANIZATION)
   (member ?PERSON ?ORGANIZATION))

(subclass NormativeAttribute RelationalAttribute)
(documentation NormativeAttribute EnglishLanguage "A &%Class containing all of the 
&%Attributes that are specific to morality, legality, aesthetics, 
etiquette, etc.  Many of these attributes express a judgement that 
something ought or ought not to be the case.")

(instance modalAttribute BinaryPredicate)
(instance modalAttribute AsymmetricRelation)
(instance modalAttribute IrreflexiveRelation)
(subrelation modalAttribute property)
(domain modalAttribute 1 Formula)
(domain modalAttribute 2 NormativeAttribute)
(documentation modalAttribute EnglishLanguage "A &%BinaryRelation that is used to state the 
normative force of a &%Proposition.  (&%modalAttribute ?FORMULA ?PROP) means 
that the &%Proposition expressed by ?FORMULA has the &%NormativeAttribute 
?PROP.  For example, (&%modalAttribute (&%exists (?ACT ?OBJ) (&%and 
(&%instance ?ACT &%Giving) (&%agent ?ACT John) (&%patient ?ACT ?OBJ) 
(&%destination ?ACT Tom))) &%Obligation) means that John is obligated to give 
Tom something.")  

(=>
   (and
      (modalAttribute ?FORMULA1 ?PROP)
      (entails ?FORMULA1 ?FORMULA2))
   (modalAttribute ?FORMULA2 ?PROP))

(=>
    (modalAttribute ?FORMULA Permission)
    (modalAttribute ?FORMULA Possibility))

(subclass SubjectiveAssessmentAttribute NormativeAttribute)
(disjoint SubjectiveAssessmentAttribute ObjectiveNorm)
(documentation SubjectiveAssessmentAttribute EnglishLanguage "The &%Class of &%NormativeAttributes
which lack an objective criterion for their attribution, i.e. the attribution of 
these &%Attributes varies from subject to subject and even with respect to the 
same subject over time.  This &%Class is, generally speaking, only used when 
mapping external knowledge sources to the SUMO.  If a term from such a knowledge 
source seems to lack objective criteria for its attribution, it is assigned to 
this &%Class.")

(=>
    (and
        (attribute ?OBJ ?ATR)
        (instance ?ATR SubjectiveAssessmentAttribute))
    (exists (?TIME ?JUDGE ?AGENT)
    (and
          (instance ?JUDGE Judging)
          (agent ?JUDGE ?AGENT)
          (patient ?JUDGE ?OBJ)
          (patient ?JUDGE
                (attribute ?OBJ ?ATR))
          (holdsDuring ?TIME
            (believes ?AGENT
              (property ?OBJ ?ATR))))))

(subclass SubjectiveStrongPositiveAttribute SubjectiveAssessmentAttribute)
(documentation SubjectiveStrongPositiveAttribute EnglishLanguage "The &%Class 
of &%NormativeAttributes which lack an objective criterion for their 
attribution, though statistically tends to be used in a strongly positive sense. 
 This &%Class is, generally speaking, only used when mapping external knowledge 
sources to the SUMO.  If a term from such a knowledge source seems to lack objective 
criteria for its attribution, it is assigned to this &%Class.")

(subclass SubjectiveWeakPositiveAttribute SubjectiveAssessmentAttribute)
(documentation SubjectiveWeakPositiveAttribute EnglishLanguage "The &%Class 
of &%NormativeAttributes which lack an objective criterion for their 
attribution, though statistically tends to be used in a weakly positive sense. 
 This &%Class is, generally speaking, only used when mapping external knowledge 
sources to the SUMO.  If a term from such a knowledge source seems to lack objective 
criteria for its attribution, it is assigned to this &%Class.")

(subclass SubjectiveStrongNegativeAttribute SubjectiveAssessmentAttribute)
(documentation SubjectiveStrongNegativeAttribute EnglishLanguage "The &%Class 
of &%NormativeAttributes which lack an objective criterion for their 
attribution, though statistically tends to be used in a strongly negative sense. 
 This &%Class is, generally speaking, only used when mapping external knowledge 
sources to the SUMO.  If a term from such a knowledge source seems to lack objective 
criteria for its attribution, it is assigned to this &%Class.")

(subclass SubjectiveWeakNegativeAttribute SubjectiveAssessmentAttribute)
(documentation SubjectiveWeakNegativeAttribute EnglishLanguage "The &%Class 
of &%NormativeAttributes which lack an objective criterion for their 
attribution, though statistically tends to be used in a weakly negative sense. 
 This &%Class is, generally speaking, only used when mapping external knowledge 
sources to the SUMO.  If a term from such a knowledge source seems to lack objective 
criteria for its attribution, it is assigned to this &%Class.")

(subclass ObjectiveNorm NormativeAttribute)
(documentation ObjectiveNorm EnglishLanguage "The &%Class of &%NormativeAttributes that are 
associated with an objective criterion for their attribution, i.e. there is 
broad consensus about the cases where these attributes are applicable.")

(subclass ContestAttribute ObjectiveNorm)
(documentation ContestAttribute EnglishLanguage "A &%Class containing &%Attributes that are 
specific to participants in a &%Contest.  In particular, these &%Attributes 
indicate the position of one of the &%agents in the &%Contest with respect 
to other &%agent(s) in the &%Contest.   Some examples of these &%Attributes 
are winning, losing, won, lost, etc.")

(=>
   (and
      (property ?THING ?ATTR)
      (instance ?ATTR ContestAttribute))
   (exists (?CONTEST)
      (and
         (instance ?CONTEST Contest)
         (or
            (agent ?CONTEST ?THING)
            (patient ?CONTEST ?THING)
            (subProcess ?THING ?CONTEST)))))

(subclass AlethicAttribute ObjectiveNorm)
(documentation AlethicAttribute EnglishLanguage "A &%Class containing all of the &%Attributes 
relating to the notions of possibility and necessity.")

(instance Possibility AlethicAttribute)
(documentation Possibility EnglishLanguage "Attribute that applies to &%Propositions that are 
possible, i.e. true in at least one possible world.")

(instance Necessity AlethicAttribute)
(documentation Necessity EnglishLanguage "Attribute that applies to &%Propositions that are 
necessary, i.e. true in every possible world.")

(<=>
   (modalAttribute ?FORMULA Necessity)
   (not (modalAttribute (not ?FORMULA) Possibility)))

(=>
   (modalAttribute ?FORMULA Necessity)
   (modalAttribute ?FORMULA Possibility))

(instance holdsRight BinaryPredicate)
(instance holdsRight AsymmetricRelation)
(domain holdsRight 1 Formula)
(domain holdsRight 2 CognitiveAgent)
(documentation holdsRight EnglishLanguage "Expresses a relationship between a &%Formula 
and a &%CognitiveAgent whereby the &%CognitiveAgent has the right to 
bring it about that the &%Formula is true.")

(instance confersRight TernaryPredicate)
(domain confersRight 1 Formula)
(domain confersRight 2 Entity)
(domain confersRight 3 CognitiveAgent)
(documentation confersRight EnglishLanguage "Expresses the relationship between a &%Formula, 
an &%Entity, and a &%CognitiveAgent when the &%Entity authorizes the 
&%CognitiveAgent to bring it about that the &%Formula is true.")

(=>
   (confersRight ?FORMULA ?AGENT1 ?AGENT2)
   (holdsRight ?FORMULA ?AGENT2))

(instance holdsObligation BinaryPredicate)
(instance holdsObligation AsymmetricRelation)
(domain holdsObligation 1 Formula)
(domain holdsObligation 2 CognitiveAgent)
(relatedInternalConcept holdsObligation holdsRight)
(documentation holdsObligation EnglishLanguage "Expresses a relationship between a 
&%Formula and a &%CognitiveAgent whereby the &%CognitiveAgent has 
the obligation to bring it about that the &%Formula is true.")

(instance confersObligation TernaryPredicate)
(domain confersObligation 1 Formula)
(domain confersObligation 2 Entity)
(domain confersObligation 3 CognitiveAgent)
(relatedInternalConcept confersObligation confersRight)
(documentation confersObligation EnglishLanguage "Expresses the relationship between a 
a &%Formula, an &%Entity, and a &%CognitiveAgent when the &%Entity 
obligates the &%CognitiveAgent to bring it about that the &%Formula is 
true.")

(=>
   (confersObligation ?FORMULA ?AGENT1 ?AGENT2)
   (holdsObligation ?FORMULA ?AGENT2))
   
(subclass DeonticAttribute ObjectiveNorm)
(documentation DeonticAttribute EnglishLanguage "A &%Class containing all of the &%Attributes 
relating to the notions of permission, obligation, and prohibition.")

(instance Permission DeonticAttribute)
(documentation Permission EnglishLanguage "&%Attribute that applies to &%Propositions that an 
&%Agent is permitted, by some authority, to make true.")

(instance Obligation DeonticAttribute)
(documentation Obligation EnglishLanguage "&%Attribute that applies to &%Propositions that an 
&%Agent is required, by some authority, to make true.")

(<=>
   (modalAttribute ?FORMULA Obligation)
   (not (modalAttribute (not ?FORMULA) Permission)))

(=>
   (modalAttribute ?FORMULA Obligation)
   (modalAttribute ?FORMULA Permission))

(subAttribute Law Obligation)
(instance Law DeonticAttribute)
(documentation Law EnglishLanguage "&%Attribute that applies to &%Propositions that are 
required by a government or a branch of the government and that are enforced 
with penalties for noncompliance.  These &%Propositions may be codified as 
legislation or they may be more informal, as in the case of government policy.")

(subAttribute Promise Obligation)
(documentation Promise EnglishLanguage "&%Attribute that applies to &%Propositions that 
an &%Agent promises to make true.  &%Promises may be implicit or explicit.  
They may be expressed in a written or verbal or gestural manner.")

;; KJN: Moving this to Mid-level-ontology as the definition for Contract is all there.
;;(=>
;;   (property ?ENTITY Promise)
;;      (or
;;         (property ?ENTITY Contract)
;;         (property ?ENTITY NakedPromise)))

;;(subAttribute NakedPromise Promise)
;;(documentation NakedPromise EnglishLanguage "A &%Promise where nothing is promised in return, 
;;i.e. a nudum pactum.")

(instance Prohibition DeonticAttribute)
(documentation Prohibition EnglishLanguage "&%Prohibition is the &%DeonticAttribute that 
applies to &%Formulas that an &%Agent is forbidden, by some authority, 
to make true.")

(<=>
  (modalAttribute ?FORMULA Prohibition)
  (not (modalAttribute ?FORMULA Permission)))

(subclass ProbabilityAttribute ObjectiveNorm)
(documentation ProbabilityAttribute EnglishLanguage "A class containing all of the &%Attributes 
relating to objective, qualitative assessments of probability, e.g. &%Likely and 
&%Unlikely.")

(instance Likely ProbabilityAttribute)
(contraryAttribute Likely Unlikely)
(documentation Likely EnglishLanguage "The &%ProbabilityAttribute of being probable, i.e. more 
likely than not to be &%True.")

(=>
   (modalAttribute ?FORMULA Likely)
   (greaterThan (ProbabilityFn (truth ?FORMULA True)) (ProbabilityFn (truth ?FORMULA False))))

(instance Unlikely ProbabilityAttribute)
(documentation Unlikely EnglishLanguage "The &%ProbabilityAttribute of being improbable, i.e. more 
likely than not to be &%False.")

(=>
   (modalAttribute ?FORMULA Unlikely)
   (greaterThan (ProbabilityFn (truth ?FORMULA False)) (ProbabilityFn (truth ?FORMULA True))))

(subclass PhysicalState InternalAttribute)
(contraryAttribute Solid Liquid Gas Plasma)
(exhaustiveAttribute PhysicalState Solid Fluid Liquid Gas Plasma)
(documentation PhysicalState EnglishLanguage "The physical state of an &%Object.  There 
are three reified instances of this &%Class:  &%Solid, &%Liquid, and &%Gas.  
Physical changes are not characterized by the transformation of one 
substance into another, but rather by the change of the form (physical 
states) of a given substance.  For example, melting an iron nail yields a 
substance still called iron.")

(instance Solid PhysicalState)
(documentation Solid EnglishLanguage "An &%Object has the &%Attribute of &%Solid if it 
has a fixed shape and a fixed volume.")

(instance Fluid PhysicalState)
(documentation Fluid EnglishLanguage "&%Fluid is the &%PhysicalState attribute of an 
&%Object that does not have a fixed shape and thus tends to flow or to 
conform to the shape of a container.")

(instance Liquid PhysicalState)
(subAttribute Liquid Fluid)
(documentation Liquid EnglishLanguage "An &%Object has the &%Attribute of &%Liquid if 
it has a fixed volume but not a fixed shape.")

(=> 
   (instance ?OBJ Solution)
   (attribute ?OBJ Liquid)) 

(instance Gas PhysicalState)
(subAttribute Gas Fluid)
(documentation Gas EnglishLanguage "An &%Object has the &%Attribute of &%Gas if it has 
neither a fixed volume nor a fixed shape.")

(<=>
   (instance ?OBJ Substance)
   (exists (?ATTR)
      (and
         (instance ?ATTR PhysicalState)
         (attribute ?OBJ ?ATTR))))

(instance Plasma PhysicalState)
(subAttribute Plasma Fluid)
(documentation Plasma EnglishLanguage "An extremely energetic &%PhysicalState that consists 
of atomic nuclei stripped of electrons.  That is, a plasma is composed of 
positive ions and free electrons.  &%Plasma behaves differently enough from 
&%Gas that it is referred to as the fourth state of matter.") 

;; NS: delete.  Instances of SoundAttribute should also be instances
;; of PerceptualAttribute, but SoundAttribute is a subclass of
;; RelationalAttribute, not of InternalAttribute.  Some
;; PerceptualAttributes are InternalAttributes.  Others are
;; RelationalAttributes.
;; (subclass PerceptualAttribute InternalAttribute)

;; NS: add.
;(subclass PerceptualAttribute Attribute)
;;MSv: NS's change was conflicting with the partition of Attribute. 
;;PerceptualAttributes are reclassified as subclass of RelationalAttribute.
(subclass PerceptualAttribute RelationalAttribute)
(documentation PerceptualAttribute EnglishLanguage "Any &%Attribute whose presence is detected 
by an act of &%Perception.")

(=>
   (and
      (instance ?PERCEPTION Perception)
      (patient ?PERCEPTION ?OBJ))
   (exists (?PROP)
      (and
         (instance ?PROP PerceptualAttribute)
         (attribute ?OBJ ?PROP))))

(subclass TasteAttribute PerceptualAttribute)
(documentation TasteAttribute EnglishLanguage "The &%Class of &%Attributes relating to 
the taste of &%Objects.")

(=>
   (instance ?OBJ (FoodForFn Animal))
   (exists (?ATTR)
      (and
         (instance ?ATTR TasteAttribute)
         (attribute ?OBJ ?ATTR))))

(subclass OlfactoryAttribute PerceptualAttribute)
(documentation OlfactoryAttribute EnglishLanguage "The &%Class of properties that are 
detectable by smell.")

(subclass VisualAttribute PerceptualAttribute)
(documentation VisualAttribute EnglishLanguage "The &%Class of visually discernible 
properties.")

(instance Illuminated VisualAttribute)
(documentation Illuminated EnglishLanguage "The &%Attribute of &%Regions that are 
illuminated to some degree, i.e. in which some shapes are visually 
discernable.")

(instance Unilluminated VisualAttribute)
(contraryAttribute Unilluminated Illuminated)
(documentation Unilluminated EnglishLanguage "The &%Attribute of &%Regions that are 
unilluminated, i.e in which no shapes are visually discernable.")

;; NS: delete.
;; (subclass ColorAttribute InternalAttribute)

;; NS: add.
(subclass ColorAttribute VisualAttribute)

(documentation ColorAttribute EnglishLanguage "The &%Class of &%Attributes relating to the 
color of &%Objects.")

(subclass PrimaryColor ColorAttribute)
(documentation PrimaryColor EnglishLanguage "Colors which can be blended to form any 
color and which cannot be derived from any other colors.")

(instance Red PrimaryColor)
(documentation Red EnglishLanguage "The &%Attribute of redness.")

(instance Blue PrimaryColor)
(documentation Blue EnglishLanguage "The &%Attribute of being blue in color.")

(instance Yellow PrimaryColor)
(documentation Yellow EnglishLanguage "The &%Attribute of being yellow in color.")

(instance White PrimaryColor)
(documentation White EnglishLanguage "The &%Attribute of being white in color.")

(instance Black PrimaryColor)
(documentation Black EnglishLanguage "The &%Attribute of being black in color.")

(instance Monochromatic ColorAttribute)
(documentation Monochromatic EnglishLanguage "An &%Object with this &%Attribute has 
the same color on every part of its surface.")

(=>
   (and
      (attribute ?OBJ Monochromatic)
      (superficialPart ?PART ?OBJ)
      (attribute ?PART ?COLOR)
      (instance ?COLOR PrimaryColor))
   (forall (?ELEMENT)
      (=>
         (superficialPart ?ELEMENT ?OBJ)
         (attribute ?ELEMENT ?COLOR))))

(=>
   (instance ?OBJ Object)
   (or
      (attribute ?OBJ Monochromatic)
      (attribute ?OBJ Polychromatic)))

(instance Polychromatic ColorAttribute)
(contraryAttribute Polychromatic Monochromatic)
(documentation Polychromatic EnglishLanguage "An &%Object with this &%Attribute has 
different colors on different parts of its surface.")

(=>
   (attribute ?OBJ Polychromatic)
   (exists (?PART1 ?PART2 ?COLOR1 ?COLOR2)
      (and
         (superficialPart ?PART1 ?OBJ)
         (superficialPart ?PART2 ?OBJ)
         (attribute ?PART1 ?COLOR1)
         (attribute ?PART2 ?COLOR2)
         (instance ?COLOR1 ColorAttribute)
         (instance ?COLOR2 ColorAttribute)
         (not (equal ?COLOR1 ?COLOR2)))))

;; KJN: Moved in from Media.kif         
(subclass StructureAttribute InternalAttribute)
(documentation StructureAttribute EnglishLanguage
"Each &%subclass of &%StructureAttribute denotes some facet of the
structure of physical entities.  Each &%instance of
&%StructureAttribute denotes some structural characteristic that may
pertain to some &%Physical entity.")

(subclass ShapeAttribute StructureAttribute)

;; KJN: Delete as StructureAttribute already subclasses from InternalAttribute                  
;;(subclass ShapeAttribute InternalAttribute)
(documentation ShapeAttribute EnglishLanguage "Any &%Attribute that relates to the 
shape of an &%Object.")

(=>
   (and
      (instance ?ATTRIBUTE ShapeAttribute)
      (attribute ?OBJ ?ATTRIBUTE)
      (surface ?SURFACE ?OBJ))
   (attribute ?SURFACE ?ATTRIBUTE))
(instance Pliable InternalAttribute)
(documentation Pliable EnglishLanguage "The shape of an &%Object with this &%Attribute 
can easily be altered.")

(=>
  (and
    (instance ?OBJ Object)
    (attribute ?OBJ Pliable))
  (exists (?CHANGE)
    (and
      (instance ?CHANGE ShapeChange)
      (patient ?CHANGE ?OBJ))))

(instance Rigid InternalAttribute)
(contraryAttribute Rigid Pliable)
(documentation Rigid EnglishLanguage "The shape of an &%Object with this &%Attribute 
cannot be altered without breaking.")

(subclass TextureAttribute PerceptualAttribute)
(documentation TextureAttribute EnglishLanguage "Any &%Attribute that characterizes the 
texture of an &%Object.")

(=>
   (and
      (instance ?ATTRIBUTE TextureAttribute)
      (attribute ?OBJ ?ATTRIBUTE)
      (surface ?SURFACE ?OBJ))
   (attribute ?SURFACE ?ATTRIBUTE))

(instance Smooth TextureAttribute)
(documentation Smooth EnglishLanguage "An &%Object with this &%Attribute has a smooth 
surface.")

(instance Rough TextureAttribute)
(contraryAttribute Smooth Rough)
(documentation Rough EnglishLanguage "An &%Object with this &%Attribute has a rough 
surface.")

(subclass GeometricFigure ShapeAttribute)
(partition GeometricFigure GeometricPoint OneDimensionalFigure TwoDimensionalFigure ThreeDimensionalFigure)
(documentation GeometricFigure EnglishLanguage "The class of all geometric figures, i.e. the 
class of all abstract, spatial representations.  The instances of this class 
are &%GeometricPoints, &%TwoDimensionalFigures or &%ThreeDimensionalFigures.")

(subclass GeometricPoint GeometricFigure)
(documentation GeometricPoint EnglishLanguage "The class of zero-dimensional 
&%GeometricFigures, i.e. the class of &%GeometricFigures that have position 
but lack extension in any dimension.")

(subclass OneDimensionalFigure GeometricFigure)
(documentation OneDimensionalFigure EnglishLanguage "The class of &%GeometricFigures that 
have position and an extension along a single dimension, viz. straight lines.")

(subclass TwoDimensionalFigure GeometricFigure)
(partition TwoDimensionalFigure OpenTwoDimensionalFigure ClosedTwoDimensionalFigure)
(documentation TwoDimensionalFigure EnglishLanguage "The class of &%GeometricFigures that 
have position and an extension along two dimensions, viz. plane figures 
like circles and polygons.")

(subclass OpenTwoDimensionalFigure TwoDimensionalFigure)
(documentation OpenTwoDimensionalFigure EnglishLanguage "The class of &%TwoDimensionalFigures that 
are not &%ClosedTwoDimensionalFigures.")

(subclass TwoDimensionalAngle OpenTwoDimensionalFigure)
(documentation TwoDimensionalAngle EnglishLanguage "Any two &%OneDimensionalFigures (i.e. 
straight lines) meeting at a single &%GeometricPoint.")

(subclass ClosedTwoDimensionalFigure TwoDimensionalFigure)
(documentation ClosedTwoDimensionalFigure EnglishLanguage "Any &%TwoDimensionalFigure which 
has a well defined interior and exterior.")

(subclass ThreeDimensionalFigure GeometricFigure)
(documentation ThreeDimensionalFigure EnglishLanguage "The class of &%GeometricFigures that 
have position and an extension along three dimensions, viz. geometric solids 
like polyhedrons and cylinders.")

(instance geometricPart BinaryPredicate)
(instance geometricPart PartialOrderingRelation)
(domain geometricPart 1 GeometricFigure)
(domain geometricPart 2 GeometricFigure)
(documentation geometricPart EnglishLanguage "(&%geometricPart ?PART ?WHOLE) means that the 
&%GeometricFigure ?PART is part of the &%GeometricFigure ?WHOLE.")

(subrelation pointOfFigure geometricPart)
(instance pointOfFigure BinaryPredicate)
(domain pointOfFigure 1 GeometricPoint)
(domain pointOfFigure 2 GeometricFigure)
(documentation pointOfFigure EnglishLanguage "(&%pointOfFigure ?POINT ?FIGURE) means that 
the &%GeometricPoint ?POINT is part of the &%GeometricFigure ?FIGURE.")

(subrelation angleOfFigure geometricPart)
(instance angleOfFigure BinaryPredicate)
(domain angleOfFigure 1 TwoDimensionalAngle)
(domain angleOfFigure 2 GeometricFigure)
(documentation angleOfFigure EnglishLanguage "(&%angleOfFigure ?ANGLE ?FIGURE) means that 
the &%TwoDimensionalAngle ?ANGLE is part of the &%GeometricFigure ?FIGURE.")

(instance pointOfIntersection TernaryPredicate)
(domain pointOfIntersection 1 OneDimensionalFigure)
(domain pointOfIntersection 2 OneDimensionalFigure)
(domain pointOfIntersection 3 GeometricPoint)
(documentation pointOfIntersection EnglishLanguage "(&%pointOfIntersection ?FIGURE1 ?FIGURE2 
?POINT) means that the two straight lines ?FIGURE1 and ?FIGURE2 meet at the 
point ?POINT.")

(=>
   (pointOfIntersection ?FIGURE1 ?FIGURE2 ?POINT)
   (and
      (pointOfFigure ?POINT ?FIGURE1)
      (pointOfFigure ?POINT ?FIGURE2)))

(instance parallel BinaryPredicate)
(domain parallel 1 OneDimensionalFigure)
(domain parallel 2 OneDimensionalFigure)
(documentation parallel EnglishLanguage "(&%parallel ?LINE1 ?LINE2) means that the 
&%OneDimensionalFigures ?LINE1 and ?LINE2 are parallel to one another, 
i.e. they are equidistant from one another at every point.")

(=>
  (parallel ?LINE1 ?LINE2)
  (not 
    (exists (?POINT)
      (pointOfIntersection ?LINE1 ?LINE2 ?POINT))))

(instance angularMeasure BinaryPredicate)
(instance angularMeasure TotalValuedRelation)
(domain angularMeasure 1 TwoDimensionalAngle)
(domain angularMeasure 2 PlaneAngleMeasure)
(documentation angularMeasure EnglishLanguage "(&%angularMeasure ?ANGLE ?MEASURE) means that 
the two-dimensional geometric angle ?ANGLE has the &%PlaneAngleMeasure of 
?MEASURE.")

(instance lineMeasure BinaryPredicate)
(instance lineMeasure TotalValuedRelation)
(domain lineMeasure 1 OneDimensionalFigure)
(domain lineMeasure 2 LengthMeasure)
(documentation lineMeasure EnglishLanguage "(&%lineMeasure ?LINE ?MEASURE) means that the 
straight line ?LINE has the &%LengthMeasure of ?MEASURE.")

(instance geometricDistance TernaryPredicate)
(instance geometricDistance SingleValuedRelation)
(instance geometricDistance TotalValuedRelation)
(domain geometricDistance 1 GeometricPoint)
(domain geometricDistance 2 GeometricPoint)
(domain geometricDistance 3 LengthMeasure)
(documentation geometricDistance EnglishLanguage "(&%geometricDistance ?POINT1 ?POINT2 
?LENGTH) means that ?LENGTH is the distance between the two 
&%GeometricPoints ?POINT1 and ?POINT2.")

(=>
   (geometricDistance ?POINT1 ?POINT2 ?LENGTH)
   (geometricDistance ?POINT2 ?POINT1 ?LENGTH))

(subclass SaturationAttribute InternalAttribute)
(documentation SaturationAttribute EnglishLanguage "A &%Class of &%Attributes that specify, in 
a qualitative manner, the extent of the presence of one kind of &%Object in 
another kind of &%Object.")

(instance Dry SaturationAttribute)
(contraryAttribute Dry Damp)
(documentation Dry EnglishLanguage "An &%Attribute which indicates that the associated 
&%Object contains no &%Liquid.")

(=>
   (attribute ?OBJ Dry)
   (not
      (exists (?SUBOBJ)
         (and
            (part ?SUBOBJ ?OBJ)
            (attribute ?SUBOBJ Liquid)))))

(instance Damp SaturationAttribute)
(documentation Damp EnglishLanguage "An &%Attribute which indicates that the associated 
&%Object contains some &%Liquid.")

(instance Wet SaturationAttribute)
(subAttribute Wet Damp)
(documentation Wet EnglishLanguage "An &%Attribute which indicates that the 
associated &%Object is fully saturated with a &%Liquid, i.e. 
every part of the &%Object has a subpart which is a &%Liquid.")

(=>
   (attribute ?OBJ Wet)
   (forall (?PART)
      (=>
         (part ?PART ?OBJ)
         (exists (?SUBPART)
            (and
               (part ?SUBPART ?PART)
               (attribute ?SUBPART Liquid))))))
         
(subclass BiologicalAttribute InternalAttribute)
(documentation BiologicalAttribute EnglishLanguage "&%Attributes that apply specifically 
to instances of &%Organism.")

;; NS: delete.  Many current instances of BiologicalAttribute apply
;; to OrganicObjects that are not Organisms.
;; (=>
;;     (and
;;         (attribute ?ORG ?ATT)
;;         (instance ?ATT BiologicalAttribute))
;;     (instance ?ORG Organism))

;; NS: add.
(=>
    (and
        (attribute ?ORG ?ATT)
        (instance ?ATT BiologicalAttribute))
    (instance ?ORG OrganicObject))

(subclass BodyPosition BiologicalAttribute)
(documentation BodyPosition EnglishLanguage "The class of &%Attributes expressing 
configurations of bodies or parts of bodies of animals or humans, 
e.g. standing, sitting, kneeling, lying down, etc.")

(=>
   (instance ?ANIMAL Animal)
   (or
      (exists (?MOTION)
         (and
            (instance ?MOTION BodyMotion)
            (agent ?MOTION ?ANIMAL)))
      (exists (?ATTR)
         (and
            (instance ?ATTR BodyPosition)
            (attribute ?ANIMAL ?ATTR)))))

(instance Standing BodyPosition)
(documentation Standing EnglishLanguage "The &%BodyPosition of being upright, i.e. being 
fully extended and supported by nothing other than one's own feet.")

(=>
   (and
      (instance ?AMBULATE Ambulating)
      (agent ?AMBULATE ?AGENT))
   (attribute ?AGENT Standing))

(instance Sitting BodyPosition)
(documentation Sitting EnglishLanguage "The &%BodyPosition of being recumbent, i.e. 
knees bent and back side supported.")

(instance Prostrate BodyPosition)
(documentation Prostrate EnglishLanguage "The &%BodyPosition of lying down, being in a 
horizontal position.")

(subclass AnimacyAttribute BiologicalAttribute)
(exhaustiveAttribute AnimacyAttribute Living Dead)
(documentation AnimacyAttribute EnglishLanguage "&%Attributes that indicate whether an 
&%Organism is alive or not.")

(instance Living AnimacyAttribute)
(documentation Living EnglishLanguage "This &%Attribute applies to &%Organisms that are 
alive.")

(=>
   (and
      (instance ?ORGANISM Organism)
      (agent ?PROCESS ?ORGANISM))
   (holdsDuring (WhenFn ?PROCESS) (attribute ?ORGANISM Living)))

(instance Dead AnimacyAttribute)
(subAttribute Dead Unconscious)
(contraryAttribute Dead Living)
(documentation Dead EnglishLanguage "This &%Attribute applies to &%Organisms that are 
not alive.")

(=>
   (instance ?ORG Organism)
   (exists (?ATTR)
      (and
         (instance ?ATTR AnimacyAttribute)
         (attribute ?ORG ?ATTR))))

(subclass SexAttribute BiologicalAttribute)
(exhaustiveAttribute SexAttribute Female Male)
(documentation SexAttribute EnglishLanguage "&%Attributes that indicate the sex of an 
&%Organism.")

(instance Female SexAttribute)
(documentation Female EnglishLanguage "An &%Attribute indicating that an &%Organism is 
female in nature.")

(=>
   (and
      (instance ?BODY ReproductiveBody)
      (part ?BODY ?ORG)
      (instance ?ORG Organism))
(attribute ?ORG Female))

(instance Male SexAttribute)
(contraryAttribute Male Female)
(documentation Male EnglishLanguage "An &%Attribute indicating that an &%Organism is 
male in nature.")

(=>
   (instance ?ANIMAL Animal)
   (exists (?ATTR)
      (and
         (instance ?ATTR SexAttribute)
         (attribute ?ANIMAL ?ATTR))))

(subclass DevelopmentalAttribute BiologicalAttribute)
(exhaustiveAttribute DevelopmentalAttribute FullyFormed NonFullyFormed)
(documentation DevelopmentalAttribute EnglishLanguage "&%Attributes that indicate the 
stage of development of an &%Organism.")

(instance FullyFormed DevelopmentalAttribute)
(documentation FullyFormed EnglishLanguage "The stage of an &%Organism when it has reached 
the end of its growth phase.")

(=>
   (attribute ?OBJ FullyFormed)
   (exists (?GROWTH)
      (and
         (instance ?GROWTH Growth)
         (experiencer ?GROWTH ?OBJ)
         (holdsDuring (BeginFn (WhenFn ?OBJ)) (attribute ?OBJ NonFullyFormed)))))

(instance NonFullyFormed DevelopmentalAttribute)
(contraryAttribute NonFullyFormed FullyFormed)
(successorAttribute NonFullyFormed FullyFormed)
(documentation NonFullyFormed EnglishLanguage "The stage of an &%Organism before it is 
&%FullyFormed.")

(=>
   (instance ?ORG Organism)
   (exists (?ATTR)
      (and
         (instance ?ATTR DevelopmentalAttribute)
         (attribute ?ORG ?ATTR))))

(subAttribute Larval NonFullyFormed)
(documentation Larval EnglishLanguage "Form of most &%Invertebrates, &%Amphibians, and 
&%Fish immediately after they hatch.  This form is fundamentally unlike 
the adult form, and metamorphosis is required to reach the latter form.") 

;; NS: delete.
;; (=>
;;    (holdsDuring ?TIME (attribute ?ORG Larval))
;;    (holdsDuring 
;;      (PastFn ?TIME) 
;;        (exists (?BIRTH) 
;;          (and 
;;            (instance ?BIRTH Birth) 
;;            (experiencer ?BIRTH ?ORG)))))

;; NS: add.
(=>
  (and
    (holdsDuring ?TIME (attribute ?ORG Larval))
    (instance ?BIRTH Birth)
    (equal ?BW (WhenFn ?BIRTH))
    (experiencer ?BIRTH ?ORG))
  (meetsTemporally ?BW ?TIME))

(subAttribute Embryonic NonFullyFormed)
(contraryAttribute Embryonic Larval)
(documentation Embryonic EnglishLanguage "The stage of an &%Organism or an 
&%AnatomicalStructure that exists only before the &%Organism is born.  
&%Mammals, for example, have this &%Attribute only prior to 
their birth.")

(=>
   (attribute ?ORG Embryonic)
   (exists (?BODY)
      (and
         (instance ?BODY ReproductiveBody)
         (located ?ORG ?BODY))))

;; NS: delete.  It's best not to put either (exists ... or (not
;; (exists ... inside the scope of holdsDuring.
;; (=>
;;    (holdsDuring ?TIME (attribute ?ORG Embryonic))
;;    (holdsDuring ?TIME (not (exists (?BIRTH) (and (instance ?BIRTH Birth) (experiencer ?BIRTH ?ORG))))))

;; NS: add.
(=>
  (and
    (holdsDuring ?TIME (attribute ?ORG Embryonic))
    (instance ?BIRTH Birth)
    (equal ?BW (WhenFn ?BIRTH))
    (experiencer ?BIRTH ?ORG))
  (not (overlapsTemporally ?TIME ?BW)))

(subclass DiseaseOrSyndrome BiologicalAttribute)
(documentation DiseaseOrSyndrome EnglishLanguage "A &%BiologicalAttribute which qualifies 
something that alters or interferes with a normal process, state or activity 
of an &%Organism.  It is usually characterized by the abnormal functioning of 
one or more of the host's systems, parts, or &%Organs.")

;; NS: If we wanted to ascribe PsychologicalAttributes
;; to a non-OrganicObject robot or an AI, this
;; statement would have to be changed.
(subclass PsychologicalAttribute BiologicalAttribute)

(partition PsychologicalAttribute StateOfMind TraitAttribute)
(documentation PsychologicalAttribute EnglishLanguage "&%Attributes
that characterize the mental or behavioral life of an &%Organism.")

;; NS: delete.
;; (=>
;;    (instance ?ATTR PsychologicalAttribute)
;;    (=>
;;       (holdsDuring ?TIME (attribute ?ORGANISM ?ATTR))
;;       (holdsDuring ?TIME (attribute ?ORGANISM Living))))

;; NS: add.
(=>
   (instance ?ATTR PsychologicalAttribute)
   (=>
      (and
        (holdsDuring ?TIME (attribute ?ORGANISM ?ATTR))
        (instance ?ORGANISM Organism))
      (holdsDuring ?TIME (attribute ?ORGANISM Living))))

(=>
   (and
      (instance ?ATTR PsychologicalAttribute)
      (attribute ?AGENT ?ATTR))
   (instance ?AGENT SentientAgent))

(subclass StateOfMind PsychologicalAttribute)
(documentation StateOfMind EnglishLanguage  "The class &%StateOfMind is distinguished from 
its complement &%TraitAttribute by the fact that instances of the former are 
transient while instances of the latter are persistent features of a creature's behavioral/psychological make-up.")

(subclass EmotionalState StateOfMind)
(documentation EmotionalState EnglishLanguage "The &%Class of &%Attributes that denote emotional 
states of &%Organisms.")

(subclass ConsciousnessAttribute StateOfMind)
(documentation ConsciousnessAttribute EnglishLanguage "&%Attributes that indicate whether 
an &%Organism is conscious or the qualitative degree of consciousness of 
an &%Organism.")

(<=>
   (and
      (instance ?AGENT SentientAgent)
      (attribute ?AGENT Living))
   (exists (?ATTR)
      (and
         (instance ?ATTR ConsciousnessAttribute)
         (attribute ?AGENT ?ATTR))))

(instance Asleep ConsciousnessAttribute)
(documentation Asleep EnglishLanguage "&%Attribute that applies to &%Organisms that are 
sleeping.")

(instance Unconscious ConsciousnessAttribute)
(contraryAttribute Unconscious Awake)
(documentation Unconscious EnglishLanguage "&%Attribute that applies to &%Organisms that 
are unconscious.  An &%Organism may be &%Unconscious because it is &%Dead 
or because of a blow to the head, a drug, etc.")

(instance Awake ConsciousnessAttribute)
(documentation Awake EnglishLanguage "&%Attribute that applies to &%Organisms that are 
neither &%Unconscious nor &%Asleep.")

(=>
   (or
      (attribute ?AGENT Asleep)
      (attribute ?AGENT Awake))
   (attribute ?AGENT Living))

(subclass TraitAttribute PsychologicalAttribute)
(documentation TraitAttribute EnglishLanguage "&%Attributes that indicate the the 
behavior/personality traits of an &%Organism.")

(subclass PsychologicalDysfunction PsychologicalAttribute)
(subclass PsychologicalDysfunction DiseaseOrSyndrome)
(documentation PsychologicalDysfunction EnglishLanguage "A clinically significant 
dysfunction whose major manifestation is behavioral or psychological.  
These dysfunctions may have identified or presumed biological etiologies 
or manifestations.")

(instance comment TernaryPredicate)
(documentation comment EnglishLanguage "(&%comment ?ENT ?STR ?PER) is a convenience 
relationship that allows ontologists represented by &%SymbolicString ?PER to write
down commentaries ?STR on a defined &%Entity ?ENT")
(termFormat EnglishLanguage comment "comment")

(domain comment 1 Entity)
(domain comment 2 SymbolicString)
(domain comment 3 SymbolicString)   

(instance MakingFn UnaryFunction)
(domainSubclass MakingFn 1 Making)
(rangeSubclass MakingFn Object)
(documentation MakingFn EnglishLanguage "A &%Function that denotes the creation of an &%Object.")

(=>
  (instance ?X (MakingFn ?Y))
  (exists (?OBJECT)
    (and
      (instance ?OBJECT ?Y)
      (result ?X ?OBJECT))))

;; END FILE

;; BEGIN FILE


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;    Sequestered Axioms    ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;  This section is not a subontology of the SUMO.  It contains axioms from 
;;  other sections of the ontology that may cause problems for an inference 
;;  engine.  In particular, they can be used to construct arbitrarily complex 
;;  terms that often appear in proofs with unhelpful conclusions.  Before this 
;;  file is loaded into the inference engine, the axioms in this section should 
;;  be commented out.

;;  (<=> 
;;     (instance ?ENTITY (UnionFn ?CLASS1 ?CLASS2))
;;     (or 
;;        (instance ?ENTITY ?CLASS1)
;;        (instance ?ENTITY ?CLASS2)))

;;  (<=> 
;;     (instance ?ENTITY (IntersectionFn ?CLASS1 ?CLASS2))
;;     (and 
;;        (instance ?ENTITY ?CLASS1)
;;        (instance ?ENTITY ?CLASS2)))

;;  (<=> 
;;     (instance ?ENTITY (ComplementFn ?CLASS))
;;     (not 
;;        (instance ?ENTITY ?CLASS)))

;;  (=>
;;     (and
;;        (instance ?CLASS1 SetOrClass)
;;        (instance ?CLASS2 SetOrClass))
;;     (equal (RelativeComplementFn ?CLASS1 ?CLASS2) (IntersectionFn ?CLASS1 (ComplementFn ?CLASS2))))

;;  (<=> 
;;     (instance ?ENTITY (GeneralizedUnionFn ?SUPERCLASS))
;;     (exists (?CLASS)
;;        (and
;;           (instance ?CLASS ?SUPERCLASS)
;;           (instance ?ENTITY ?CLASS))))

;;  (<=> 
;;     (instance ?ENTITY (GeneralizedIntersectionFn ?SUPERCLASS))
;;     (forall (?CLASS)
;;           (=>
;;              (instance ?CLASS ?SUPERCLASS)
;;              (instance ?ENTITY ?CLASS))))

;;  (<=>
;;     (instance ?SUBCLASS (PowerSetFn ?CLASS))
;;     (subclass ?SUBCLASS ?CLASS))

;; (=>
;;   (instance ?REL Function)
;;   (<=>
;;     (equal (AssignmentFn ?REL @ROW) ?INST)
;;     (?REL @ROW ?INST)))

;; NS: sequestered 2007-08-01
;; (<=>
;;    (instance ?REL BinaryRelation)
;;    (not
;;       (exists (?ITEM1 ?ITEM2 ?ITEM3 @ROW)
;;          (?REL ?ITEM1 ?ITEM2 ?ITEM3 @ROW))))

;; NS: sequestered 2007-08-01
;; (=>
;;    (instance ?REL TernaryRelation)
;;    (not
;;       (exists (?ITEM1 ?ITEM2 ?ITEM3 ?ITEM4 @ROW)
;;          (?REL ?ITEM1 ?ITEM2 ?ITEM3 ?ITEM4 @ROW))))

;; NS: sequestered 2007-08-01
;; (=>
;;    (instance ?REL QuaternaryRelation)
;;    (not
;;       (exists (?ITEM1 ?ITEM2 ?ITEM3 ?ITEM4 ?ITEM5 @ROW)
;;          (?REL ?ITEM1 ?ITEM2 ?ITEM3 ?ITEM4 ?ITEM5 @ROW))))

;; NS: sequestered 2007-08-01
;; (=>
;;    (instance ?REL QuintaryRelation)
;;    (not
;;       (exists (?ITEM1 ?ITEM2 ?ITEM3 ?ITEM4 ?ITEM5 ?ITEM6 @ROW)
;;          (?REL ?ITEM1 ?ITEM2 ?ITEM3 ?ITEM4 ?ITEM5 ?ITEM6 @ROW))))
