;; ==============================
;;      MILO (Mid-Level Ontology)
;; ==============================

;; This is the source file for the MILO (MId-Level Ontology), an ontology that 
;; is being developed as a bridge between the abstract content of the SUMO and 
;; the rich detail of the various domain ontologies.    
;; Those who are interested in making use of this ontology are urged 
;; to contact Adam Pease (apease [at] articulatesoftware [dot] com).

;; The MILO (MId-Level Ontology) is copyrighted by Teknowledge (c) 
;; 2003 and Articulate Software 2004-2007.  It is released under the GNU Public License 
;; <http://www.gnu.org/copyleft/gpl.html>.  Users of this code also consent, by 
;; use of this material, to credit Teknowledge and Articulate Software
;; in any writings, briefings, 
;; publications, presentations, or other representations of any code or other 
;; product which incorporates, builds on, or uses this material. 

;; We ask that people using or referencing this work 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.  See also http://www.ontologyportal.org

;; NS: delete.
;; [1]
;; (subclass HumanCorpse OrganicObject)

;; NS: delete.
;; [2]
;; (documentation HumanCorpse EnglishLanguage "A &%Dead thing which was
;; formerly a &%Human.")

;; NS: delete.
;; [3]
;; (=>
;;   (instance ?CORPSE HumanCorpse)
;;   (exists (?HUMAN)
;;     (and
;;       (instance ?HUMAN Human)
;;       (before (WhenFn ?HUMAN) (WhenFn ?CORPSE))
;;       (not
;;         (exists (?OTHERPART)
;;           (and
;;             (holdsDuring
;;               (WhenFn ?CORPSE)
;;               (part ?OTHERPART ?CORPSE))
;;             (not
;;               (holdsDuring 
;;                 (WhenFn ?HUMAN) 
;;                 (part ?OTHERPART ?HUMAN)))))))))

;; NS: delete.
;; [4]
;; (=>
;;   (instance ?CORPSE HumanCorpse)
;;   (attribute ?CORPSE Dead))

;; NS: The KR above is inadequate for several reasons: (1)
;; It completely fails to generalize, saying nothing about
;; the remains of organisms other than humans, or remains
;; that are not partonomically identical to the original
;; living organism; (2) Rule [3] is malformed, because
;; &%before must be used with TimePoints, not TimeIntervals;
;; and (3) Axioms that apply the attributes &%Living and
;; &%Dead to &%Organism and &%HumanCorpse probably result in
;; unintended conclusions.  Consider rule [4], above, in
;; conjuction with rules [5] and [6], below, both of which
;; appear in Merge.kif:
;;
;; [5] From Merge.kif.  Already changed there to prevent
;; concluding that Organisms can be Dead.
;; (=>
;;   (and
;;     (instance ?DEATH Death)
;;     (experiencer ?DEATH ?AGENT))
;;   (holdsDuring
;;     (FutureFn
;;       (WhenFn ?DEATH))
;;         (attribute ?AGENT Dead)))
;;
;; [6] From Merge.kif.  Already changed there, broadening
;; the consequent to (instance ?ORG OrganicObject).
;; (=>
;;     (and
;;         (attribute ?ORG ?ATT)
;;         (instance ?ATT BiologicalAttribute))
;;     (instance ?ORG Organism))
;; 
;;
;; [6.1] From Merge.kif
;; (=>
;;     (and
;;         (instance ?PATH PathologicProcess)
;;         (experiencer ?PATH ?ORG))
;;     (exists (?PART ?DISEASE)
;;         (and
;;             (part ?PART ?ORG)
;;             (instance ?DISEASE DiseaseOrSyndrome)
;;             (attribute ?PART ?DISEASE))))
;;
;; [6] and [6.1] together entail the conclusion that every
;; skolemized part of an Organism that is affected by a
;; skolemized disease is also, itself, an instance of
;; Organism (since DiseaseOrSyndrome is a subclass of
;; BiologicalAttribute).

;; TO DO: 
;;
;; 1. Delete axioms [1] - [4], above, which already are
;;    commented out.
;; 
;; 2. In Merge.kif, delete [6] and replace it with the
;;    following:  (already done.)
;;
;;      (=>
;;        (and
;;          (instance ?ATT BiologicalAttribute)
;;          (holdsDuring ?T1 (attribute ?ORG ?ATT)))
;;        (instance ?ORG OrganicObject))
;;
;; 3. In Merge.kif, rewrite [5] to avoid concluding that
;;    Organisms can be Dead.  (already done.)
;;
;; 4. Apparently, the intent of rule [3], above, is to
;;    represent the state of most &%Dead &%Humans in a
;;    rather short time interval following death, when the
;;    body is still an intact, integral whole, and
;;    embalming, cremation, mummification, or burial have
;;    not yet occurred.  Add the section below, which tries
;;    to address the presumed intent of [1] - [4], but also
;;    tries to include human remains within a broader theory
;;    of "organism remains".

;; Start: OrganismRemains

;; NS: new.
(subclass OrganismRemains OrganicObject)
(documentation OrganismRemains EnglishLanguage "An
&%instance of &%OrganismRemains is &%Dead matter of a
formerly &%Living &%Organism: &%Plant, &%Animal, or
&%Microorganism.  An &%instance of &%OrganismRemains might
or might not be recognizable as the remains of a particular
kind or species of organism, depending on the cause of the
&%Organism's &%Death (heart failure, stroke, roadkill,
dismemberment, etc.), the elapsed time since death, the
speed of decomposition, and any post-mortem processing of
the dead organism (embalming, cremation, mummification,
boiling, consumption as food, etc.).")

;; [7] All organism remains are dead.
(=>
  (instance ?X OrganismRemains)
  (holdsDuring (WhenFn ?X) (attribute ?X Dead)))

;; [8] The parts of organism remains were once parts of some
;; &%Organism.
(=>
  (and
    (instance ?REM OrganismRemains)
    (holdsDuring ?T2 
      (part ?OBJ ?REM)))
  (exists (?ORG ?T1)
    (and
      (instance ?ORG Organism)
      (earlier (WhenFn ?ORG) (WhenFn ?REM))
      (instance ?T1 TimeInterval)
      (finishes ?T1 (WhenFn ?ORG))
      (holdsDuring ?T1 
        (part ?OBJ ?ORG)))))

;; [8a] - [8d] refine [8] and the rule in Merge.kif that
;; defines the Death of Organisms.

;; [8a] The organic result of an organism's death is an
;; instance of OrganismRemains.
(=>
  (and
    (instance ?REM OrganicObject)
    (instance ?DEATH Death)
    (instance ?ORG Organism)
    (experiencer ?DEATH ?ORG)
    (result ?DEATH ?REM))
  (instance ?REM OrganismRemains))

;; [8b]
(=>
  (instance ?REM OrganismRemains)
  (exists (?DEATH)
    (and
      (instance ?DEATH Death)
      (result ?DEATH ?REM))))

;; [8c]
(=>
  (and
    (instance ?DEATH Death)
    (instance ?REM OrganismRemains)
    (instance ?ORG Organism)
    (holdsDuring ?T2 (part ?OBJ ?REM))
    (holdsDuring ?T1 (part ?OBJ ?ORG))
    (earlier ?T1 ?T2)
    (result ?DEATH ?REM))
  (experiencer ?DEATH ?ORG))

;; [8d]
(=>
  (and
    (instance ?DEATH Death)
    (instance ?REM OrganismRemains)
    (instance ?ORG Organism)
    (holdsDuring ?T2 (part ?OBJ ?REM))
    (holdsDuring ?T1 (part ?OBJ ?ORG))
    (earlier ?T1 ?T2)
    (experiencer ?DEATH ?ORG))
  (result ?DEATH ?REM))

;; [9] Every Organism is alive.
(=>
  (instance ?ORG Organism)
  (holdsDuring (WhenFn ?ORG)
    (attribute ?ORG Living)))

(subclass HumanCorpse OrganismRemains)
(documentation HumanCorpse EnglishLanguage "&%HumanCorpse is the &%OrganismRemains of
a &%Human")

(=>
  (instance ?X HumanCorpse)
  (instance ?X (DeadFn Human)))
    
;; NS: new.  Add DeadFn and [11], below.
(instance DeadFn UnaryFunction)
(domainSubclass DeadFn 1 Organism)
(rangeSubclass DeadFn OrganismRemains)
(documentation DeadFn EnglishLanguage "(&%DeadFn ?ORGCLASS)
denotes the &%Class of all remains that were once part
of &%Living &%Organisms of the type ?ORGCLASS.")

;; [11]
(=>
  (and
    (instance ?REM (DeadFn ?ORGTYPE))
    (instance ?DEATH Death)
    (result ?DEATH ?REM)
    (experiencer ?DEATH ?ORG))
  (instance ?ORG ?ORGTYPE))

;; [12]
(=>
  (and
    (instance ?REM OrganicObject)
    (instance ?DEATH Death)
    (experiencer ?DEATH ?ORG)
    (instance ?ORG ?ORGTYPE)
    (subclass ?ORG Organism)
    (result ?DEATH ?REM))
  (instance ?REM (DeadFn ?ORGTYPE)))

;; NS: The diagram below depicts the temporal relationships
;; between the main attributes and classes mentioned above,
;; as applied to one instance of Organism.  Before it is the
;; experiencer of its Death, an Organism X has the
;; BiologicalAttribute Living.  X's Death has as its result
;; a new instance of OrganismRemains, Y, which consists of
;; the same material (parts) as the previously existing
;; Organism X.

;;                        Death
;;                  (experiencer = X)
;;                       (result = Y)
;;                          ^
;;                          |
;; |------- Living --------|-|------- Dead -------->
;;
;; |----- Organism X -------|-- OrganismRemains Y -->???|

;; The distinction between "existing" as a chunk of more or
;; less organism-shaped matter and simply being Dead (having
;; experienced death), as well as the temporal aspects, make
;; this all seem excessively difficult, but alternatives
;; that make it possible to express the same distinctions of
;; meaning all seem about equally awkward.  In the approach
;; chosen here, Organism and OrganismRemains are conceived
;; as temporally disjoint.  It would be a mistake to apply
;; Dead to an instance of Organism for any time interval,
;; and a mistake to apply Living to an instance of
;; OrganismRemains for any time interval.  In other words,
;; in this approach there are no Dead Organisms, only Living
;; Organisms or Dead OrganismRemains.

;; End: OrganismRemains

(instance HumanSlave SocialRole)
(documentation HumanSlave EnglishLanguage "A &%Human who is owned by someone else.")

;; NS: delete.
;; (=>
;;    (attribute ?SLAVE HumanSlave)
;;    (exists (?PERSON)
;;       (and
;;          (instance ?PERSON Human)
;;          (not (equal ?PERSON ?SLAVE))
;;          (possesses ?PERSON ?SLAVE))))

;; NS: add.
(=>
   (holdsDuring ?TIME (attribute ?SLAVE HumanSlave))
   (exists (?PERSON)
      (and
         (instance ?PERSON Human)
         (not (equal ?PERSON ?SLAVE))
         (holdsDuring ?TIME
           (possesses ?PERSON ?SLAVE)))))

(subclass HumanAdult Human)

;; NS: add.
;; this is very unprecise as the age to become a legal agent depends on country and purpose
(subclass HumanAdult LegalAgent)

(documentation HumanAdult EnglishLanguage "The class of
&%Humans that are 18 years of age or older.")

;; NS: delete.
;; (=>
;;    (and
;;       (instance ?ADULT HumanAdult)
;;       (age ?ADULT (MeasureFn ?NUMBER YearDuration)))
;;    (greaterThanOrEqualTo ?NUMBER 18))

;; NS: add.
(=>
  (holdsDuring ?TIME
    (and
      (instance ?ADULT HumanAdult)
      (age ?ADULT (MeasureFn ?NUMBER YearDuration))))
  (greaterThanOrEqualTo ?NUMBER 18))

;; NS. add. An alternate formulation.
(=>
  (holdsDuring ?TIME (instance ?H HumanAdult))
  (exists (?AGE)
    (and
      (holdsDuring ?TIME (age ?H ?AGE))
      (instance ?AGE (IntervalFn (MeasureFn 18 YearDuration) (MeasureFn 120 YearDuration))))))

;; NS: add.
(=>
  (and
    (instance ?H Human)
    (holdsDuring ?T1
      (age ?H (MeasureFn ?N YearDuration)))
    (greaterThanOrEqualTo ?N 18))
  (holdsDuring ?T1 (instance ?H HumanAdult)))

;; NS: add.
(=>
  (holdsDuring ?TIME
      (instance ?ADULT HumanAdult))
  (holdsDuring ?TIME
      (developmentalForm ?ADULT FullyFormed)))

;; NS: add.
(=>
  (and
    (instance ?ORG Human)
    (holdsDuring ?TIME
      (attribute ?ORG FullyFormed)))
  (holdsDuring ?TIME
    (instance ?ORG HumanAdult)))

;; NS: add.  Missing from Merge.kif.  Narrow to
;; developmentalForm.
(=>
  (and
    (instance ?ORG OrganicObject)
    (instance ?ATTR DevelopmentalAttribute)
    (holdsDuring ?TIME (property ?ORG ?ATTR)))
  (holdsDuring ?TIME (developmentalForm ?ORG ?ATTR)))

(subclass HumanYouth Human)
(documentation HumanYouth EnglishLanguage "The class of &%Humans that are younger than 
18 years of age.")

;; NS: delete.
;; (=>
;;    (and
;;       (instance ?YOUTH HumanYouth)
;;       (age ?YOUTH (MeasureFn ?NUMBER YearDuration)))
;;    (lessThan ?NUMBER 18))

;; NS: add.
(=>
  (holdsDuring ?TIME
    (and
      (instance ?YOUTH HumanYouth)
      (age ?YOUTH (MeasureFn ?NUMBER YearDuration))))
  (lessThan ?NUMBER 18))

;; NS. An alternate formulation.
(=>
  (holdsDuring ?TIME (instance ?H HumanYouth))
  (exists (?AGE)
    (and
      (holdsDuring ?TIME (age ?H ?AGE))
      (instance ?AGE (IntervalFn (MeasureFn 0 YearDuration) (MeasureFn 17 YearDuration))))))

;; NS: add.
(=>
  (and
    (instance ?H Human)
    (holdsDuring ?T1 (age ?H (MeasureFn ?N YearDuration)))
    (lessThan ?N 18))
  (holdsDuring ?T1 (instance ?H HumanYouth)))

(subclass HumanChild HumanYouth)
(documentation HumanChild EnglishLanguage "A &%HumanYouth between birth and puberty, i.e a 
&%Human who is &%NonFullyFormed.")

;; NS: edit.
(=>
  (holdsDuring ?TIME
    (instance ?CHILD HumanChild))
  (holdsDuring ?TIME
    (developmentalForm ?CHILD NonFullyFormed)))

;; NS: add.  Narrowing from Human.
(=>
  (and
    (instance ?CHILD Human)
    (holdsDuring ?TIME
      (attribute ?CHILD NonFullyFormed)))
  (holdsDuring ?TIME
    (instance ?CHILD HumanYouth)))
  
;; NS: edit.
(=>
  (holdsDuring ?TIME
    (and
      (instance ?CHILD HumanChild)
      (age ?CHILD (MeasureFn ?NUMBER YearDuration))))
  (lessThanOrEqualTo ?NUMBER 14))

;; NS: add. An alternate formulation.
(=>
  (holdsDuring ?TIME (instance ?H HumanChild))
  (exists (?AGE)
    (and
      (holdsDuring ?TIME (age ?H ?AGE))
      (instance ?AGE (IntervalFn (MeasureFn 0 YearDuration) (MeasureFn 14 YearDuration))))))

;; NS: add.
(=>
  (and
    (instance ?H Human)
    (holdsDuring ?T1 (age ?H (MeasureFn ?N YearDuration)))
    (lessThanOrEqualTo ?N 14))
  (holdsDuring ?T1 (instance ?H HumanChild)))

;; NS: edit.
(subclass Teenager Human)
(documentation Teenager EnglishLanguage "A &%Human between puberty and the age of 20.")

(=>
  (holdsDuring ?TIME
    (and
      (instance ?TEEN Teenager)
      (age ?TEEN (MeasureFn ?NUMBER YearDuration))))
  (and
    (greaterThan ?NUMBER 12)
    (lessThan ?NUMBER 20)))

;; NS: add.  An alternate formulation.
(=>
  (holdsDuring ?TIME (instance ?H Teenager))
  (exists (?AGE)
    (and
      (holdsDuring ?TIME (age ?H ?AGE))
      (instance ?AGE (IntervalFn (MeasureFn 13 YearDuration) (MeasureFn 19 YearDuration))))))

;; NS: add.
(=>
  (and
    (instance ?H Human)
    (holdsDuring ?T1 (age ?H (MeasureFn ?N YearDuration)))
    (greaterThan ?N 12)
    (lessThan ?N 20))
  (holdsDuring ?T1 (instance ?H Teenager)))

(subclass Boy HumanChild)
(subclass Boy Man)
(documentation Boy EnglishLanguage "A &%HumanChild who is &%Male.")

;; NS: add.
(=>
  (holdsDuring ?T1
    (and
      (instance ?H HumanChild)
      (attribute ?H Male)))
  (holdsDuring ?T1 (instance ?H Boy)))

(subclass Girl HumanChild)
(subclass Girl Woman)
(documentation Girl EnglishLanguage "A &%HumanChild who is &%Female.")

;; NS: add.
(=>
  (holdsDuring ?T1
    (and
      (instance ?H HumanChild)
      (attribute ?H Female)))
  (holdsDuring ?T1 (instance ?H Girl)))

(subclass HumanBaby HumanChild)
(documentation HumanBaby EnglishLanguage "A &%Human between birth and the first year of age.")

;; NS: edit.
(=>
  (holdsDuring ?TIME
    (and
      (instance ?BABY HumanBaby)
      (age ?BABY (MeasureFn ?NUMBER YearDuration))))
  (lessThanOrEqualTo ?NUMBER 1))

;; NS: add.  An alternate formulation.  Constructing a query
;; to ask for the age of ?BABY is awkward with both
;; formulations, and probably won't give the
;; desired/expected answer.
(=>
  (holdsDuring ?TIME (instance ?BABY HumanBaby))
  (exists (?AGE)
    (and
      (holdsDuring ?TIME (age ?BABY ?AGE))
      (instance ?AGE (IntervalFn (MeasureFn 0 YearDuration) (MeasureFn 1 YearDuration))))))

;; NS: Note that ?BABY, above, will also inherit less restrictive
;; numeric age constraints from HumanChild and HumanYouth.  How
;; this will work out in inference depends on the inference
;; algorithm (presumably resolution), type of query (variable
;; binding or true/false), number of answers requested, and time
;; allowed for the inference engine to run.

;; NS: add.
(=>
  (and
    (instance ?H Human)
    (holdsDuring ?T1 (age ?H (MeasureFn ?N YearDuration)))
    (lessThanOrEqualTo ?N 1))
  (holdsDuring ?T1 (instance ?H HumanBaby)))


(documentation older EnglishLanguage "(older ?OBJ1 ?OBJ2) means that ?OBJ1 is older than 
?OBJ2, i.e. the age of ?OBJ1 is &%greaterThan the age of ?OBJ2.")
(instance older BinaryPredicate)
(domain older 1 Object)
(domain older 2 Object)

(=>
  (older ?O1 ?O2)
  (exists (?N1 ?N2 ?U)
    (and
      (age ?O1 (MeasureFn ?N1 ?U))
      (age ?O2 (MeasureFn ?N2 ?U))
      (greaterThan ?N1 ?N2))))

(documentation StartFn EnglishLanguage "(StartFn ?PROCESS) denotes &%IntentionalProcesses 
of bringing it about that &%Processes of type ?PROCESS begin, e.g. start 
working, begin running, etc.")
(instance StartFn UnaryFunction)
(domain StartFn 1 Process)
(rangeSubclass StartFn IntentionalProcess)

(=>
  (instance ?S (StartFn ?P))
  (exists (?I)
    (and
      (instance ?I ?P)
      (starts (WhenFn ?S) (WhenFn ?I)))))

(documentation StopFn EnglishLanguage "(StopFn ?PROCESS) denotes &%IntentionalProcesses 
of bringing it about that &%Processes of type ?PROCESS end, e.g. stop 
walking, quit working, etc.")
(instance StopFn UnaryFunction)
(domain StopFn 1 Process)
(rangeSubclass StopFn IntentionalProcess)

(=>
  (instance ?S (StopFn ?P))
  (exists (?I)
    (and
      (instance ?I ?P)
      (finishes (WhenFn ?S) (WhenFn ?I)))))

(subclass Dodging BodyMotion)
(subclass Dodging IntentionalProcess)
(documentation Dodging EnglishLanguage "Purposely moving one's body in such a way as 
to avoid being hit by something.")

;; NS: edited to temporally relate ?I to ?D.
(=>
  (and
    (instance ?D Dodging)
    (agent ?D ?A)
    (equal ?DT (WhenFn ?D)))
  (hasPurpose ?D 
    (not 
      (exists (?I)
        (and
          (or
            (meetsTemporally ?DT (WhenFn ?I))
            (overlapsTemporally ?DT (WhenFn ?I)))
          (instance ?I Impacting)
          (patient ?I ?A))))))

(subclass Mounting BodyMotion)
(documentation Mounting EnglishLanguage "Any &%BodyMotion which results in being &%On 
something else.")

(=>
  (and
    (instance ?M Mounting)
    (agent ?M ?A)
    (patient ?M ?O))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?M)) 
      (not (orientation ?A ?O On)))
    (holdsDuring 
      (EndFn (WhenFn ?M)) 
      (orientation ?A ?O On))))

(subclass Stepping BodyMotion)
(documentation Stepping EnglishLanguage "The &%BodyMotion of
extending one foot forward and then bringing the other foot
to the same lateral position as the first leg.")

;; NS. delete.
;; (=>
;;    (instance ?AMBULATE Ambulating)
;;    (exists (?SUB)
;;       (and
;;          (subclass ?SUB Stepping)
;;          (forall (?INST)
;;             (<=>
;;                (instance ?INST ?SUB)
;;                (subProcess ?INST ?AMBULATE))))))

;; NS: add.  The conception here is that each instance of
;; Ambulating (Walking or Running) includes at least two
;; Stepping subProcesses: a starting one, and an ending one.
(=>
  (and
    (instance ?AMBULATE Ambulating)
    (equal ?DURATION (WhenFn ?AMBULATE)))
   (exists (?STEP1 ?STEPN)
     (and
       (instance ?STEP1 Stepping)
       (instance ?STEPN Stepping)
       (subProcess ?STEP1 ?AMBULATE)
       (subProcess ?STEPN ?AMBULATE)
       (starts (WhenFn ?STEP1) ?DURATION)
       (finishes (WhenFn ?STEPN) ?DURATION)
       (not (equal ?STEP1 ?STEPN)))))

;; NS: add.
(=>
  (and
    (instance ?A Ambulating)
    (subProcess ?S1 ?A)
    (instance ?S1 Stepping)
    (subProcess ?S2 ?A)
    (instance ?S2 Stepping)
    (equal ?S1-START (BeginFn (WhenFn ?S1)))
    (equal ?S2-START (BeginFn (WhenFn ?S2)))
    (not
      (or
        (before ?S1-START ?S2-START)
        (before ?S2-START ?S1-START))))
  (equal ?S1 ?S2))

;; NS: add.
(=>
  (and
    (instance ?AMBULATE Ambulating)
    (instance ?STEP Stepping)
    (subProcess ?STEP ?AMBULATE)
    (agent ?AMBULATE ?AGENT))
  (agent ?STEP ?AGENT))

;; NS: add.
(=>
  (and
    (instance ?AMBULATE Ambulating)
    (instance ?STEP Stepping)
    (subProcess ?STEP ?AMBULATE)
    (agent ?STEP ?AGENT))
  (agent ?AMBULATE ?AGENT))


(subclass Wading Walking)
(documentation Wading EnglishLanguage "Any instance of &%Walking which occurs through a 
&%BodyOfWater.")

(=>
  (instance ?P Wading)
  (exists (?W)
    (and
      (instance ?W WaterArea)
      (eventLocated ?P ?W))))

(subclass Jumping BodyMotion)
(subclass Jumping MotionUpward)
(documentation Jumping EnglishLanguage "Any &%MotionUpward which is done by one's body 
and which results in a situation where one's feet are unsupported.")

(=>
  (and
    (instance ?J Jumping)
    (agent ?J ?A))
  (holdsDuring 
    (EndFn (WhenFn ?J))
    (not
      (attribute ?A Standing))))

(subclass Somersaulting BodyMotion)
(documentation Somersaulting EnglishLanguage "Any &%BodyMotion which begins and ends in 
a &%Sitting position and where the feet roll over the head and return to 
their original position.")

(=>
  (and
    (instance ?S Somersaulting)
    (agent ?S ?A))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?S)) 
      (attribute ?A Sitting))
    (holdsDuring 
      (EndFn (WhenFn ?S)) 
      (attribute ?A Sitting))))  

(subclass Reflecting Radiating)
(documentation Reflecting EnglishLanguage "Any instance of &%Radiating where the radiated 
waves rebound from a surface, e.g. an echo of sound or a reflection of 
light.")

(subclass ReflectingLight Reflecting)
(subclass ReflectingLight RadiatingLight)
(documentation ReflectingLight EnglishLanguage "Those
instances of &%RadiatingLight where the &%instrument is not
a light source, but is simply a surface which bends light
waves that come in contact with it.")

(documentation wavelength EnglishLanguage "(wavelength ?RADIATION ?MEASURE) means that the 
instance of radiation, ?RADIATION, has an average wavelength of ?MEASURE.")
(instance wavelength SingleValuedRelation)
(domain wavelength 1 Radiating)
(domain wavelength 2 LengthMeasure)
(instance wavelength AsymmetricRelation)
(instance wavelength BinaryPredicate)
;(subrelation wavelength measure)

(subclass RadiatingInfrared Radiating)
(disjoint RadiatingInfrared RadiatingLight)
(disjoint RadiatingInfrared RadioEmission)
(documentation RadiatingInfrared EnglishLanguage "Any instance of &%Radiating where the 
&%wavelengths are longer than those of visible light and shorter than those 
of radio emissions.")

(subclass RadiatingUltraviolet RadiatingElectromagnetic)
(disjoint RadiatingUltraviolet RadiatingLight)
(disjoint RadiatingUltraviolet XRayRadiation)
(documentation RadiatingUltraviolet EnglishLanguage "Any case of &%RadiatingElectromagnetic where the 
&%wavelengths are shorter than those of visible light and longer than those 
of X-Rays.")
(abbreviation "UV" RadiatingUltraviolet)

(subclass XRayRadiation Radiating)
(documentation XRayRadiation EnglishLanguage "Electro-magnetic radiation of short wavelength, 
often made use of by devices that scan the inside of objects.")

(subclass RadiatingVisibleLight RadiatingLight)
(disjoint RadiatingVisibleLight RadiatingUltraviolet)
(documentation RadiatingVisibleLight EnglishLanguage "Any instance of &%RadiatingLight that can 
be detected by normal human visual perception.")

(=>
  (and
    (instance ?R RadiatingLight)
    (instance ?H Human)
    (instance ?S Seeing)
    (agent ?S ?H)
    (patient ?S ?R))
  (instance ?R RadiatingVisibleLight))

(subclass Sunlight RadiatingLight)
(documentation Sunlight EnglishLanguage "Any instance of &%RadiatingLight where the 
Sun (&%Sol) is the origin.")

(subclass RadioReceiver ReceiverDevice)
(documentation RadioReceiver EnglishLanguage "A &%RadioReceiver is a &%Device for receiving 
radio broadcast signals from a &%RadioStation.")


(subclass Script Collection)
(documentation Script EnglishLanguage "The collection of &%Characters in a particular 
written language.  Every &%WrittenCommunication consists of &%Characters 
written in a particular script.  Scripts include different typefaces, as 
well as entirely different characters.  'Times Roman' is a very specific 
script.  While the 'latin' character set is a general one, that has 
specific subclasses like Times Roman.  Other scripts include Devanagri 
(which may be expressed in many different more specific typefaces), or 
Simplified Chinese.") 

;; NS: edited to fix argument order for &%part.
(=>
  (instance ?W WrittenCommunication)
  (exists (?T ?C ?S)
    (and
      (result ?W ?T)
      (instance ?T Text)
      (part ?C ?T)
      (instance ?C Character)
      (instance ?S Script)
      (member ?C ?S))))

(subclass Orthography Procedure)
(documentation Orthography EnglishLanguage "A method for representing the sounds of a &%Language 
with written &%Characters.")

(subclass Lyrics Text)
(documentation Lyrics EnglishLanguage "Any &%Text which is intended to be sung.")

(=>
  (instance ?LYRIC Lyrics)
  (hasPurpose ?LYRIC 
    (exists (?SING)
      (and
        (instance ?SING Singing)
        (patient ?SING ?LYRIC)))))

(subclass Paragraph Text)
(documentation Paragraph EnglishLanguage "A &%Text which consists of one or more sentences, 
begins with an indented line, and expresses a single topic.")

(=>
  (instance ?T Paragraph)
  (exists (?S)
    (and
      (instance ?S Sentence)
      (part ?S ?T))))

(documentation sententialObject EnglishLanguage "(sententialObject ?OBJECT ?SENTENCE) 
means that the &%NounPhrase ?OBJECT is the object of the &%Sentence 
?SENTENCE.")
(domain sententialObject 1 NounPhrase)
(domain sententialObject 2 Sentence)

(subrelation sententialObject grammaticalRelation)
(documentation sententialSubject EnglishLanguage "(sententialSubject ?SUBJECT ?SENTENCE) 
means that the &%NounPhrase ?SUBJECT is the subject of the &%Sentence 
?SENTENCE.")
(domain sententialSubject 1 NounPhrase)
(domain sententialSubject 2 Sentence)
(subrelation sententialSubject grammaticalRelation)

(documentation speaksLanguage EnglishLanguage "(speaksLanguage ?AGENT ?LANGUAGE) means that the 
&%SentientAgent ?AGENT is capable of understanding and/or generating the &%Language 
?LANGUAGE.")
(instance speaksLanguage BinaryPredicate)
(domain speaksLanguage 1 SentientAgent)
(domain speaksLanguage 2 Language)

;; KJN: Deleting this.  Made MakingInstrumentalMusic in Music ontology and moved 
;; it to Merge
;;(subclass InstrumentalMusic Music)
;;(documentation InstrumentalMusic EnglishLanguage "&%Music
;;which is produced (at least in part) by a
;;&%MusicalInstrument.")

;;(=>
;;   (instance ?MUSIC InstrumentalMusic)
;;   (exists (?INSTRUMENT)
;;      (and
;;         (instance ?INSTRUMENT MusicalInstrument)
;;         (instrument ?MUSIC ?INSTRUMENT))))

;;(partition Music MonophonicMusic PolyphonicMusic)

;; KJN: Making this into an attribute to describe a MakingMusic or
;; MusicRecording instance, instead of a subclass of MakingMusic
(instance MonophonicMusic RelationalAttribute)
(documentation MonophonicMusic EnglishLanguage "&%MakingMusic
which has a single part, i.e. &%MakingMusic which cannot be
divided into two or more contemporaneous &%subProcesses
which are also instances of &%MakingMusic.")

(instance PolyphonicMusic RelationalAttribute)
(documentation PolyphonicMusic EnglishLanguage "&%MakingMusic
which has two or more parts, i.e. &%MakingMusic which can be
divided into two or more contemporaneous &%subProcesses
which are also instances of &%MakingMusic.")

(<=>
  (attribute ?MUSIC PolyphonicMusic)
  (exists (?PART1 ?PART2)
    (and
      (instance ?MUSIC MakingMusic)
      (instance ?PART1 MakingMusic)
      (instance ?PART2 MakingMusic)
      (subProcess ?PART1 ?MUSIC)
      (subProcess ?PART2 ?MUSIC)
      (not (equal ?PART1 ?PART2))
      (cooccur ?PART1 ?MUSIC)
      (cooccur ?PART2 ?MUSIC))))  

;; KJN: Removing this.  Created MakingVocalMusic and put it in Merge.kif      
;;(subclass VocalMusic Music)
;;(documentation VocalMusic EnglishLanguage "&%Music which is produced (at least in part)
;;by &%Singing.")

;;(=>
;;  (instance ?M VocalMusic)
;;  (exists (?S)
;;    (and
;;      (instance ?S Singing)
;;      (subProcess ?S ?M))))
      
(subclass MusicalTone RadiatingSound)
(documentation MusicalTone EnglishLanguage "A &%Process of &%RadiatingSound where the
sound has a fundamental frequency and 0 or more partial frequencies
or unrelated transients or noise components that have a lesser
amplitude than the fundamental.")

(subclass RadiatingSoundUltrasonic RadiatingSound)
(documentation RadiatingSoundUltrasonic EnglishLanguage "All sound waves that have frequencies 
above those that normal &%Human ears can detect.")

(instance soundFrequency BinaryPredicate)
(documentation soundFrequency EnglishLanguage "A relation between a &%Process of 
&%MusicalTone and the fundamental frequency of that tone.")
(domain soundFrequency 1 MusicalTone)
(domain soundFrequency 2 FunctionQuantity)

;; NS: The ambiguity of &%patient, in particular, creates
;; unnecessary confusion for axiom authors, and definitely
;; will be a problem if SUMO is ever used in an application
;; requiring serious inference.  On the one hand, &%patient
;; is frequently used to indicate the object acted on (in
;; grammatical terms, the direct object) of a Process.  On
;; the other hand, it is also used to gather up just about
;; all of the objects that play any role in a Process,
;; except for &%agent, &%origin, &%destination, and perhaps
;; a few others.  This means that a user (human or
;; application) won't really be able to determine the object
;; acted on/direct object of a Process (e.g., Process1)
;; without posing a query like the following:
;;
;;     (and
;;       (patient Process1 ?X)
;;       (not (instrument Process1 ?X))
;;       (not (resource Process1 ?X))
;;       (not (result Process1 ?X))
;;       ... etc.)
;;
;; The solution is to (a) restrict the meaning of &%patient
;; to "object acted on/direct object" and define some new
;; predicate to gather up all of the non-&%agent
;; subrelations, or (b) define some new predicate that
;; strictly means "object acted on/direct object", relate it
;; to those predicates it should subsume, and redefine
;; &%patient to mean "every case role in a Process that is
;; not the &%agent".  Either way, all of the axioms that
;; currently use &%patient and its current subrelations will
;; have to be reviewed and, if necessary, rewritten.  This
;; should be done sooner rather than later.
;;
;; To determine all of the entities that play any role in
;; Process1, a user can pose this query:
;;
;;    (involvedInEvent Process1 ?X)


(subclass WrittenCommunication LinguisticCommunication)
(documentation WrittenCommunication EnglishLanguage "Any
&%LinguisticCommunication where the &%instrument is a
&%Text, e.g. a letter, an email, a memo, etc.")

;; NS: There is a tendency throughout MILO and the domain
;; ontologies, and sometimes even within Merge.kif, to
;; compose rules in relative isolation, as if no more
;; general rule already stated somewhere else could possibly
;; be relevant.  One practical result is that we allow (or
;; force) inference engines to do unnecessary skolemization.
;; Typically, an inference engine will have no way of
;; proving that two skolemized terms should be considered
;; &%equal, so newly introduced terms that "pass in the
;; night" will proliferate during inference.  Another
;; problem is the relatively small and imprecise (at least
;; as used) set of CaseRoles.  Over-skolemization and
;; CaseRole imprecision combine to pretty much guarantee
;; that many of the rules in MILO and the domain ontologies
;; will not produce the intended or desired inference
;; results.  

;; [12] - [24] below are interrelaed, but should be much
;; more so.

;; Merge.kif
;;
;; [12] (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.")
;;
;; [13]
;; (=>
;;     (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))))
;;
;; NS: [12] and [13] seem not to correspond to each other.
;;
;; TO DO: Try to think of a more useful way to capture the
;;        salient meaning of Communication.  (refers ?PHYS
;;        ?ENTITY) seems so vague as to be pointless.
;;        According to the documentation statement, an
;;        instance of Communication is essentially a
;;        transfer of information from at least one agent to
;;        at least one other agent.  I understand why this
;;        rule is so general, but I'm inclined to view
;;        Communication as involving (at least)
;;        representation and ContentBearingPhysicals.

;; Merge.kif
;;
;; [14] (subclass LinguisticCommunication Communication)
;;
;; [15]
;; (=>
;;     (instance ?COMMUNICATE LinguisticCommunication)
;;     (exists (?OBJ)
;;         (and
;;             (represents ?COMMUNICATE ?OBJ)
;;             (instance ?OBJ LinguisticExpression)
;;             (patient ?COMMUNICATE ?OBJ))))
;;
;; TO DO: Relate [15] to [13], or to a revised version of [13].

;; Merge.kif
;; 
;; [16] (subclass Writing ContentDevelopment)
;;
;; [17]
;; (=>
;;     (instance ?DEVELOP ContentDevelopment)
;;     (exists (?OBJ)
;;         (and
;;             (instance ?OBJ ContentBearingObject)
;;             (result ?DEVELOP ?OBJ))))

;; Mid-level-ontology.kif
;;
;; [18] (subclass WrittenCommunication Communication)
;;
;; [19]
;; (=>
;;    (instance ?COMMUNICATE WrittenCommunication)
;;    (exists (?WRITE ?READ ?TEXT)
;;       (and
;;          (instance ?WRITE Writing)
;;          (instance ?READ Reading)
;;          (instance ?TEXT Text)
;;          (instrument ?COMMUNICATE ?TEXT)
;;          (result ?WRITE ?TEXT)
;;          (patient ?READ ?TEXT)
;;          (subProcess ?WRITE ?COMMUNICATE)
;;          (subProcess ?READ ?COMMUNICATE))))
;;
;; NS: In Merge.kif, the documentation for &%Reading
;; indicates that the term denotes the process of reading
;; aloud, but &%Reading is not related to &%Speaking.  The
;; process of reading silently is supposedly denoted by
;; &%Interpreting.  &%Reading is not usefully related to
;; &%Interpreting.  So, according to [19], an instance of
;; WrittenCommunication entails reading a text aloud, but
;; not interpreting (understanding) the text.  Also, [19]
;; fails to specify any temporal ordering between ?WRITE and
;; ?READ.
;;
;; TO DO: Fix [19].
      
;; Merge.kif
;;
;; [20] (subclass Speaking Vocalizing)
;;
;; [21] (subclass Vocalizing RadiatingSound)
;;
;; [22] (documentation Vocalizing EnglishLanguage "Any
;; instance of RadiatingSound where the instrument is the
;; Human vocal cords. This covers grunts, screams, roars, as
;; well as Speaking.")
;; 
;; [23]
;; (=>
;;     (instance ?VOCAL Vocalizing)
;;     (exists (?HUMAN)
;;         (and
;;             (instance ?HUMAN Human)
;;             (agent ?VOCAL ?HUMAN)
;;             (instrument ?VOCAL ?HUMAN))))
;;
;; NS: [22] and [23] do not correspond, perhaps because
;; creating a term for vocal cord was not within the scope
;; of Merge.kif.

;; Merge.kif
;;
;; [24]
;; (=>
;;     (and
;;         (instance ?EMIT RadiatingSound)
;;         (agent ?EMIT ?SOUND))
;;     (exists (?ATTR)
;;         (and
;;             (instance ?ATTR SoundAttribute)
;;             (attribute ?SOUND ?ATTR))))
;;
;; NS: [20], [21], [23], and [24] together entail a CaseRole
;; mismatch.  In [23], the &%agent is a Human.  In [24], the
;; &%agent is presumably a sound, but neither Merge.kif nor
;; Mid-level-ontology.kif contain a representation of
;; *Sound, *SoundWave, etc.  So, currently, [23] and [24]
;; entail that the Human who is the agent in a Speaking is
;; also the instrument (and, so, the patient) in the
;; Speaking, and is either &%Stressed or &%Audible as well.
;; 
;; TO DO: Clean up the CaseRole mess, creating the necessary
;;        concepts.

(subclass Corresponding LinguisticCommunication)
(documentation Corresponding EnglishLanguage "Instances of &%LinguisticCommunication which 
are achieved by means of &%Texts that are mailed between the persons 
communicating with one another.")
(=>
  (instance ?C Corresponding)
  (exists (?M ?T)
    (and
      (instance ?M Mailing)
      (subProcess ?M ?C)
      (instance ?T Text)
      (patient ?M ?T)
      (patient ?C ?T))))

(subclass Reminding Requesting)
(documentation Reminding EnglishLanguage "Any &%Requesting that is intended to cause a 
&%Remembering of something.")

(=>
   (instance ?REMIND Reminding)
   (exists (?REMEMBER)
      (and
         (instance ?REMEMBER Remembering)
         (causes ?REMIND ?REMEMBER))))

(subclass Threatening Committing)
(documentation Threatening EnglishLanguage "Any &%Committing where the thing promised 
is something that is deemed undesirable by the &%destination of the 
&%Committing.")

(=>
   (and
      (instance ?THREATEN Threatening)
      (agent ?THREATEN ?AGENT)
      (patient ?THREATEN ?PROP)
      (destination ?THREATEN ?DEST))
  (not (desires ?DEST ?PROP)))

(subclass Punishing RegulatoryProcess)
(documentation Punishing EnglishLanguage "A &%RegulatoryProcess where the agent does 
something to the &%destination that the &%agent knows is undesirable 
for the &%destination.")

(=>
  (and
    (instance ?P Punishing)
    (agent ?P ?A)
    (patient ?P ?F)
    (destination ?P ?D))
  (knows ?A 
    (not 
      (desires ?D ?F))))

(subclass Registering Stating)
(subclass Registering PoliticalProcess)
(documentation Registering EnglishLanguage "Submitting official paperwork in a government 
agency, e.g. filing for divorce, making a legal claim against someone.")

(=>
   (instance ?ACTION LegalAction)
   (exists (?REGISTER)
      (and
         (instance ?REGISTER Registering)
         (subProcess ?REGISTER ?ACTION))))

(subclass Answering Stating)
(documentation Answering EnglishLanguage "Responding to a &%Questioning, i.e. trying to answer 
someone's question.")

(=>
   (instance ?ANSWER Answering)
   (exists (?QUESTION)
      (and
         (instance ?QUESTION Questioning)
         (refers ?ANSWER ?QUESTION)
         (earlier (WhenFn ?QUESTION) (WhenFn ?ANSWER)))))

(subclass Arguing Stating)
(documentation Arguing EnglishLanguage "Any &%Stating which has the form of an &%Argument.")

(=>
   (instance ?ARGUE Arguing)
   (exists (?STATEMENT ?ARGUMENT)
      (and
         (patient ?ARGUE ?STATEMENT)
         (instance ?STATEMENT Statement)
         (containsInformation ?STATEMENT ?ARGUMENT)
         (instance ?ARGUMENT Argument))))
         
;; changing this to LinguisticCommunication
;;(subclass TellingALie Stating)
(subclass TellingALie LinguisticCommunication)
(documentation TellingALie EnglishLanguage "Any &%LinguisticCommunication which is both &%False and believed 
to be &%False by the &%agent of the &%LinguisticCommunication.")

(=>
   (and
      (instance ?STATE TellingALie)
      (agent ?STATE ?AGENT)
      (patient ?STATE ?STATEMENT))
   (holdsDuring
      (WhenFn ?STATE)
      (believes ?AGENT (truth ?STATEMENT False))))

(subclass Founding Declaring)
(subclass Founding OrganizationalProcess)
(documentation Founding EnglishLanguage "Setting up an &%Organization.")

(=>
   (instance ?FOUND Founding)
   (exists (?ORG)
      (and
         (instance ?ORG Organization)
         (result ?FOUND ?ORG)))) 

(subclass Club Organization)
(documentation Club EnglishLanguage "A Club is an &%Organization of people that share some &%desire")
(=>
  (and
    (instance ?CLUB Club)
    (member ?MEM1 ?CLUB)
    (member ?MEM2 ?CLUB))
  (exists (?DESIRE)
    (and
      (desires ?MEM1 ?DESIRE)
      (desires ?MEM2 ?DESIRE))))
                  
(documentation yearOfFounding EnglishLanguage "(yearOfFounding ?ORG ?NUMBER) means that the &%Organization 
?ORG was founded in the year expressed in ?NUMBER.")
(instance yearOfFounding BinaryPredicate)
(instance yearOfFounding AsymmetricRelation)
(domain yearOfFounding 1 Organization)
(domain yearOfFounding 2 Integer)

(=>
  (yearOfFounding ?O ?Y)
  (dateEstablished ?O 
    (YearFn ?Y)))

(<=>
  (yearOfFounding ?O ?Y)
  (exists (?F)
    (and
      (overlapsTemporally ?F (YearFn ?Y))
      (instance ?F Founding)
      (result ?F ?O))))

(instance dateEstablished BinaryPredicate)
(domain dateEstablished 1 Physical)
(domainSubclass dateEstablished 2 TimePosition)
(documentation dateEstablished EnglishLanguage "(&%dateEstablished ?THING ?TIME) means 
that the &%Physical ?THING was founded on the date indicated by ?TIME.  
For example, (&%dateEstablished &%UnitedNations 
(&%DayFn 26 (&%MonthFn &%June (&%YearFn 1945)))).") 

(=>
  (dateEstablished ?THING ?DATE)
  (exists (?DAY)
    (and
      (instance ?DAY ?DATE)
      (overlapsTemporally ?DAY (BeginFn (WhenFn ?THING))))))

(instance dateUsed TernaryPredicate)
(domain dateUsed 1 Object)
(domain dateUsed 2 TimePoint)
(domain dateUsed 3 Agent)
(documentation dateUsed EnglishLanguage "The date an &%Object is used by an &%Agent.")
(termFormat EnglishLanguage dateUsed "date used")
(=>
  (dateUsed ?OBJECT ?DATE ?AGENT)
  (exists (?PROCESS)
    (and
      (instance ?PROCESS Process)
      (patient ?PROCESS ?OBJECT)
      (agent ?PROCESS ?AGENT)
      (uses ?OBJECT ?AGENT)
      (overlapsTemporally ?DATE (WhenFn ?PROCESS)))))
      
(subclass Accrediting Declaring)
(documentation Accrediting EnglishLanguage "Any process of certifying an &%EducationalOrganization.")
(=>
   (and
      (instance ?A Accrediting)
      (patient ?A ?EO))
   (instance ?EO EducationalOrganization))

(subclass Indicating Communication)
(subclass Indicating BodyMotion)
(documentation Indicating EnglishLanguage "Pointing out a person, place or thing with 
one's hand or with an &%Artifact.")

(subclass Divorcing Declaring)
(documentation Divorcing EnglishLanguage "A &%LegalAction whereby a marriage (&%Wedding) is dissolved.  This 
includes annulments.")
(=>
  (instance ?D Divorcing)
  (exists (?P1 ?P2 ?T1 ?T2)
    (and
      (holdsDuring ?T1 
        (spouse ?P1 ?P2))
      (holdsDuring ?T2 
        (not (spouse ?P1 ?P2)))
      (finishes ?T1 ?D)
      (starts ?T2 ?D))))

(subclass Appointing Declaring)
(documentation Appointing EnglishLanguage "Any instance of &%Declaring by which the 
patient is assigned to a &%Position within an &%Organization where 
the patient previously had no position.  For example, the appointments 
of people to non-elective offices in a government.")
(=>
  (and
    (instance ?A Appointing)
    (patient ?A ?H))
  (exists (?P ?ORG)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?A)) 
        (not 
          (occupiesPosition ?H ?P ?ORG)))
      (holdsDuring 
        (EndFn (WhenFn ?A)) 
        (occupiesPosition ?H ?P ?ORG)))))

(=>
  (instance ?A Appointing)
  (not
    (exists (?H)
      (and
        (agent ?A ?H) 
        (instance ?H Public)))))

(subclass TurningOffDevice InternalChange)
(documentation TurningOffDevice EnglishLanguage "Any &%Process whose result is that the patient 
of the process is in the state of &%DeviceOff.  In other words, this class covers 
any process of turning off a device, e.g. turning off the lights, switching off a 
television set, etc.")

(=>
  (and
    (instance ?P TurningOffDevice)
    (patient ?P ?D))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?P)) 
      (attribute ?D DeviceOn))
    (holdsDuring 
      (EndFn (WhenFn ?P)) 
      (attribute ?D DeviceOff))))

(=>
  (and
    (instance ?P TurningOffDevice)
    (patient ?P ?D))
  (instance ?D Device))

(subclass TurningOnDevice InternalChange)
(documentation TurningOnDevice EnglishLanguage "Any &%Process whose result is that the patient 
of the process is in the state of &%DeviceOn.  In other words, this class covers 
any process of turning on a device, e.g. turning on the lights, switching on a 
television set, etc.")

(=>
  (and
    (instance ?P TurningOnDevice)
    (patient ?P ?D))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?P)) 
      (attribute ?D DeviceOff))
    (holdsDuring 
      (EndFn (WhenFn ?P)) 
      (attribute ?D DeviceOn))))

(=>
  (and
    (instance ?P TurningOnDevice)
    (patient ?P ?D))
  (instance ?D Device))

(subclass Projectile Weapon)
(documentation Projectile EnglishLanguage "A missile, bullet, etc. that is fired from 
a &%Weapon.")

(=>
   (instance ?PROJECTILE Projectile)
   (capability Shooting patient ?PROJECTILE))

(subclass ProjectileShell Container)
(documentation ProjectileShell EnglishLanguage "The outer casing of a &%Projectile.")

;; NS: No.  Arrows don't have shells.  And the mechanics are
;; not described very precisely.  Typically, the casing
;; stays behind in the gun (does not move).  The true
;; projectile is the slug/warhead.  TO DO: rework this
;; subtopic someday.
(=>
   (instance ?PROJECTILE Projectile)
   (exists (?SHELL)
      (and
         (instance ?SHELL ProjectileShell)
         (part ?SHELL ?PROJECTILE))))

(subclass ProjectileLauncher Weapon)
(documentation ProjectileLauncher EnglishLanguage "A &%Weapon that shoots a &%Projectile.")

(=>
  (instance ?L ProjectileLauncher)
  (capability Shooting instrument ?L))

(=>
  (instance ?S Shooting)
  (exists (?P ?L)
    (and
      (instance ?P Projectile)
      (patient ?S ?P)
      (instance ?L ProjectileLauncher)
      (instrument ?S ?L))))

(subclass Spear Weapon)
(documentation Spear EnglishLanguage "A &%Weapon with a long handle and a short 
blade.")

(subclass Sword Weapon)
(documentation Sword EnglishLanguage "A &%Weapon with a long blade and covered 
handle.")

(subclass Whip Weapon)
(documentation Whip EnglishLanguage "A &%Weapon that consists of a thin strand of 
&%Fabric, usually &%Leather, and a handle by which the strand is 
impelled at a high rate of speed.")

(subclass Gun Weapon)
(subclass Gun ProjectileLauncher)
(partition Gun ArtilleryGun Firearm)
(documentation Gun EnglishLanguage "A &%Weapon that shoots a &%Projectile.")

(=>
   (instance ?GUN Gun)
   (capability Shooting instrument ?GUN))

(=>
   (instance ?SHOOT Shooting)
   (exists (?PROJECTILE ?GUN)
      (and
         (instance ?PROJECTILE Projectile)
         (patient ?SHOOT ?PROJECTILE)
         (instance ?GUN Gun)
         (instrument ?SHOOT ?GUN))))

(subclass MortarGun ArtilleryGun)
(documentation MortarGun EnglishLanguage "A short-range &%Gun that is positioned on the ground 
at a high angle and fires explosive shells.")

(subclass Bullet Projectile)
(documentation Bullet EnglishLanguage "A &%Projectile that is designed to be fired by a &%Gun.")
(=>
  (instance ?B Bullet)
  (hasPurpose ?B 
    (exists (?S ?GUN)
      (and
        (instance ?S Shooting)
        (instrument ?S ?GUN)
        (instance ?GUN Gun)
        (patient ?S ?B)))))

(subclass BulletCartridge Projectile)
(documentation BulletCartridge EnglishLanguage "The entire projectile consisting of a bullet, 
casing, gunpowder, and primer.")
(termFormat EnglishLanguage BulletCartridge "bullet cartridge")

(=>
  (instance ?CARTRIDGE BulletCartridge)
  (hasPurpose ?CARTRIDGE
    (exists (?BULLET ?CASE)
      (and
        (instance ?BULLET Bullet)
        (instance ?CASE CartridgeCase)
        (properPart ?BULLET ?CARTRIDGE)
        (properPart ?CASE ?CARTRIDGE)))))
          
(subclass CartridgeCase EngineeringComponent)
(documentation CartridgeCase EnglishLanguage "the part of a cartridge that holds the bullet")
(termFormat EnglishLanguage CartridgeCase "case")
(=>
  (instance ?CASE CartridgeCase)
  (exists (?CARTRIDGE ?BULLET ?K)
    (and
      (instance ?CARTRIDGE BulletCartridge)
      (instance ?BULLET Bullet)
      (instance ?K Keeping)
      (properPart ?CASE ?CARTRIDGE)
      (properPart ?BULLET ?CARTRIDGE)
      (agent ?K ?CASE)
      (patient ?K ?BULLET))))
                
        
(subclass GunBarrel EngineeringComponent)
(documentation GunBarrel EnglishLanguage "The part of a &%Gun through which a &%Projectile travels 
when it is fired.")
(=>
  (instance ?B GunBarrel)
  (exists (?G)
    (and
      (instance ?G Gun)
      (part ?B ?G))))

(=>
  (and
    (instance ?G Gun)
    (instance ?B GunBarrel)
    (part ?B ?G)
    (instance ?S Shooting)
    (instrument ?S ?GUN)
    (patient ?S ?P)
    (instance ?P Projectile))
  (exists (?SUB)
    (and
      (subProcess ?SUB ?S)
      (path ?SUB ?B))))

(subclass GunPowder Mixture)
(documentation GunPowder EnglishLanguage "A &%Mixture of potassium nitrate, sulfur, and 
charcoal that is used in &%ExplosiveDevices and to propell &%Projectiles 
in &%ProjectileWeapons.")

(subclass Lever Device)
(termFormat EnglishLanguage Lever "lever")
(documentation Lever EnglishLanguage "Anything which is actually used
as a lever, since many things can be used as such, regardless of the
intent during their &%Manufacture.  A lever necessarily has a &%Fulcrum
around which the lever exhibits &%Rotating.  A lever has a mechanical
advantage at the point of output compared to the point of input of
force.")
(externalImage Lever "http://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Palanca-ejemplo.jpg/800px-Palanca-ejemplo.jpg")

(=>
  (instance ?L Lever)
  (exists (?A)
    (axis ?A ?L)))

(=>
  (and
    (instance ?L Lever)
    (instance ?P Pushing)
    (instance ?M1 Motion)
    (destination ?P ?E1)
    (physicalEnd ?E1 ?L)
    (physicalEnd ?E2 ?L)
    (not
      (equal ?E1 ?E2))
    (holdsDuring (ImmediatePastFn (WhenFn ?M1))
      (located ?E1 ?P1))
    (holdsDuring (ImmediateFutureFn (WhenFn ?M1))
      (located ?E1 ?P2))
    (holdsDuring (ImmediatePastFn (WhenFn ?M1))
      (located ?E2 ?P3))
    (holdsDuring (ImmediateFutureFn (WhenFn ?M1))
      (located ?E2 ?P4))
    (distance ?P1 ?P2 ?D1)
    (distance ?P3 ?P4 ?D2))
  (greaterThan ?D2 ?D1))

(=>
  (instance ?P GunPowder)
  (capability Explosion instrument ?P))

(subclass GunTrigger EngineeringComponent)
(subclass GunTrigger Lever)
(documentation GunTrigger EnglishLanguage "The part of the &%Gun which is pulled in &%Shooting 
the &%Gun.")
(typicalPart GunTrigger Gun)
(typicallyContainsPart GunTrigger Gun)

(subclass LoadingWeapon Inserting)
(documentation LoadingWeapon EnglishLanguage "Inserting ammunition into a &%ProjectileWeapon 
in such a way that the ammunition can be fired by the weapon.")

(=>
  (and
    (instance ?L LoadingWeapon)
    (patient ?L ?P))
  (instance ?P Projectile))

(=>
  (and
    (instance ?L LoadingWeapon)
    (destination ?L ?W))
  (instance ?W ProjectileLauncher))

(instance effectiveRange BinaryPredicate)
(instance effectiveRange SingleValuedRelation)
(subrelation effectiveRange measure)
(domain effectiveRange 1 Device)
(domain effectiveRange 2 LengthMeasure)
(documentation effectiveRange EnglishLanguage "Models the effective range of some
device that is able to move by itself (like vehicles, rockets and so
on) or move other things (like weapons).")

;; effectiveRange of weapons means the ability to damage objects

(=>
  (and
    (instance ?GUN Gun)
    (effectiveRange ?GUN ?LM)
    (distance ?GUN ?O ?LM1)
    (not
      (exists (?O2)
        (between ?O ?O2 ?GUN)))
    (lessThanOrEqualTo ?LM1 ?LM))
  (capability
    (KappaFn ?DAMAGING
      (and
        (instance ?DAMAGING Damaging)
        (patient ?DAMAGING ?O)))
     instrument ?GUN))

;; effectiveRange of weapons means the ability to kill living things

(=>
  (and
    (instance ?GUN Gun)
    (effectiveRange ?GUN ?LM)
    (distance ?GUN ?O ?LM1)
    (instance ?O Organism)
    (not
      (exists (?O2)
        (between ?O ?O2 ?GUN)))
    (lessThanOrEqualTo ?LM1 ?LM))
  (capability
    (KappaFn ?KILLING
      (and
        (instance ?KILLING Killing)
        (patient ?KILLING ?O)))
     instrument ?GUN))

(subclass GunStock EngineeringComponent)
(documentation GunStock EnglishLanguage "The part of a &%Gun that is placed against the 
shoulder to absorb some of the recoil action when it is fired.")

(=>
   (instance ?STOCK GunStock)
   (exists (?GUN)
      (and
         (instance ?GUN Gun)
         (part ?STOCK ?GUN))))

(subclass WeaponOfMassDestruction Weapon)
(documentation WeaponOfMassDestruction EnglishLanguage "Nuclear, chemical and biological weapons.  
What these weapons have in common is that they are designed to kill large numbers 
of people indiscriminately.")

;; KJN: Moving to WMD.kif as BiochemicalWeapon is defined there
;;(subclass RadioactiveWeapon WeaponOfMassDestruction)
;;(disjoint RadioactiveWeapon BiochemicalWeapon)
;;(documentation RadioactiveWeapon EnglishLanguage "A &%WeaponOfMassDestruction which 
;;achieves its effect through radioactivity, either by an explosion resulting 
;;from nuclear fission or by a conventional explosive device that scatters 
;;radioactive debris.")

;;(documentation RadiologicalWeapon EnglishLanguage "&%Weapons which are designed to spread 
;;radioactive particles over a large area by means of a conventional 
;;explosive device rather than a nuclear reaction.  These weapons are often 
;;referred to as 'dirty bombs'.")
;;(subclass RadiologicalWeapon RadioactiveWeapon)

;;(subclass NuclearWeapon ExplosiveDevice)
;;(subclass NuclearWeapon Weapon)
;;(documentation NuclearWeapon EnglishLanguage "An &%ExplosiveDevice and &%RadioactiveWeapon
;;which achieves its effect by means of a critical mass of a radioactive substance.")
;;(subclass NuclearWeapon RadioactiveWeapon)

;;(=>
;;  (instance ?W NuclearWeapon)
;;  (capability RadiatingNuclear instrument ?W))

(subclass Handle EngineeringComponent)
(documentation Handle EnglishLanguage "The part or parts of an &%Artifact that are designed to be 
held with the &%Hands when the &%Artifact is used or carried.")
(=>
  (instance ?H Handle)
  (hasPurpose 
    ?H
    (exists (?G ?D)
      (and
        (instance ?G Grabbing)
        (patient ?G ?H)
        (instrument ?G ?D)
        (instance ?D Hand)))))

(subclass Shield Artifact)
(documentation Shield EnglishLanguage "An &%Artifact that is held by the hand or whole arm and 
is used to prevent injuries from &%Weapons.")

(=>
  (instance ?S Shield)
  (hasPurpose ?S
    (exists (?P ?H)
      (and
        (instance ?P Protecting)
        (instrument ?P ?S)
        (instance ?H Human)
        (patient ?P ?H)
        (prevents ?P 
          (KappaFn ?I
            (and
              (instance ?I Injuring)
              (exists (?W)
                (and
                  (instance ?W Weapon)
                  (instrument ?I ?W)))
              (=>
                (patient ?I ?H)
                (not
                  (patient ?P ?H))))))))))

(=>
  (instance ?S Shield)
  (exists (?H)
    (and
      (instance ?H Handle)
      (part ?H ?S)))) 

(subclass Mast Artifact)
(documentation Mast EnglishLanguage "A large pole in the center of a &%WaterVehicle which is 
used to support a sail.")

(=>
   (instance ?M Mast)
   (exists (?W)
      (and
         (instance ?W WaterVehicle)
         (part ?M ?W))))

;; KJN: Moving this to Engineering.kif         
;;(subclass Rotor EngineeringComponent)
;;(documentation Rotor EnglishLanguage "The &%Rotating component of a motor, generator or similar 
;;&%Device.")

;;(=>
;;  (instance ?R Rotor)
;;  (capability Rotating instrument ?R))

(subclass WingDevice EngineeringComponent)
(documentation WingDevice EnglishLanguage "The wings of &%Aircraft, i.e. the parts of &%Aircraft 
that allow them to become and remain airborne.")

(=>
  (instance ?W WingDevice)
  (exists (?A)
    (and
      (instance ?A Aircraft)
      (part ?W ?A))))

(subclass Tube Artifact)
(documentation Tube EnglishLanguage "A long, narrow, and hollow &%Artifact that is designed for 
moving &%Fluids from place to another.")

(=>
  (instance ?T Tube)
  (hasPurpose ?T 
    (exists (?P ?OBJ)
      (and
        (instance ?P Transfer)
        (path ?P ?T)
        (patient ?P ?OBJ)
        (attribute ?OBJ Fluid)))))

(subclass PhotographicFilm Artifact)
(documentation PhotographicFilm EnglishLanguage "Celluloid covered with an emulsion which can 
be converted into photographic negatives by a &%Camera.")

(subclass PictureFrame Artifact)
(documentation PictureFrame EnglishLanguage "A frame which surrounds a &%PaintedPicture or 
&%Photograph and has the function of protecting and accenting the picture.")

(=>
  (instance ?F PictureFrame)
  (hasPurpose ?F 
    (exists (?P)
      (and
        (meetsSpatially ?F ?P)
        (or
          (instance ?P PaintedPicture)
          (instance ?P Photograph))))))

(subclass Shelf Artifact)
(documentation Shelf EnglishLanguage "An piece of &%Furniture or part of a piece of &%Furniture 
that is used for keeping or displaying things.")

(=>
  (instance ?S Shelf)
  (exists (?F)
    (and
      (instance ?F Furniture)
      (part ?S ?F))))

(subclass AutomaticGun Gun)
(documentation AutomaticGun EnglishLanguage "A &%Gun that fires a burst of &%Projectiles 
with each pull of the trigger.  Also known as a machine gun.")
(=>
  (instance ?G AutomaticGun)
  (hasPurpose ?G
    (exists (?S1 ?S2 ?P ?T)
      (and
        (instance ?P Pulling)
        (instance ?T GunTrigger)
        (patient ?P ?T)
        (part ?T ?G)
        (instance ?S1 Shooting)
        (instance ?S2 Shooting)
        (instrument ?S1 ?G)
        (instrument ?S2 ?G)
        (not (equal ?S1 ?S2))
        (causes ?P ?S1)
        (causes ?P ?S2)))))

(=>
  (instance ?T GunTrigger)
  (hasPurpose ?T
    (exists (?S ?G ?P)
      (and
        (instance ?G AutomaticGun)
        (part ?T ?G)
        (patient ?P ?T)
        (instance ?P Pulling)
        (instance ?S Shooting)
        (instrument ?S ?G)
        (causes ?P ?S)))))

(subclass ArtilleryGun Gun)
(documentation ArtilleryGun EnglishLanguage "A &%Gun that is too large to be carried and fired 
by a single &%Human.  Typically, &%ArtilleryGuns are on wheels.") 

(subclass Firearm Gun)
(partition Firearm Rifle Pistol)
(documentation Firearm EnglishLanguage "A &%Gun that is small enough to be carried and fired by 
a single &%Human.")

(subclass Rifle Firearm)
(documentation Rifle EnglishLanguage "A &%Firearm with a long barrel that is intended to be fired 
from the shoulder.")

(subclass Pistol Firearm)
(documentation Pistol EnglishLanguage "A &%Firearm that is intended to be aimed and fired with a 
single hand.")

(subclass RevolverGun Pistol)
(documentation RevolverGun EnglishLanguage "A &%Pistol whose magazine is a revolving cylinder with 
six chambers for &%Bullets.")

(instance ContainerEmpty RelationalAttribute)
(documentation ContainerEmpty EnglishLanguage "&%ContainerEmpty is the &%Attribute of a 
&%Container that is empty.")

(=>
  (attribute ?C ContainerEmpty)
  (instance ?C Container))

(=>
  (attribute ?C ContainerEmpty)
  (not 
    (exists (?H ?S)
      (and 
        (instance ?H Hole)
        (hole ?H ?C)
        (partiallyFills ?S ?C)))))

(instance ContainerFull RelationalAttribute)
(contraryAttribute ContainerFull ContainerEmpty)
(documentation ContainerFull EnglishLanguage "&%ContainerFull is the &%Attribute of a 
&%Container that is full to capacity.")

(=>
  (attribute ?C ContainerFull)
  (instance ?C Container))

(=>
  (attribute ?C ContainerFull)
  (exists (?H ?S)
    (and 
      (instance ?H Hole)
      (hole ?H ?C)
      (fills ?S ?C))))

(subclass Holster Container)
(documentation Holster EnglishLanguage "A &%Container for a &%Pistol.  It is generally made of 
Leather and worn on either the shoulder or the waist.")

(=>
  (instance ?H Holster)
  (hasPurpose ?H 
    (exists (?P)
      (and
        (instance ?P Pistol)
        (contains ?H ?P)))))

(subclass Wastebasket Container)
(documentation Wastebasket EnglishLanguage "A &%Container which is used for trash.")

(subclass ArrowProjectile Projectile)
(documentation ArrowProjectile EnglishLanguage "A long, thin &%Projectile with a pointed tip is 
fired from a bow.")

(subclass DriveComponent EngineeringComponent)
(documentation DriveComponent EnglishLanguage "An &%EngineeringComponent whose purpose is to 
transfer force from one part of a &%Device to another part.")

;; KJN: Moving this to Economy.kif as the definition for MiningProduct is found there
;;(subclass PetroleumProduct MiningProduct)
(subclass PetroleumProduct Oil)
(documentation PetroleumProduct EnglishLanguage "&%PetroleumProduct is a broad class that 
includes both crude oil (Petroleum) and &%RefinedPetroleumProducts.")
(=>
  (instance ?PP PetroleumProduct)
  (exists (?O)
    (and
      (instance ?O OrganicCompound)
      (part ?O ?PP))))

(subclass FossilFuel Fuel)
(subclass FossilFuel PetroleumProduct)
(documentation FossilFuel EnglishLanguage "&%FossilFuel is the subclass of &%Fuel whose 
instances are derived from fossilized organic deposits, such as &%Coal 
and &%LiquefiedPetroleumGas.")

(subclass Fuel Substance)
(documentation Fuel EnglishLanguage "Fuel is the class of &%Substances that can be 
used as resources in Combustion processes in order to produce heat.  
Mechanical energy can be produced by burning fuel in an &%Engine.")
(=>
  (instance ?X FossilFuel)
  (attribute ?X Flammable))

(subclass Wax Substance)
(documentation Wax EnglishLanguage "Any &%Substance of high molecular weight that resembles 
beeswax.")

(subclass LiquefiedPetroleumGas FossilFuel)
;; KJN: Moving this to Economy.kif as the definition for RefinedPetroleumProduct is there
;;(subclass LiquefiedPetroleumGas RefinedPetroleumProduct)
(documentation LiquefiedPetroleumGas EnglishLanguage "&%LiquefiedPetroleumGas is a 
compressed hydrocarbon gas.")

(subclass Gasoline FossilFuel)
(documentation Gasoline EnglishLanguage "&%Gasoline is the subclass of 
RefinedPetroleumProducts that are fuels for internal combustion engines.")

(subclass DieselFuel FossilFuel)
(documentation DieselFuel EnglishLanguage "&%DieselFuel is the subclass of 
RefinedPetroleumProducts that are fuels for diesel engines.")

(documentation Transducer EnglishLanguage "A &%Device which is capable of converting one 
form of energy into another.  Formally, a &%Twoport that neither stores 
nor dissipates, but only transfers energy between its two ports.") 
(subclass Transducer Device)

(subclass Engine Transducer)
(documentation Engine EnglishLanguage "Engine is a subclass of &%Transducer.  &%Engines 
are devices for converting some form of energy resource into mechanical 
power.")

(documentation powerComponent EnglishLanguage "(powerComponent ?GENERATOR ?THING) means that the &%CorpuscularObject ?GENERATOR is the power-producing component of the &%CorpuscularObject ?THING which provides the energy for its operation.")
(instance powerComponent BinaryPredicate)
(instance powerComponent AsymmetricRelation)
(instance powerComponent IrreflexiveRelation)
(domain powerComponent 1 CorpuscularObject)
(domain powerComponent 2 CorpuscularObject)
(subrelation powerComponent component)

(=>
  (powerComponent ?G ?O)
  (and
    (instance ?G Device)
    (instance ?O Artifact)))

(=>
  (and
    (powerComponent ?G ?O)
    (instance ?O Device))
  (instance ?O SelfPoweredDevice))

;(=>
;  (powerComponent ?G ?O)
;  (or 
;    (instance ?G Engine)
;    (instance ?G Battery)))

(subclass SteamEngine Engine)
(documentation SteamEngine EnglishLanguage "&%SteamEngine is the subclass of &%Engines 
that produce mechanical power from heat and steam pressure.")

(subclass Turbine Engine)
(documentation Turbine EnglishLanguage "An &%Engine which converts the kinetic energy of a moving 
&%Liquid (typically &%Water) into mechanical energy.")

(subclass Windmill Engine)
(documentation Windmill EnglishLanguage "Windmill is the subclass of &%Engines that 
produce mechanical power from &%Wind energy.")

(subclass InternalCombustionEngine Engine)
(documentation InternalCombustionEngine EnglishLanguage "&%InternalCombustionEngine is 
the subclass of &%Engines in which a heat reaction that occurs inside 
the engine is transformed into mechanical energy.")

(=>
  (instance ?R (OperatingFn InternalCombustionEngine))
  (exists (?E ?C ?F)
    (and
      (instance ?E InternalCombustionEngine)
      (instrument ?R ?E)
      (hole ?C ?E)
      (instance ?F Combustion)
      (completelyFills ?F ?C))))

(subclass Manifold EngineeringComponent)
(documentation Manifold EnglishLanguage "A pipe which has several outlets for other pipes that flow 
into or out of it.")

(subclass ElectricMotor Engine)
(subclass ElectricMotor ElectricDevice)
(documentation ElectricMotor EnglishLanguage "&%ElectricMotor is the subclass of &%Engines 
that produce mechanical power from electricity.")

(subclass SwitchDevice EngineeringComponent)
(documentation SwitchDevice EnglishLanguage "An &%EngineeringComponent which is capable of turning 
an &%ElectricDevice on and off.")

(=>
   (instance ?DEVICE SwitchDevice)
   (exists (?PROC1 ?PROC2 ?ELECTRIC)
      (and
         (instrument ?PROC1 ?DEVICE)
         (causes ?PROC1 ?PROC2)
         (instrument ?PROC2 ?ELECTRIC)
         (instance ?ELECTRIC ElectricDevice))))

(subclass Microphone ElectricDevice)
(subclass Microphone CommunicationDevice)
(documentation Microphone EnglishLanguage "A &%CommunicationDevice that converts sound 
into electrical energy.")

(subclass ReceiverDevice CommunicationDevice)
(subclass ReceiverDevice ElectricDevice)
(documentation ReceiverDevice EnglishLanguage "An &%ElectricDevice that is capable of 
receiving and decoding &%RadioEmissions, e.g. &%Radios and &%Televisions.")

(=>
  (and
    (instance ?E RadioEmission)
    (destination ?E ?D))
  (instance ?D ReceiverDevice))

(subclass Telegraph ElectricDevice)
(subclass Telegraph CommunicationDevice)
(documentation Telegraph EnglishLanguage "A &%Device that permits &%LinguisticCommunication 
between remote points by means of a code of aural dots and dashes that can 
be converted into letters of an alphabet.")

(subclass ProjectionScreen CommunicationDevice)
(documentation ProjectionScreen EnglishLanguage "A &%CommunicationDevice upon which images 
are projected so that they can be viewed.")

(subclass Pencil WritingDevice)
(documentation Pencil EnglishLanguage "A &%WritingDevice that consists of an encased piece of 
graphite.")

;; NS: delete.  In general, it's bad practice to list
;; instances or subclasses in documentation, except as
;; designated examples.  Otherwise, changes to the file (or
;; another domain file) tend to make the documentation
;; obsolete.
;; (documentation DeviceAttribute EnglishLanguage "This class
;; contains two &%Attributes to indicate whether a &%Device is or is
;; not behaving as it is intended to behave, &%Functioning and
;; &%Malfunctioning.")

;; NS: add.
(subclass DeviceAttribute ObjectiveNorm)
(documentation DeviceAttribute EnglishLanguage "This class
contains &%Attributes that indicate how a &%Device is
behaving with respect to some norm or expectation.
Examples: &%Functioning, &%Malfunctioning.")

(=>
   (and
      (attribute ?DEVICE ?ATTRIBUTE)
      (instance ?ATTRIBUTE DeviceAttribute))
   (instance ?DEVICE Device))

(instance Functioning DeviceAttribute)
(contraryAttribute Functioning Malfunctioning)
(documentation Functioning EnglishLanguage "Indicates that a &%Device is performing its 
intended function.")

(=>
   (and
      (attribute ?DEVICE Functioning)
      (hasPurpose ?DEVICE ?PROP))
   (truth ?PROP True))

(instance Malfunctioning DeviceAttribute)
(documentation Malfunctioning EnglishLanguage "Indicates that a &%Device is not performing 
its intended function.")

(=>
   (and
      (attribute ?DEVICE Malfunctioning)
      (hasPurpose ?DEVICE ?PROP))
   (truth ?PROP False))

;; NS: delete.  This is wrong, because attributes such as
;; Malfunctioning and Functioning are instances of
;; ObjectiveNorm and, so, of RelationalAttribute.  Instances
;; of DeviceStateAttribute (DeviceOn, DeviceOff, etc.)
;; probably should be considered instances of
;; InternalAttribute, since they aren't "normative", but
;; rather simply descriptive of a device's state.

;; (subclass DeviceStateAttribute DeviceAttribute)

;; NS: add.
(subclass DeviceStateAttribute InternalAttribute)

(documentation DeviceStateAttribute EnglishLanguage
"&%DeviceStateAttribute is the class of attributes that represent
different states that a Device may be in.  Examples: &%DeviceOff,
&%DeviceOn, &%DeviceOpen, and &%DeviceClosed.")

(instance DeviceClosed DeviceStateAttribute)

;; NS: delete.  Now inconsistent.
;; (instance DeviceClosed RelationalAttribute)

;; NS: The treatment of attributes in MILO and even in SUMO
;; is confused, and confusing.  The partition of Attribute
;; into InternalAttribute and RelationalAttribute is not
;; explained well enough to prevent it from seeming
;; spurious.  I suspect that InternalAttribute was intended
;; to mean (and, perhaps, should be renamed to)
;; *IntrinsicAttribute.  There are no rules associated with
;; either InternalAttribute or RelationalAttribute, so the
;; basis of the partition and its utility are a little hazy.

(instance DeviceOff DeviceStateAttribute)

;; NS: delete.  Now redundant.
;; (instance DeviceOff InternalAttribute)

(instance DeviceOn DeviceStateAttribute)

;; NS: delete.  Now redundant.
;; (instance DeviceOn InternalAttribute)

(instance DeviceOpen DeviceStateAttribute)

;; NS: delete.  Now inconsistent.
;; (instance DeviceOpen RelationalAttribute)

(documentation deviceState EnglishLanguage "(deviceState ?DEVICE ?STATE) means that 
the &%Object ?DEVICE is in the &%DeviceStateAttribute ?STATE.")
(instance deviceState BinaryPredicate)
(domain deviceState 1 Object)
(domain deviceState 2 DeviceStateAttribute)
(subrelation deviceState attribute)

(subclass Aerator Device)
(documentation Aerator EnglishLanguage "A &%Device whose purpose is to mix &%Substances with 
&%Air.")

(=>
   (instance ?AERATOR Aerator)
   (hasPurpose ?AERATOR (exists (?COMBINE ?AIR)
                           (and
                              (instance ?COMBINE Combining)
                              (resource ?COMBINE ?AIR)
                              (instance ?AIR Air)
                              (instrument ?COMBINE ?AERATOR)))))

(subclass Aerating Combining)
(documentation Aerating EnglishLanguage "Combining a substance with &%Air.")
(=>
   (instance ?AERATE Aerating)
   (exists (?AIR ?S)
      (and
         (patient ?AERATE ?AIR)
         (instance ?AIR Air)
         (patient ?AERATE ?S)
         (attribute ?S Liquid))))

(subclass Broom BrushOrComb)
(documentation Broom EnglishLanguage "A &%BrushOrComb whose purpose is to remove dirt and other 
small particles from floors.")

(=>
  (instance ?B Broom)
  (hasPurpose ?B 
    (exists (?S)
      (and
        (instance ?S Sweeping)
        (instrument ?S ?B)))))

(subclass BrushOrComb Device)
(documentation BrushOrComb EnglishLanguage "A &%Device which consists of a handle and bristles and 
whose purpose is to remove particles from something or to smooth something out.")

(=>
  (instance ?B BrushOrComb)
  (hasPurpose ?B 
    (exists (?S)
      (and
        (or
          (instance ?S Removing)
          (instance ?S SurfaceChange))
        (instrument ?S ?B)))))

(subclass MatchDevice Device)
(documentation MatchDevice EnglishLanguage "A small stick of carboard or wood that is treated 
with chemicals that can be easily ignited with friction.  MatchDevices are 
used for starting fires.")

(=>
  (instance ?M MatchDevice)
  (capability (StartFn Combustion) instrument ?M))

(subclass VendingDevice Device)
(documentation VendingDevice EnglishLanguage "A &%Device which is capable of &%Selling a &%Product 
to a customer automatically when the customer inserts the appropriate amount of 
Currency.")

(=>
  (instance ?VD VendingDevice)
  (hasPurpose ?VD 
    (exists (?T ?C ?P)
      (and
        (instance ?T FinancialTransaction)
        (instrument ?T ?VD)
        (patient ?T ?C)
        (instance ?C Currency)
        (patient ?T ?P)
        (instance ?P Product)))))

(subclass WritingDevice Device)
(documentation WritingDevice EnglishLanguage "A &%Device whose purpose is to be an instrument 
of &%Writing, e.g. pens, pencils, crayons, etc.")

(=>
  (instance ?D WritingDevice)
  (hasPurpose ?D 
    (exists (?W)
      (and
        (instance ?W Writing)
        (instrument ?W ?D)))))

(subclass SmokingDevice Device)
(documentation SmokingDevice EnglishLanguage "Any Device whose purpose is &%Smoking.")

(=>
  (instance ?D SmokingDevice)
  (hasPurpose ?D 
    (exists (?S) 
      (and 
        (instance ?S Smoking) 
        (instrument ?S ?D)))))

(subclass SmokingPipe SmokingDevice)
(documentation SmokingPipe EnglishLanguage "A &%SmokingDevice consisting of a tube and a small 
bowl.")

(subclass Shower BathingDevice)
(documentation Shower EnglishLanguage "&%Shower refers to a plumbing fixture that
sprays water over you.")
(termFormat EnglishLanguage Shower "shower")

(=>
  (instance ?SHOWER Shower)
  (hasPurpose ?SHOWER
    (exists (?SPRAY)
      (and
        (instance ?SPRAY WaterMotion)
        (origin ?SPRAY ?SHOWER)))))

(=>
  (instance ?SHOWER Shower)
  (exists (?X ?FLOOR)
    (and
      (or
        (instance ?X Wall)
        (instance ?X Ceiling))
      (connected ?SHOWER ?X)
      (instance ?FLOOR Floor)
      (orientation ?SHOWER ?FLOOR Above))))

(subclass BathTub BathingDevice)
(subclass BathTub FluidContainer)
(documentation BathTub BathingDevice "&%BathTub refers to a &%BathingDevice that you
can fill with water to use to watch the body")
(termFormat EnglishLanguage BathTub "tub")

(=>
  (instance ?TUB BathTub)
  (hasPurpose ?TUB
    (exists (?WATER)
      (and
        (instance ?WATER Water)
        (contains ?TUB ?WATER)))))

(subclass Excrement BodySubstance)
(documentation Excrement EnglishLanguage "&%Excrement refers to the waste matter 
that is discharged from the body")
(termFormat EnglishLanguage Excrement "excrement")

(=>
  (instance ?X Excrement)
  (exists (?PROC ?ORG)
    (and
      (instance ?ORG Organism)
      (instance ?PROC PhysiologicProcess)
      (result ?PROC ?X)
      (agent ?PROC ?ORG))))

(subclass Feces Excrement)
(documentation Feces EnglishLanguage "&%Feces is a type of &%Solid &%Excrement 
evacuated from the bowels")
(termFormat EnglishLanguage Feces "feces")

(=>
  (instance ?X Feces)
  (attribute ?X Solid))

(=>
  (instance ?X Feces)
  (exists (?PROC ?INT)
    (and
      (instance ?PROC PhysiologicProcess)
      (instrument ?PROC ?INT)
      (instance ?INT Intestine)
      (result ?PROC ?X))))
      
(subclass Urine Excrement)
(documentation Urine EnglishLanguage "&%Urine is a type of &%Liquid &%Excrement that
is secreted by the &%Kidney")
(termFormat EnglishLanguage Urine "urine")

(=>
  (instance ?X Urine)
  (attribute ?X Solid))
 
(=>
  (instance ?X Urine)
  (exists (?PROC ?KIDNEY)
    (and
      (instance ?PROC PhysiologicProcess)
      (instrument ?PROC ?KIDNEY)
      (instance ?KIDNEY Kidney)
      (result ?PROX ?X))))
    
(subclass Excretion OrganismProcess)
(documentation Excretion EnglishLanguage "&%Excretion is a type of &%OrganismProcess
that discharges waste from tissues, organs or the body")
(termFormat EnglishLanguage Excretion "excretion")

(=>
  (instance ?PROC Excretion)
  (exists (?ORG ?WASTE ?PART)
    (and
      (instance ?ORG Organism)
      (agent ?PROC ?ORG)
      (patient ?PROC ?WASTE)
      (instance ?WASTE Excrement)
      (instance ?PART BodyPart)
      (instrument ?PROC ?PART))))

(subclass Urination Excretion)
(documentation Urination EnglishLanguage "&%Urination is a type of &%Excretion that 
discharges &%Urine")
(termFormat EnglishLanguage Urination "urination")

(=>
  (instance ?PROC Urination)
  (exists (?URINE)
    (and
      (instance ?URINE Urine)
      (patient ?PROC ?URINE))))
      
(subclass Defecation Excretion)
(documentation Defecation EnglishLanguage "&%Defecation is a type of &%Excretion that
discharges &%Feces")
(termFormat EnglishLanguage Defecation "defecation")

(=>
  (instance ?PROC Defecation)
  (exists (?FECES)
    (and
      (instance ?FECES Feces)
      (patient ?PROC ?FECES))))

(subclass Sewage Mixture)

(documentation Sewage EnglishLanguage "The byproduct of &%Animal digestion.  Sewage is a 
waste product that is removed from the body of an animal by a normally
functioning &%BiologicalProcess.  Sewage consists largely of substances
which the animal cannot digest, or may be harmful, so the breakdown of 
the biological waste removal process can be evidence or cause of a 
&%DiseaseOrSyndrome.")

(=>
  (and
    (instance ?ANI Animal)
    (instance ?D DiseaseOrSyndrome)
    (not
      (attribute ?ANI ?D)))
  (exists (?P ?W)
    (and
      (instance ?P BiologicalProcess)
      (instance ?P Removing)
      (origin ?P ?ANI)
      (instance ?W Sewage)
      (agent ?P ?ANI)
      (patient ?P ?W))))

      
(subclass Bidet WashingDevice)
(documentation Bidet EnglishLanguage "&%Bidet is a &%WashingDevice intended for
washing genitals and the anal area while on the toilet")
(termFormat EnglishLanguage Bidet "bidet")

(=>
  (instance ?X Bidet)
  (hasPurpose ?X
    (exists (?PROC ?WASH ?PART)
      (and
        (or
          (instance ?PROC Defecation)
          (instance ?PROC Urination))
        (instrument ?PROC ?PART)
        (instance ?WASH Washing)
        (patient ?WASH ?PART)
        (instrument ?WASH ?X)
        (before 
          (BeginFn (WhenFn ?PROC))
          (BeginFn (WhenFn ?WASH)))))))

(subclass Toilet Device)
(documentation Toilet EnglishLanguage "A &%Device for the disposal of wastes resulting from
urination and defecation.")

(=>
  (and
    (located ?T ?R)
    (instance ?T Toilet)
    (instance ?R Room))
  (instance ?R Bathroom))

(=>
  (instance ?X Toilet)
  (hasPurpose ?X
    (exists (?PROC)
      (and
        (or 
          (instance ?PROC Defecation)
          (instance ?PROC Urination))
        (destination ?PROC ?X)))))
  
(subclass Toothbrush BrushOrComb)
(documentation Toothbrush EnglishLanguage "A small &%BrushOrComb with relatively soft
bristles and a long handle, used for brushing teeth (see &%Tooth).  It is
used help control bacteria living in the mouth.  While most typically used
by humans on themselves, it can be used by &%Dentists on their
patients and by adults assisting children.  They are occasionally used by
humans caring for pets, zoo animals and valuable livestock.")
(=>
  (instance ?T Toothbrush)
  (hasPurpose ?T
    (exists (?K)
      (and
        (instance ?TOOTH Tooth)
        (instrument ?K ?T)
        (instance ?K Killing)
        (instance ?B Bacterium)
        (patient ?K ?B)
        (patient ?K ?TOOTH)))))

(subclass CigarOrCigarette SmokingDevice)
(documentation CigarOrCigarette EnglishLanguage "A tube of thin paper containing finely ground 
tobacco that is smoked.")
(=>
  (instance ?C CigarOrCigarette)
  (exists (?T)
    (and
      (instance ?T Tobacco)
      (part ?T ?C))))

(subclass Tableware Device)
(documentation Tableware EnglishLanguage "&%Devices that are used in &%Ingesting (&%Eating 
and/or &%Drinking) a meal.  This coves dishware, flatware, and glassware.")

(=>
  (instance ?T Tableware)
  (hasPurpose ?T 
    (exists (?I)
      (and
        (instance ?I Ingesting)
        (instrument ?I ?T)))))

(subclass Compass Device)
(subclass Compass ContentBearingObject)
(documentation Compass EnglishLanguage "A &%Device that indicates the direction of the
various &%DirectionalAttributes with respect to the device.")
(=>
  (instance ?C Compass)
  (exists (?D)
    (and
      (instance ?D DirectionalAttribute)
      (represents ?C ?D))))

(subclass MajorAppliance Device)

;; TERMS - subclasses of &%MajorAppliance:
(subclass Refrigerator MajorAppliance)
(subclass Freezer MajorAppliance)
(subclass CookingRange MajorAppliance)
(subclass CookingOven MajorAppliance)
(subclass HotWaterHeater MajorAppliance)
(subclass ClothesWashingMachine MajorAppliance)
(subclass ClothesDryer MajorAppliance)
(subclass Dishwasher MajorAppliance)
            
(subclass CoolingDevice Device)
(documentation CoolingDevice EnglishLanguage "A &%Device whose purpose is &%Cooling something, 
e.g. air conditioners, refrigerators, freezers, etc.")
(=>
  (instance ?D CoolingDevice)
  (hasPurpose ?D 
    (exists (?C)
      (and
        (instance ?C Cooling)
        (instrument ?C ?D))))) 

(subclass FanDevice CoolingDevice)
(documentation FanDevice EnglishLanguage "A &%CoolingDevice which consists simply of one or more 
blades that circulate the air.  Note that this class covers both electrical fans 
and fans that are manually operated.")
(=>
  (instance ?F FanDevice)
  (hasPurpose ?F 
    (exists (?W)
      (and
        (instance ?W Wind)
        (instrument ?W ?F)))))

(subclass HeatingDevice Device)
(documentation HeatingDevice EnglishLanguage "A &%Device whose purpose is &%Heating something, 
e.g. electric heaters, heat lamps, ovens, stoves, etc.")

(=>
  (instance ?D HeatingDevice)
  (hasPurpose ?D 
    (exists (?H)
      (and
        (instance ?H Heating)
        (instrument ?H ?D)))))

(subclass Oven HeatingDevice)
(subclass Oven Container)
(documentation Oven EnglishLanguage "A &%HeatingDevice with a door for inserting and removing 
&%Food that is to undergo &%Baking.")

(=>
  (instance ?O Oven)
  (hasPurpose ?O 
  (exists (?C)
    (and
      (instance ?C Cooking)
      (instrument ?C ?O)))))

(subclass Stove HeatingDevice)
(documentation Stove EnglishLanguage "A &%HeatingDevice which consists one or more burners for 
heating pots and pans of &%Food.")

(=>
  (instance ?S Stove)
  (hasPurpose ?S 
    (exists (?C)
      (and
        (instance ?C Cooking)
        (instrument ?C ?S)))))

(subclass Refrigerator CoolingDevice)
(subclass Refrigerator ElectricDevice)
(subclass Refrigerator Container)
(documentation Refrigerator EnglishLanguage "The intersection of &%Containers and &%ElectricDevices 
in which the temperature is reduced from that of the outside air by a &%Cooling 
process.")

(subclass PotOrPan Container)
(documentation PotOrPan EnglishLanguage "A &%Container which has a handle and is used for 
&%Cooking.")

(=>
  (instance ?P PotOrPan)
  (hasPurpose ?P 
    (exists (?C)
      (and
        (instance ?C Cooking)
        (instrument ?C ?P)))))

(subclass Ramp SelfConnectedObject)
(documentation Ramp EnglishLanguage "Ramp is the class of &%SelfConnectedObjects that are 
inclined planes used for moving objects from one level to another, 
especially used for wheeled vehicles and people who cannot climb stairs.")

(=>
  (instance ?R Ramp)
  (capability MotionUpward path ?R))

(=>
  (instance ?R Ramp)
  (capability MotionDownward path ?R))

(subclass RecreationOrExerciseDevice Device)
(documentation RecreationOrExerciseDevice EnglishLanguage "A &%Device whose purpose is &%RecreationOrExercise.")

(=>
  (instance ?D RecreationOrExerciseDevice)
  (hasPurpose ?D 
    (exists (?E)
      (and
        (instance ?E RecreationOrExercise)
        (instrument ?E ?D)))))

(subclass WalkingCane Device)
(documentation WalkingCane EnglishLanguage "A &%Device which has the form of a staff with 
a handle and which enables some people to walk with greater assurance.")

(=>
  (instance ?C WalkingCane)
  (hasPurpose ?C 
    (exists (?W)
      (and
        (instance ?W Walking)
        (instrument ?W ?C)))))

(subclass WashingDevice Device)
(documentation WashingDevice EnglishLanguage "Any &%Device whose purpose is &%Washing 
something, e.g. washing machines, dishwashers, bathtubs, etc.")

(=>
  (instance ?D WashingDevice)
  (hasPurpose ?D 
    (exists (?W)
      (and
        (instance ?W Washing)
        (instrument ?W ?D)))))

(subclass MaterialHandlingEquipment Device)
(documentation MaterialHandlingEquipment EnglishLanguage "&%MaterialHandlingEquipment 
is a class of &%Devices that are equipment used for handling goods and 
supplies more efficiently or safely.  Examples are cranes, hoists, 
forklifts, conveyors, racks, etc.")

(subclass Crane MaterialHandlingEquipment)
(documentation Crane EnglishLanguage "Crane is a subclass of mechanical &%Devices 
that consist of a &%HoistingDevice on a moveable boom, designed to 
assist in moving heavy loads.")

(=>
  (instance ?C Crane)
  (exists (?H)
    (and
      (instance ?H HoistingDevice)
      (component ?H ?C))))

(subclass HoistingDevice MaterialHandlingEquipment)
(documentation HoistingDevice EnglishLanguage "&%HoistingDevice is a subclass of 
mechanical &%Devices that provide a mechanical advantage in lifting 
and lowering, e.g., by use of a block and tackle.")

(=>
  (instance ?H HoistingDevice)
  (capability MotionUpward instrument ?H))

(=>
  (instance ?H HoistingDevice)
  (capability MotionDownward instrument ?H))

(subclass OpticalDevice Device)
(documentation OpticalDevice EnglishLanguage "A &%Device which enables someone to see something 
more clearly or with greater magnification.")

(=>
  (instance ?D OpticalDevice)
  (hasPurpose ?D 
    (exists (?S)
      (and
        (instance ?S Seeing)
        (instrument ?S ?D)))))

(subclass EyeGlass OpticalDevice)
(documentation EyeGlass EnglishLanguage "A lens or pair of lenses with or without frames whose 
purpose is to to correct a defect in vision.  This class covers ordinary eye 
glasses, reading glasses, contact lenses, monocles, etc.")

(subclass Lens OpticalDevice)
(documentation Lens EnglishLanguage "An &%OpticalDevice which consists of a polished, 
transparent piece of glass or plastic.  Lenses are often part of 
other &%OpticalDevices.")

(subclass Microscope OpticalDevice)
(documentation Microscope EnglishLanguage "An &%OpticalDevice with a stand and a focus, which is 
used for magnifying the images of things that are placed in the stand.")

(subclass Filter Device)
(documentation Filter EnglishLanguage "A &%Device whose purpose is to remove part of a 
&%Mixture that is passed through the &%Filter.")

(=>
  (instance ?FILTER Filter)
  (hasPurpose ?FILTER 
    (exists (?REMOVE ?M)
      (and
        (instance ?REMOVE Removing)
        (origin ?REMOVE ?M)
        (instance ?M Mixture)
        (instrument ?REMOVE ?FILTER)))))

(subclass FileDevice Device)
(documentation FileDevice EnglishLanguage "A &%Device whose purpose is to make something 
smoother.  For example, a nail file is used to even out the tips of one's 
finger nails.")

(=>
  (instance ?DEVICE FileDevice)
  (capability SurfaceChange instrument ?DEVICE))

(subclass ElectricDevice Device)
(documentation ElectricDevice EnglishLanguage "A &%Device that uses &%Electricity as its
primary power source.")

;; NS: edit.  patient -> instrument.  If I put a toaster on
;; my counter, the toaster is a "patient" in the putting,
;; but no Electricity is required.
(=>
  (and
    (instance ?DEV ElectricDevice)
    (instance ?EV Process)
    (instrument ?EV ?DEV))
  (exists (?R)
    (and
      (instance ?R Electricity)
      (resource ?EV ?R))))

(subclass Electricity Substance)
(documentation Electricity EnglishLanguage "While electricity is typically thought of as just a difference
in electrical potential, one way of modeling electricity is as a substance
that can be moved from one point to another or consumed.  One could make the claim
that subatomic physics also supports the classification as a substance since electrons
are objects.")
      
(documentation PowerSource EnglishLanguage "A source of electrical power.")
(termFormat EnglishLanguage PowerSource "power source")
(subclass PowerSource Device)
(=>
  (instance ?PS PowerSource)
  (exists (?RE)
    (and
      (instance ?RE RadiatingElectromagnetic)
      (origin ?RE ?PS))))

(documentation DCPowerSource EnglishLanguage "A direct-current &%PowerSource.")
(termFormat EnglishLanguage DCPowerSource "DC power source")
(subclass DCPowerSource PowerSource)

(subclass Battery DCPowerSource)
(subclass Battery ElectricDevice)
(documentation Battery EnglishLanguage "Battery is a subclass of &%Device.  Batteries are 
devices that use chemical means to store or produce electrical power.")

(subclass Radar ElectricDevice)
(documentation Radar EnglishLanguage "An &%ElectricDevice that emits and receives microwave 
radiation for the purpose of locating and tracking distant objects.")

(=>
  (instance ?RADAR Radar)
  (hasPurpose ?RADAR 
    (exists (?DISCOVER)
      (and
        (instance ?DISCOVER Discovering)
        (instrument ?DISCOVER ?RADAR)))))

(=>
  (instance ?RADAR Radar)
  (capability RadiatingElectromagnetic agent ?RADAR))

(instance discovers BinaryPredicate)
(domain discovers 1 Agent)
(domain discovers 2 Object)
(documentation discovers EnglishLanguage "(discovers ?AGENT ?OBJECT) means that the 
&%Agent ?AGENT discovered the &%Object ?OBJECT.")
(termFormat EnglishLanguage discovers "discovers")
(=>
  (discovers ?AGENT ?OBJECT)
  (exists (?DISCOVERING)
    (and
      (instance ?DISCOVERING Discovering)
      (agent ?DISCOVERING ?AGENT)
      (patient ?DISCOVERING ?OBJECT))))  
  
(subclass Sonar CorpuscularObject)
(documentation Sonar EnglishLanguage "Something that emits and receives sound 
for the purpose of locating and tracking distant objects.  Note that
this covers both manmade devices and &%BodyParts such as the sonar
of bats and dolphins.")

(=>
  (instance ?SONAR Sonar)
  (hasPurpose ?SONAR 
    (exists (?DISCOVER)
      (and
        (instance ?DISCOVER Discovering)
        (instrument ?DISCOVER ?SONAR)))))

(=>
  (instance ?SONAR Sonar)
  (capability RadiatingSound agent ?SONAR))

(subclass Echoing RadiatingSound)
(documentation Echoing EnglishLanguage "Instances of &%RadiatingSound where the instrument 
is a surface which bounces sound waves back to their origin, where they can 
be heard again.")

(subclass ElectricalSignalling Signalling)
(documentation ElectricalSignalling EnglishLanguage "&%ElectricalSignalling is the 
subclass of &%Signalling processes that involve control of an electrical 
current.  Cf. &%ElectronicSignalling.")
(=>
  (instance ?S ElectricalSignalling)
  (exists (?D)
    (and
      (instance ?D ElectricDevice)
      (instrument ?S ?D))))

;;KJN: Not necessarily by a computer.  Read Wikipedia on Electronics and Signalling.    
;; Also, should probably be a subclass of ElectricalSignalling since theoretically
;; ElectronicSignalling cannot exist without Electricity as well  
;;(subclass ElectronicSignalling Signalling)
(subclass ElectronicSignalling ElectricalSignalling)
(documentation ElectronicSignalling EnglishLanguage "&%ElectronicSignalling is the 
subclass of &%ElectricalSignalling that involve a signal generated through electronic
means.")

;;(=>
;;  (instance ?S ElectronicSignalling)
;;  (exists (?D)
;;    (and
;;      (instance ?D Computer)
;;      (instrument ?S ?D))))

(subclass SecurityDevice Device)
(documentation SecurityDevice EnglishLanguage "A &%Device whose purpose is to protect people or 
property from kidnappers and/or thieves.")

(subclass Lock SecurityDevice)
(documentation Lock EnglishLanguage "A &%Device, which, through a &%Key or a combination prevents 
access to a &%Container or &%StationaryArtifact.")

(subclass Key SecurityDevice)
(documentation Key EnglishLanguage "A &%Device which opens and closes a &%Lock.")

(=>
    (instance ?X Key)
    (hasPurpose ?X
        (exists (?LOCK)
            (and
                (instance ?LOCK Lock)
                (capability 
                    (KappaFn ?CLOSE
                        (and
                            (instance ?CLOSE Closing)
                            (patient ?CLOSE ?LOCK)
                            (holdsDuring
                                (ImmediateFutureFn ?CLOSE)
                                (attribute ?LOCK Locked)))) instrument ?X)
                (capability 
                    (KappaFn ?OPEN
                        (and
                            (instance ?OPEN Closing)
                            (patient ?OPEN ?LOCK)
                            (holdsDuring
                                (ImmediateFutureFn ?OPEN)
                                (not
                                    (attribute ?LOCK Locked))))) instrument ?X)))))

(instance Locked RelationalAttribute)
(documentation Locked EnglishLanguage "An &%Attribute of &%Objects. A &%Locked &%Object is in some way restricted in movement, there is some movement, that the the &%Object can not performed, when it's locked.")
(=>
  (attribute ?X Locked)
  (exists (?LOCK ?CLOSE ?MOVE)
    (and
      (instance ?LOCK Lock)
      (connected ?LOCK ?X)
      (instance ?CLOSE Closing)
      (patient ?CLOSE ?LOCK)
      (instance ?MOVE Motion)
      (earlier
        (WhenFn ?CLOSE)
        (WhenFn (attribute ?X Locked)))
      (holdsDuring
        (WhenFn (attribute ?X Locked))
        (not
          (modalAttribute
            (patient ?MOVE ?X) Possibility))))))
            
(=>
    (attribute ?X Locked)
    (instance ?X Object))
    
    
(subclass SafeContainer Container)
(subclass SafeContainer SecurityDevice)
(documentation SafeContainer EnglishLanguage "A &%Container with a &%Lock which is intended 
to secure items from theft.  Note that this covers safes, lockers, and locked 
storage compartments.")

(=>
  (instance ?S SafeContainer)
  (exists (?L)
    (and
      (instance ?L Lock)
      (part ?L ?S))))

(subclass AnimalController Device)
(documentation AnimalController EnglishLanguage "Any &%Device which is used to control the 
movements of an &%Animal or &%Human, e.g. leashes, reins, harnesses, muzzles, 
bridles, shackles, handcuffs, etc.")
(=>
  (instance ?AC AnimalController)
  (hasPurpose ?AC 
    (exists (?G ?A)
      (and
        (instance ?G Guiding)
        (instrument ?G ?AC)
        (instance ?A Animal)
        (patient ?G ?A)))))
             
(subclass SelfPoweredDevice Device)
(documentation SelfPoweredDevice EnglishLanguage "&%SelfPoweredDevice is 
the subclass of &%Devices whose action is powered by some kind of on-board 
component or power source (not the user, which would be a 
&%UserPoweredVehicle).") 

(=>
  (instance ?DEVICE SelfPoweredDevice)
  (exists (?SOURCE)
    (and
      (instance ?SOURCE Device)
      (powerComponent ?SOURCE ?DEVICE))))

(subclass AnimalPoweredDevice Device)
(documentation AnimalPoweredDevice EnglishLanguage "&%AnimalPoweredDevice is the subclass 
of &%Devices that function with power supplied by animals.  Examples: 
oxcarts, horse-drawn plows, mule-driven mills.")
(=>
  (and
    (instance ?D AnimalPoweredDevice)
    (instrument ?P ?D))
  (exists (?A)
    (and
      (instance ?A Animal)
      (instrument ?P ?A))))

;; NS: delete.
;; (documentation Flat EnglishLanguage "A three dimensional object for which
;; two dimensions are markedly larger than the third the
;; two larger dimensions are also not of markedly different length.")

;; NS: add.
(documentation Flat EnglishLanguage "This &%ShapeAttribute
describes a three dimensional &%Object for which two
dimensions are markedly larger than the third, and the two
larger dimensions also are not of markedly different
lengths.")

(instance Flat ShapeAttribute)
(=>
  (attribute ?F Flat)
  (and
    (side ?S1 ?F)
    (side ?S2 ?F)
    (meetsSpatially ?S1 ?S2)
    (not (equal ?S1 ?S2))
    (height ?F ?H)
    (greaterThan ?S1 (MultiplicationFn 2 ?H))
    (greaterThan ?S2 (MultiplicationFn 2 ?H))))

;; NS: delete.
;; (documentation LongAndThin EnglishLanguage "A three dimensional object that
;; has two thin dimensions and one markedly larger one.") 

;; NS: add.
(documentation LongAndThin EnglishLanguage "This
&%ShapeAttribute describes a three dimensional &%Object that
is markedly longer in one dimension than in the other two.")

(instance LongAndThin ShapeAttribute)

(=>
  (attribute ?F LongAndThin)
  (and
    (side ?S1 ?F)
    (side ?S2 ?F)
    (meetsSpatially ?S1 ?S2)
    (not (equal ?S1 ?S2))
    (length ?F ?H)
    (lessThan ?S1 (MultiplicationFn 3 ?H))
    (lessThan ?S2 (MultiplicationFn 3 ?H))))

(instance LevelShape ShapeAttribute)
(documentation LevelShape EnglishLanguage "The &%ShapeAttribute of &%Objects where no 
part of the top of the &%Object is higher than any other part of the 
top.")

(=>
  (attribute ?O LevelShape)
  (not 
    (exists (?P1 ?P2 ?T ?H1 ?H2)
      (and
        (top ?T ?O)
        (part ?P1 ?T)
        (part ?P2 ?T)
        (height ?P1 ?H1)
        (height ?P2 ?H2)
        (greaterThan ?H1 ?H2)))))

(instance SymmetricShape ShapeAttribute)
(documentation SymmetricShape EnglishLanguage "A &%ShapeAttribute that applies to a 
&%SelfConnectedObject that can be divided into two copies of each other.")

(=>
  (attribute ?T SymmetricShape)
  (exists (?C1 ?C2)
    (and
      (copy ?C1 ?C2)
      (equal ?T 
        (MereologicalSumFn ?C1 ?C2)))))

(subclass Baton Device)
(documentation Baton EnglishLanguage "A thin stick which is used for &%MusicalConducting.")

;; NS: edit.
(=>
  (instance ?B Baton)
  (hasPurpose ?B 
    (exists (?M ?G)
      (and
        (instance ?M MusicalPerformance)
        (instance ?G Guiding)
        (subProcess ?G ?M)
        (instrument ?G ?B)))))

(=>
  (instance ?B Baton)
  (attribute ?B LongAndThin))

;; NS: Note that a baton (typically a cylindrical aluminum
;; tube or wooden dowel) would have some strange things
;; concluded about it, given the rule for LongAndThin stated
;; above.  In particular, what are the two shorter "sides"
;; that spatially meet?  In general, I think the current
;; naive (commonsense) treatment of object faces and
;; dimensions (&%side, &%top, &%bottom, &%BackFn, &%FrontFn,
;; etc.), with its implicit but unexplained notion of
;; default orientation, should be related to a more general
;; scheme that explicitly treats dimensions in terms of an
;; object's maximal extent along x, y, and z axes,
;; regardless of orientation.

;; TO DO: Add the x, y, z axes representation mentioned above,
;; and relate it to the &%side, &%top, etc. one, where possible.

(subclass SecurityAlarm SecurityDevice)
(subclass SecurityAlarm ElectricDevice)
(documentation SecurityAlarm EnglishLanguage "A &%SecurityDevice that detects intrusions to 
a &%StationaryArtifact and issues a warning of some sort.")

(partition Quantity FiniteQuantity InfiniteQuantity)

(subclass FiniteQuantity Quantity)
(documentation FiniteQuantity EnglishLanguage "Any &%Quantity that is limited or bounded in 
magnitude.")

(subclass InfiniteQuantity Quantity)
(documentation InfiniteQuantity EnglishLanguage "Any &%Quantity that is not limited or bounded 
in magnitude.")

(subclass Clock MeasuringDevice)
(documentation Clock EnglishLanguage "Any &%Device that measures and represents &%TimeDuration 
or &%TimePosition.")

(=>
  (and
    (instance ?M Measuring)
    (result ?M ?Q)
    (instrument ?M ?C)
    (instance ?C Clock))
  (instance ?Q TimeMeasure))

(subclass WatchClock Clock)
(documentation WatchClock EnglishLanguage "A &%Clock that can be worn on the &%Wrist.")

(=>
  (and
    (wears ?P ?C)
    (located ?C ?W)
    (instance ?C Clock)
    (instance ?W Wrist))
  (instance ?C WatchClock))

(subclass Thermometer MeasuringDevice)
(documentation Thermometer EnglishLanguage "Any &%Device that measures and represents 
&%TemperatureMeasure.")

(=>
   (and
      (instance ?MEASURE Measuring)
      (result ?MEASURE ?QUANTITY)
      (instrument ?MEASURE ?THERMOMETER)
      (instance ?THERMOMETER Thermometer))
   (instance ?QUANTITY TemperatureMeasure))

(subclass PressureMeasuringDevice MeasuringDevice)
(documentation PressureMeasuringDevice EnglishLanguage "Any &%Device that measures and 
represents &%PressureMeasure.")

(=>
   (and
      (instance ?M Measuring)
      (result ?M ?Q)
      (instrument ?M ?T)
      (instance ?T Thermometer))
   (instance ?Q TemperatureMeasure))

(documentation measurementReading EnglishLanguage "(measurementReading ?DEVICE ?QUANTITY) 
means that ?QUANTITY is a reading of the &%MeasuringDevice ?DEVICE, e.g. if 
?THERMOMETER is a &%Thermometer, (measurementReading ?THERMOMETER 
(&%MeasureFn 42 &%CelsiusDegree)) would mean that ?THERMOMETER registers 42 
degrees &%Celsius.")
(instance measurementReading BinaryPredicate)
(domain measurementReading 1 MeasuringDevice)
(domain measurementReading 2 ConstantQuantity)

(subclass CommunicationDevice EngineeringComponent)
(documentation CommunicationDevice EnglishLanguage "A
&%CommunicationDevice is a &%Device which serves at the
&%instrument in a &%Communication &%Process by allowing the
communicated message to be conveyed between the participants.")
(relatedInternalConcept Communication CommunicationDevice)

(=>
  (instance ?DEVICE CommunicationDevice)
  (capability Communication instrument ?DEVICE))


(subclass Telephone ElectricDevice)
(subclass Telephone CommunicationDevice)
(documentation Telephone EnglishLanguage "A &%Telephone is a
&%CommunicationDevice that enables &%LinguisticCommunication
between nodes in a &%TelephoneSystem by converting sound into
electrical signals that are then transmitted.  When the signals
are received, they are converted back into sound.")

;; NS: edit.  Speaking -> Communication.
(subclass Telephoning Communication)

;; NS: edit.
(documentation Telephoning EnglishLanguage "A &%Telephoning is a
&%Communication in which the &%instrument is a &%Telephone, and
which typically includes an &%instance of &%Speaking as a
&%subProcess.")

(=>
   (instance ?TEL Telephoning)
   (exists (?DEVICE)
      (and
         (instance ?DEVICE Telephone)
         (instrument ?TEL ?DEVICE))))

;; NS: add.
(=>
  (instance ?TEL Telephoning)
  (exists (?SPEAK)
    (and
      (instance ?SPEAK Speaking)
      (subProcess ?SPEAK ?TEL)
      (=>
        (agent ?TEL ?AGENT)
        (agent ?SPEAK ?AGENT)))))

(subclass Fax ArtifactMediatedCommunication)
(documentation Fax EnglishLanguage "The communication of a printed page between remote locations.") 

(=>
  (instance ?Fax Fax)
  (exists (?FaxMachine)
    (and
      (instance ?FaxMachine FaxMachine)
      (instrument ?Fax ?FaxMachine))))

;; NS: add.  Device -> TelephonyDevice (in OntologyX.kif).
(subclass FaxMachine TelephonyDevice)

;; NS: edit.
(subclass FaxMachine ElectricDevice)
(subclass FaxMachine CommunicationDevice)
(documentation FaxMachine EnglishLanguage "A &%FaxMachine is a
&%TelephonyDevice that scans a paper page and transmits a coded
image of the page over a &%TelephoneSystem to a receiving
&%FaxMachine, which decodes the coded and image and prints a
replica of the original.  A typical &%FaxMachine is made up of a
scanner, a printer, a modem, and a control panel with some sort
of status display.")

;; NS: delete.
;; (subrelation telephoneNumber uniqueIdentifier)

;; NS: &%telephoneNumber is defined further in OntologyX.kif.
;;     &%postAddress is defined in OntologyX.kif.


;; NS: delete phoneNumber, dayPhone, eveningPhone.  The rules
;; commented out below are absurd, and the relations are
;; superceded by others in OntologyX.kif.

;; (instance phoneNumber BinaryPredicate)
;; (subrelation phoneNumber refers)
;; (domain phoneNumber 1 SymbolicString)
;; (domain phoneNumber 2 Telephone)
;; (documentation phoneNumber EnglishLanguage "(&%phoneNumber ?Phone ?Agent) holds if ?Phone is 
;; a phone number corresponding to the Telephone ?Phone.")

;; (instance dayPhone BinaryPredicate)
;; (domain dayPhone 1 SymbolicString)
;; (domain dayPhone 2 Agent) 
;; (documentation dayPhone EnglishLanguage "(&%dayPhone ?Phone ?Agent) means that ?Phone is a phone 
;; number corresponding to the location where ?Agent can be reached during the day.")

;; (=>
;; 	(and
;; 		(dayPhone ?Number ?Agent)
;; 		(instance ?Day Day))
;; 	(exists (?Phone)
;; 		(and
;; 			(phoneNumber ?Number ?Phone)
;; 			(holdsDuring (HourFn ?Number ?Day) (possesses ?Agent ?Phone))
;; 			(lessThan ?Number 18))))

;; (instance eveningPhone BinaryPredicate)
;; (domain eveningPhone 1 SymbolicString)
;; (domain eveningPhone 2 Agent) 
;; (documentation eveningPhone EnglishLanguage "(&%eveningPhone ?Phone ?Agent) means that ?Phone 
;; is a phone number corresponidng to the location where ?Agent can be reached 
;; during the evening.")

;; (=>
;; 	(and
;; 		(eveningPhone ?Number ?Agent)
;; 		(instance ?Day Day))
;; 	(exists (?Phone)
;; 		(and
;; 			(phoneNumber ?Number ?Phone)
;; 			(holdsDuring (HourFn ?Number ?Day) (possesses ?Agent ?Phone))
;; 			(greaterThan ?Number 18))))

(instance emailAddress BinaryPredicate)
(subrelation emailAddress refers)
(domain emailAddress 1 SymbolicString)
(domain emailAddress 2 Agent)

;; NS: edit.
(documentation emailAddress EnglishLanguage "(&%emailAddress
?Address ?Agent) means that ?Address denotes a &%VirtualPlace at
which ?Agent can be contacted.")

(subclass LightFixture Device)
(documentation LightFixture EnglishLanguage "Any &%Device whose purpose is to be a source of 
visible light.")

(=>
  (instance ?F LightFixture)
  (capability RadiatingLight instrument ?F))

(subclass Candle LightFixture)
(documentation Candle EnglishLanguage "An &%LightFixture that consists of &%Wax and a wick, 
which is lit with a flame.")

(=>
  (instance ?CANDLE Candle)
  (material Wax ?CANDLE))

(=>
  (instance ?C Candle)
  (hasPurpose ?C
    (exists (?F)
      (and
        (instance ?F Fire)
        (resource ?F ?C)))))

(subclass Lightning WeatherProcess)
(subclass Lightning Radiating)
(documentation Lightning EnglishLanguage "A &%WeatherProcess which involves a significant 
release of electricity from a &%Cloud.")

(=>
   (instance ?L Lightning)
   (exists (?C)
      (and
         (instance ?C Cloud)
         (eventLocated ?L ?C))))

(subclass Thunder WeatherProcess)
(subclass Thunder RadiatingSound)
(documentation Thunder EnglishLanguage "Any instance of &%RadiatingSound which is caused by 
an instance of Lightning.")

(=>
  (instance ?T Thunder)
  (exists (?L)
    (and
      (instance ?L Lightning)
      (causes ?L ?T))))

(subclass VehicleLight LightFixture)
(documentation VehicleLight EnglishLanguage "Any &%LightFixture which is attached to the 
surface of a &%Vehicle and whose purpose is to illuminate that area around 
the &%Vehicle so that potential obstacles can be detected or alerted.")

(=>
  (instance ?L VehicleLight)
  (exists (?V)
    (and
      (instance ?V Vehicle)
      (part ?L ?V))))

(subclass Headlight VehicleLight)
(documentation Headlight EnglishLanguage "Any &%VehicleLight which is attached to the front 
of a &%Vehicle.")

(=>
  (instance ?L Headlight)
  (exists (?V)
    (and
      (instance ?V Vehicle)
      (part ?L (FrontFn ?V)))))

(subclass Taillight VehicleLight)
(documentation Taillight EnglishLanguage "Any &%VehicleLight which is attached to the back 
of a &%Vehicle.")

(=>
  (instance ?L Taillight)
  (exists (?V)
    (and
      (instance ?V Vehicle)
      (part ?L (BackFn ?V)))))

(subclass PaintedPicture ArtWork)
(documentation PaintedPicture EnglishLanguage "Any &%ArtWork which is produced by &%Painting.")

(=>
  (instance ?PP PaintedPicture)
  (exists (?PAINT ?PAINTING)
    (and
      (instance ?PAINT Paint)
      (instance ?PAINTING Painting)
      (resource ?PAINTING ?PAINT)
      (result ?PAINTING ?PP))))

(subclass WatercolorPicture PaintedPicture)
(documentation WatercolorPicture EnglishLanguage "Any &%PaintedPicture which is created 
with water-based paints.")

(=>
  (instance ?W WatercolorPicture)
  (exists (?WP ?P)
    (and
      (instance ?WP WatercolorPaint)
      (instance ?P Painting)
      (resource ?P ?WP)
      (result ?P ?W))))

(subclass Wallpaper ArtWork)
(documentation Wallpaper EnglishLanguage "Any decorative paper that is used to cover the 
&%Walls of &%Rooms.")

(=>
  (and
    (instance ?W Wallpaper)
    (part ?P ?W))
  (instance ?P Paper))

(=>
  (instance ?P Wallpaper)
  (hasPurpose ?P 
    (exists (?W ?R ?C)
      (and
        (instance ?W Wall)
        (part ?W ?R)
        (instance ?R Room)
        (instance ?C Covering)
        (patient ?C ?W)
        (instrument ?C ?P)))))

(subclass Sculpture ArtWork)
(documentation Sculpture EnglishLanguage "Any &%ArtWork which is not constructed on the 
two-dimensional surface of a canvas, piece of paper, etc.")

(subclass Portrait PaintedPicture)
(documentation Portrait EnglishLanguage "A &%PaintedPicture that represents someone's &%Face.")

(=>
  (instance ?P Portrait)
  (exists (?F)
    (and
      (instance ?F Face)
      (represents ?P ?F))))

(subclass Sketch ArtWork)
(documentation Sketch EnglishLanguage "Any &%ArtWork which is produced by a pencil or 
piece of charcoal.")

(subclass Collage ArtWork)
(documentation Collage EnglishLanguage "Any abstract &%ArtWork that is produced by arranging 
bits of paper or photographs.")

(subclass Folding ShapeChange)
(documentation Folding EnglishLanguage "Bending something in such a way that one part of 
it covers another part.")
(=>
  (and
    (instance ?F Folding)
    (patient ?F ?O))
  (exists (?C ?P1 ?P2)
    (and
      (instance ?C Covering)
      (subProcess ?C ?F)
      (part ?P1 ?O)
      (part ?P2 ?O)
      (instrument ?C ?P1)
      (patient ?C ?P2))))

(subclass Painting Covering)
(subclass Painting Coloring)
(documentation Painting EnglishLanguage "The application of &%Paint to a &%surface.  Note that 
this class covers both &%ArtPainting (the creation of &%PaintedPictures), as 
well as painting one's kitchen, for example.")

(=>
   (and
      (instance ?PAINT Painting)
      (patient ?PAINT ?SURFACE)
      (resource ?PAINT ?STUFF))
   (exists (?OBJ)
      (and
         (surface ?SURFACE ?OBJ)
         (instance ?STUFF Paint))))

(subclass Paint Solution)
(documentation Paint EnglishLanguage "Any &%Solution which is capable of &%Coloring something.")

(=>
   (instance ?PAINT Paint)
   (capability Coloring instrument ?PAINT))

(subclass WatercolorPaint Paint)
(documentation WatercolorPaint EnglishLanguage "Any &%Paint which is a water-based &%Solution.")

(=>
  (instance ?P WatercolorPaint)
  (exists (?W)
    (and
      (instance ?W Water)
      (part ?W ?P))))

(subclass OilPaint Paint)
(disjoint OilPaint WatercolorPaint)
(documentation OilPaint EnglishLanguage "Any &%Paint which is an oil-based &%Solution.")

(=>
  (instance ?P OilPaint)
  (exists (?O)
    (and
      (instance ?O Oil)
      (part ?O ?P))))

(subclass OilPicture PaintedPicture)
(disjoint OilPicture WatercolorPicture)
(documentation OilPicture EnglishLanguage "Any &%OilPicture which is created 
with oil-based paints.")

(=>
  (instance ?P OilPicture)
  (exists (?O ?PAINTING)
    (and
      (instance ?O OilPaint)
      (instance ?PAINTING Painting)
      (resource ?PAINTING ?O)
      (result ?PAINTING ?P))))

(subclass ArtPainting ContentDevelopment)
(subclass ArtPainting Painting)
(documentation ArtPainting EnglishLanguage "Any &%ContentDevelopment that results in a 
&%PaintedPicture.")

(=>
   (instance ?PAINT ArtPainting)
   (exists (?PICTURE)
      (and
         (instance ?PICTURE PaintedPicture)
         (result ?PAINT ?PICTURE))))

(subclass PaintingDevice Device)
(documentation PaintingDevice EnglishLanguage "A &%Device used as an &%instrument for &%Painting. Paintbrushes, rollers or sprayers can belong into this class.")

(=>
  (instance ?PD PaintingDevice)
  (exists (?PAINT)
    (and
      (instance ?PAINT Painting)
      (capability ?PAINT instrument ?PD))))
(=>
  (instance ?PD PaintingDevice)
  (hasPurpose ?PD
    (exists (?STUFF ?COVER ?SURF ?OBJ)
      (and
        (instance ?STUFF Substance)
        (instance ?COVER Covering)
        (instance ?OBJ Object)
        (surface ?SURF ?OBJ)
        (agent ?COVER ?PD)
        (instrument ?COVER ?STUFF)
        (patient ?COVER ?SURF)))))

(subclass Sculpting ContentDevelopment)
(subclass Sculpting Transfer)
(documentation Sculpting EnglishLanguage "The process of creating three-dimensional artwork by shaping or combining hard materials, typically stone such as marble or metal, glass, or wood.")

(subclass GraphicDesigning Designing)
(documentation GraphicDesigning EnglishLanguage "Graphic designing is the process of assembling together images, typography or motion graphics to create a piece of design.")

(documentation potentialOfHydrogen EnglishLanguage "(potentialOfHydrogen ?SOLUTION ?NUMBER) 
means that the Solution ?SOLUTION has a pH value of ?NUMBER.  The ph varies 
between 0 and 14, and it is a measure of the acidity or alkalinity of ?SOLUTION.  
More precisely,  and it is the logarithm of the reciprocal of the quantity of 
&%AtomGrams of &%Hydrogen ions.")
(instance potentialOfHydrogen BinaryPredicate)
(domain potentialOfHydrogen 1 Solution)
(domain potentialOfHydrogen 2 RealNumber)

(=>
  (potentialOfHydrogen ?S ?N)
  (and
    (greaterThanOrEqualTo ?N 0)
    (lessThanOrEqualTo ?N 14)))

(subclass Tracing ContentDevelopment)
(subclass Tracing SurfaceChange)
(documentation Tracing EnglishLanguage "Any &%ContentDevelopment that results in a &%Blueprint.")

(=>
  (instance ?T Tracing)
  (exists (?P)
    (and
      (instance ?P Blueprint)
      (result ?T ?P))))
      
(subclass ComposingMusic ContentDevelopment)
(documentation ComposingMusic EnglishLanguage "&%ComposingMusic is a type of &%ContentDevelopment
that results in a &%MusicalComposition")
(termFormat EnglishLanguage ComposingMusic "composing music")

(=>
  (instance ?C ComposingMusic)
  (exists (?M)
    (and
      (instance ?M MusicalComposition)
      (result ?C ?M))))

(subclass Drawing ContentDevelopment)
(subclass Drawing SurfaceChange)
(documentation Drawing EnglishLanguage "Any &%ContentDevelopment that results in a &%Sketch.")

(=>
   (instance ?DRAW Drawing)
   (exists (?SKETCH)
      (and
         (instance ?SKETCH Sketch)
         (result ?DRAW ?SKETCH))))

(subclass Focusing QuantityChange)
(documentation Focusing EnglishLanguage "Altering the relative distance of a &%Lens 
so that a visual image is sharper.")
(=>
  (instance ?F Focusing)
  (exists (?L)
    (and
      (instance ?L Lens)
      (patient ?F ?L))))

(subclass DisplayArtifact Artifact)
(documentation DisplayArtifact EnglishLanguage "Something for posting content so 
that it can be disseminated to the public.")
(=>
  (instance ?DA DisplayArtifact)
  (hasPurpose ?DA 
    (exists (?P ?D ?I)
      (and
        (instance ?P Putting)
        (instance ?D Disseminating)
        (instance ?I ContentBearingObject)
        (patient ?P ?I)
        (patient ?D ?I)
        (destination ?P ?DA)))))

(subclass VehicleWheel Wheel)
(documentation VehicleWheel EnglishLanguage "&%VehicleWheel is a class of cylindrical 
&%Devices used to move a &%RoadVehicle along a road, running either  
directly on the wheel rims or on tires attached to the wheel rims.")

(subclass Wheel Artifact)
(documentation Wheel EnglishLanguage "A circular &%Artifact which is a component of 
&%LandVehicles and of some &%Devices.")

(=>
   (instance ?VEHICLE LandVehicle)
   (exists (?WHEEL)
      (and
         (instance ?WHEEL Wheel)
         (part ?WHEEL ?VEHICLE))))

(subclass VehicleController Device)
(documentation VehicleController EnglishLanguage "Any &%Device which is used to start, stop or 
control the movements of a &%Vehicle.  This class covers steering wheels, brakes, 
acceleration pedals, airplane sticks, etc.")

(=>
  (instance ?C VehicleController)
  (exists (?V)
    (and
      (instance ?V Vehicle)
      (part ?C ?V))))

(=>
  (instance ?C VehicleController)
  (hasPurpose ?C 
    (exists (?D)
      (and
        (instance ?D Driving)
        (instrument ?D ?C)))))

(subclass SteeringWheel VehicleController)
(documentation SteeringWheel EnglishLanguage "A &%VehicleController which enables one to steer 
a &%Vehicle.")

(=>
  (instance ?W SteeringWheel)
  (capability DirectionChange instrument ?W))

(subclass VehicleBrake VehicleController)
(documentation VehicleBrake EnglishLanguage "A &%VehicleController which is capable of stopping 
the motion of a &%Vehicle.")

(=>
  (and
    (instance ?B VehicleBrake)
    (instance ?V Vehicle)
    (part ?B ?V))
  (hasPurpose ?B 
    (exists (?S)
      (and
        (instance ?S (StopFn Motion))
        (patient ?S ?V)
        (instrument ?S ?B))))) 

(subclass VehicleThrottle VehicleController)
(documentation VehicleThrottle EnglishLanguage "A &%VehicleController which controls the amount 
of &%Fuel which is supplied to the &%Engine.")

(subclass VehicleTire Artifact)
(documentation VehicleTire EnglishLanguage "A covering, usually made of rubber, for a &%Wheel.")

(=>
  (instance ?T VehicleTire)
  (exists (?W)
    (and
      (instance ?W VehicleWheel)
      (part ?T ?W))))

(subclass VehicleWindow Window)
(documentation VehicleWindow EnglishLanguage "Any &%Window which is part of a &%Vehicle, 
e.g. the &%Windshield and &%RearWindow of an &%Automobile.")

(=>
  (instance ?W VehicleWindow)
  (exists (?V)
    (and
      (instance ?V Vehicle)
      (part ?W ?V))))

(subclass Windshield VehicleWindow)
(disjoint Windshield RearWindow)
(documentation Windshield EnglishLanguage "Any &%VehicleWindow which located at the front 
of a &%RoadVehicle.")

(=>
  (instance ?W Windshield)
  (exists (?A)
    (and
      (instance ?A RoadVehicle)
      (part ?W (FrontFn ?A)))))

(subclass LandVehicle Vehicle)
(documentation LandVehicle EnglishLanguage 
"&%LandVehicle is the class of &%TransportationDevices that travel on 
land.  The two main types of &%LandVehicle are &%RoadVehicle and 
&%RailVehicle. Note that this includes vehicles which travel on any solid
surface, including a frozen body of water or snow.")
(=>
  (instance ?X LandVehicle)
  (hasPurpose ?X
    (exists (?EV ?SURF)
      (and
        (surface ?SURF GeographicArea)
        (instance ?EV Transportation)
        (holdsDuring
          (WhenFn ?EV)
          (meetsSpatially ?X ?SURF))))))      
      
(subclass WaterVehicle Vehicle)
(documentation WaterVehicle EnglishLanguage "&%WaterVehicle is the class of all 
&%TransportationDevices used to travel on or in water.")

(=>
  (instance ?X WaterVehicle)
  (hasPurpose ?X
    (exists (?EV ?SURF)
      (and
        (instance ?SURF Water)
        (instance ?EV Transportation)
        (holdsDuring
          (WhenFn ?EV)
          (meetsSpatially ?X ?SURF))))))

(=>
  (and
    (instance ?CRAFT WaterVehicle)
    (instance ?EVENT Transportation)
    (instrument ?EVENT ?CRAFT))
  (exists (?WATER)
    (and
      (instance ?WATER WaterArea)
      (eventLocated ?EVENT ?WATER))))
                
      
(subclass RoadVehicle LandVehicle)
(documentation RoadVehicle EnglishLanguage "The class of &%LandVehicles that are not 
&%RollingStock.")

(subclass Fleet Collection)
(documentation Fleet EnglishLanguage "A &%Collection of &%Vehicle")
(termFormat EnglishLanguage Fleet "Fleet")

(=>
  (instance ?FLEET Fleet)
  (memberType ?FLEET Vehicle))

(instance fleetSize BinaryPredicate)
(domain fleetSize 1 Agent)
(domain fleetSize 2 Integer)
(documentation fleetSize EnglishLanguage "(fleetSize ?AGENT ?NUM) means the &%Agent 
?AGENT has a fleet size of an &%Integer ?NUM. The &%Fleet can consists of any type of 
&%Vehicle")
(termFormat EnglishLanguage fleetSize "Fleet Size")

(=>
  (and
    (instance ?FLEET Fleet)
    (fleetSize ?AGENT ?NUM)
    (possesses ?AGENT ?FLEET))
  (memberCount ?FLEET ?NUM)) 

  
(subclass Axle Device)
(documentation Axle EnglishLanguage "Axle is a class of &%Devices each of which can 
be paired with two &%VehicleWheels to rotate and move a &%RoadVehicle.")
(=>
  (and
    (instance ?W VehicleWheel)
    (instance ?V RoadVehicle)
    (part ?W ?V))
  (exists (?A)
    (and
      (instance ?A Axle)
      (component ?A ?V)
      (connected ?W ?A))))
;;MSv:changed definition of paper based on use to one based on production
(documentation Paper EnglishLanguage "Paper is a flat sheet
of fibers, usually produced by spreading a wet solution of
wood particles on a flat surface and drying through heat and
pressure.  The fibers can also be cotton or a synthetic,
although typically the bulk of the substance is wood fibers.
This includes all manner of paper products that may have
varying thicknesses, colors or texture.  This is
distinguished from flat wood products such as plywood and
particle board which have a structural function in building
construction.  Sheathing materials such as the paper affixed
to sheetrock however, is paper.")
(subclass Paper Artifact)

(=>
  (instance ?X Paper)
  (exists (?MAKE ?CELL ?PRESS)
    (and
      (instance ?MAKE Making)
      (instance ?CELL Cellulose)
      (instance ?PRESS Compressing)
      (resource ?MAKE ?CELL)
      (result ?MAKE ?X)
      (subProcess ?MAKE ?PRESS)
      (patient ?PRESS ?CELL))))
;;(=>
;;  (instance ?PAPER Paper)
;;  (hasPurpose ?PAPER 
;;    (exists (?TEXT) 
;;      (and
;;        (instance ?TEXT Text)
;;        (part ?TEXT ?PAPER)))))

(subclass CurrencyBill Currency)
(partition Currency CurrencyBill CurrencyCoin)
(documentation CurrencyBill EnglishLanguage "Any instance of &%Currency that is made 
of paper.")

(=>
  (instance ?BILL CurrencyBill)
  (exists (?PAPER)
    (and
      (instance ?PAPER Paper)
      (part ?PAPER ?BILL)))) 

(subclass CurrencyCoin Currency)
(documentation CurrencyCoin EnglishLanguage "Any instance of &%Currency that is made 
of &%Metal.")

(=>
  (instance ?COIN CurrencyCoin)
  (exists (?METAL)
    (and
      (subclass ?METAL Metal)
      (material ?METAL ?COIN)))) 

(subclass Wire Artifact)
(documentation Wire EnglishLanguage "A long, thin strand of &%Metal that is used in a wide 
range of applications, including the wiring of electrical systems, creating 
bundles and the construction of cages.")

(=>
   (instance ?WIRE Wire)
   (material Metal ?WIRE))

(subclass WireSpring Wire)
(subclass WireSpring EngineeringComponent)
(documentation WireSpring EnglishLanguage "An &%EngineeringComponent consisting of a coil of 
&%Wire that returns to its original shape when pulled apart or pressed together.")

(subclass WireLine Wire)
(subclass WireLine EngineeringComponent)
(documentation WireLine EnglishLanguage "A &%Wire that is designed for conducting electricity.")

(=>
  (instance ?WL WireLine)
  (hasPurpose ?WL 
    (exists (?R)
      (and
        (instance ?R Radiating)
        (path ?R ?WL)))))

(subclass TelephoneLine WireLine)
(documentation TelephoneLine EnglishLanguage "A &%WireLine that carries telephone signals and 
allows users of &%Telephones or &%Telegraphs to communicate with one another.")

(=>
  (instance ?TL TelephoneLine)
  (exists (?T1 ?T2)
    (and
      (or
        (instance ?T1 Telephone)
        (instance ?T1 Telegraph))
      (or 
        (instance ?T2 Telephone)
        (instance ?T2 Telegraph))
      (not (equal ?T1 ?T2))
        (connects ?TL ?T1 ?T2))))

(subclass String Artifact)
(documentation String EnglishLanguage "A long, thin strand of Fabric that is used for &%Tying 
things together, etc.  Note that this class covers a cord of any width, including 
rope, twine, and thread, for example.")

(=>
  (instance ?S String)
  (material Fabric ?S))

(subclass Plug Artifact)
(documentation Plug EnglishLanguage "An &%Artifact which is designed to fit snugly within 
a &%Hole.")

(=>
   (instance ?PLUG Plug)
   (exists (?HOLE)
      (completelyFills ?PLUG ?HOLE)))

(subclass Pottery Artifact)
(documentation Pottery EnglishLanguage "Household &%Artifacts that are made out of baked &%Clay.")

(=>
   (instance ?POTTERY Pottery)
   (exists (?CLAY)
      (and
         (instance ?CLAY Clay)
         (part ?CLAY ?POTTERY))))

(subclass Pillow Artifact)
(documentation Pillow EnglishLanguage "A soft, stuffed &%Artifact to support the &%Head or 
the body as a whole while one is sleeping or relaxing.")

(subclass Mirror Artifact)
(documentation Mirror EnglishLanguage "An &%Artifact with a surface that is capable of 
displaying an image by reflecting light.")

(=>
  (instance ?M Mirror)
  (capability ReflectingLight instrument ?M))

(subclass Furniture Artifact)

(documentation Furniture EnglishLanguage "Any free-standing and movable 
&%Artifacts which which are used in day-to-day living and designed 
to rest on the &%Floor of a &%Room.  This excludes items such as a rock 
which may serve as a chair but was not created with the intention of 
supporting that use.") 

(=>
  (instance ?F Furniture)
  (hasPurpose ?F
    (exists (?FL)
      (and
        (instance ?FL Floor)
	(meetsSpatially ?F ?FL)))))

(=>
  (instance ?F Furniture)
  (capability Translocation moves ?F))
                                  
(disjoint Furniture EngineeringComponent)
(disjoint Furniture Machine)
(disjoint Furniture TransportationDevice)
(disjoint Furniture Weapon)

(subclass Seat Furniture)
(documentation Seat EnglishLanguage "Any instance of &%Furniture which is designed to 
accommodate &%Humans who are &%Sitting.")

(=>
  (instance ?SEAT Seat)
  (hasPurpose ?SEAT 
    (exists (?PERSON)
      (and
        (instance ?PERSON Human)
        (located ?PERSON ?SEAT)
        (attribute ?PERSON Sitting)))))

(subclass Chair Seat)
(documentation Chair EnglishLanguage "A &%Seat that is designed to accommodate a single 
&%Human.")

(=>
   (instance ?CHAIR Chair)
   (not (exists (?PERSON1 ?PERSON2)
      (and
         (instance ?PERSON1 Human)
         (instance ?PERSON2 Human)
         (attribute ?PERSON1 Sitting)
         (attribute ?PERSON2 Sitting)
         (located ?PERSON1 ?CHAIR)
         (located ?PERSON2 ?CHAIR)
         (not (equal ?PERSON1 ?PERSON2)))))) 

(subclass Sofa Seat)
(documentation Sofa EnglishLanguage "A padded &%Seat that is designed to accommodate more 
than one &%Human.")

(=>
  (instance ?S Sofa)
  (hasPurpose ?S
    (exists (?P1 ?P2 ?T)
      (and
        (not (equal ?P1 ?P2))
	(instance ?P1 Human)
	(instance ?P2 Human)
	(holdsDuring ?T
	  (and
	    (attribute ?P1 Sitting)
	    (attribute ?P2 Sitting)
	    (eventLocated ?P1 ?S)
	    (eventLocated ?P2 ?S)))))))

(subclass Bed Furniture)
(documentation Bed EnglishLanguage "A piece of &%Furniture which is primarily for sleeping.")

(=>
   (instance ?BED Bed)
   (hasPurpose ?BED (exists (?PERSON)
      (and
        (attribute ?PERSON Asleep)
        (located ?PERSON ?BED)))))

(subclass KingBed Bed)
(documentation KingBed EnglishLanguage "A &%KingBed is a type of &%Bed that is 1.9m
by 2.0m in size")
(termFormat EnglishLanguage KingBed "king-sized bed")

(=>
  (instance ?X KingBed)
  (and
    (width ?X (MeasureFn 1.9 Meter))
    (length ?X (MeasureFn 2.0 Meter))))

(=>
  (instance ?X KingBed)
  (modalAttribute
    (exists (?P1 ?P2 ?P3 ?TIME)
      (and
        (not (equal ?P1 ?P2))
        (not (equal ?P2 ?P3))
        (not (equal ?P1 ?P3))
        (attribute ?P1 Asleep)
        (attribute ?P2 Asleep)
        (attribute ?P3 Asleep)
        (instance ?P1 Human)
        (instance ?P2 Human)
        (instance ?P3 Human)
        (holdsDuring ?TIME
          (and
            (located ?P1 ?X)
            (located ?P2 ?X)
            (located ?P3 ?X))))) Possibility))
    
(subclass QueenBed Bed)
(documentation QueenBed EnglishLanguage "A &%QueenBed is a type of &%Bed that is 1.5m
by 2.0m in size")
(termFormat EnglishLanguage QueenBed "queen-sized bed")

(=>
  (instance ?X QueenBed)
  (and
    (width ?X (MeasureFn 1.5 Meter))
    (length ?X (MeasureFn 2.0 Meter))))

(=>
  (instance ?X QueenBed)
  (modalAttribute
    (exists (?P1 ?P2)
      (and
        (not (equal ?P1 ?P2))
        (not (equal ?P2 ?P3))
        (attribute ?P1 Asleep)
        (attribute ?P2 Asleep)
        (instance ?P1 Human)
        (instance ?P2 Human)
        (holdsDuring ?TIME
          (and
            (located ?P1 ?X)
            (located ?P2 ?X))))) Possibility))    
    
(subclass DoubleBed Bed)
(documentation DoubleBed EnglishLanguage "A &%DoubleBed is a type of &%Bed that is 1.35m
by 2.0m in size")
(termFormat EnglishLanguage DoubleBed "full-sized bed")

(=>
  (instance ?X DoubleBed)
  (and
    (width ?X (MeasureFn 1.35 Meter))
    (length ?X (MeasureFn 2.0 Meter))))

(=>
  (instance ?X DoubleBed)
  (modalAttribute
    (exists (?P1 ?P2)
      (and
        (not (equal ?P1 ?P2))
        (not (equal ?P2 ?P3))
        (attribute ?P1 Asleep)
        (attribute ?P2 Asleep)
        (instance ?P1 Human)
        (instance ?P2 Human)
        (holdsDuring ?TIME
          (and
            (located ?P1 ?X)
            (located ?P2 ?X))))) Possibility))    
       
(subclass SingleBed Bed)
(documentation SingleBed EnglishLanguage "A &%SingleBed is a type of &%Bed that is 1m
by 2.0m in size")
(termFormat EnglishLanguage SingleBed "twin-sized bed")

(=>
  (instance ?X SingleBed)
  (and
    (width ?X (MeasureFn 1.0 Meter))
    (length ?X (MeasureFn 2.0 Meter))))

(subclass BunkBed Bed)
(documentation BunkBed EnglishLanguage "A &%BunkBed is a type of &%Bed has one bed 
directly above another")
(termFormat EnglishLanguage BunkBed "bunk bed")

(=>
  (instance ?X BunkBed)
  (exists (?BED1 ?BED2)
    (and
      (instance ?BED1 SingleBed)
      (instance ?BED2 SingleBed)
      (part ?BED1 ?X)
      (part ?BED2 ?X)
      (orientation ?BED1 ?BED2 Above))))

(subclass MurphyBed Bed)
(documentation MurphyBed EnglishLanguage "A &%MurphyBed is a type of &%Bed that can
be stored vertically inside a wall, closet or cabinet")
(termFormat EnglishLanguage MurphyBed "pull-down bed")

(=>
  (instance ?X MurphyBed)
  (exists (?STORAGE)
    (and
      (instance ?STORAGE Compartment)
      (meetsSpatially ?STORAGE ?X)
      (hasPurpose ?STORAGE
        (exists (?K)
          (and
            (instance ?K Keeping)
            (patient ?K ?X)
            (destination ?K ?STORAGE)
            (holdsDuring 
              (WhenFn ?K)
              (attribute ?X Vertical))))))))

(subclass RollawayBed Bed)
(documentation RollawayBed EnglishLanguage "A &%RollawayBed is a type of &%Bed that is
mounted on rollers so that it can be easily moved")
(termFormat EnglishLanguage RollawayBed "rollaway bed")

(=>
  (instance ?X RollawayBed)
  (exists (?WHEEL)
    (and
      (instance ?WHEEL Wheel)
      (part ?WHEEL ?X))))

(subclass SofaBed Bed)
(documentation SofaBed EnglishLanguage "A &%SofaBed is a &%Bed that can be kept inside
a compartment in a &%Sofa")
(termFormat EnglishLanguage SofaBed "sofa bed")

(=>
  (instance ?X SofaBed)
  (exists (?SOFA ?STORAGE)
    (and
      (instance ?STORAGE Compartment)
      (part ?STORAGE ?SOFA)
      (instance ?SOFA Sofa)
      (hasPurpose ?STORAGE
        (exists (?K)
          (and
            (instance ?K Keeping)
            (patient ?K ?X)
            (destination ?K ?STORAGE)))))))

(subclass Crib Bed)
(documentation Crib EnglishLanguage "A &%Crib is a &%Bed for babies")
(termFormat EnglishLanguage Crib "crib")

(=>
  (instance ?X Crib)
  (hasPurpose ?X
    (exists (?BABY)
      (and
        (instance ?BABY HumanBaby)
        (attribute ?BABY Asleep)
        (located ?BABY ?X)))))

(subclass Hammock Bed)
(documentation Hammock EnglishLanguage "&%Hammock is a type of &%Bed made of rope or 
canvas and is suspended between two stationary objects")
(termFormat EnglishLanguage Hammock "hammock")

(=>
  (instance ?X Hammock)
  (and
    (material Fabric ?X)    
    (exists (?POLE1 ?POLE2 ?GROUND)
      (and
        (orientation ?POLE1 ?POLE2 Near)
        (connected ?POLE1 ?X)
        (connected ?POLE2 ?X)
        (instance ?GROUND LandArea)
        (located ?X ?GROUND)
        (orientation ?X ?GROUND Above)))))
        
(=>
  (instance ?X Hammock)
  (hasPurpose ?X 
    (exists (?PROC)
      (and
        (instance ?PROC LyingDown)
        (eventLocated ?PROC ?X)))))
      
  
(subclass Mattress Artifact)
(documentation Mattress EnglishLanguage "A &%Mattress is a &%component of a &%Bed 
that is a cushion to make it more comfortable")
(termFormat EnglishLanguage Mattress "mattress")

(=>
  (instance ?X Mattress)
  (exists (?BED)
    (and
      (instance ?BED Bed)
      (component ?X ?BED))))

(=>
  (instance ?X Mattress)
  (hasPurpose ?X
    (exists (?PERSON)
      (and
        (attribute ?PERSON Asleep)
        (orientation ?PERSON ?X On)))))
      
(subclass BedFrame Artifact)
(documentation BedFrame EnglishLanguage "A &%BedFrame is a %&component of a &%Bed that
supports the mattress")
(termFormat EnglishLanguage BedFrame "bed frame")

(=>
  (and
    (instance ?X Bed)
    (component ?BEDFRAME ?X)
    (instance ?BEDFRAME BedFrame)
    (component ?MATTRESS ?X)
    (instance ?MATTRESS Mattress))
  (orientation ?MATTRESS ?BEDFRAME On))

(subclass FourPosterBed BedFrame)
(documentation FourPosterBed EnglishLanguage "&%FourPosterBed is a type of &%BedFrame
with a post at each corner to support curtains or a canopy")
(termFormat EnglishLanguage FourPosterBed "four-poster bed")

(=>
  (instance ?X FourPosterBed)
  (exists (?SHAPE)
    (and
      (attribute ?X ?SHAPE)
      (instance ?SHAPE Quadrilateral)
      (forall (?CORNER)
        (=>
          (and
            (pointOfIntersection ?SIDE1 ?SIDE2 ?CORNER)
            (sideOfFigure ?SIDE1 ?SHAPE)
            (sideOfFigure ?SIDE2 ?SHAPE)
            (not (equal ?SIDE1 ?SIDE2)))
          (exists (?POST ?FLOOR)
            (and
              (meetsSpatially ?CORNER ?POST)
              (instance ?POST Artifact)
              (instance ?FLOOR Floor)
              (orientation ?BED ?FLOOR On)
              (orientation ?POST ?FLOOR Vertical))))))))
          
      
(subclass BedAttribute RelationalAttribute)
(documentation BedAttribute EnglishLanguage "&%BedAttribute is the class of attributes
attached to the type of cushion a &%Bed has")
(termFormat EnglishLanguage BedAttribute "bed attribute")

(=>
  (and
    (attribute ?X ?ATTR)
    (instance ?ATTR BedAttribute))
  (instance ?X Bed))
  
(instance WaterBed BedAttribute)
(documentation WaterBed EnglishLanguage "&%WaterBed describes how the cushion of a &%Bed
is filled with water")
(termFormat EnglishLanguage WaterBed "water bed")

(=>
  (attribute ?X WaterBed)
  (exists (?MATTRESS ?WATER)
    (and
      (component ?MATTRESS ?X)
      (contains ?MATTRESS ?WATER)
      (instance ?WATER Water))))

(subclass BedLinen Artifact)
(documentation BedLinen EnglishLanguage "&%BedLinen is an &%Artifact made of &%Fabric
that is used to &%Covering a &%Bed")
(termFormat EnglishLanguage BedLinen "bed linen")

(=>
  (instance ?X BedLinen)
  (material Fabric ?X))

(=>
  (instance ?X BedLinen)
  (hasPurpose ?X
    (exists (?COVER ?BED)
      (and
        (instance ?COVER Covering)
        (patient ?COVER ?BED)
        (instance ?BED Bed)
        (instrument ?COVER ?X)))))        
        
(subclass Table Furniture)
(documentation Table EnglishLanguage "A piece of &%Furniture with four legs and a flat top.  
It is used either for eating, paperwork or meetings.")

(subclass Desk Table)
(documentation Desk EnglishLanguage "A &%Table for a single person which is intended to be 
used for paperwork.")

(subclass ChestOrCabinet Furniture)
(subclass ChestOrCabinet Container)
(documentation ChestOrCabinet EnglishLanguage "Any piece of &%Furniture which is also a 
Container, e.g. a chest of drawers, a memory chest, an armoire, etc.")

(subclass Coffin Container)
(documentation Coffin EnglishLanguage "A &%Container for a &%HumanCorpse.")
(=>
  (instance ?C Coffin)
  (hasPurpose ?C 
    (exists (?HC)
      (and
        (instance ?HC HumanCorpse)
        (located ?HC ?C)))))

(subclass Compartment Container)
(documentation Compartment EnglishLanguage "A &%Container which is part of another &%Container, 
e.g. a drawer, a zippered pouch in a piece of luggage, a compartment in a TV 
dinner, etc.")
(=>
  (instance ?C Compartment)
  (exists (?O)
    (and
      (instance ?O Container)
      (not (equal ?C ?O))
      (part ?C ?O))))

(subclass Mailbox Container)
(documentation Mailbox EnglishLanguage "A &%Container whose purpose is to receive items 
that are mailed to the address associated with the &%Mailbox.")

(=>
  (instance ?B Mailbox)
  (hasPurpose ?B 
    (exists (?M ?I)
      (and
        (instance ?M Mailing)
        (patient ?M ?I)
        (destination ?M ?B)))))

(subclass Screw AttachingDevice)
(documentation Screw EnglishLanguage "An &%AttachingDevice which contains a spiral of grooves to 
hold it in place and which is fastened with a &%Screwdriver.")

(subclass Screwdriver Device)
(documentation Screwdriver EnglishLanguage "A &%Device that is used to rotate
a &%Screw, which by the action of its helical threads is driven into a 
medium that is softer than the material of the screw itself.")

(=>
  (instance ?D Screwdriver)
  (hasPurpose ?D
    (exists (?R ?S)
      (and
        (instance ?R Rotating)
        (instrument ?R ?D)
        (patient ?R ?S)
        (instance ?S Screw)))))

(subclass Hammer Device)
(documentation Hammer EnglishLanguage "A &%Device that is used to pound &%Nails into a 
surface, where they become firmly attached.")

(=>
  (instance ?H Hammer)
  (hasPurpose ?H
    (exists (?I ?N)
      (and
        (instance ?I Impelling)
        (instrument ?I ?H)
        (patient ?I ?N)
        (instance ?N Nail)))))

(subclass Nail AttachingDevice)
(documentation Nail EnglishLanguage "An &%AttachingDevice which is a thin piece of metal, with 
or without a head, that is fastened with a &%Hammer.")

(subclass Tape AttachingDevice)
(documentation Tape EnglishLanguage "A thin strip of &%Fabric or &%Paper that is used to attach 
two things.")

(=>
   (instance ?TAPE Tape)
   (exists (?PART)
      (and
         (part ?PART ?TAPE)
         (or
            (instance ?PART Paper)
            (instance ?PART Fabric)))))
            
(subclass Anchor AttachingDevice)
(documentation Anchor EnglishLanguage "An &%AttachingDevice which is large hook or set of hooks 
that are used to secure a &%WaterVehicle on the open water.")
(=>
   (and
      (instance ?A Anchor)
      (instance ?ATTACH Attaching)
      (instrument ?ATTACH ?A)
      (patient ?ATTACH ?S))
   (instance ?S WaterVehicle))

(subclass BoatDeck Artifact)
(documentation BoatDeck EnglishLanguage "One of the levels of a &%WaterVehicle, e.g. the 
upper deck and lower deck of small boats with a cabin.")

(=>
  (instance ?D BoatDeck)
  (exists (?B)
    (and
      (instance ?B WaterVehicle)
      (part ?D ?B))))
   
   
(subclass Button AttachingDevice)
(documentation Button EnglishLanguage "An &%AttachingDevice that is used on &%Clothing.")
(=>
  (instance ?B Button)
  (hasPurpose ?B
    (exists (?C)
      (and
        (instance ?C Clothing)
        (part ?B ?C)))))

(subclass Clamp AttachingDevice)
(documentation Clamp EnglishLanguage "An &%AttachingDevice which is designed to attach 
two things together by means of a movable part which can be tightened 
or loosened.")

(subclass Washer Device)
(documentation Washer EnglishLanguage "A thin plate (typically disk-shaped) with a &%Hole (typically in the middle) that is normally used to distribute the load of a threaded &%AttachingDevice, but can have also other functions")
(=>
    (instance ?W Washer)
    (hasPurpose ?W
        (exists (?O1 ?O2)
            (and
                (instance ?O1 CorpuscularObject)
                (instance ?O2 AttachingDevice)
                (meetsSpatially ?O1 ?W)
                (contains ?W ?O2))))) 
        
(=>
  (and
    (instance ?W Washer)
    (instance ?O1 CorpuscularObject)
    (instance ?O2 AttachingDevice)
    (meetsSpatially ?O1 ?W)
    (contains ?W ?O2))
  (exists (?PURPOSE)
    (hasPurpose ?W ?PURPOSE)))

(=>
  (instance ?W Washer)
  (attribute ?W RingTorus))
  
(subclass Holder Device)
(documentation Holder EnglishLanguage "A large class of &%Devices whose purpose is to hold 
something else, i.e. be the &%instrument of a &%Keeping.")

(=>
   (instance ?DEVICE Holder)
   (capability Keeping instrument ?DEVICE))

(subclass Saddle Holder)
(documentation Saddle EnglishLanguage "A &%Device which allows a &%Human to ride on a 
&%Horse.")

(=>
   (instance ?SADDLE Saddle)
   (capability 
     (KappaFn ?RIDE         
         (exists (?HUMAN ?HORSE) 
           (and
             (instance ?RIDE Carrying)
             (patient ?RIDE ?HUMAN)
             (instance ?HUMAN Human)
             (agent ?RIDE ?HORSE)
             (instance ?HORSE Horse)))) instrument ?SADDLE))

(subclass HorseRiding Carrying)
(documentation HorseRiding EnglishLanguage "Any instance of &%Carrying where the &%Animal is 
a &%Horse.")

(=>
  (instance ?R HorseRiding) 
  (exists (?H)
    (and
      (instance ?H Horse)
      (instrument ?R ?H))))

(instance carries BinaryPredicate)
;; KJN: Editing this to be more general not only to Animal but to any Agent
;;(domain carries 1 Animal)
(domain carries 1 Agent)
(domain carries 2 Object)
;;(documentation carries EnglishLanguage "(carries ?ANIMAL ?OBJECT) means that 
;;an &%Animal ?ANIMAL transers an &%OBJECT ?OBJECT from one point to another")

(documentation carries EnglishLanguage "(carries ?AGENT ?OBJECT) means that 
an &%Agent ?AGENT transers an &%OBJECT ?OBJECT from one point to another")
(termFormat EnglishLanguage carries "carries")
(=>
  (carries ?AGENT ?OBJECT)
  (exists (?CARRYING)
    (and
      (instrument ?CARRYING ?AGENT)
      (patient ?CARRYING ?OBJECT))))
      
      
(subclass Tray Holder)
(documentation Tray EnglishLanguage "A &%Holder that is designed for &%Food, dishes, and 
flatware.")

(subclass Dish Holder)
(documentation Dish EnglishLanguage "A &%Holder for &%Food while the &%Food is being eaten.")
(=>
  (instance ?D Dish)
  (hasPurpose ?D 
    (exists (?F ?E)
      (and
        (instance ?E Eating)
        (patient ?E ?F)
        (patient ?E ?D)
        (instance ?F (FoodForFn Animal))
        (located ?F ?D)))))

(subclass Container Holder)
(documentation Container EnglishLanguage "Any &%Holder whose purpose is to contain 
something else.  Note that &%Container is more specific in meaning 
than &%Holder, because a &%Container must have a &%Hole that is at 
least partially filled by the thing contained.")

(=>
   (instance ?CONTAINER Container)
   (hasPurpose ?CONTAINER (exists (?OBJ) (contains ?CONTAINER ?OBJ))))

(subclass Bag Container)
(documentation Bag EnglishLanguage "A &%Pliable &%Container with the purpose of &%Transfer of &%Object.")
;; MS: Changing the rules so that it becomes a more general term, removing the restriction on material of the container.
;;(documentation Bag EnglishLanguage "Any &%Container which is made of &%Fabric.")
;;(=>
;;  (instance ?BAG Bag)
;;  (exists (?PART)
;;    (and
;;      (part ?PART ?BAG)
;;      (instance ?PART Fabric))))
      
(=>
  (instance ?BAG Bag)
  (attribute ?BAG Pliable))

(=>
  (instance ?BAG Bag)
  (hasPurpose ?BAG
    (exists (?T ?OBJ)
      (and
        (instance ?T Transfer)
        (instance ?OBJ Object)
        (contains ?BAG ?OBJ)
        (instrument ?T ?BAG)
        (patient ?T ?OBJ)))))

(subclass Box Container)
(documentation Box EnglishLanguage "Any six-sided &%Container whose sides are 
rectangular in shape.")

(=>
  (instance ?BOX Box)
  (equal 
    (CardinalityFn 
      (KappaFn ?SIDE 
        (or
          (top ?SIDE ?BOX)
          (bottom ?SIDE ?BOX)
          (side ?SIDE ?BOX)))) 6))   

(subclass TrapOrCage Holder)
(documentation TrapOrCage EnglishLanguage "A &%Device whose purpose is to trap or cage &%Animals, 
i.e. to be in instrument in an act of &%Confining.")

(=>
  (instance ?T TrapOrCage)
  (hasPurpose ?T 
    (exists (?C)
      (and
        (instance ?C Confining)
        (instrument ?C ?T)))))

(subclass Envelope Container)
(documentation Envelope EnglishLanguage "A sealable &%Container for one or more pieces of 
paper which is designed to protect the papers while they are transferred to 
someone.")

(subclass TravelContainer Container)
(documentation TravelContainer EnglishLanguage "Any &%Container which is intended to be 
used for carrying clothing, toiletries, and other personal effects that 
would be needed on a overnight trip.")   

(subclass FluidContainer Container)
(documentation FluidContainer EnglishLanguage "A &%Container which is used to store &%Fluids,  
i.e. &%Liquids and &%Gases.")

(=>
   (and
      (instance ?TANK FluidContainer)
      (contains ?TANK ?STUFF))
   (attribute ?STUFF Fluid))

(subclass Bottle FluidContainer)
(documentation Bottle EnglishLanguage "A &%Container whose top is narrower than its bottom, which 
has no handle, and which is intended to store &%Liquids.")

(=>
   (and
      (instance ?BOTTLE Bottle)
      (contains ?BOTTLE ?STUFF))
   (attribute ?STUFF Liquid))

(=>
   (and
      (instance ?BOTTLE Bottle)
      (bottom ?BOTTOM ?BOTTLE)
      (top ?TOP ?BOTTLE)
      (width ?BOTTOM ?WIDTH1)
      (width ?TOP ?WIDTH2))
   (lessThan ?WIDTH2 ?WIDTH1))

(subclass DrinkingCup FluidContainer)
(documentation DrinkingCup EnglishLanguage "An open &%FluidContainer that is intended to serve a &%Beverage 
to a single person.  Note that this class includes both cups with handles and 
drinking glasses.")

(=>
   (and
      (instance ?CUP DrinkingCup)
      (contains ?CUP ?STUFF))
   (instance ?STUFF Beverage))
      
(subclass SwimmingPool FluidContainer)
(subclass SwimmingPool StationaryArtifact)
(documentation SwimmingPool EnglishLanguage "A &%FluidContainer that is filled with &%Water 
and that is used for &%Swimming.")

(=>
  (instance ?P SwimmingPool)
  (hasPurpose ?P 
    (exists (?S)
      (and
        (instance ?S Swimming)
        (eventLocated ?S ?P)))))

(=>
  (and
    (instance ?P SwimmingPool)
    (contains ?P ?F)
    (instance ?F Fluid))
  (instance ?F Water))

(subclass BoardOrBlock Artifact)
(documentation BoardOrBlock EnglishLanguage "A piece of material with flat, rectangular sides.  
Note that boards and blocks are lumped into a single concept, because the 
difference between these notions cannot be precisely defined.")

(=>
   (instance ?BOARD BoardOrBlock)
   (capability Constructing resource ?BOARD))

(subclass Brick BoardOrBlock)
(documentation Brick EnglishLanguage "A block of fired &%Clay that is used in &%Constructing.")
(=>
  (instance ?B Brick)
  (material Clay ?B))

(=>
  (instance ?B Brick)
  (hasPurpose ?B 
    (exists (?C)
       (and
         (instance ?C Constructing)
         (resource ?C ?B)))))

(subclass Veneer Artifact)
(documentation Veneer EnglishLanguage "A thin layer covering an &%Object (like &%Furniture) or a &%Wall for decorative or productive purposes.")
(=>
  (instance ?V Veneer)
  (attribute ?V Flat))
(=>
  (instance ?V Veneer)
  (hasPurpose ?V
    (exists (?OBJ)
      (covers ?V ?OBJ))))

(instance tangent BinaryPredicate)
(domain tangent 1 OneDimensionalFigure)
(domain tangent 2 TwoDimensionalObject)
(documentation tangent EnglishLanguage "(&%tangent ?LINE ?CIRCLE) means that the straight line 
?LINE is tangent to the figure ?CIRCLE, i.e. ?LINE touches ?CIRCLE without 
intersecting it.")

(=>
   (tangent ?LINE ?CIRCLE)
   (exists (?POINT1)
      (and
         (pointOfFigure ?POINT1 ?LINE)
         (pointOfFigure ?POINT1 ?CIRCLE)
         (forall (?POINT2)
            (=>
               (and
                  (pointOfFigure ?POINT2 ?LINE)
                  (pointOfFigure ?POINT2 ?CIRCLE))
               (equal ?POINT1 ?POINT2))))))

(subclass TwoDimensionalObject Object)
(documentation TwoDimensionalObject EnglishLanguage "A real-world physical object
with a very flat aspect.  This includes drawings on paper, cave
paintings and other surface alterations.")
;;(=>
;;  (instance ?T TwoDimensionalObject)
;;  (attribute ?T TwoDimensionalFigure))

(instance sliceOfFigure BinaryPredicate)
(documentation sliceOfFigure EnglishLanguage "(sliceOfFigure ?SLICE ?FIGURE) indicates
that ?SLICE is a 2-d section of the 3-d figure ?FIGURE.  Or, more 
formally, ?SLICE is 2-d figure formed by the intersection of a plane
with the 3-d figure ?FIGURE.")
(domain sliceOfFigure 1 TwoDimensionalObject)
(domain sliceOfFigure 2 CorpuscularObject)

(instance RoundShape ThreeDimensionalFigure)
(documentation RoundShape EnglishLanguage "Any &%ThreeDimensionalFigure that has a single
tangent at every point on its surface.")

;; NS: fixed misspelled name: tangent.
(=>
  (attribute ?O RoundShape)
  (forall (?P)
    (and
      (pointOfFigure ?P ?O)
      (instance ?TO TwoDimensionalObject)
      (meetsSpatially ?P ?O)
      (meetsSpatially ?P ?TO)
      (exists (?T)       
        (tangent ?T ?TO)))))

(subclass Cone ThreeDimensionalFigure)
(documentation Cone EnglishLanguage "The class of &%ThreeDimensionalFigures which are 
produced by rotating a &%RightTriangle around its &%RightAngle.")

(subclass Cylinder ThreeDimensionalFigure)
(documentation Cylinder EnglishLanguage "The class of &%ThreeDimensionalFigures such that 
all &%GeometricPoints that make up the &%Cylinder are equidistant from a 
&%OneDimensionalFigure, known as the axis of the &%Cylinder.")

(subclass ObliqueAngle TwoDimensionalAngle)
(documentation ObliqueAngle EnglishLanguage "Any &%TwoDimensionalAngle that has an 
&%angularMeasure that is greater than 90 &%AngularDegrees.")

(=>
  (and
    (instance ?A ObliqueAngle)
    (angularMeasure ?A (MeasureFn ?N AngularDegree)))
  (greaterThan ?N 90))


(subclass RightAngle TwoDimensionalAngle)
(documentation RightAngle EnglishLanguage "Any &%TwoDimensionalAngle that has the 
&%angularMeasure of 90 &%AngularDegrees.")

(=>
   (instance ?A RightAngle)
   (angularMeasure ?A (MeasureFn 90 AngularDegree)))

(subclass AcuteAngle TwoDimensionalAngle)
(documentation AcuteAngle EnglishLanguage "Any &%TwoDimensionalAngle that has an 
&%angularMeasure that is less than 90 &%AngularDegrees.")
(partition TwoDimensionalAngle RightAngle ObliqueAngle AcuteAngle)
(=>
   (and
      (instance ?A AcuteAngle)
      (angularMeasure ?A (MeasureFn ?N AngularDegree)))
   (lessThan ?N 90))

(subclass Polygon ClosedTwoDimensionalFigure)
(documentation Polygon EnglishLanguage "A &%ClosedTwoDimensionalFigure that is composed 
exclusively of straight lines, i.e. &%OneDimensionalFigures.")

(=>
   (instance ?POLYGON Polygon)
   (=>
      (geometricPart ?PART ?POLYGON)
      (or
         (sideOfFigure ?PART ?POLYGON)
         (exists (?SIDE)
            (and
               (sideOfFigure ?SIDE ?POLYGON)
               (geometricPart ?PART ?SIDE))))))

(subclass Triangle Polygon)
(documentation Triangle EnglishLanguage "Any three-sided &%Polygon.")

(=>
   (instance ?TRIANGLE Triangle)
   (equal (CardinalityFn (KappaFn ?SIDE (sideOfFigure ?SIDE ?TRIANGLE))) 3))

(subclass RightTriangle Triangle)
(documentation RightTriangle EnglishLanguage "Any &%Triangle that contains a &%RightAngle.")

(=>
   (instance ?T RightTriangle)
   (exists (?A)
      (and
         (instance ?A RightAngle)
         (angleOfFigure ?A ?T))))
      
(subclass Quadrilateral Polygon)
(documentation Quadrilateral EnglishLanguage "Any four-sided &%Polygon.")

(=>
   (instance ?QUAD Quadrilateral)
   (equal (CardinalityFn (KappaFn ?SIDE (sideOfFigure ?SIDE ?QUAD))) 4))

(subclass Rectangle Quadrilateral)
(documentation Rectangle EnglishLanguage "Any &%Quadrilateral whose angles are all 
&%RightAngles.")

(=>
   (instance ?RECTANGLE Rectangle)
   (=>
      (angleOfFigure ?ANGLE ?RECTANGLE)
      (instance ?ANGLE RightAngle)))

(subclass Square Rectangle)
(documentation Square EnglishLanguage "Any &%Rectangle whose sides are all equal.")

(=>
   (instance ?SQUARE Square)
   (exists (?LENGTH)
      (forall (?SIDE)
         (=>
            (sideOfFigure ?SIDE ?SQUARE)
            (lineMeasure ?SIDE ?LENGTH)))))

(documentation DiameterFn EnglishLanguage "(DiameterFn ?CIRCLE) denotes the length of the 
diameter of the &%Circle ?CIRCLE.")
(instance DiameterFn UnaryFunction)
(instance DiameterFn TotalValuedRelation)
(domain DiameterFn 1 Circle)
(range DiameterFn LengthMeasure)
            
(=>
  (equal (DiameterFn ?C) ?L)
  (exists (?R)
    (and
      (equal (RadiusFn ?C) ?R)
      (equal (MultiplicationFn ?R 2) ?L))))

(documentation RadiusFn EnglishLanguage "(RadiusFn ?CIRCLE) denotes the length of the radius 
of the &%Circle ?CIRCLE.")
(instance RadiusFn UnaryFunction)
(instance RadiusFn TotalValuedRelation)
(domain RadiusFn 1 Circle)
(range RadiusFn LengthMeasure)

(=>
  (and
    (equal (CenterOfCircleFn ?C) ?P)
    (pointOfFigure ?P2 ?C)
    (geometricDistance ?P2 ?P ?R))
  (equal (RadiusFn ?C) ?R))
    
(subclass CircleSector ClosedTwoDimensionalFigure)
(documentation CircleSector EnglishLanguage "A slice of a &%Circle, i.e. any 
&%ClosedTwoDimensionalFigure which consists of two Radii and the arc of 
the &%Circle that they bound.")

(subrelation sideOfFigure geometricPart)
(domain sideOfFigure 1 OneDimensionalFigure)
(domain sideOfFigure 2 GeometricFigure)
(documentation sideOfFigure EnglishLanguage "(&%sideOfFigure ?SIDE ?FIGURE) means that the 
&%OneDimensionalFigure ?POINT is a side of the &%GeometricFigure ?FIGURE.")

(subclass Sphere ThreeDimensionalFigure)
(documentation Sphere EnglishLanguage "The class of &%ThreeDimensionalFigures such that 
all &%GeometricPoints that make up the &%Sphere are equidistant from a 
single &%GeometricPoint, known as the center of the &%Sphere.")

(=>
  (and
    (attribute ?OBJ ?SPHERE)
    (instance ?SPHERE Sphere))
  (exists (?CENTER ?DIST)
    (forall (?PT)
      (=>
        (pointOfFigure ?PT ?OBJ)
        (geometricDistance ?PT ?CENTER ?DIST)))))

(subclass Bubble CorpuscularObject)
(documentation Bubble EnglishLanguage "A globe which has a &%Liquid surface and which contains 
a &%Gas.")
(=>
  (instance ?B Bubble)
  (exists (?S)
    (and
      (surface ?S ?B)
      (attribute ?S Liquid))))

(=>
  (and
    (instance ?B Bubble)
    (interiorPart ?P ?B))
  (attribute ?P Gas))

(=>
  (and
    (instance ?B Bubble)
    (not
      (exists (?X ?S)
        (and
          (attribute ?X ?S)
          (not (equal ?X Gas))
          (meetsSpatially ?X ?B)))))
  (attribute ?B RoundShape))

(subclass Nest CorpuscularObject)
(documentation Nest EnglishLanguage "Any structure which is created by nonhuman &%Animals for 
the purpose of giving birth to their offspring.")

(=>
   (instance ?NEST Nest)
   (hasPurpose ?NEST (exists (?BIRTH)
                        (and
                           (instance ?BIRTH Birth)
                           (eventLocated ?BIRTH ?NEST)))))

(subclass OutdoorClothing Clothing)
(documentation OutdoorClothing EnglishLanguage "&%Clothing that is intended to be worn 
outdoors.")  

(=>
   (and
      (instance ?CLOTHING OutdoorClothing)
      (holdsDuring ?TIME (wears ?PERSON ?CLOTHING)))
   (not (exists (?BUILDING)
      (and
         (instance ?BUILDING Building)
         (holdsDuring ?TIME (located ?PERSON ?BUILDING))))))
   
(subclass Apron Clothing)
(documentation Apron EnglishLanguage "An item of &%Clothing that protects the front and 
middle part of the body while one is &%Cooking or doing other work.")
(=>
  (instance ?A Apron)
  (hasPurpose ?A
    (exists (?P ?C)
      (and
        (instance ?C Cooking)
        (agent ?C ?P)
        (holdsDuring 
          (WhenFn ?C)
          (wears ?P ?A))))))

(subclass Belt Clothing)
(documentation Belt EnglishLanguage "A piece of &%Clothing that is worn around the waist 
to restrain another piece of clothing.")
(=>
  (and
    (wears ?P ?B)
    (instance ?B Belt))
  (exists (?C)
    (and
      (instance ?C Clothing)
      (wears ?P ?C)
      (meetsSpatially ?B ?C))))

(subclass TieClothing Clothing)
(documentation TieClothing EnglishLanguage "&%Clothing that is intended to be worn around the 
&%Neck and knotted at the front.")

(=>
  (and
    (wears ?P ?T)
    (instance ?T TieClothing))
  (exists (?N)
    (and
      (instance ?N Neck)
      (part ?N ?P)
      (contains ?T ?N))))

(subclass Cloak Clothing)
(documentation Cloak EnglishLanguage "A piece of &%Clothing that covers the whole body 
except the face (and possibly entire head), hands, and feet.")

(subclass Collar Clothing)
(documentation Collar EnglishLanguage "A piece of &%Clothing that fits around the &%Neck.  
A &%Collar is always part of a &%Coat or a &%Shirt.")
(=>
  (instance ?C Collar)
  (exists (?OC)
    (and
      (part ?C ?OC)
      (or
        (instance ?OC Coat)
        (instance ?OC Shirt)))))

(=>
  (and
    (wears ?P ?C)
    (instance ?C Collar))
  (exists (?N)
    (and
      (instance ?N Neck)
      (part ?N ?P)
      (meetsSpatially ?C ?N))))

(subclass Glove Clothing)
(documentation Glove EnglishLanguage "Clothing that is intended to be worn on the &%Hand.  
Note that this class covers both gloves which have individual compartments 
for each of the &%Fingers and mittens.")
(=>
  (and
    (wears ?P ?G)
    (instance ?G Glove))
  (exists (?H)
    (and
      (instance ?H Hand)
      (part ?H ?P)
      (meetsSpatially ?G ?H))))

(subclass Hat Clothing)
(documentation Hat EnglishLanguage "A type of &%Clothing that is worn on the &%Head.  Note 
that this class covers caps, bonnets, berets, etc.")

(=>
   (and
      (wears ?PERSON ?HAT)
      (instance ?HAT Hat))
   (exists (?HEAD)
      (and
         (instance ?HEAD Head)
         (part ?HEAD ?PERSON)
         (meetsSpatially ?HAT ?HEAD))))

(subclass Coat OutdoorClothing)
(documentation Coat EnglishLanguage "&%Clothing that has sleeves and covers from the neck 
down.  &%Coats are intended to be worn outdoors.")

(subclass Trousers Clothing)
(documentation Trousers EnglishLanguage "A piece of &%Clothing that covers each &%Leg 
of a person separately.")

(=>
  (and
    (wears ?H ?T)
    (instance ?T Trousers))
  (exists (?L)
    (and
      (instance ?L Leg)
      (part ?L ?H)
      (contains ?T ?L))))

(subclass Shoe Clothing)
(documentation Shoe EnglishLanguage "&%Clothing that is intended to be worn on the &%Foot.  
It consists of an upper, a sole, and a heel.")

(=>
   (and
      (wears ?PERSON ?SHOE)
      (instance ?SHOE Shoe))
   (exists (?FOOT)
      (and
         (instance ?FOOT Foot)
         (part ?FOOT ?PERSON)
         (meetsSpatially ?SHOE ?FOOT))))

(documentation ShoeSole EnglishLanguage "The bottom part of a &%Shoe that is
intended to be the point of contact with the ground while the
shoe is being worn.")
(subclass ShoeSole Artifact)
(=>
  (instance ?SS ShoeSole)
  (exists (?S)
    (and 
      (instance ?S Shoe)
      (bottom ?SS ?S))))

(documentation Sandal EnglishLanguage "Any kind of open shoe lacking a markedly
thicker heel.  The toe may be enclosed, but there must be some opening in the upper
other than the &%Hole through which the foot is inserted.")
(subclass Sandal Shoe)
(=>
  (instance ?S Sandal)
  (exists (?H1 ?H2)
    (and
      (instance ?H1 Hole)
      (instance ?H2 Hole)
      (not (equal ?H1 ?H2))
      (hasPurpose ?H1
        (exists (?D ?F ?A ?I)
          (and 
            (instance ?D Dressing)
            (instance ?F Foot)
            (agent ?D ?A)
            (part ?F ?A)
            (subProcess ?I ?D)
            (instance ?I Inserting)
            (patient ?I ?F)
            (destination ?I ?H1)))))))

(=>
  (instance ?S Sandal)
  (exists (?SOLE)
    (and
      (instance ?SOLE ShoeSole)
      (part ?SOLE ?S)
      (attribute ?SOLE Flat)))) 

(subclass Sock Clothing)
(documentation Sock EnglishLanguage "A piece of &%Clothing that is made of a soft &%Fabric 
like &%Cotton and that is intended to be worn on the &%Foot.")
(=>
  (and
    (wears ?P ?S)
    (instance ?S Sock))
  (exists (?F)
    (and
      (instance ?F Foot)
      (part ?F ?P)
      (contains ?S ?F))))

(subclass Shirt Clothing)
(documentation Shirt EnglishLanguage "An item of &%Clothing which covers the upper body of a 
&%Human.")

(=>
   (and
      (instance ?SHIRT Shirt)
      (wears ?PERSON ?SHIRT))
   (instance ?PERSON Human))

(subclass Sleeve Clothing)
(documentation Sleeve EnglishLanguage "A piece of &%Clothing that covers the Arm.  A 
&%Sleeve is always part of a &%Coat or a &%Shirt.")
(=>
  (and
    (wears ?P ?S)
    (instance ?S Sleeve))
  (exists (?A)
    (and
      (instance ?A Arm)
      (part ?A ?P)
      (contains ?S ?A))))

(=>
  (instance ?S Sleeve)
  (exists (?C)
    (and
      (part ?S ?C)
      (or
        (instance ?C Shirt)
        (instance ?C Coat)))))

(subclass Dress Clothing)
(documentation Dress EnglishLanguage "An item of &%Clothing which covers the lower body of a 
&%Woman.")

(=>
   (and
      (instance ?DRESS Dress)
      (wears ?PERSON ?DRESS))
   (instance ?PERSON Woman))

(subclass ClothingSuit Collection)
(documentation ClothingSuit EnglishLanguage "A &%Collection of instances of &%Clothing that 
are designed to be worn together.")

(=>
   (and
      (instance ?SUIT ClothingSuit)
      (member ?ITEM1 ?SUIT)
      (holdsDuring ?TIME (wears ?PERSON ?ITEM1)))
   (forall (?ITEM2)
      (=>
         (member ?ITEM2 ?SUIT)
         (holdsDuring ?TIME (wears ?PERSON ?ITEM2)))))

(subclass Rug Fabric)
(documentation Rug EnglishLanguage "A piece of &%Fabric whose purpose is to cover a &%Floor.")

(=>
  (instance ?R Rug)
  (hasPurpose ?R 
    (exists (?C)
      (and
        (instance ?C Covering)
        (instrument ?C ?R)
        (patient ?C ?F)
        (instance ?F Floor)))))

(documentation Towel EnglishLanguage "A piece of &%Fabric which is used for &%Drying.")
(subclass Towel Fabric)

(=>
  (instance ?X Towel)
  (capability Drying instrument ?X))

(=>
  (instance ?T Towel)
  (hasPurpose ?T 
    (exists (?D)
      (and
        (instance ?D Drying)
        (instrument ?D ?T)))))

(subclass Leather Fabric)
(documentation Leather EnglishLanguage "A &%Fabric that is the result of tanning an &%Animal 
&%Skin.")

(=>
   (instance ?LEATHER Leather)
   (exists (?MAKE ?SKIN)
      (and
         (instance ?MAKE Making)
         (resource ?MAKE ?SKIN)
         (instance ?SKIN Skin)
         (result ?MAKE ?LEATHER))))
      
(subclass Silk Fabric)
(documentation Silk EnglishLanguage "Fabric that is woven from the strands produced by 
certain &%Larval &%Insects.")

(=>
  (instance ?S Silk)
  (exists (?M ?T ?I)
    (and
      (instance ?M Making)
      (result ?M ?S)
      (resource ?M ?T)
      (part ?T ?I)
      (instance ?I Insect)
      (attribute ?I Larval))))

(subclass Wool Fabric)
(documentation Wool EnglishLanguage "&%Fabric that is made from the &%Hair of &%Sheep.")

(=>
  (instance ?W Wool)
  (exists (?M ?H ?S)
    (and
      (instance ?M Making)
      (result ?M ?W)
      (resource ?M ?H)
      (part ?H ?S)
      (instance ?H Hair)
      (instance ?S Sheep))))

(subclass Pocket Fabric)
(documentation Pocket EnglishLanguage "A pouch of &%Fabric in an instance of &%Clothing where 
something can be kept.")

(=>
   (instance ?POCKET Pocket)
   (exists (?CLOTHING)
      (and
         (instance ?CLOTHING Clothing)
         (part ?POCKET ?CLOTHING))))

(=>
   (instance ?POCKET Pocket)
   (capability Keeping instrument ?POCKET))

(subclass Blanket Fabric)
(documentation Blanket EnglishLanguage "A piece of &%Fabric whose purpose is to keep a 
person who is in bed warm.")

(=>
   (instance ?BLANKET Blanket)
   (hasPurpose ?BLANKET 
     (exists (?HEAT ?PERSON ?BED)
       (and
         (instance ?HEAT Heating)
         (patient ?HEAT ?PERSON)
         (instance ?PERSON Human)
         (located ?PERSON ?BED)
         (instance ?BED Bed)))))

(subclass Cotton PlantAnatomicalStructure)
(documentation Cotton EnglishLanguage "Fibers from the cotton plant that are used in 
&%Making &%CottonFabric.")

(subclass CottonFabric Fabric)
(documentation CottonFabric EnglishLanguage "Any &%Fabric that is made entirely out of &%Cotton.")
(=>
  (instance ?F CottonFabric)
  (exists (?M ?C)
    (and
      (instance ?M Making)
      (resource ?M ?C)
      (instance ?C Cotton)
      (result ?M ?F))))

(=>
  (instance ?F CottonFabric)
  (material Cotton ?F))

(documentation Veil EnglishLanguage "A piece of &%Clothing intended to cover or
obscure the face or hair of a &%Woman.  This is commonly worn for
religious reasons when in public in &%Muslim countries, but is also customary
at &%Weddings and &%Funerals among some non-Muslim women.")
(subclass Veil Clothing)
(=>
  (instance ?V Veil)
  (hasPurpose ?V
    (exists (?F ?H)
      (or
        (and
          (instance ?F Face)
          (meetsSpatially ?V ?F))
        (and
          (instance ?H Hair)
          (meetsSpatially ?V ?H)))))) 

(subclass Concealing Putting)
(documentation Concealing EnglishLanguage "Locating something in such a way that it cannot 
be seen.")
(=>
  (and
    (instance ?C Concealing)
    (patient ?C ?OBJ))
  (hasPurpose ?C 
    (not 
      (exists (?S)
        (and
          (instance ?S Seeing)
          (patient ?S ?OBJ))))))

(subclass Dressing Putting)
(documentation Dressing EnglishLanguage "The &%Process of putting on &%Clothing.")

(=>
   (and
      (instance ?DRESS Dressing)
      (agent ?DRESS ?AGENT)
      (patient ?DRESS ?CLOTHING))
   (and
      (instance ?CLOTHING Clothing)
      (holdsDuring 
        (BeginFn 
          (WhenFn ?DRESS)) 
        (not 
          (wears ?AGENT ?CLOTHING)))
      (holdsDuring 
        (EndFn 
          (WhenFn ?DRESS)) 
        (wears ?AGENT ?CLOTHING))))

(subclass ChangingClothing Transfer)
(documentation ChangingClothing EnglishLanguage "Any instance of a process of 
&%RemovingClothing and &%Dressing.")
(=>
  (instance ?CC ChangingClothing)
  (exists (?R ?D)
    (and
      (instance ?R RemovingClothing)
      (instance ?D Dressing)
      (subProcess ?R ?CC)
      (subProcess ?D ?CC))))

(subclass RemovingClothing Uncovering)
(documentation RemovingClothing EnglishLanguage "Removing &%Clothing from a &%Human or 
&%Animal in such a way that the &%Human or &%Animal no longer wears the 
&%Clothing.")

(=>
  (and
    (instance ?REMOVE RemovingClothing)
    (agent ?REMOVE ?AGENT)
    (patient ?REMOVE ?CLOTHING))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?REMOVE)) 
      (wears ?AGENT ?CLOTHING))
    (holdsDuring 
      (EndFn (WhenFn ?REMOVE)) 
      (not (wears ?AGENT ?CLOTHING)))))

;;MS: Moved from Hotel.kif because how general this term is.
(subclass Cleaning Maintaining)      
(documentation Cleaning EnglishLanguage "&%Cleaning refers to the &%Process of removing
dirt and arranging things")

(=>
  (instance ?X Cleaning)
  (exists (?OBJ)
    (and
      (patient ?X ?OBJ)
      (holdsDuring
        (EndFn (WhenFn ?X))
        (attribute ?OBJ Clean)))))

(subclass Sweeping Removing)
(documentation Sweeping EnglishLanguage "Removing small particles from the floor by means of 
a &%Broom.")

(=>
  (and
    (instance ?S Sweeping)
    (instrument ?S ?B))
  (instance ?B Broom))

(subclass Washing Removing)
(subclass Washing Cleaning)
(documentation Washing EnglishLanguage "&%Removing small particles from something by means of 
a &%Detergent and &%Water.")

(=>
  (instance ?P Washing)
  (exists (?D ?W)
    (and
      (instance ?D Detergent)
      (instrument ?P ?D)
      (instance ?W Water)
      (instrument ?P ?W))))

(subclass CleaningDevice Device)
(documentation CleaningDevice EnglishLanguage "Any &%Device whose purpose is &%Cleaning something.")

(=>
    (instance ?D CleaningDevice)
    (hasPurpose ?D
        (exists (?C)
            (and
                (instance ?C Cleaning)
                (instrument ?C ?D)))))

(subclass Tying Attaching) 
(documentation Tying EnglishLanguage "The &%Process of tying two things, or two strands of 
the same thing, together.") 

(subclass Untying Detaching) 
(disjoint Untying Tying)
(documentation Untying EnglishLanguage "The &%Process of untying two things, or two strands 
of the same thing.") 

(subclass Sewing Attaching)
(documentation Sewing EnglishLanguage "Attaching two pieces of &%Fabric or one part of a 
piece of &%Fabric to another part by means of needle and thread.")

(=>
  (instance ?S Sewing)
  (exists (?F)
    (and
      (instance ?F Fabric)
      (patient ?S ?F))))

(subclass Soldering Attaching)
(documentation Soldering EnglishLanguage "Attaching two things by means of a &%MetallicAlloy.")

(=>
  (and
    (instance ?S Soldering)
    (patient ?S ?OBJ1)
    (patient ?S ?OBJ2)
    (not (equal ?OBJ1 ?OBJ2)))
  (exists (?A)
    (and
      (instance ?A MetallicAlloy)
      (connects ?A ?OBJ1 ?OBJ2))))

(subclass SolderingIron ElectricDevice)
(documentation SolderingIron EnglishLanguage "An &%ElectricDevice
for melting &%Solder and thereby &%Attaching metallic objects
to one another.")

(=>
  (instance ?S Soldering)
  (exists (?SI)
    (and
      (instance ?SI SolderingIron)
      (instrument ?S ?SI))))

(=>
  (instance ?SI SolderingIron)
  (exists (?X)
    (and
      (part ?X ?SI)
      (material Metal ?X))))
(=>
  (instance ?S Soldering)
  (exists (?M)
    (and
      (instance ?M Melting)
      (subProcess ?M ?S))))
      
;;; Start of Pathologies and Diseases

;; NS: TO DO: In general, it would be better to treat all
;; pathologies (diseases, illnesses) as processes, and
;; deprecate nearly all uses of DiseaseOrSyndrome.  Clean up
;; this area.

(instance patientMedical BinaryPredicate)
(domain patientMedical 1 Human)
(domain patientMedical 2 CognitiveAgent)
(documentation patientMedical EnglishLanguage "The relation of receiving medical care 
from a recognized medical practitioner.  (&%patientMedical ?PATIENT 
?DOCTOR) means that ?PATIENT is the patient of ?DOCTOR.  Note that 
argument type restriction on the second argument is &%CognitiveAgent 
to allow for cases where someone is the patient of an &%Organization, 
viz. a &%CareOrganization.")

(=>
   (patientMedical ?PATIENT ?DOCTOR)
   (exists (?PROCESS)
      (and
         (patient ?PROCESS ?PATIENT)
         (agent ?PROCESS ?DOCTOR)
         (or
            (instance ?PROCESS DiagnosticProcess)
            (instance ?PROCESS TherapeuticProcess)))))

(subclass Bandage Fabric)
(documentation Bandage EnglishLanguage "A piece of &%Fabric that is used in &%Covering an 
open wound.")
(=>
  (instance ?B Bandage)
  (hasPurpose ?B 
    (exists (?TP ?C)
      (and
        (instance ?TP TherapeuticProcess)
        (instance ?C Covering)
        (subProcess ?C ?TP)
        (instrument ?C ?B)))))

(subclass Massaging TherapeuticProcess)
(subclass Massaging Touching)
(documentation Massaging EnglishLanguage "A subclass of &%TherapeuticProcess which involves 
kneading &%Muscles in such a way that tension is relieved, blood circulation 
is increased, etc.")

(subclass RelievingPain TherapeuticProcess)
(documentation RelievingPain EnglishLanguage "Any &%TherapeuticProcess that removes &%Pain from 
the patient of the process.")

(=>
  (and
    (instance ?R RelievingPain)
    (patient ?R ?P))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?R)) 
      (attribute ?P Pain))
    (holdsDuring 
      (EndFn (WhenFn ?R)) 
      (not 
        (attribute ?P Pain)))))

(subclass NonspecificDisease DiseaseOrSyndrome)
(documentation NonspecificDisease EnglishLanguage "The class of &%DiseaseOrSyndromes that are not 
caused by a single type of &%Microorganism.")

(=>
   (instance ?DISEASE NonspecificDisease)
   (not (exists (?AGENT)
      (and
         (instance ?AGENT Microorganism)
         (forall (?VICTIM)
            (=>
               (attribute ?VICTIM ?DISEASE)
               (located ?AGENT ?VICTIM)))))))

(subclass BacterialDisease InfectiousDisease)
(documentation BacterialDisease EnglishLanguage "A disease that is caused by instances of 
&%Bacterium.")

(subclass InfectiousDisease DiseaseOrSyndrome)
(documentation InfectiousDisease EnglishLanguage "Any &%DiseaseOrSyndrome that is caused by a 
&%Microorganism.")

(=>
  (and
    (instance ?I InfectiousDisease)
    (attribute ?A ?I))
  (exists (?P)
    (and
      (instance ?P PathologicProcess)
      (agent ?P ?O)
      (instance ?O Microorganism)
      (experiencer ?P ?A))))

(subclass TakingIll PathologicProcess)
(documentation TakingIll EnglishLanguage "Any &%Process where the experiencer contracts a 
&%DiseaseOrSyndrome.")

(=>
  (and
    (instance ?T TakingIll)
    (experiencer ?T ?A))
  (exists (?D)
    (and
      (instance ?D DiseaseOrSyndrome)
      (holdsDuring 
        (BeginFn (WhenFn ?T)) 
	(not (attribute ?A ?D)))
      (holdsDuring 
        (EndFn (WhenFn ?T)) 
	(attribute ?A ?D)))))

(subclass ViralDisease InfectiousDisease)
(documentation ViralDisease EnglishLanguage "A disease that is caused by instances of 
&%Virus.")

(instance Diarrhea DiseaseOrSyndrome)
(documentation Diarrhea EnglishLanguage "A &%DiseaseOrSyndrome of frequent, watery bowel 
movements.  Severe cases can be fatal for the young or weak.  It is
a common cause of death for the very young in poor developing countries.")

(instance Emphysema DiseaseOrSyndrome)
(documentation Emphysema EnglishLanguage "A &%DiseaseOrSyndrome that affects the &%Lungs and 
which results in a decrease of breathing ability.")

(=>
  (attribute ?H Emphysema)
  (exists (?L ?P)
    (and
      (instance ?L Lung)
      (part ?L ?H)
      (instance ?P PathologicProcess)
      (eventLocated ?P ?L))))

(instance Fever DiseaseOrSyndrome)
(documentation Fever EnglishLanguage "Having a body temperature which is (significantly) greater 
than 98.6 degrees Fahrenheit.  This syndrome is often associated with dehydration 
and chills.")

(=>
  (and
    (instance ?H Human)
    (attribute ?H Fever))
  (exists (?N)
    (and
      (measure ?H 
        (MeasureFn ?N FahrenheitDegree))
      (greaterThan ?N 98.6))))

(instance Goiter DiseaseOrSyndrome)
(documentation Goiter EnglishLanguage "A &%DiseaseOrSyndrome which is due to an &%Iodine deficiency 
and which results in an enlarged &%ThyroidGland.")

(=>
  (attribute ?H Goiter)
  (exists (?G ?P)
    (and
      (instance ?G ThyroidGland)
      (part ?G ?H)
      (instance ?P PathologicProcess)
      (eventLocated ?P ?G))))

(instance Tuberculosis BacterialDisease)
(documentation Tuberculosis EnglishLanguage "A &%BacterialDisease caused by the &%Tubercle &%Bacillus 
that results in lesions on various body parts, especially the &%Lungs.")

(subclass RecoveringFromIllness OrganismProcess)
(documentation RecoveringFromIllness EnglishLanguage "Any &%Process where the experiencer recovers 
from a &%DiseaseOrSyndrome.")

(=>
  (and
    (instance ?R RecoveringFromIllness)
    (experiencer ?R ?A))
  (exists (?D)
    (and
      (instance ?D DiseaseOrSyndrome)
      (holdsDuring 
        (BeginFn (WhenFn ?T)) 
	(attribute ?A ?D))
      (holdsDuring 
        (EndFn (WhenFn ?T)) 
	(not (attribute ?A ?D))))))

(subclass Protozoa Microorganism)
(documentation Protozoa EnglishLanguage "Unicellular &%Organisms that are capable of movement 
and that are found in almost every part of the world.  This class includes 
amoebas, sporozoans, and paramecia.")

(documentation parasite EnglishLanguage "(parasite ?ORGANISM1 ?ORGANISM2) means that there 
is a parasitic relationship between ?ORGANISM1 and ?ORGANISM2, i.e. ?ORGANISM1 
inhabits and obtains nourishment from ?ORGANISM2 in such a way that 
?ORGANISM2 is injured.")
(instance parasite BinaryPredicate)
(domain parasite 1 Organism)
(domain parasite 2 Organism)

(=>
  (parasite ?O1 ?O2)
  (inhabits ?O1 ?O2))

(=>
  (parasite ?O1 ?O2)
  (exists (?I)
    (and
      (instance ?I Injuring)
      (agent ?I ?O1)
      (patient ?I ?O2))))

(instance Cancer DiseaseOrSyndrome)
(documentation Cancer EnglishLanguage "A &%DiseaseOrSyndrome characterized by pathologic and 
uncontrolled cell division that results in a &%Tumor.")

(=>
   (attribute ?PERSON Cancer)
   (exists (?TUMOR)
      (and
         (instance ?TUMOR Tumor)
         (part ?TUMOR ?PERSON))))

(subclass Neurosis PsychologicalDysfunction)
(documentation Neurosis EnglishLanguage "Any &%PsychologicalDysfunction which is not due 
to an organic impairment of the &%NervousSystem.")

(subclass Psychosis PsychologicalDysfunction)
(documentation Psychosis EnglishLanguage "Any &%PsychologicalDysfunction which is the 
result of an organic impairment of the &%NervousSystem.")


(subclass Atrophy PathologicProcess)
(subclass Atrophy Decreasing)
(documentation Atrophy EnglishLanguage "Any decrease in the size of a &%BodyPart which is due to 
disease or lack of use.")
(=>
  (instance ?A Atrophy)
  (exists (?B)
    (and
      (experiencer ?A ?B)
      (instance ?B BodyPart))))

(subclass Bloating Increasing)
(subclass Bloating PathologicProcess)
(documentation Bloating EnglishLanguage "Any &%Process where the stomach or instestines of a 
&%Human or &%Animal become distended from excessive gas.")
(=>
  (instance ?B Bloating)
  (exists (?P ?S ?I ?G)
    (and
      (experiencer ?B ?P)
      (instance ?G Gas)
      (or
        (and
          (part ?I ?P)
          (instance ?I Intestine)
          (contains ?I ?G))
        (and
          (part ?S ?P)
          (instance ?S Stomach)
          (contains ?S ?G))))))

;;; End of Pathologies and Diseases

(subclass ConjugatedSubstance CompoundSubstance)
(documentation ConjugatedSubstance EnglishLanguage "A &%CompoundSubstance that results from 
the &%ChemicalSynthesis of two or more &%CompoundSubstances.")
(<=> 
  (instance ?CS ConjugatedSubstance) 
  (exists (?C1 ?C2 ?P) 
    (and 
      (instance ?C1 CompoundSubstance) 
      (instance ?C2 CompoundSubstance) 
      (not (equal ?C1 ?C2)) 
      (instance ?P ChemicalSynthesis)
      (resource ?P ?C1)
      (resource ?P ?C2)
      (result ?P ?CS))))

(instance conjugate BinaryPredicate)
(instance conjugate IrreflexiveRelation)
(instance conjugate SymmetricRelation)
(instance conjugate TransitiveRelation)
(domain conjugate 1 CompoundSubstance)
(domain conjugate 2 CompoundSubstance)
(documentation conjugate EnglishLanguage "(&%conjugate ?COMPOUND1 ?COMPOUND2) means that 
?COMPOUND1 and ?COMPOUND2 are identical &%CompoundSubstances except that 
one has one more &%Proton than the other.")

(=>
   (conjugate ?COMPOUND1 ?COMPOUND2)
   (exists (?NUMBER1 ?NUMBER2)
      (and
         (protonNumber ?COMPOUND1 ?NUMBER1) 
         (protonNumber ?COMPOUND2 ?NUMBER2)
         (or
            (equal ?NUMBER1 (AdditionFn ?NUMBER2 1))
            (equal ?NUMBER2 (AdditionFn ?NUMBER1 1))))))

(subclass Biting Grabbing)
(documentation Biting EnglishLanguage "Any instance of &%Grabbing where the &%instrument is 
the &%Mouth of the &%agent.")

(=>
   (and
      (instance ?BITE Biting)
      (agent ?BITE ?ANIMAL))
   (exists (?MOUTH)
      (and
         (instance ?MOUTH Mouth)
         (part ?MOUTH ?ANIMAL)
         (instrument ?BITE ?MOUTH))))

(subclass Strangling Grabbing)
(documentation Strangling EnglishLanguage "Any instance of &%Grabbing where the patient is 
someone else's throat and the intention is to make it impossible for the other 
person to breathe.")

(=>
  (instance ?S Strangling)
  (exists (?T)
    (and
      (patient ?S ?T)
      (instance ?T Throat))))

(=>
  (and
    (instance ?S Strangling)
    (agent ?S ?A)
    (patient ?S ?V)
    (instance ?V Human))
  (hasPurpose ?S 
    (not 
      (exists (?B)
        (and
          (instance ?B Breathing)
          (agent ?B ?V))))))

(subclass Spitting Impelling)
(documentation Spitting EnglishLanguage "Any instance of &%Impelling where the &%origin is 
the &%Mouth of the &%agent.")

(=>
   (and
      (instance ?SPIT Spitting)
      (agent ?SPIT ?ANIMAL))
   (exists (?MOUTH)
      (and
         (instance ?MOUTH Mouth)
         (part ?MOUTH ?ANIMAL)
         (origin ?SPIT ?MOUTH))))

(subclass Punching Impelling)
(documentation Punching EnglishLanguage "Any instance of &%Impelling where the instrument 
is a &%Fist of the agent.")

(=>
  (and
    (instance ?P Punching)
    (agent ?P ?A))
  (exists (?H)
    (and
      (instance ?H Hand)
      (attribute ?H Fist)
      (part ?H ?A)
      (instrument ?P ?H))))

(subclass Kicking Impelling)
(documentation Kicking EnglishLanguage "Any instance of &%Impelling where the &%instrument 
is a &%Foot of the &%agent.")

(=>
  (and
    (instance ?KICK Kicking)
    (agent ?KICK ?ANIMAL))
  (exists (?FOOT)
    (and
      (instance ?FOOT Foot)
      (part ?FOOT ?ANIMAL)
      (instrument ?KICK ?FOOT))))

(subclass Mailing Transfer)
(documentation Mailing EnglishLanguage "Any instance of &%Transfer where a postal system is 
used to move the &%patient, either a letter or a package.")

(subclass Messaging Transfer)
(documentation Messaging EnglishLanguage "Any instance of &%Transfer where a &%Message is the 
patient.")

(=>
  (instance ?MESSAGING Messaging)
  (exists (?M)
    (and
      (instance ?M Message)
      (patient ?MESSAGING ?M))))

(instance neighbor BinaryPredicate)
(instance neighbor SymmetricRelation)
(instance neighbor IrreflexiveRelation)
(domain neighbor 1 Human)
(domain neighbor 2 Human)
(documentation neighbor EnglishLanguage "(&%neighbor ?PERSON1 ?PERSON2) means that ?PERSON1 is 
a neighbor of ?PERSON2, i.e. ?PERSON1 and ?PERSON2 have their &%homes &%Near 
one another.")

(=>
   (neighbor ?PERSON1 ?PERSON2)
   (exists (?HOME1 ?HOME2)
      (and
         (home ?PERSON1 ?HOME1)
         (home ?PERSON2 ?HOME2)
         (not (equal ?HOME1 ?HOME2))
         (orientation ?HOME1 ?HOME2 Near))))

(instance capacity BinaryPredicate)
(domain capacity 1 SelfConnectedObject)
(domain capacity 2 ConstantQuantity)
(relatedInternalConcept capacity humanCapacity)
(documentation capacity EnglishLanguage "(&%capacity ?OBJ ?QUANTITY) means that ?OBJ can contain 
something that has the &%measure of ?QUANTITY.  This predicate denotes maximal 
capacity, i.e. ?OBJ can hold no more than ?QUANTITY.  Note, however, that this 
does not mean that &%capacity is a &%SingleValuedRelation, since an object may 
have various maximal capacities across different dimensions, e.g. a particular 
box may have a &%capacity of 3 pounds and a &%capacity of 1 liter.")

(=>
   (and
      (measure ?OBJ1 ?MEAS)
      (contains ?OBJ2 ?OBJ1))
   (capacity ?OBJ2 ?MEAS)) 

(instance humanCapacity BinaryPredicate)
(instance humanCapacity SingleValuedRelation)
(domain humanCapacity 1 StationaryArtifact)
(domain humanCapacity 2 PositiveInteger)
(documentation humanCapacity EnglishLanguage "(&%humanCapacity ?CONSTRUCT ?NUMBER) means that the 
&%StationaryArtifact ?CONSTRUCT, e.g. a &%Building or a &%Room, can hold a maximum 
of ?NUMBER &%Humans without crowding.")

(instance LastFn UnaryFunction)
(domain LastFn 1 List)
(range LastFn Entity)
(documentation LastFn EnglishLanguage "(&%LastFn ?LIST) returns the last item in the 
&%List ?LIST.  For example, (&%LastFn (&%ListFn &%Monday &%Tuesday 
&%Wednesday)) would return the value of &%Wednesday.")

(<=>
   (equal (LastFn ?LIST) ?ITEM)
   (exists (?NUMBER)
      (and
         (equal (ListLengthFn ?LIST) ?NUMBER)
         (equal (ListOrderFn ?LIST ?NUMBER) ?ITEM))))

(instance FirstFn UnaryFunction)
(domain FirstFn 1 List)
(range FirstFn Entity)
(documentation FirstFn EnglishLanguage "(&%FirstFn ?LIST) returns the first item in 
the &%List ?LIST.  For example, (&%FirstFn (&%ListFn &%Monday &%Tuesday 
&%Wednesday)) would return the value of &%Monday.")

(=>
   (and
     (instance ?LIST List)
     (not
       (equal ?LIST NullList)))
   (equal (FirstFn ?LIST) (ListOrderFn ?LIST 1)))

(instance StreetAddressFn QuaternaryFunction)
(domain StreetAddressFn 1 StationaryArtifact)
(domain StreetAddressFn 2 Roadway)
(domain StreetAddressFn 3 City)
(domain StreetAddressFn 4 Nation)
(range StreetAddressFn Agent)
(documentation StreetAddressFn EnglishLanguage "(&%StreetAddressFn ?BUILDING ?ROAD ?CITY 
?COUNTRY) returns the &%Agent, e.g. a family, an organization, a person, 
etc. that resides or conducts business at the corresponding &%postContactSite.")

(=>
   (equal (StreetAddressFn ?PLACE ?ROAD ?CITY ?COUNTRY) ?AGENT)
   (postContactSite ?PLACE ?AGENT))

(=>
   (equal (StreetAddressFn ?PLACE ?ROAD ?CITY ?COUNTRY) ?AGENT)
   (exists (?BUILDING)
      (and
         (instance ?BUILDING Building)
         (part ?PLACE ?BUILDING))))
 
(subclass ArtStudio Workshop)
(documentation ArtStudio EnglishLanguage "A &%Workshop, which is 
devoted to the creation of &%ArtWorks.")

(=>
  (instance ?STUDIO ArtStudio)
  (hasPurpose ?STUDIO 
  (exists (?MAKE ?WORK)
    (and
      (instance ?MAKE Making)
      (result ?MAKE ?WORK)
      (instance ?WORK ArtWork)))))

(subclass Mine StationaryArtifact)
(documentation Mine EnglishLanguage "An construction in the earth from which &%Minerals are removed, 
either in pure form or as part of ores.")

(=>
  (instance ?MINE Mine)
  (hasPurpose ?MINE 
    (exists (?REMOVE ?MINERAL)
      (and
        (instance ?REMOVE Removing)
        (patient ?REMOVE ?MINERAL)
        (instance ?MINERAL Mineral)
        (origin ?REMOVE ?MINE)))))

(subclass MobileResidence Artifact)
(disjoint MobileResidence Residence)
(documentation MobileResidence EnglishLanguage "Anything which serves to house people but 
which changes its location from time to time, e.g. a motorhome, a mobile 
home, a camp, etc.  Note that &%MobileResidence is disjoint from &%Residence, 
because the latter is a subclass of &%StationaryArtifact.")

(subclass Prison StationaryArtifact)
(documentation Prison EnglishLanguage "An installation which is owned and maintained by 
a &%Government for the purpose of &%Confining people.  This class covers 
jails, federal prisons, concentration camps, gulags, etc.")

(=>
  (instance ?P Prison)
  (hasPurpose ?P 
    (exists (?C ?H ?G)
      (and
        (instance ?C Confining)
        (eventLocated ?C ?P)
        (patient ?C ?H)
        (instance ?H Human)
        (agent ?C ?G)
        (instance ?G Government)))))

(documentation detainee EnglishLanguage "(detainee ?EVENT ?OBJECT) means that in the 
Confining ?EVENT, the Object ?OBJECT is restrained by force, threat, or 
other form of intimidation.")
(instance detainee CaseRole)
(domain detainee 1 Confining)
(domain detainee 2 Animal)
(subrelation detainee patient)

(instance targetInAttack BinaryPredicate)
(instance targetInAttack CaseRole)
(domain targetInAttack 1 Process)
(domain targetInAttack 2 Object)
(subrelation targetInAttack patient)
(documentation targetInAttack EnglishLanguage "This relation 
identifies the &%patient in the event that is the object of the
attack.")

(subclass VotingPoll StationaryArtifact)
(documentation VotingPoll EnglishLanguage "A structure where Voting for an &%Election 
takes place.")

(=>
  (instance ?P VotingPoll)
  (exists (?V)
    (and
      (instance ?V Voting)
      (eventLocated ?V ?P))))

(subclass Camp MobileResidence)
(documentation Camp EnglishLanguage "A &%MobileResidence consisting of tents and other temporary 
living quarters that is constructed on an undeveloped &%LandArea.")

(=>
   (instance ?CAMP Camp)
   (exists (?TENT)
      (and
         (instance ?TENT Tent)
         (part ?TENT ?CAMP))))

(subclass Tent MobileResidence)
(documentation Tent EnglishLanguage "A &%MobileResidence that is made of &%Fabric and poles and 
can be easily assembled and disassembled.")

(=>
   (instance ?TENT Tent)
   (exists (?FABRIC)
      (and
         (instance ?FABRIC Fabric)
         (part ?FABRIC ?TENT))))        

(subclass Monument StationaryArtifact)
(documentation Monument EnglishLanguage "A &%StationaryArtifact whose purpose is to commemorate 
a person, animal or event.")

(=>
  (instance ?M Monument)
  (hasPurpose ?M 
    (exists (?R)
      (and
        (instance ?R Remembering)
        (instrument ?R ?M)))))

(subclass Tomb StationaryArtifact)
(documentation Tomb EnglishLanguage "A &%StationaryArtifact which is meant to contain someone 
who is &%Dead.")

(=>
  (instance ?T Tomb)
  (hasPurpose ?T 
    (exists (?P)
      (and
        (attribute ?P Dead)
        (contains ?T ?P)))))

(subclass Workshop StationaryArtifact)
(documentation Workshop EnglishLanguage "A &%Room, suite of &%Rooms or &%Building which is 
devoted to hand-crafting &%Artifacts.")

(=>
  (instance ?S Workshop)
  (hasPurpose ?S 
    (exists (?M)
      (and
        (instance ?M Making)
        (result ?M ?W)
        (instance ?W Artifact)))))

;; KJN: Moving this to Government.kif as chiefOfState is defined there.        
;;(subclass ExecutiveResidence PermanentResidence)
;;(documentation ExecutiveResidence EnglishLanguage "A &%Residence of a &%chiefOfState, e.g. 
;;the White House, a state governor's mansion, Buckingham Palace, etc.")

;;(=>
;;   (instance ?RESIDENCE ExecutiveResidence)
;;   (exists (?AREA ?POSITION ?PERSON)
;;      (and
;;         (located ?RESIDENCE ?AREA)
;;         (home ?PERSON ?RESIDENCE)
;;         (chiefOfState ?AREA ?POSITION ?PERSON)))) 

(subclass ApartmentUnit SingleFamilyResidence)
(documentation ApartmentUnit EnglishLanguage "A &%SingleFamilyResidence that is not owned 
by any member of the &%SocialUnit that lives there.")

(=>
   (and
      (instance ?UNIT ApartmentUnit)
      (home ?PERSON ?UNIT))
   (not (possesses ?PERSON ?UNIT)))

(=>
   (instance ?UNIT ApartmentUnit)
   (exists (?BUILDING)
      (and
         (instance ?BUILDING ApartmentBuilding)
         (part ?UNIT ?BUILDING))))

(documentation landlord EnglishLanguage "(landlord ?PERSON ?UNIT) means that ?PERSON is a 
landlord of the &%Residence ?UNIT, i.e. he or she owns ?UNIT and is renting 
the unit to someone else.")
(instance landlord BinaryPredicate)
(domain landlord 1 Agent)
(domain landlord 2 PermanentResidence)

(=>
   (landlord ?L ?U)
   (exists (?R ?P)
      (and
         (possesses ?L ?U)
	 (tenant ?P ?U)
	 (agent ?R ?P)
         (instance ?R Renting)
         (patient ?R ?U))))

(documentation tenant EnglishLanguage "(tenant ?PERSON ?UNIT) means that ?PERSON is a tenant 
of the &%Residence ?UNIT, i.e. he or she is renting the unit.")
(instance tenant BinaryPredicate)
(domain tenant 1 Agent)
(domain tenant 2 Residence)

(=>
  (tenant ?P ?U)
  (exists (?L ?R)
    (and
      (instance ?R Renting)
      (landlord ?L ?U)
      (agent ?R ?P)
      (possesses ?L ?U)
      (patient ?R ?U))))

(subclass CondominiumUnit SingleFamilyResidence)
(documentation CondominiumUnit EnglishLanguage "A &%SingleFamilyResidence that may be owned 
by a member of the &%SocialUnit that lives there.")

(=>
   (and
      (instance ?UNIT SingleFamilyResidence)
      (home ?PERSON ?UNIT)
      (possesses ?PERSON ?UNIT)
      (not (instance ?UNIT Building)))
   (instance ?UNIT CondominiumUnit))

(=>
   (instance ?UNIT CondominiumUnit)
   (exists (?BUILDING)
      (and
         (instance ?BUILDING CondominiumBuilding)
         (part ?UNIT ?BUILDING))))

(subclass ApartmentBuilding ResidentialBuilding)
(disjoint ApartmentBuilding SingleFamilyResidence)
(documentation ApartmentBuilding EnglishLanguage "A &%ResidentialBuilding containing 
&%ApartmentUnits.")

(=>
   (instance ?BUILDING ApartmentBuilding)
   (exists (?UNIT1 ?UNIT2)
      (and
         (instance ?UNIT1 ApartmentUnit)
         (instance ?UNIT2 ApartmentUnit)
         (part ?UNIT1 ?BUILDING)
         (part ?UNIT2 ?BUILDING)
         (not (equal ?UNIT1 ?UNIT2)))))

(subclass CondominiumBuilding ResidentialBuilding)
(disjoint CondominiumBuilding SingleFamilyResidence)
(documentation CondominiumBuilding EnglishLanguage "A &%ResidentialBuilding containing 
&%CondominiumUnits.")

(=>
   (instance ?BUILDING CondominiumBuilding)
   (exists (?UNIT1 ?UNIT2)
      (and
         (instance ?UNIT1 CondominiumUnit)
         (instance ?UNIT2 CondominiumUnit)
         (part ?UNIT1 ?BUILDING)
         (part ?UNIT2 ?BUILDING)
         (not (equal ?UNIT1 ?UNIT2)))))

(subclass Dormitory ResidentialBuilding)
(subclass Dormitory TemporaryResidence)
(disjoint Dormitory SingleFamilyResidence)
(documentation Dormitory EnglishLanguage "A &%TemporaryResidence which is owned by a &%School 
and which is used to house students while they take classes at the &%School.")
(=>
  (instance ?D Dormitory)
  (exists (?S)
    (and
      (instance ?S School)
      (possesses ?S ?D))))

(subclass AnimalResidence Artifact)
(documentation AnimalResidence EnglishLanguage "An &%Artifact which is intended to house 
&%Animals and not &%Humans.  Note that an &%AnimalResidence may or may not 
be a &%StationaryArtifact, e.g. a horse stall is stationary while a doghouse 
generally is not.")

(=>
   (instance ?RESIDENCE AnimalResidence)
   (hasPurpose ?RESIDENCE (exists (?ANIMAL)
                             (and
                                (instance ?ANIMAL Animal)
                                (not (instance ?ANIMAL Human))
                                (inhabits ?ANIMAL ?RESIDENCE)))))

(subclass SportsFacility StationaryArtifact)
(documentation SportsFacility EnglishLanguage "A specially designated and maintained facility 
where &%Sports are played.  Note that this covers sports fields, stadiums, 
and gymnasiums.")

(=>
  (instance ?G SportsFacility)
  (hasPurpose ?G 
    (exists (?S) 
      (and
        (instance ?S Sport)
        (eventLocated ?S ?G)))))

(subclass SportsLeague Organization)
(documentation SportsLeague EnglishLanguage "An &%Organization whose members are &%SportsTeams 
and whose purpose is to set up games between its members.")

(=>
  (and
    (instance ?L SportsLeague)
    (member ?M ?L))
  (instance ?M SportsTeam))

(subclass PlaceOfCommerce StationaryArtifact)
(partition PlaceOfCommerce CommercialBuilding CommercialUnit)
(documentation PlaceOfCommerce EnglishLanguage "A &%Building or part of a &%Building which is 
intended for organizational activities, e.g. retail or wholesale selling, 
manufacturing, office work, etc.")

(=>
   (instance ?OFFICE PlaceOfCommerce)
   (or
      (instance ?OFFICE CommercialBuilding)
      (exists (?BUILDING)
         (and
            (instance ?BUILDING CommercialBuilding)
            (part ?OFFICE ?BUILDING)))))

(subclass CommercialBuilding Building)
(subclass CommercialBuilding PlaceOfCommerce)
(documentation CommercialBuilding EnglishLanguage "A &%Building which is intended for 
organizational activities, e.g. retail or wholesale selling, manufacturing, 
office work, etc.")

(subclass Warehouse CommercialBuilding)
(documentation Warehouse EnglishLanguage "A very large &%CommercialBuilding whose purpose is 
to store commodities.")

(=>
  (instance ?B Warehouse)
  (hasPurpose ?B
    (exists (?K ?P)
      (and
        (instance ?K Keeping)
        (patient ?K ?P)
        (instance ?P Product)
        (eventLocated ?K ?B)))))

(subclass CommercialUnit PlaceOfCommerce)
(documentation CommercialUnit EnglishLanguage "A &%Room or suite of &%Rooms intended for 
clerical and/or professional work of a single &%Organization.")

(=>
   (and
      (instance ?UNIT CommercialUnit)
      (instance ?ORG Organization)
      (located ?ORG ?UNIT))
   (not (exists (?OTHER)
      (and
         (instance ?OTHER Organization)
         (located ?OTHER ?UNIT)
         (not (equal ?OTHER ?ORG))))))

(subclass Store Building)
(documentation Store EnglishLanguage "A &%Building that has the purpose of housing
&%FinancialTransactions.")

(=>
  (instance ?X Store)
  (hasPurpose ?X
    (exists (?EV)
      (and
        (instance ?EV FinancialTransaction)
        (eventLocated ?EV ?X)))))
        
; adjusting this in Society.kif to avoid duplication between Factory and IndustrialPlant
;(subclass Factory Building)
;(documentation FactoryBuilding EnglishLanguage "A &%Building intended to house a &%Manufacture process that produces goods of some value.")
;(=>
;  (instance ?X Factory)
;  (hasPurpose ?X
;    (exists (?EV)
;      (and
;        (instance ?EV Manufacture)
;        (eventLocated ?EV ?X)))))

(subclass FarmBuilding Building)
(disjoint FarmBuilding ResidentialBuilding)
(documentation FarmBuilding EnglishLanguage "A &%Building on a &%Farm that is used for keeping 
&%DomesticAnimals, &%Fodder or harvested crops.")
(=>
  (instance ?B FarmBuilding)
  (exists (?F)
    (and
      (instance ?F Farm)
      (located ?B ?F))))

;; KJN: Edit. Subclassing Agency from Business, which is also a CommercialAgent
(subclass Agency Business)
(documentation Agency EnglishLanguage "A &%Business whose customers are all other 
&%CommercialAgents, e.g. staffing agencies, food-service providers, etc.")
(=>
   (and
      (instance ?A Agency)
      (customer ?C ?A))
   (instance ?C CommercialAgent))

;; KJN: Edit. Making it subclass from Business, which is also a CommercialAgent
(subclass EntertainmentCompany Business)
(documentation EntertainmentCompany EnglishLanguage "Any &%Business whose services include 
&%Performances.  This class covers nightclubs, commercial live theaters, 
and comedy clubs.")
(=>
  (instance ?C EntertainmentCompany)
  (exists (?P)
    (and
      (instance ?P CommercialService)
      (agent ?P ?C)
      (instance ?P Performance))))

;; KJN: Edit. Making it subclass from Business instead of CommercialAgent
(subclass FinancialCompany Business)
(documentation FinancialCompany EnglishLanguage "The class &%FinancialCompany 
includes, as subclasses, &%FinancialBank, &%CreditUnion and &%SavingsAndLoan.")

;; KJN: Moving this to FinancialOntology.kif to remove dependencies since Stock is defined there
;;(documentation stockHolder EnglishLanguage "(stockHolder ?Stock ?Agent) means that 
;;?Agent possesses the &%Stock ?Stock.")
;;(instance stockHolder BinaryPredicate)
;;(domain stockHolder 1 Stock)
;;(domain stockHolder 2 CognitiveAgent)

(subclass SavingsAndLoan FinancialCompany)
(documentation SavingsAndLoan EnglishLanguage "A federally or state chartered 
&%FinancialCompany that takes &%Deposits from individuals, funds 
&%Mortgages, and pays &%Dividends.")

;; KJN: Moved from FinancialOntology.kif.  Changing definition as Contract is used
;; incorrectly.
(instance insured BinaryPredicate)
(instance insured AsymmetricRelation)
;;(domain insured 1 Contract)
(domain insured 1 Proposition)
(domain insured 2 Organization)
(documentation insured EnglishLanguage "(insured ?Contract ?Org) means that ?Contract is insured 
by the ?Organization.")

;; KJN: Added.
(=>
  (insured ?PROP ?ORG)
  (property ?PROP Contract))

;; KJN: Edit.  Subclassing from Business instead of CommercialAgent
(subclass InsuranceCompany Business)
(documentation InsuranceCompany EnglishLanguage "A &%Business that insures &%Agents 
for the payment of a premium or premiums.")

(=>
  (instance ?I InsuranceCompany)
  (exists (?C)
    (insured ?C ?I)))

;; KJN: Edit.  Subclassing from Business instead of CommercialAgent    
(subclass TransportationCompany Business)
(documentation TransportationCompany EnglishLanguage "A &%Business whose services 
include &%Transportation, e.g. a &%RailroadCompany, an airline, a cruise 
ship line, etc.")

(=>
  (instance ?C TransportationCompany)
  (exists (?S)
    (and
      (instance ?S CommercialService)
      (agent ?S ?C)
      (instance ?S Transportation))))

      
(subclass FinancialService CommercialService)
(documentation FinancialService EnglishLanguage "&%Services performed by a
&%FinancialCompany.")
(=>
  (instance ?S FinancialService)
  (exists (?O)
    (and
      (instance ?O FinancialCompany)
      (agent ?S ?O))))

(documentation loss EnglishLanguage "The amount by which the cost of an investment or 
business operation exceeds its return, i.e. the negative quantity left 
after subtracting for all expenses.")
(instance loss AsymmetricRelation)
(domain loss 1 FinancialTransaction)
(domain loss 2 CurrencyMeasure)

(subclass Financing Funding)
(subclass Financing FinancialService)
(documentation Financing EnglishLanguage "Any &%Funding which is provided by a &%FinancialCompany 
with the aim of making a profit on the money invested.")

;; KJN: Edit.  Subclassing from Business instead of CommercialAgent
(subclass Partnership Business)
(documentation Partnership EnglishLanguage "A &%Business that is owned by more 
than one person.")

(=>
  (instance ?C Partnership)
  (exists (?H1 ?H2)
    (and
      (instance ?H1 Human)
      (instance ?H2 Human)
      (not (equal ?H1 ?H2))
      (possesses ?H1 ?C)
      (possesses ?H2 ?C))))

(subclass Scholarship Funding)
(documentation Scholarship EnglishLanguage "Any &%Funding which is made on the basis of merit 
and whose purpose is to allow the destination to realize an 
&%EducationalProgram.")

(=>
  (and
    (instance ?F Scholarship)
    (destination ?F ?H))
  (hasPurpose ?F 
    (exists (?EP ?P)
      (and
        (instance ?EP EducationalProgram)
        (realization ?P ?EP)
        (experiencer ?P ?H)))))

(subclass Welfare Funding)
(documentation Welfare EnglishLanguage "Any &%Funding which is provided by a &%ServiceOrganization 
to people in need.")

(=>
  (instance ?W Welfare)
  (exists (?O)
    (and
      (instance ?O ServiceOrganization)
      (agent ?W ?O))))

;; KJN: Edit.  Subclassing from Business instead of CommercialAgent      
;; Manufacturer (imported from Media.kif) is already a Business
;;(subclass Publisher Business)
(subclass Publisher Manufacturer)
(documentation Publisher EnglishLanguage "Any &%Business whose services include the 
&%Publication of &%Texts.")

(=>
  (instance ?C Publisher)
  (exists (?S)
    (and
      (instance ?S CommercialService)
      (agent ?S ?C)
      (instance ?S Publication))))

(subclass FamilyBusiness Partnership)
(documentation FamilyBusiness EnglishLanguage "A &%Partnership that is owned by a single 
family.")
(=>
  (and
    (instance ?C FamilyBusiness)
    (possesses ?P1 ?C)
    (possesses ?P2 ?C))
  (familyRelation ?P1 ?P2))

;; KJN: Edit.  Subclassing from Business instead of CommercialAgent  
(subclass Restaurant Business)
(documentation Restaurant EnglishLanguage "Any &%Business whose services include selling 
Food to customers which is intended to be eaten on the premises.")
;wikipedia has: A restaurant *prepares* and serves food and drink to customers in return for money.

(=>
  (instance ?C Restaurant)
  (exists (?S ?F ?B)
    (and
      (instance ?S CommercialService)
      (agent ?S ?C)
      (instance ?S Selling)
      (instance ?B RestaurantBuilding)        
      (eventLocated ?S ?B)
      (patient ?S ?F)
      (instance ?F (FoodForFn Human)))))

(=>
  (instance ?PLACE RestaurantBuilding)
  (capability Cooking eventLocated ?PLACE))

(=>
  (instance ?R Restaurant)
  (exists (?D)
    (and
      (possesses ?R ?D)
      (instance ?D DiningArea))))

;; KJN: Edit.  Subclassing from Business instead of CommercialAgent    
(subclass Proprietorship Business)
(documentation Proprietorship EnglishLanguage "A &%Business that is owned by a 
single person.")

(=>
  (instance ?C Proprietorship)
  (exists (?H)
    (and
      (instance ?H Human)
      (possesses ?H ?C)
      (not
        (exists (?H2)
	  (and
	    (not (equal ?H ?H2))
	    (possesses ?H2 ?C)))))))

(subclass Auditorium Building)
(documentation Auditorium EnglishLanguage "Any &%Building whose purpose is to hold concerts, 
sports events, plays, etc. before an audience.  This class includes theaters, 
sports stadiums, university auditoriums, etc.")

(=>
   (instance ?AUDITORIUM Auditorium)
   (hasPurpose ?AUDITORIUM (exists (?DEMO)
                              (and
                                 (instance ?DEMO Demonstrating)
                                 (eventLocated ?DEMO ?AUDITORIUM)))))

(=>
   (instance ?AUDITORIUM Auditorium)
   (exists (?STAGE)
      (and
         (instance ?STAGE PerformanceStage)
         (part ?STAGE ?AUDITORIUM))))

(subclass AuditoriumSeat Seat)
(documentation AuditoriumSeat EnglishLanguage "A &%Seat within an &%Auditorium from which one 
can observe the &%PerformanceStage.")

(=>
   (instance ?SEAT AuditoriumSeat)
   (exists (?AUDITORIUM)
      (and
         (instance ?AUDITORIUM Auditorium)
         (part ?SEAT ?AUDITORIUM))))

(=>
   (and
      (instance ?SEAT AuditoriumSeat)
      (part ?SEAT ?AUDITORIUM)
      (part ?STAGE ?AUDITORIUM)
      (instance ?AUDITORIUM Auditorium)
      (instance ?STAGE PerformanceStage)
      (located ?PERSON ?SEAT)
      (instance ?PERSON Human)
      (subclass ?SEE Seeing)
      (forall (?INST)
         (=>
            (instance ?INST ?SEE)
            (patient ?INST ?STAGE))))
   (capability ?SEE agent ?PERSON))

(subrelation enjoys inScopeOfInterest)
(domain enjoys 1 CognitiveAgent)
(domainSubclass enjoys 2 IntentionalProcess)
(documentation enjoys EnglishLanguage "(&%enjoys ?AGENT ?PROCESS) means that the 
&%CognitiveAgent ?AGENT tends to enjoy actions of type ?PROCESS, 
i.e. tends to enjoy being the &%agent or &%experiencer of such 
actions.")

(=>
   (enjoys ?AGENT ?PROCESS)
   (desires ?AGENT (exists (?INSTANCE)
                      (and
                         (instance ?INSTANCE ?PROCESS)
                         (or
                            (agent ?INSTANCE ?AGENT)
                            (experiencer ?INSTANCE ?AGENT))))))


;; NS: The propositional attitude stuff below appears to have been
;; written without an understanding of temporal issues, or of the
;; English meanings of "hope" and "fear".

;; NS: delete.
;; (subrelation expects believes)

;; NS: delete.
;; (documentation expects EnglishLanguage "Any belief about the future.  (&%expects 
;; ?AGENT ?BELIEF) means that (&%believes ?AGENT ?BELIEF) and, if 
;; ?BELIEF happens, it will happen in the future, i.e. after the 
;; expectation.")

;; NS: add.
(instance expects BinaryPredicate)
(domain expects 1 CognitiveAgent)
(domain expects 2 Formula)
(documentation expects EnglishLanguage "(&%holdsDuring ?T1 (&%expects
?AGENT ?BELIEF)) means (and (&%holdDuring ?T1 (&%believes
?AGENT (&%holdsDuring ?T2 ?BELIEF))) (&%earlier ?T1 ?T2)).")

;; NS: delete.  This could easily cause temporal contradictions.  Note
;; that ?FORMULA might have been True at some time before ?AGENT's
;; expectation (or existence).  Also, ?FORMULA might never be True.
;; (=>
;;    (and
;;       (holdsDuring ?TIME1 (expects ?AGENT ?FORMULA))
;;       (holdsDuring ?TIME2 (truth ?FORMULA True)))
;;    (earlier ?TIME1 ?TIME2))

;; NS: add.  Unfortunately, this might be wrong.  Since the second
;; argument to &%believes is an opaque context (i.e., quoted), ?T2
;; probably isn't accessible for use in the &%earlier literal.
(=>
  (holdsDuring ?T1 (expects ?AGENT ?FORMULA))
  (and
    (holdsDuring ?T1 (believes ?AGENT (holdsDuring ?T2 ?FORMULA)))
    (earlier ?T1 ?T2)))

(subrelation fears expects)
(documentation fears EnglishLanguage "(&%fears ?AGENT ?FORMULA) means
that ?AGENT fears that the proposition ?FORMULA will be true,
i.e. he/she believes that it will come to pass in the future and that
it will be undesirable for ?AGENT.")

(=>
   (fears ?AGENT ?FORMULA)
   (not (desires ?AGENT ?FORMULA)))

(subrelation hopes expects)
(documentation hopes EnglishLanguage "(&%hopes ?AGENT ?FORMULA) means that ?AGENT hopes that 
the proposition ?FORMULA will be true, i.e. he/she believes that it will 
come to pass in the future and that it will be desirable for ?AGENT.")

(=>
   (hopes ?AGENT ?FORMULA)
   (desires ?AGENT ?FORMULA))

(instance doubts PropositionalAttitude)
(instance doubts BinaryPredicate)
(domain doubts 1 CognitiveAgent)
(domain doubts 2 Formula)
(documentation doubts EnglishLanguage "(&%doubts ?AGENT ?FORMULA) means that ?AGENT is unsure 
about the truth of ?FORMULA, in particular ?AGENT does not believe that 
?FORMULA is true.")

(=>
   (doubts ?AGENT ?FORMULA)
   (not (believes ?AGENT ?FORMULA)))

(instance dislikes ObjectAttitude)
(subrelation dislikes inScopeOfInterest)
(disjointRelation dislikes wants)
(relatedInternalConcept dislikes disapproves)
(domain dislikes 1 CognitiveAgent)
(domain dislikes 2 Object)
(documentation dislikes EnglishLanguage "(&%dislikes ?AGENT ?OBJECT) means that ?AGENT has a 
feeling of antipathy to ?OBJECT, i.e. ?AGENT believes that ?OBJECT will 
thwart one of his/her goals.  Note that there is no implication that what 
is hated by an agent is not already possessed by the agent.")

(=>
   (dislikes ?AGENT ?OBJECT)
   (desires ?AGENT (not (possesses ?AGENT ?OBJECT))))

(instance disapproves PropositionalAttitude)
(instance disapproves BinaryPredicate)
(subrelation disapproves inScopeOfInterest)
(disjointRelation disapproves desires)
(domain disapproves 1 CognitiveAgent)
(domain disapproves 2 Formula)
(documentation disapproves EnglishLanguage "(&%disapproves ?AGENT ?FORMULA) means that 
?AGENT has a feeling of antipathy to the state of affairs represented by 
?FORMULA, i.e. ?AGENT believes that the realization of ?FORMULA will 
thwart one of his/her goals.  Note that there is no implication that what 
is disapproved of by an agent is not already true.")

(subrelation lacks needs)
(documentation lacks EnglishLanguage "(&%lacks ?AGENT ?OBJECT) means that ?AGENT &%needs 
?OBJECT and it is not currently the case that ?AGENT &%possesses ?OBJECT.")

(=>
   (holdsDuring ?TIME (lacks ?AGENT ?OBJECT))
   (holdsDuring ?TIME (not (possesses ?AGENT ?OBJECT))))

;; KJN: Moving this to People.kif as the rest of BeliefGroups are defined there.   
;;(instance Antisemitism BeliefGroup)
;;(documentation Antisemitism EnglishLanguage "The &%BeliefGroup that is characterized by a 
;;dislike for &%Judaism.")

;;(=>
;;   (member ?MEMBER Antisemitism)
;;   (dislikes ?MEMBER Judaism))

(instance DescendantsFn UnaryFunction)
(domain DescendantsFn 1 Human)
(range DescendantsFn FamilyGroup)
(documentation DescendantsFn EnglishLanguage "(&%DescendantsFn ?PERSON) denotes all and only 
the descendants of ?PERSON, i.e. the &%Group consisting of ?OFFSPRING who 
satisfy the following formula:  (&%ancestor ?OFFSPRING ?PERSON).")

(=>
   (and
      (instance ?PERSON Human)
      (equal (DescendantsFn ?PERSON) ?DESCENDANTS))
   (forall (?MEMBER)
      (<=>
         (member ?MEMBER ?DESCENDANTS)
         (ancestor ?MEMBER ?PERSON))))

(subclass GroupOfAnimals Group)
(documentation GroupOfAnimals EnglishLanguage "Any &%Group which contains exclusively 
non-human &%members.")

(=>
   (instance ?GROUP GroupOfAnimals)
   (forall (?MEMBER)
      (=>
         (member ?MEMBER ?GROUP)
         (and
            (instance ?MEMBER Animal)
            (not (instance ?MEMBER Human))))))

(subclass Brood GroupOfAnimals)
(documentation Brood EnglishLanguage "A &%GroupOfAnimals that are all born at the same time 
and to the same parents.")

(=>
   (instance ?BROOD Brood)
   (forall (?MEMBER1 ?MEMBER2)
      (=>
         (and
            (member ?MEMBER1 ?BROOD)
            (member ?MEMBER2 ?BROOD))
         (sibling ?MEMBER1 ?MEMBER2))))

(=>
   (instance ?BROOD Brood)
   (exists (?TIME)
      (forall (?MEMBER)
         (=>
            (member ?MEMBER ?BROOD)
            (exists (?BIRTH)
               (and
                  (instance ?BIRTH Birth)
                  (experiencer ?BIRTH ?MEMBER)
                  (equal ?TIME (WhenFn ?BIRTH))))))))
      
(subclass AnimalTeam GroupOfAnimals)
(documentation AnimalTeam EnglishLanguage "A &%GroupOfAnimals which are &%Pulling something.")
(=>
   (instance ?AT AnimalTeam)
   (exists (?P)
      (and
         (instance ?P Pulling)
         (agent ?P ?AT))))

(subclass SportsTeam GroupOfPeople)
(documentation SportsTeam EnglishLanguage "A &%GroupOfPeople who habitually play a &%Sport 
together, either as an occupation or as a leisure activity.")

(=>
   (instance ?TEAM SportsTeam)
   (exists (?SPORT)
      (and
         (subclass ?SPORT Sport)
         (capability ?SPORT agent ?TEAM))))

(subclass TeamSport Sport)
(documentation TeamSport EnglishLanguage "Any &%Sport which is played by &%SportsTeams, e.g. 
&%Baseball and &%Football.")

(=>
  (instance ?S TeamSport)
  (exists (?T1 ?T2)
    (and
      (contestParticipant ?S ?T1)
      (contestParticipant ?S ?T2)
      (instance ?T1 SportsTeam)
      (instance ?T2 SportsTeam)
      (not (equal ?T1 ?T2)))))

(subclass Racing Sport)
(documentation Racing EnglishLanguage "A sport which involves a contest of speed between the 
participants.  Note that this covers a variety of things, including auto 
racing, running competitions, etc.")

(subrelation groupMember member)
(domain groupMember 1 Human)
(domain groupMember 2 GroupOfPeople)
(documentation groupMember EnglishLanguage "A &%subrelation of &%member, &%groupMember 
is used to relate a &%Human to a &%GroupOfPeople of which he/she is a 
&%member.")

(=>
    (and
        (holdsDuring ?T1
            (member ?OBJ ?GROUP))
        (instance ?OBJ Human)
        (instance ?GROUP GroupOfPeople))
    (holdsDuring ?T1
        (groupMember ?OBJ ?GROUP)))

(documentation headquartersOfOrganization EnglishLanguage "(headquartersOfOrganization ?ORG ?AREA) 
means that the &%Organization ?ORG is headquartered in ?AREA.")
(domain headquartersOfOrganization 1 Organization)
(domain headquartersOfOrganization 2 GeopoliticalArea)
(subrelation headquartersOfOrganization located)

(subclass CommunicationOrganization Organization)
(documentation CommunicationOrganization EnglishLanguage "&%CommunicationOrganization is 
the subclass of &%Organizations that manage &%Communications over physical 
infrastructure owned or leased by the organization.  Such organizations 
may also produce and disseminate information, entertainment, or other 
content.  Also see &%MediaOrganization.")
(=>
  (instance ?CO CommunicationOrganization)
  (exists (?CS ?C)
    (and
      (instance ?C Communication)
      (instance ?CS CommunicationSystem)
      (instrument ?C ?CS)
      (agent ?C ?CO))))

(subclass MediaOrganization Organization)
(documentation MediaOrganization EnglishLanguage "&%MediaOrganization is the subclass 
of &%Organization for groups whose primary purpose is the production or 
dissemination of media content.  For organizations that physically enable 
&%Communication, see &%CommunicationOrganization.")

(instance profit AsymmetricRelation)
(domain profit 1 FinancialTransaction)
(domain profit 2 CurrencyMeasure)
(documentation profit EnglishLanguage "The positive gain from an investment or business operation after 
subtracting for all expenses.") 

(subclass NonprofitOrganization Organization)
(disjoint NonprofitOrganization CommercialAgent)
(documentation NonprofitOrganization EnglishLanguage "Any &%Organization whose purpose is something 
other than making a profit.")

(=>
  (instance ?N NonprofitOrganization)
  (not 
    (hasPurpose ?N 
      (exists (?P)
        (profit ?N ?P)))))

(subclass CommunicationSystem Collection)
(documentation CommunicationSystem EnglishLanguage "&%CommunicationSystem is a complex 
system with various components, enabling communication (in some 
medium) between points in a specific area, whether local or worldwide.")

(subclass CareOrganization Organization)
(partition CareOrganization HospitalOrganization MedicalClinic)
(documentation CareOrganization EnglishLanguage "Any &%Organization whose purpose is to 
provide medical care for for &%Humans who reside there, either permanently 
or temporarily.")  

(instance medicalPatient BinaryPredicate)
(documentation medicalPatient EnglishLanguage "A relation between a &%Human and a 
&%CareOrganization that treats the patient.")
(domain medicalPatient 1 Human)
(domain medicalPatient 2 CareOrganization)

(=>
   (instance ?ORG CareOrganization)
   (hasPurpose ?ORG (exists (?PATIENT) (medicalPatient ?PATIENT ?ORG))))

(subclass HospitalOrganization CareOrganization)
(documentation HospitalOrganization EnglishLanguage "A &%CareOrganization where patients reside for a 
short period of time while they undergo treatment for a disease or disorder.")

(subclass HospitalBuilding TemporaryResidence)
(documentation HospitalBuilding EnglishLanguage "A &%Building that serves at the place of business for
a &%HospitalOrganization.")

(subclass MedicalClinic CareOrganization)
(documentation MedicalClinic EnglishLanguage "A &%CareOrganization which provides medical care 
on an out-patient basis only, i.e. there are no rooms where patients may take 
up residence for a period of time while they receive care.")

(subclass MedicalClinicBuilding (ComplementFn Residence))
(subclass MedicalClinicBuilding Building)

(subclass Cafeteria Restaurant)
(documentation Cafeteria EnglishLanguage "Any &%Restaurant which does not offer table service.  
Food is selected and purchased at a central counter.")

(=>
  (instance ?COMPANY Cafeteria)
  (not
    (exists (?PERSON)
      (occupiesPosition ?PERSON ServicePosition ?COMPANY))))

(subclass Tavern Restaurant)
(documentation Tavern EnglishLanguage "A &%Restaurant whose primary service is selling 
&%AlcoholicBeverages to customers.")

(=>
   (instance ?COMPANY Tavern)
   (exists (?SERVICE ?BEVERAGE)
      (and
         (instance ?SERVICE CommercialService)
         (agent ?SERVICE ?COMPANY)
         (instance ?SERVICE Selling)
         (patient ?SERVICE ?BEVERAGE)
         (instance ?BEVERAGE AlcoholicBeverage))))

(subclass Shipping Transportation)
(documentation Shipping EnglishLanguage "Shipping is the subclass of &%Transportation 
events in which goods are transported from one place to another by an 
agent who is entrusted with the goods temporarily just in order to move 
them.  Shipping may be done within an organization or it may be done 
by an outside commercial agent.  See &%CommercialShipping.")

(subclass CommercialShipping Shipping)
(subclass CommercialShipping CommercialService)
(documentation CommercialShipping EnglishLanguage "&%CommercialShipping is the subclass of 
&%Transportation events in which a commercial agent provides transportation 
of goods for remuneration.")

(subclass Smuggling Transportation)
(subclass Smuggling CriminalAction)
(documentation Smuggling EnglishLanguage "Any instance &%Transportation which is also a 
&%CriminalAction.")

;; KJN: Moving to Transportation.kif as Train is defined there
;;(subclass RailroadCompany TransportationCompany)
;;(documentation RailroadCompany EnglishLanguage "Any &%TransportationCompany whose services 
;;include &%Transportation by &%Train.")

;;(=>
;;   (instance ?COMPANY RailroadCompany)
;;   (exists (?SERVICE ?TRAIN)
;;      (and
;;         (instance ?SERVICE CommercialService)
;;         (agent ?SERVICE ?COMPANY)
;;         (instance ?SERVICE Transportation)
;;         (instrument ?SERVICE ?TRAIN)
;;         (instance ?TRAIN Train))))
         
(instance customer IrreflexiveRelation)
(instance customer BinaryPredicate)
(instance customer AsymmetricRelation)
(domain customer 1 CognitiveAgent)
(domain customer 2 CognitiveAgent)
(documentation customer EnglishLanguage "A very general relation that exists whenever there
is a &%FinancialTransaction between the two &%Agents such that the first is
the &%destination of the &%FinancialTransaction and the second is the
&%agent.")

(<=>
  (customer ?AGENT1 ?AGENT2)
  (exists (?SERVICE)
    (and
      (instance ?SERVICE FinancialTransaction)
      (agent ?SERVICE ?AGENT2)
      (destination ?SERVICE ?AGENT1))))

(instance price TernaryPredicate)
(domain price 1 Physical)
(domain price 2 CurrencyMeasure)
(domain price 3 Agent)
(documentation price EnglishLanguage "(&%price ?Obj ?Money ?Agent) means that ?Agent 
pays the amount of money ?Money for ?Obj.")

(=>
  (price ?Obj ?Money ?Agent)
  (exists (?Buying)
    (and
      (instance ?Buying Buying)
      (agent ?Buying ?Agent)
      (patient ?Buying ?Obj)
      (transactionAmount ?Buying ?Money))))
      
(subclass WholesaleStore MercantileOrganization)

;; NS: edit.
(documentation WholesaleStore EnglishLanguage "A
&%MercantileOrganization that sells its goods exclusively to
&%CommercialAgents, typically for resale, rather than to end-point
consumers.")

(=>
   (and
      (instance ?STORE WholesaleStore)
      (customer ?CUSTOMER ?STORE))
   (instance ?CUSTOMER CommercialAgent))

   
(subclass RetailStore MercantileOrganization)
(disjoint RetailStore WholesaleStore)

;; NS: edit.
(documentation RetailStore EnglishLanguage "A &%RetailStore is a
&%MercantileOrganization that sells goods to customers who are
end-point consumers, rather than to &%CommercialAgents who are
buying the goods in order to resell them at a higher price.  This
distinguishes retail stores from wholesale establishments, where
the purchasers are businesses or their representatives, as well
as mail order or office buildings where transactions are
facillitated but the consumer does not take possession of the
item on the premises.  More succinctly, &%RetailStore is the
complement of &%WholesaleStore, which is the class of
&%MercantileOrganizations that sell goods to the general
public.")

;; NS: edit.  located -> agent.
(=>
  (instance ?X RetailStore)
  (and 
    (capability Selling agent ?X)
    (exists (?P ?EV)
      (and
        (instance ?EV Selling)
        (destination ?EV ?P)
        (instance ?P Human)))))
        
(subclass ShoppingMall MercantileOrganization)
(documentation ShoppingMall EnglishLanguage "A &%MercantileOrganization which is a collection 
of various shops gathered together in a single, modern development.")

(=>
  (and
    (instance ?M ShoppingMall)
    (member ?S ?M))
  (instance ?S RetailStore)) 

(subclass DrugStore RetailStore)
(documentation DrugStore EnglishLanguage "A &%RetailStore that sells &%Medicine, and 
perhaps other items as well.")
(=>
  (instance ?D DrugStore)
  (exists (?S)
    (and
      (instance ?S Selling)
      (agent ?S ?D)
      (patient ?S ?M)
      (instance ?M Medicine))))

(subclass GroceryStore RetailStore)
(documentation GroceryStore EnglishLanguage "A &%RetailStore that sells Food, and perhaps 
other items as well.")

(=>
   (instance ?STORE GroceryStore)
   (exists (?SELL ?FOOD)
      (and
         (instance ?SELL Selling)
         (agent ?SELL ?STORE)
         (patient ?SELL ?FOOD)
         (instance ?FOOD (FoodForFn Animal)))))

(subclass OfferingForSale Offering)
(documentation OfferingForSale EnglishLanguage "&%Offering to sell something to someone.")

(=>
  (and
    (instance ?SALE OfferingForSale)
    (agent ?SALE ?AGENT))
  (patient ?SALE 
    (exists (?SELL ?OBJ)
      (and
        (instance ?SELL Selling)
        (patient ?SELL ?OBJ)
        (agent ?SELL ?AGENT)))))

(subclass OfferingToPurchase Offering)
(documentation OfferingToPurchase EnglishLanguage "&%Offering to buy something from someone.")

(subclass BargainSale Offering)
(documentation BargainSale EnglishLanguage "&%Offering to sell something to someone at a 
reduced price.")

(=>
   (and
      (instance ?SALE BargainSale)
      (patient ?SALE ?OBJ)
      (instance ?OBJ Object))
   (exists (?PRICE1 ?PRICE2 ?AGENT1 ?AGENT2)
      (and
         (holdsDuring (ImmediatePastFn (WhenFn ?SALE)) (price ?OBJ ?PRICE1 ?AGENT1))
         (holdsDuring (WhenFn ?SALE) (price ?OBJ ?PRICE2 ?AGENT2))
         (lessThan ?PRICE2 ?PRICE1))))

(subclass ChristianBible Book)
(subsumesContentClass ChristianBible NewTestament)
(subsumesContentClass ChristianBible OldTestament)
(documentation ChristianBible EnglishLanguage "Any instance of the collection of writings which 
is regarded as scripture by those who embrace &%Christianity.")

(subclass ChristianGospel Text)
(documentation ChristianGospel EnglishLanguage "Four books in the New Testament of the 
&%ChristianBible that describe the life and teachings of Jesus Christ 
and that are referred to, respectively, as Matthew, Mark, Luke, and John.")

(subclass OldTestament Book)
(documentation OldTestament EnglishLanguage "The first part of the &%ChristianBible, describing 
the history of the Hebrew people.")

(subclass NewTestament Book)
(subsumesContentClass NewTestament ChristianGospel)
(documentation NewTestament EnglishLanguage "The second and final part of the &%ChristianBible,
describing the life and teachings of Jesus Christ and the activities of his 
apostles.")

(instance BeforeCommonEra TimeInterval)
(documentation BeforeCommonEra EnglishLanguage "The &%TimeInterval that runs from 
&%NegativeInfinity to the time of the birth of Christ.")

(equal (BeginFn BeforeCommonEra) NegativeInfinity)

(not (overlapsTemporally CommonEra BeforeCommonEra))

(instance CommonEra TimeInterval)
(documentation CommonEra EnglishLanguage "The &%TimeInterval that runs from the supposed 
time of the death of Christ to &%PositiveInfinity.")

(equal (EndFn CommonEra) PositiveInfinity)

(subclass MissionOrganization ReligiousOrganization)
(documentation MissionOrganization EnglishLanguage "The class of &%ReligiousOrganizations 
that send members to foreign countries with the aim of coverting citizens 
of those countries to the beliefs of the &%ReligiousOrganization.")

(subclass ReligiousBuilding Building)
(subclass ReligiousBuilding PlaceOfWorship)
(documentation ReligiousBuilding EnglishLanguage "A &%Building which is intended to be 
used for religious worship.  This class covers churches, temples, religious shrines, etc.")

; this rule is not needed as we have a more general one in Mid-level-ontology.kif relating PlacesOfWorship to
; ReligiousProcess es in them.
;(=>
;   (instance ?BUILDING ReligiousBuilding)
;   (hasPurpose ?BUILDING (exists (?SERVICE)
;                            (and
;                               (instance ?SERVICE ReligiousService)
;                               (eventLocated ?SERVICE ?BUILDING)))))

(subclass Steeple StationaryArtifact)
(documentation Steeple EnglishLanguage "A component of a &%ReligiousBuilding that is tall 
and narrow and symbolizes the connection between humanity and a deity.")

(=>
   (instance ?STEEPLE Steeple)
   (exists (?BUILDING)
      (and
         (instance ?BUILDING Building)
         (part ?STEEPLE ?BUILDING))))

(subclass Ceremony IntentionalProcess)
(subclass Ceremony SocialInteraction)
(documentation Ceremony EnglishLanguage "An &%instance of
&%Ceremony is a relatively stylized, highly conventional
&%SocialInteraction, typically guided or controlled by officials
or professionals, to commemorate or mark some transformative
event, such as a &%Wedding or a &%Baptizing.")

;; TO DO: Probably it would be best to make the now more or less
;; standard anthropological distinction between &%Ceremony (past
;; to present looking status confirmation events) and *Ritual
;; (present to future looking status transformation events), but
;; that seems more technical than required here, and for unknown
;; utility.

(subclass Wedding Ceremony)
(subclass Wedding Declaring)
(documentation Wedding EnglishLanguage "Any &%Declaring that leads to one person being 
the &%spouse of another.")

(=>
  (instance ?WED Wedding)
  (exists (?PERSON1 ?PERSON2)
    (holdsDuring 
      (ImmediateFutureFn (WhenFn ?WED))
      (spouse ?PERSON1 ?PERSON2))))

(=>
  (and
    (holdsDuring ?T1
      (spouse ?P1 ?P2))
    (instance ?T1 TimeInterval))
  (exists (?WED)
    (and
      (instance ?WED Wedding)
      (patient ?WED ?P1)
      (patient ?WED ?P2)
      (earlier (WhenFn ?WED) ?T1))))
         
         
(subclass ReligiousService ReligiousProcess)
(subclass ReligiousService Demonstrating)
(documentation ReligiousService EnglishLanguage "A formal process of public worship which is 
typically carried out in a church, temple or other sanctified building and 
which typically accords with a prescribed set of rules.")

;; Moving this to People.kif, where Christianity is defined.
;;(subclass ChristianService ReligiousService)
;;(documentation ChristianService EnglishLanguage "Any &%ReligiousService that is conducted by 
;;&%members of &%Christianity.")

;;(=>
;;   (and
;;      (instance ?SERVICE ChristianService)
;;      (agent ?SERVICE ?PERSON)
;;      (instance ?PERSON Human))
;;   (member ?PERSON Christianity))

(subclass Baptizing Ceremony)   
(subclass Baptizing ReligiousProcess)
(subclass Baptizing JoiningAnOrganization)
(documentation Baptizing EnglishLanguage "A &%ReligiousProcess which marks the acceptance of 
the person being baptized into the &%ReligiousOrganization.")
(=>
  (and
    (instance ?B Baptizing)
    (patient ?B ?H))
  (instance ?H Human))

(subclass Praying ReligiousProcess)
(subclass Praying Requesting)
(documentation Praying EnglishLanguage "A formal or informal process of private worship which 
may or may not be carried out in a &%ReligiousBuilding.")

;; KJN: Moving this to Government.kif as the definition for PoliticalParty is there.
;;(subclass PartyPlatform FactualText)
;;(documentation PartyPlatform EnglishLanguage "A &%Text which is authored by a &%PoliticalParty 
;;and which contains the core goals and principles of the &%PoliticalParty for a 
;;particular year or election cycle.")

;;(=>
;;   (and
;;      (subclass ?PLATFORM PartyPlatform)
;;      (authors ?PARTY ?PLATFORM)
;;      (instance ?PARTY Organization))
;;   (instance ?PARTY PoliticalParty))

;;(=>
;;   (and
;;      (subclass ?PLATFORM PartyPlatform)
;;      (authors ?PARTY ?PLATFORM)
;;      (instance ?PARTY PoliticalParty)
;;      (instance ?INST ?PLATFORM)
;;      (containsInformation ?INST ?PROP))
;;   (believes ?PARTY ?PROP))

;; KJN: Moving this to Government.kif as CommunistState is defined there.   
;;(subclass CommunistParty PoliticalParty)
;;(documentation CommunistParty EnglishLanguage "Any &%PoliticalParty that advocates for a 
;;&%CommunistState.")
;;(=>
;;  (and
;;    (instance ?P CommunistParty)
;;    (member ?M ?P)
;;    (instance ?A GeopoliticalArea))
;;  (desires ?M (governmentType ?A CommunistState)))

;; KJN: Moving this to Government.kif to remove dependency to CountriesAndRegions.kif
;;(instance DemocraticPartyUS PoliticalParty)
;;(documentation DemocraticPartyUS EnglishLanguage "One of the two major political parties in 
;;the &%UnitedStates.  The &%DemocraticPartyUS represents liberal values.")

;;(instance NaziParty PoliticalParty)
;;(documentation NaziParty EnglishLanguage "The German &%PoliticalParty headed by Adolf Hitler.")

;; KJN: Moving this to Government.kif to remove dependency to CountriesAndRegions.kif
;;(instance RepublicanPartyUS PoliticalParty)
;;(documentation RepublicanPartyUS EnglishLanguage "One of the two major political parties in 
;;the &%UnitedStates.  The &%RepublicanPartyUS represents traditional, 
;;conservative values.")

(subclass ReferenceText FactualText)
(documentation ReferenceText EnglishLanguage "A &%Text which is not intended to be read 
from beginning to end, but which is meant to be consulted to answer specific 
factual questions, e.g. about the meaning of a word, the location of a 
country, etc.")

(subclass IndependentState GeopoliticalArea)
(subclass IndependentState Nation)

(documentation IndependentState EnglishLanguage "&%IndependentState is a subclass of 
&%GeopoliticalArea, representing the classification 'Independent State' 
used by the CIA World Fact Book.  Cf. 
&%DependencyOrSpecialSovereigntyArea.")

(subclass DependencyOrSpecialSovereigntyArea GeopoliticalArea)
(disjoint IndependentState DependencyOrSpecialSovereigntyArea)
(subclass OverseasArea DependencyOrSpecialSovereigntyArea)

(documentation DependencyOrSpecialSovereigntyArea EnglishLanguage 
"&%DependencyOrSpecialSovereigntyArea is a subclass of 
&%GeopoliticalArea, representing the classification 'Dependency or Special 
Sovereignty Area' used by the CIA World Fact Book.  Cf. 
&%IndependentState.")

(instance ResidentFn UnaryFunction)
(domain ResidentFn 1 GeopoliticalArea)
(range ResidentFn GroupOfPeople)
(documentation ResidentFn EnglishLanguage "(&%ResidentFn ?AREA) denotes the 
&%GroupOfPeople who have their &%home in ?AREA.")

(=>
   (member ?PERSON (ResidentFn ?AREA))
   (home ?PERSON ?AREA))

(subrelation CitizenryFn ResidentFn)
(instance CitizenryFn UnaryFunction)
(domain CitizenryFn 1 GeopoliticalArea)
(range CitizenryFn GroupOfPeople)
(documentation CitizenryFn EnglishLanguage "(&%CitizenryFn ?AREA) denotes the 
&%GroupOfPeople who are legal and permanent residents of the 
&%GeopoliticalArea ?AREA.")

(=>
   (and
      (instance ?AREA GeopoliticalArea)
      (equal ?CITIZENRY (CitizenryFn ?AREA))
      (equal ?POPULATION (ResidentFn ?AREA)))
   (greaterThanOrEqualTo ?POPULATION ?CITIZENRY))

(instance PerCapitaFn BinaryFunction)
(domain PerCapitaFn 1 Quantity)
(domain PerCapitaFn 2 GeopoliticalArea)
(range PerCapitaFn Quantity)
(documentation PerCapitaFn EnglishLanguage "(&%PerCapitaFn ?AREA ?QUANTITY) denotes the 
average amount of ?QUANTITY possessed by a resident of &%GeopoliticalArea 
?AREA.")

(=>
   (equal (PerCapitaFn ?QUANTITY1 ?AREA) ?QUANTITY2)
   (exists (?POPULATION)
      (and
         (equal ?POPULATION (CardinalityFn (ResidentFn ?AREA)))
         (equal ?QUANTITY2 (DivisionFn ?QUANTITY1 ?POPULATION)))))  

(subclass CityDistrict GeopoliticalArea)
(documentation CityDistrict EnglishLanguage "Any &%geopoliticalSubdivision of a &%City.")

(<=>
   (instance ?DISTRICT CityDistrict)
   (exists (?CITY)
      (and
         (instance ?CITY City)
         (geopoliticalSubdivision ?DISTRICT ?CITY))))

(subclass Downtown CityDistrict)
(documentation Downtown EnglishLanguage "The commercial center of a &%City.  The part of the 
&%City that contains more shops and offices than any other part.")

(subclass Cemetery LandArea)
(documentation Cemetery EnglishLanguage "A &%LandArea which is used for burying the dead.")
(=>
  (instance ?C Cemetery)
  (exists (?T)
    (and
      (instance ?T Tomb)
      (located ?T ?C))))

(subclass Park LandArea)
(documentation Park EnglishLanguage "A publicly owned &%LandArea which is intended to be used 
for recreation and/or exercise.")

(=>
  (instance ?PARK Park)
  (exists (?GOV)
    (and
      (instance ?GOV Government)
      (possesses ?GOV ?PARK))))

(=>
  (instance ?PARK Park)
  (hasPurpose ?PARK 
    (exists (?REC)
      (and
        (instance ?REC RecreationOrExercise)
        (eventLocated ?REC ?PARK)))))

(subclass PublicPark Park)
(documentation PublicPark EnglishLanguage "A &%Park that is publicly owned, i.e. owned 
by a &%Government.")

(=>
  (instance ?P PublicPark)
  (exists (?G)
    (and
      (instance ?G Government)
      (possesses ?G ?P))))

(subclass CultivatedLandArea LandArea)
(documentation CultivatedLandArea EnglishLanguage "A &%LandArea which is dedicated to 
&%Agriculture, e.g. &%Lawns, gardens, and fields for growing crops.")

(=>
  (instance ?A CultivatedLandArea)
  (exists (?C)
    (and
      (instance ?C Agriculture)
      (eventLocated ?C ?A))))

(subclass Campground LandArea)
(documentation Campground EnglishLanguage "A &%LandArea whose purpose is to have &%MobileResidences 
(e.g. recreational vehicles, mobile homes, &%Tents, etc.) located there.")
(=>
  (instance ?C Campground)
  (hasPurpose ?C 
  (exists (?R)
    (and
      (instance ?R MobileResidence)
      (located ?R ?C)))))

(subclass CityBlock LandArea)
(documentation CityBlock EnglishLanguage "A square-shaped area surrounded by &%Roadways 
which is part of a &%City and typically contains &%Buildings.")
(=>
  (instance ?B CityBlock)
  (exists (?C)
    (and
      (instance ?C City)
      (part ?B ?C))))

(subclass AerobicExerciseDevice RecreationOrExerciseDevice)
(documentation AerobicExerciseDevice EnglishLanguage "An &%RecreationOrExerciseDevice whose purpose is 
to develop the cardiovascular system.")

(subclass AnaerobicExerciseDevice RecreationOrExerciseDevice)
(disjoint AnaerobicExerciseDevice AerobicExerciseDevice)
(documentation AnaerobicExerciseDevice EnglishLanguage "An &%RecreationOrExerciseDevice whose purpose 
is to develop &%Muscles without also developing the cardiovascular system.")

;; KJN: Moving this to Government.kif to remove dependency to CountriesAndRegions.kif
;;(instance UnitedStatesDepartmentOfState GovernmentOrganization)
;;(subOrganization UnitedStatesDepartmentOfState (GovernmentFn UnitedStates))
;;(documentation UnitedStatesDepartmentOfState EnglishLanguage "The &%subOrganization of the US 
;;government that sets and enforces foreign policy.")

;;(instance UnitedStatesDepartmentOfInterior GovernmentOrganization)
;;(subOrganization UnitedStatesDepartmentOfInterior (GovernmentFn UnitedStates))
;;(documentation UnitedStatesDepartmentOfInterior EnglishLanguage "Manages and preserves public lands 
;;and natural resources in the &%UnitedStates.")

;; NS: delete.
;; (subclass SkilledOccupation Position)

;; NS: add.
(subclass SkilledOccupation OccupationalRole)

(documentation SkilledOccupation EnglishLanguage "Any &%Position which requires 
learning a set of skills.")

(=>
   (and
      (instance ?OCCUPATION SkilledOccupation)
      (attribute ?PERSON ?OCCUPATION))
   (exists (?TRAINING)
      (and
         (instance ?TRAINING EducationalProcess)
         (destination ?TRAINING ?PERSON)))) 


;; NS: edit.
(subclass ManualLabor Position)
(subclass ManualLabor OccupationalRole)
(documentation ManualLabor EnglishLanguage "Any &%Position which involves manual 
work.")

(subclass UnskilledOccupation ManualLabor)
(disjoint UnskilledOccupation SkilledOccupation)
(documentation UnskilledOccupation EnglishLanguage "Any &%Position which does not 
require learning a set of skills.") 

(subclass OccupationalTrade SkilledOccupation)
(subclass OccupationalTrade ManualLabor)
(documentation OccupationalTrade EnglishLanguage "Any &%Position that involves skilled 
manual work.")

(subclass Profession SkilledOccupation)
(disjoint Profession OccupationalTrade)
(documentation Profession EnglishLanguage "Any occupation that requires at least a bachelor's
degree.")

;; NS: edit.
(=>
   (and
      (or
         (instance ?ROLE OccupationalTrade)
         (instance ?ROLE Profession))
      (holdsDuring ?T1 (attribute ?HUMAN ?ROLE)))
   (exists (?FIELD)
      (and
         (instance ?FIELD FieldOfStudy)
         (holdsDuring ?T1 (knows ?HUMAN ?FIELD)))))


;; NS: edit.
(documentation GovernmentSecretary EnglishLanguage "This
&%Position &%Attribute describes a person who is head of an
adminstrative department of &%Government.")

;; NS: delete.  Redundant.
;; (subclass GovernmentSecretary SkilledOccupation)

;; NS: edit.  Renamed GovernmentOfficer to GovernmentPosition.
;; NS: add.
(instance GovernmentSecretary GovernmentPosition)

;; NS: add.
(instance SecretaryOfTheInterior GovernmentPosition)
;; NS: edit.
(subAttribute SecretaryOfTheInterior GovernmentSecretary)
;; NS: edit.
(documentation SecretaryOfTheInterior EnglishLanguage "This
&%Position &%Attribute describes the head of the
&%UnitedStatesDepartmentOfInterior.")

;; NS: edit.
;; KJN: Moving this very specific rule to Government.kif where the US Government is
;; discussed in more detail
;;(=>
;;  (holdsDuring ?T1
;;    (occupiesPosition ?PERSON SecretaryOfTheInterior UnitedStatesDepartmentOfInterior))
;;  (holdsDuring ?T1
;;    (leader UnitedStatesDepartmentOfInterior ?PERSON)))

;; NS: add.
(instance SecretaryOfTheTreasury GovernmentPosition)
;; NS: edit.
(subAttribute SecretaryOfTheTreasury GovernmentSecretary)
;; NS: edit.
(documentation SecretaryOfTheTreasury EnglishLanguage "This
&%Position &%Attribute describes the head of the United
States Treasury Department.")

(subclass StateGovernment Government)
(documentation StateGovernment EnglishLanguage "The class of &%Governments whose 
jurisdictions are &%StateOrProvinces.")

;; NS: delete.  This is just silly.  It will add two new terms
;; during inference -- a skolemized StateOrProvince, P1, plus
;; (GovernmentFn P1) -- neither of which can be usefully related
;; to any other concepts.
;; (=>
;;    (instance ?GOVERNMENT StateGovernment)
;;    (exists (?STATE)
;;       (and
;;          (instance ?STATE StateOrProvince)
;;          (equal (GovernmentFn ?STATE) ?GOVERNMENT))))

;; NS: add.
(<=>
  (instance ?STATE StateOrProvince)
  (instance (GovernmentFn ?STATE) StateGovernment))

(subclass CityGovernment Government)
(documentation CityGovernment EnglishLanguage "&%CityGovernment is the class of 
governments of &%Cities.")
(<=>
  (instance ?C City)
  (instance (GovernmentFn ?C) CityGovernment))

;; KJN: Moving this to Government.kif as the definition for GeneralElection as well
;; as most of the rules for PopularElection are located there.  
;;(subclass PopularElection GeneralElection)
;;(documentation PopularElection EnglishLanguage "&%PopularElection is the class of 
;;&%Elections in which office-holders and issues are determined directly by 
;;the outcome of the votes cast by the enfranchised.  For example, U.S.  
;;Senators and Representatives are elected by &%PopularElection.  By 
;;contrast, U.S. Presidents are elected by indirect elections, in which the 
;;Electoral College determines the actual outcome.  See &%electionWinner.")

;;(subclass ElectoralCollegeElection GeneralElection)
;;(documentation ElectoralCollegeElection EnglishLanguage "&%ElectoralCollegeElection is 
;;the class of &%Elections in which the outcome is decided by the votes of 
;;electors who have been chosen by popular vote, rather than directly by 
;;results of the popular vote.  &%ElectoralCollegeElection is an indirect 
;;method of election, in contrast to &%PopularElection.")

;; KJN: Moving this to Government.kif to remove dependency to CountriesAndRegions.kif
;;(instance UnitedStatesCongress LegislativeOrganization)
;;(subOrganization UnitedStatesCongress (GovernmentFn UnitedStates))
;;(documentation UnitedStatesCongress EnglishLanguage "The legislative branch of the government 
;;of the &%UnitedStates.")

(subclass MilitaryService MilitaryOrganization)
(documentation MilitaryService EnglishLanguage "A branch of the armed forces of a &%Nation.  
For example, there are five military services in the United States, the army, 
the navy, the air force, the marines, and the coast guard.")

(subclass CoastGuard GovernmentOrganization)
(documentation CoastGuard EnglishLanguage "&%CoastGuard is the subclass of &%GovernmentOrganizations 
that enforce the maritime laws of a &%Nation and guard its &%Seacoast.  This may be 
a military or quasi-military organization.")

(subclass Army MilitaryService)
(documentation Army EnglishLanguage "&%MilitaryServices that are land forces.")

(subclass AirForce MilitaryService)
(documentation AirForce EnglishLanguage "&%AirForce is the subclass of &%MilitaryService 
that comprises military air forces.")

(subclass MilitaryUnit MilitaryOrganization)
(documentation MilitaryUnit EnglishLanguage "Any &%MilitaryOrganization that can be dispatched 
to an area of operations.")
(=>
  (instance ?B Battle)
  (exists (?U1 ?U2)
    (and
      (instance ?U1 MilitaryUnit)
      (instance ?U2 MilitaryUnit)
      (not 
        (equal ?U1 ?U2))
      (agent ?B ?U1)
      (agent ?B ?U2))))

(subclass MilitaryReserveForce MilitaryOrganization)
(documentation MilitaryReserveForce EnglishLanguage "&%MilitaryReserveForce is the subclass 
of &%MilitaryOrganizations that consist of forces trained in military 
procedures and activities, which are subject to being called to active duty 
if needed.")

(subclass MilitarySquad MilitaryUnit)
(documentation MilitarySquad EnglishLanguage "Any &%MilitaryUnit with the rank of squad.")

(subclass MilitaryCorps MilitaryUnit)
(documentation MilitaryCorps EnglishLanguage "Any &%MilitaryUnit with the rank of 
corps.")

(subclass CavalryUnit MilitaryUnit)
(documentation CavalryUnit EnglishLanguage "&%MilitaryUnits composed primarily of &%Soldiers 
who are mounted, i.e. who perform their combat missions from a &%Horse or 
&%Vehicle.")
(=>
  (and
    (instance ?C CavalryUnit)
    (instance ?B Battle)
    (agent ?B ?C))
  (exists (?P ?V ?T)
    (and
      (attribute ?P Soldier)
      (member ?P ?C)
      (instance ?T Transportation)
      (agent ?T ?P)
      (instance ?V Vehicle)
      (patient ?T ?V)
      (during ?T ?B))))

(subclass MilitarySurplus MilitaryArtifact)
(documentation MilitarySurplus EnglishLanguage "Any &%MilitaryArtifact which is sold to a 
non-military customer.")

(=>
  (instance ?S MilitarySurplus)
  (exists (?A ?B)
    (and
      (instance ?B Buying)
      (patient ?B ?A)
      (not 
        (instance ?A MilitaryOrganization))
      (not 
        (member ?A MilitaryOrganization)))))

(documentation hostileForces EnglishLanguage "(hostileForces ?UNIT1 ?UNIT2) means that 
the &%MilitaryUnits ?UNIT1 and ?UNIT2 are, respectively, allied with 
&%GeopoliticalAreas that are at war with one another.")
(instance hostileForces BinaryPredicate)
(instance hostileForces IrreflexiveRelation)
(domain hostileForces 1 MilitaryUnit)
(domain hostileForces 2 MilitaryUnit)

(=>
  (hostileForces ?U1 ?U2)
  (exists (?W ?A1 ?A2)
    (and
      (instance ?WAR War)
      (contestParticipant ?W ?A1)
      (contestParticipant ?W ?A2)
      (subOrganization ?U1 (GovernmentFn ?A1))
      (subOrganization ?U2 (GovernmentFn ?A2)))))

(subclass Commission Organization)
(documentation Commission EnglishLanguage "A small, temporary &%Organization whose purpose 
is to investigate some issue.")

(=>
   (instance ?COMMISSION Commission)
   (hasPurpose ?COMMISSION (exists (?INVESTIGATE ?ISSUE)
                              (and
                                 (instance ?INVESTIGATE Investigating)
                                 (patient ?INVESTIGATE ?ISSUE)
                                 (agent ?INVESTIGATE ?COMMISSION)))))

(subclass ServiceOrganization Organization)
(documentation ServiceOrganization EnglishLanguage "An &%Organization that performs 
a public service and is regulated by the &%Government.")

(=>
   (instance ?ORG ServiceOrganization)
   (exists (?PROC ?GOV)
      (and
         (instance ?PROC RegulatoryProcess)
         (patient ?PROC ?ORG)
         (agent ?PROC ?GOV)
         (instance ?GOV Government)))) 

(subclass Library EducationalOrganization)
(documentation Library EnglishLanguage "An &%EducationalOrganization which is a repository 
of &%Texts which have been classified for efficient retrieval.")

(=>
  (instance ?L Library)
  (exists (?B ?T)
    (and
      (possesses ?L ?B)
      (instance ?B Building)
      (instance ?T Text)
      (located ?T ?B))))

(subclass PublicLibrary Library)
(subclass PublicLibrary GovernmentOrganization)
(documentation PublicLibrary EnglishLanguage "A &%Library which is financed by taxes and which 
is open to everyone.")

(subclass Museum EducationalOrganization)
(documentation Museum EnglishLanguage "An &%EducationalOrganization where &%Artifacts of historic, 
scientific or aesthetic value are collected and exhibited.")

(subclass OrganizationalBoard Organization)
(documentation OrganizationalBoard EnglishLanguage "Part of an &%Organization that 
is responsible for managing the &%Organization.")

(=>
   (instance ?BOARD OrganizationalBoard)
   (exists (?ORG ?MANAGE)
      (and
         (subOrganization ?BOARD ?ORG)
         (instance ?MANAGE Managing)
         (agent ?MANAGE ?BOARD)
         (patient ?MANAGE ?ORG))))

(subclass SecurityUnit Organization)
(documentation SecurityUnit EnglishLanguage "The &%Organization that is charged with 
ensuring the security of members of the overall &%Organization and the 
property of the &%Organization.")

(=>
  (and
    (instance ?UNIT SecurityUnit)
    (subOrganization ?UNIT ?ORG))
  (holdsObligation 
    (exists (?MAINTAIN)
      (and
        (instance ?MAINTAIN Maintaining)
        (agent ?MAINTAIN ?UNIT)
        (patient ?MAINTAIN ?ORG)))
    ?UNIT))

(subclass UnionOrganization Organization)
(documentation UnionOrganization EnglishLanguage "An &%Organization comprised of workers from 
the same &%Corporation or &%Industry.  The purpose of the &%UnionOrganization 
is to strengthen its representation in bargaining with the &%Corporation or 
&%Industry.")

(=>
   (instance ?ORG UnionOrganization)
   (exists (?COLL)
      (=>
         (member ?MEMBER ?ORG)
         (or
            (and
               (instance ?COLL Corporation)
               (employs ?COLL ?MEMBER)) 
            (exists (?CORP)
               (and
                  (instance ?COLL Industry)
                  (member ?CORP ?COLL)
                  (employs ?CORP ?MEMBER)))))))

(subclass OrganicCompound CompoundSubstance)
(documentation OrganicCompound EnglishLanguage "Any &%CompoundSubstance that has a &%Carbon 
base.")

(=>
   (and
      (instance ?COMPOUND OrganicCompound)
      (instance ?COMPOUND Molecule))
   (exists (?CARBON)
      (and
         (instance ?CARBON Carbon)
         (part ?CARBON ?COMPOUND))))

(subclass Urea OrganicCompound)
(documentation Urea EnglishLanguage "Urea is a dry, soluble, nitrogenous substance 
that is the major solid component of the urine of mammals, and which 
may be synthesized from ammonia and carbon dioxide, it is useful in the 
production of &%Plastic and in &%Fertilizers.") 

(subclass Steroid OrganicCompound)
(subclass Steroid BiologicallyActiveSubstance)
(documentation Steroid EnglishLanguage "A class of &%OrganicCompounds having the same basic 
chemical structure and having significant physiological effects.")

(subclass Hydrocarbon OrganicCompound)
(documentation Hydrocarbon EnglishLanguage "Any &%OrganicCompound that contains only &%Carbon 
and &%Hydrogen.")

(=>
  (instance ?S Hydrocarbon)
  (exists (?P1 ?P2)
    (and
      (equal ?S (MereologicalSumFn ?P1 ?P2))
      (instance ?P1 Carbon)
      (instance ?P2 Hydrogen))))

(subclass Alcohol OrganicCompound)
(documentation Alcohol EnglishLanguage "&%OrganicCompounds that are produced from hydrocarbons 
by distillation.")

(subclass Alkaloid ChemicalBase)
(subclass Alkaloid PlantSubstance)
(subclass Alkaloid BiologicallyActiveSubstance)
(documentation Alkaloid EnglishLanguage "A &%ChemicalBase found in &%Plants that has 
physiological and psychological effects.")
(=>
   (instance ?A Alkaloid)
   (exists (?N)
      (and
         (instance ?N Nitrogen)
         (part ?N ?A))))

(instance Drugged ConsciousnessAttribute)
(contraryAttribute Drugged Sober)
(documentation Drugged EnglishLanguage "The &%ConsciousnessAttribute of someone whose motor and/or 
cognitive faculties are significantly impaired by a &%BiologicallyActiveSubstance.")

(=>
  (holdsDuring ?T 
    (attribute ?P Drugged))
  (holdsDuring ?T 
    (exists (?B)
      (and
        (instance ?B BiologicallyActiveSubstance)
        (part ?B ?P)))))

(subAttribute Drunk Drugged)
(documentation Drunk EnglishLanguage "The &%ConsciousnessAttribute of someone whose motor and 
cognitive faculties are significantly impaired by &%Alcohol.")

(=>
  (holdsDuring ?TIME (attribute ?PERSON Drunk))
  (exists (?PAST)
    (and
      (temporalPart ?PAST (PastFn ?TIME))
      (holdsDuring ?PAST 
        (exists (?DRINK ?ALCOHOL)
          (and
            (instance ?DRINK Drinking)
            (patient ?DRINK ?ALCOHOL)
            (instance ?ALCOHOL AlcoholicBeverage)
            (agent ?DRINK ?PERSON)))))))

(=>
  (holdsDuring ?T 
    (attribute ?P Drunk))
  (holdsDuring ?T 
    (exists (?B)
      (and
        (instance ?B Alcohol)
        (part ?B ?P)))))

(subclass AminoAcid ChemicalAcid)
(subclass AminoAcid OrganicCompound)
(documentation AminoAcid EnglishLanguage "Organic acids that are the building blocks of 
&%Proteins.")
(=>
  (instance ?P Protein)
  (exists (?A)
    (and
      (instance ?A AminoAcid)
      (part ?A ?P))))

(subclass Cholesterol Steroid)
(subclass Cholesterol AnimalSubstance)
(documentation Cholesterol EnglishLanguage "A &%Steroid that is produced by the &%Liver and that 
is believed to be closely associated with various cardiological disorders.")
(=>
  (instance ?S Cholesterol)
  (exists (?P ?L)
    (and
      (instance ?P BiologicalProcess)
      (eventLocated ?P ?L)
      (instance ?L Liver)
      (result ?P ?S))))

(subclass ChemicalAcid CompoundSubstance)
(disjoint ChemicalAcid ChemicalBase)
(documentation ChemicalAcid EnglishLanguage "A bitter &%CompoundSubstance that is capable of 
reacting with a &%ChemicalBase and forming a &%ChemicalSalt.")
(=>
  (and
    (instance ?CA ChemicalAcid)
    (instance ?CB ChemicalBase)
    (instance ?C ChemicalProcess)
    (patient ?C ?CA)
    (patient ?C ?CB))
  (exists (?CS)
    (and 
      (instance ?CS ChemicalSalt)
      (result ?C ?CS))))

(subclass ChemicalBase CompoundSubstance)
(documentation ChemicalBase EnglishLanguage "A &%CompoundSubstance that is capable of 
reacting with a &%ChemicalAcid and forming a &%ChemicalSalt.")

(subclass ChemicalSalt CompoundSubstance)
(documentation ChemicalSalt EnglishLanguage "A bitter &%CompoundSubstance that is formed in a 
chemical reaction of a &%ChemicalBase with a &%ChemicalAcid.")

(subclass SodiumChloride ChemicalSalt)
(names "salt" SodiumChloride)
(names "NaCl" SodiumChloride)

(documentation SodiumChloride EnglishLanguage "&%SodiumChloride is the compound of &%Sodium and &%Chloride,
which may appear in crystalline form or in solution with water or other substances.
It is a compound found in solution in significant quantities in sea water.")

(=>
   (instance ?SALT SodiumChloride)
   (exists (?SYNTHESIS ?SODIUM ?CHLORINE)
      (and
         (instance ?SYNTHESIS ChemicalSynthesis)
         (resource ?SYNTHESIS ?SODIUM)
         (instance ?SODIUM Sodium)
         (resource ?SYNTHESIS ?CHLORINE)
         (instance ?CHLORINE Chlorine)
         (result ?SYNTHESIS ?SALT))))

(subclass Diamond Mineral)
(subclass Diamond Carbon)
(documentation Diamond EnglishLanguage "Crystalline &%Carbon that is valued as a gem and 
used in industrial applications.")

(subclass SalineSolution Solution)
(documentation SalineSolution EnglishLanguage "A &%Solution consisting of &%SodiumChloride and 
&%Water.")

(=>
   (and
      (instance ?SOLUTION SalineSolution)
      (part ?PART ?SOLUTION))
   (or
      (instance ?PART SodiumChloride)
      (instance ?PART Water)))

(=>
   (instance ?WATER Water)
   (exists (?SYNTHESIS ?HYDROGEN ?OXYGEN)
      (and
         (instance ?SYNTHESIS ChemicalSynthesis)
         (resource ?SYNTHESIS ?HYDROGEN)
         (instance ?HYDROGEN Hydrogen)
         (resource ?SYNTHESIS ?OXYGEN)
         (instance ?OXYGEN Oxygen)
         (result ?SYNTHESIS ?WATER))))

(documentation reactant EnglishLanguage "(reactant ?PROCESS ?SUBSTANCE) means that ?SUBSTANCE 
is a chemical reactant in the chemical reaction ?PROCESS, i.e. ?SUBSTANCE is 
present at the beginning of the chemical reaction ?PROCESS.")
(domain reactant 1 ChemicalProcess)
(domain reactant 2 Substance)
(subrelation reactant resource)
(instance reactant CaseRole)


(documentation reagent EnglishLanguage "(reagent ?PROCESS ?SUBSTANCE) means that ?SUBSTANCE 
is a chemical agent in the chemical reaction ?PROCESS.")
(domain reagent 1 ChemicalProcess)
(domain reagent 2 Substance)
(subrelation reagent instrument)
(instance reagent CaseRole)

(subclass Oil Solution)
(documentation Oil EnglishLanguage "A greasy, viscous &%Solution that cannot be mixed with &%Water.  
Note that this general class covers petroleum oil, vegetable oil, animal fat, etc.")

(=>
   (instance ?OIL Oil)
   (not (exists (?MIX ?WATER)
      (and
         (instance ?MIX Mixture)
         (part ?WATER ?MIX)
         (instance ?WATER Water)
         (part ?OIL ?MIX)))))

(subclass Surfactant Substance)

(documentation Surfactant EnglishLanguage "Surfactants, also known as &%Wetting agents, 
lower the surface tension of a &%Liquid, allowing easier spreading.  The 
term surfactant is a compression of 'Surface active agent'.  Surfactants 
are usually organic compounds that contain both hydrophobic and 
hydrophilic groups, and are thus semi-soluble in both organic and aqueous 
solvents.") 

(subclass Detergent Surfactant)
(subclass Detergent Mixture)
(documentation Detergent EnglishLanguage "A detergent is a compound, or a mixture of 
compounds, whose molecules have two distinct regions: one that is 
hydrophilic, and dissolves easily in water, and another region that is 
hydrophobic, with little (if any) affinity for water.  As a consequence, 
these compounds can aid in the solubilization of hydrophobic compounds in 
water, and usually are optimized for this property.  Though &%Soap also has 
these properties, soaps in general are not considered detergents.  &%Soap is 
a particular type of surfactant that is derived from oils and fats.  They 
are created through the saponification process whereby the ester linkage 
in a vegetable oil or fat is hydrolytically cleaved, creating a sodium or 
potassium salt of a fatty acid (i.e.  soap).  Both detergents and soaps 
are considered to be surfactants.  &%Surfactants that are not soaps are 
considered to be detergents.  Detergents are also commonly known as any 
cleaning mixture containing surfactants.  (from Wikipedia)") 

(=>
  (instance ?DETERGENT Detergent)
  (hasPurpose ?DETERGENT 
    (exists (?REMOVE ?SUBSTANCE ?SURFACE ?OBJECT)
      (and
        (instance ?REMOVE Removing)
        (instance ?SUBSTANCE Substance)
        (patient ?REMOVE ?SUBSTANCE)
        (origin ?REMOVE ?SURFACE)
        (surface ?SURFACE ?OBJECT)))))

(subclass Bathing Washing)
(documentation Bathing EnglishLanguage "&%Washing the entire body of a &%Human or &%Animal.")
(=>
  (and
    (instance ?B Bathing)
    (patient ?B ?A))
  (instance ?A Animal))

(subclass BathingDevice WashingDevice)
(documentation BathingDevice EnglishLanguage "A &%WashingDevice which is intended to be used by 
Humans for washing their bodies.  Note that this class covers bathtubs, showers, 
etc.")
(=>
  (instance ?BD BathingDevice)
  (hasPurpose ?BD 
    (exists (?B ?P)
      (and
        (instance ?B Bathing)
        (instrument ?B ?BD)
        (patient ?B ?PERSON)
        (instance ?P Human)))))

(subclass WashBasin WashingDevice)
(documentation WashBasin EnglishLanguage "A &%WashingDevice which is intended to be used by 
&%Humans for washing their &%Hands.")

(=>
  (instance ?B WashBasin)
  (hasPurpose ?B 
    (exists (?W ?H)
      (and
        (instance ?W Washing)
        (instrument ?W ?B)
        (patient ?W ?H)
        (instance ?H Hand)))))

(subclass Glue Mixture)
(subclass Glue AttachingDevice)
(documentation Glue EnglishLanguage "Any &%Mixture whose purpose is to be used as the &%instrument 
of &%Attaching one thing to another.")

(=>
   (instance ?GLUE Glue)
   (hasPurpose ?GLUE (exists (?ATTACH)
                            (and
                               (instance ?ATTACH Attaching)
                               (instrument ?ATTACH ?GLUE)))))

(subclass Glass Mixture)
(documentation Glass EnglishLanguage "A transparent or translucent &%Mixture of silicates.")

(subclass MetallicAlloy Mixture)
(documentation MetallicAlloy EnglishLanguage "A &%Mixture of two or more &%Metals, and possibly 
nonmetallic elements as well.  For example, steel is an alloy containing iron 
and manganese.")

(=>
   (instance ?ALLOY MetallicAlloy)
   (exists (?METAL1 ?METAL2)
      (and
         (instance ?METAL1 Metal)
         (instance ?METAL2 Metal)
         (not (equal ?METAL1 ?METAL2))
         (part ?METAL1 ?ALLOY)
         (part ?METAL2 ?ALLOY))))

(subclass Steel MetallicAlloy)
(documentation Steel EnglishLanguage "A &%MetallicAlloy made from &%Iron and other elements.")

(=>
   (instance ?STEEL Steel)
   (exists (?IRON)
      (and
         (instance ?IRON Iron)
         (part ?IRON ?STEEL))))

(subclass Brass MetallicAlloy)
(documentation Brass EnglishLanguage "A &%MetallicAlloy made from &%Copper and &%Zinc.")

(=>
   (instance ?BRASS Brass)
   (exists (?COPPER ?ZINC)
      (and
         (instance ?COPPER Copper)
         (instance ?ZINC Zinc)
         (part ?COPPER ?BRASS)
         (part ?ZINC ?BRASS))))

(subclass Powder Substance)
(documentation Powder EnglishLanguage "Any &%Solid &%Substance which consists of loose, 
identical, and very small particles.")

(=>
   (instance ?POWDER Powder)
   (attribute ?POWDER Solid))

(subclass Fallout Powder)
(documentation Fallout EnglishLanguage "Radioactive powder that is typically dispersed by 
the explosion of a nuclear weapon.")

(=>
   (instance ?POWDER Fallout)
   (capability RadiatingNuclear instrument ?POWDER)) 

(subclass Fog WaterCloud)
(documentation Fog EnglishLanguage "Any &%WaterCloud that is in contact with the ground.")

(=>
   (instance ?FOG Fog)
   (exists (?LAND)
      (and
         (instance ?LAND LandArea)
         (meetsSpatially ?FOG ?LAND))))

(subclass Ice Water)
(documentation Ice EnglishLanguage "&%Water that has the &%PhysicalState of &%Solid.")

(<=>
   (instance ?ICE Ice)
   (and
      (instance ?ICE Water)
      (attribute ?ICE Solid)))

(=>
   (and
      (instance ?ICE Ice)
      (measure ?ICE (MeasureFn ?NUMBER CelsiusDegree)))
   (lessThanOrEqualTo ?NUMBER 0))

(subclass Field LandArea)
(documentation Field EnglishLanguage "A &%LandArea that has been cleared of &%BotanicalTrees.  
Note that a &%Field is not necessarily used for the cultivation of crops and 
that a &%Field may be very small, e.g. &%Lawn is a subclass of &%Field.")

(=>
   (instance ?FIELD Field)
   (not (exists (?TREE)
      (and
         (instance ?TREE BotanicalTree)
         (located ?TREE ?FIELD)))))

(subclass Lawn Field)
(documentation Lawn EnglishLanguage "A &%Field of cultivated and mowed &%Grass.")

(=>
  (instance ?L Lawn)
  (exists (?G)
    (and
      (instance ?G Grass)
      (located ?G ?L))))

(subclass MilitaryFront GeographicArea)
(documentation MilitaryFront EnglishLanguage "A &%GeographicArea along which opposing military 
forces confront one another in a &%Battle.")

(=>
   (holdsDuring ?TIME (instance ?AREA MilitaryFront))
   (exists (?BATTLE)
      (and
         (instance ?BATTLE Battle)
         (eventLocated ?BATTLE ?AREA)
         (temporalPart ?TIME ?BATTLE))))

(partition Region GeographicArea SpaceRegion)

;; KJN: Moving this to Geography.kif as PlanetEarth is defined there, as well as
;; an area for Astronomical bodies
;;(subclass Meteorite Meteoroid)
;;(documentation Meteorite EnglishLanguage "Any &%Meteoroid that leaves traces on the surface 
;;of &%Earth.")

;;(=>
;;  (instance ?M Meteorite)
;;  (exists (?T)
;;    (holdsDuring ?T
;;      (meetsSpatially ?M PlanetEarth))))

;; KJN: changing the definition of this based on Wikipedia      
;;(subclass Meteoroid AstronomicalBody)
;;(documentation Meteoroid EnglishLanguage "Any &%AstronomicalBody that breaks through the 
;;&%Atmosphere of &%Earth.")
;;(documentation Meteoroid EnglishLanguage "According to the International Astronomical
;;Union, a &%Meteoroid is a solid object moving in interplanetary space, of a size 
;;considerably smaller than an asteroid and considerably larger than an atom.")

;; KJN: Changing this rule based on new linguistic definition
;;(=>
;;  (instance ?M Meteoroid)
;;  (exists (?T)
;;    (holdsDuring ?T
;;      (meetsSpatially ?M EarthsAtmosphere))))

;;(=>
;;  (instance ?M Meteoroid)
;;  (exists (?R)
;;    (and
;;      (instance ?R OuterSpaceRegion)
;;      (located ?M ?R))))

(subclass AtmosphericRegion SpaceRegion)
(documentation AtmosphericRegion EnglishLanguage "&%AtmosphericRegion is the class of 
all subregions of &%EarthsAtmosphere.")

;; KJN: Moving this to Geography.kif to remove dependencies  
;;(subclass Creek BodyOfWater)
;;(subclass Creek StreamWaterArea)
;;(subclass Creek FreshWaterArea)
;;(disjoint Creek River)
;;(documentation Creek EnglishLanguage "Creek is the class of small streams of fresh 
;;water flowing through land, usually into a &%River.")
;;(=>
;;  (and
;;    (instance ?C Creek)
;;    (instance ?R River))
;;  (smaller ?C ?R))

(subclass StreamWaterArea WaterArea)
(subclass StreamWaterArea FlowRegion)
(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 FlowRegion Region)

(documentation FlowRegion EnglishLanguage "&%FlowRegion is a class of things whose 
boundaries are relatively stable but whose constitutive &%material is continuously moving 
through the region itself and being replaced by 
other, similar material.  Each &%FlowRegion is constituted by a stream 
of matter moving as a whole.  A &%FlowRegion may be liquid or gaseous.  
A wind may be considered as a &%Process or as a &%FlowRegion, similarly 
an OceanCurrent or a &%WaterWave.  The motion process associated with a 
&%FlowRegion F is denoted by (&%FlowFn F).  Note that certain 
properties belong to the &%FlowRegion itself (e.g., mass, length, volume, 
temperature, and speed or velocity of the region moving as a whole), 
while other properties of interest belong to the &%Motion of its 
constitutive stuff (e.g., velocity, direction).  The motion of 
a &%FlowRegion as a whole (e.g., &%JetStream moves within the atmosphere) 
is distinguished from the motion of the &%pieces of stuff constituting the 
&%FlowRegion.  See &%FlowFn and &%FlowRegionFn.")

(=>
  (and
    (instance ?FR FlowRegion)
    (located ?FLUID ?FR))
  (attribute ?FLUID Fluid))

(subclass SpaceRegion Region)
(disjoint SpaceRegion GeographicArea)
(partition SpaceRegion AtmosphericRegion OuterSpaceRegion)
(documentation SpaceRegion EnglishLanguage "The class of all &%Regions which are not 
&%GeographicAreas.")

(subclass OuterSpaceRegion SpaceRegion)
(documentation OuterSpaceRegion EnglishLanguage "The class of all &%Regions which are 
neither &%GeographicAreas nor &%AtmosphericRegions.")

(subclass StormFront AtmosphericRegion)
(documentation StormFront EnglishLanguage "The &%Region where two or more unstable air 
masses meet.")

(=>
   (instance ?FRONT StormFront)
   (exists (?AIR1 ?AIR2)
      (and
         (instance ?AIR1 Air)
         (instance ?AIR2 Air)
         (between ?AIR1 ?FRONT ?AIR2))))

(instance Inside PositionalAttribute)
(documentation Inside EnglishLanguage "&%Inside is a &%PositionalAttribute used to 
describe the relative location of one object or region to another 
region.")

;; KJN: Removing this example to remove dependency to CountriesAndRegions.kif
;;For example, (&%orientation &%Virginia &%UnitedStates &%Inside).")

(=>
   (instance ?INSIDE Inside)
   (exists (?OBJECT)
     (forall (?THING)
       (=>
         (located ?THING ?INSIDE)
         (exists (?PART)
           (and
             (interiorPart ?PART ?OBJECT)
             (located ?THING ?PART)))))))

(instance Outside PositionalAttribute)
(contraryAttribute Inside Outside)
(documentation Outside EnglishLanguage "&%Outside is a &%PositionalAttribute used to 
describe the relative location of one object or region to another 
region. ")

;; KJN: Removing this example to remove dependency to CountriesAndRegions.kif
;;For example, (&%orientation &%Cuba &%UnitedStates &%Outside).")

(=>
  (orientation ?OBJ ?REGION Outside)
  (instance ?REGION Region))

(=>
  (orientation ?OBJ ?REGION Inside)
  (instance ?REGION Region))

(<=>
  (orientation ?OBJ ?REGION Outside)
  (not 
    (partlyLocated ?OBJ ?REGION)))

(=>
  (part ?OBJ ?REGION)
  (not 
    (orientation ?OBJ ?REGION Outside)))

(subclass Outdoors Region)
(documentation Outdoors EnglishLanguage "Any &%Region which is not enclosed by a &%Building 
or part of a &%Building.")

(=>
   (instance ?OUTDOORS Outdoors)
   (not
     (exists (?BUILDING)
       (and
         (instance ?BUILDING Building)
         (orientation ?OUTDOORS ?BUILDING Inside)))))

(subclass Indoors Region)
(disjoint Indoors Outdoors)
(documentation Indoors EnglishLanguage "Any &%Region which is enclosed by a &%Building.")

(=>
   (instance ?INDOORS Indoors)
   (exists (?BUILDING)
     (and
       (instance ?BUILDING Building)
       (orientation ?INDOORS ?BUILDING Inside))))

(subclass BiologicalSpecies Class)
(documentation BiologicalSpecies EnglishLanguage "The &%Class of all biological species, i.e. 
the class of all classes of &%Organism whose instances can interbreed.")

(=>
   (instance ?SPECIES BiologicalSpecies)
   (subclass ?SPECIES Organism))

(subclass Wood Tissue)
(subclass Wood PlantSubstance)
(documentation Wood EnglishLanguage "&%Tissue that comprises the inner trunk of &%BotanicalTrees.  
It is often used in constructing &%Buildings and other &%Artifacts.
Wood is the principal substance making up a tree, and is distinguished from the
bark, roots, flowers, seeds, fruit and leaves.") 
(=>
  (instance ?X Wood)
  (exists (?CELL)
    (and
      (instance ?CELL Cellulose)
      (part ?CELL ?X))))
      
(relatedInternalConcept Wood WoodArtifact)
(subclass WoodArtifact Artifact)
(documentation WoodArtifact EnglishLanguage "&%Wood that has been cut (and perhaps treated) for 
some purpose, e.g. &%Constructing or &%Combustion.  Note that this class covers 
both lumber and firewood.")

(=>
  (instance ?W WoodArtifact)
  (material Wood ?W))

(subclass OakWood WoodArtifact)
(documentation OakWood EnglishLanguage "Any &%WoodArtifact that is made from the &%Wood of an 
oak tree.")

(subclass Rubber PlantSubstance)
(subclass Rubber BodySubstance)
(subclass Rubber Hydrocarbon)
(documentation Rubber EnglishLanguage "Natural rubber, as opposed to synthetic rubber
which is a &%Plastic, is a product of the rubber tree, genus Hevea or Ficus. 
It is the coagulated form of the milky juice secreted by these trees.  
Rubber is essentially a polymer of isoprene. ")
(=>
  (instance ?R Rubber)
  (exists (?T)
    (and
      (instance ?T BotanicalTree)
      (part ?R ?T))))

(subclass Plastic Hydrocarbon)
(documentation Plastic EnglishLanguage "Any of a large set of hydrocarbon materials, in 
the form of polymers, which are usually derived from &%Petroleum products.  
Plastics have a tremendous variety of material properties including a wide 
range of values for opacity, density, ductility etc. and are pervasive in 
modern &%Manufacture (-ing).")

(subclass Polypropylene Plastic)
(documentation Polypropylene EnglishLanguage "Polypropylene (PP), also known as polypropene, is a thermoplastic polymer used in a wide variety of applications including packaging and labeling, textiles (e.g., ropes, thermal underwear and carpets), stationery, plastic parts and reusable containers of various types, laboratory equipment, loudspeakers, automotive components, and polymer banknotes. An addition polymer made from the monomer propylene, it is rugged and unusually resistant to many chemical solvents, bases and acids.(Wikipedia)")

(subclass Polystyrene Plastic)
(documentation Polystyrene EnglishLanguage "Polystyrene (PS) is a synthetic aromatic polymer made from the monomer styrene, a liquid petrochemical. Polystyrene can be rigid or foamed. General purpose polystyrene is clear, hard and brittle. It is a very inexpensive resin per unit weight. It is a rather poor barrier to oxygen and water vapor and has relatively low melting point. Polystyrene is one of the most widely used plastics, the scale of its production being several billion kilograms per year. Polystyrene can be naturally transparent, but can be colored with colorants. Uses include protective packaging (such as packing peanuts and CD and DVD cases), containers (such as 'clamshells'), lids, bottles, trays, tumblers, and disposable cutlery.

As a thermoplastic polymer, polystyrene is in a solid (glassy) state at room temperature but flows if heated above about 100 °C, its glass transition temperature. It becomes rigid again when cooled. This temperature behavior is exploited for extrusion, and also for molding and vacuum forming, since it can be cast into molds with fine detail.

It is very slow to biodegrade and therefore a focus of controversy, since it is often abundant as a form of litter in the outdoor environment, particularly along shores and waterways especially in its foam form. (Wikipedia)")

(subclass Cellulose PlantSubstance)
(subclass Cellulose Carbohydrate)
(documentation Cellulose EnglishLanguage "The main component of &%Plant &%Tissue.")

(subclass Starch Carbohydrate)
(documentation Starch EnglishLanguage "A complex &%Carbohydrate that is the main form in 
which &%Carbohydrates are stored.")

(subclass Sugar Carbohydrate)
(documentation Sugar EnglishLanguage "A simple &%Carbohydrate that has a sweet taste and 
consists mostly or entirely of sucrose.")

(subclass Nectar PlantSubstance)
(documentation Nectar EnglishLanguage "A sweet, sticky liquid that is produced by &%Plants 
and that attracts Insects.")

(subclass Medicine BiologicallyActiveSubstance)
(documentation Medicine EnglishLanguage "Any &%BiologicallyActiveSubstance which has a 
therapeutic effect under certain conditions.")

(=>
  (instance ?M Medicine)
  (exists (?P)
    (and
      (instance ?P TherapeuticProcess)
      (instrument ?P ?M))))

(subclass Stimulant BiologicallyActiveSubstance)
(disjoint Stimulant Depressant)
(documentation Stimulant EnglishLanguage "Any &%BiologicallyActiveSubstance which has 
the effect of stimulating the central nervous system, i.e. increasing 
function or activity in the &%Brain or &%SpinalCord.")

(subclass Depressant BiologicallyActiveSubstance)
(documentation Depressant EnglishLanguage "Any &%BiologicallyActiveSubstance which has 
the effect of depressing the central nervous system, i.e. decreasing 
function or activity in the &%Brain or &%SpinalCord.")

(subclass Opium BiologicallyActiveSubstance)
(subclass Opium PlantSubstance)
(documentation Opium EnglishLanguage "A substance harvested from the seed capsules of the 
opium poppy that contains various powerful alkaloids.")
(subclass Opium Depressant)

(=>
  (instance ?O Opium)
  (exists (?A)
    (and
      (instance ?A Alkaloid)
      (part ?A ?O))))

(subclass Grass FloweringPlant)
(documentation Grass EnglishLanguage "&%FloweringPlants with green, narrow leaves that are 
used for lawns and &%Fields. &%Grass includes any plant of the family 
Gramineae, a widely distributed group of mostly annual and perennial 
herbs.")

(subclass Lilac FloweringPlant)
(documentation Lilac EnglishLanguage "A &%FloweringPlant that has large clusters of 
aromatic flowers.")

(subclass Tobacco FloweringPlant)
(documentation Tobacco EnglishLanguage "A &%FloweringPlant containing nicotine whose leaves 
are dried and then smoked or ingested.")

(subclass Lesion AbnormalAnatomicalStructure)
(documentation Lesion EnglishLanguage "Any &%AbnormalAnatomicalStructure which is the result of 
an Injuring and which is found on the surface of an &%Organ.")

(=>
  (instance ?L Lesion)
  (exists (?I)
    (and
      (instance ?I Injuring)
      (result ?I ?L))))

(=>
  (instance ?L Lesion)
  (exists (?S ?O)
    (and
      (surface ?S ?O)
      (instance ?O Organ)
      (located ?L ?S))))

(subclass Scar AbnormalAnatomicalStructure)
(documentation Scar EnglishLanguage "Any &%AbnormalAnatomicalStructure which results from the 
healing of a &%Lesion.")

(=>
  (instance ?S Scar)
  (exists (?T ?OP ?L)
    (and
      (temporalPart ?T 
        (PastFn (WhenFn ?S)))
      (holdsDuring ?T 
        (instance ?L Lesion))
      (instance ?OP OrganOrTissueProcess)
      (patient ?OP ?L)
      (result ?OP ?S))))

(subclass Tumor AbnormalAnatomicalStructure)
(documentation Tumor EnglishLanguage "Any &%AbnormalAnatomicalStructure which consists of a 
mass of &%Tissue.  Note that this class covers both malignant (i.e. cancerous) 
and benign tumors.")

(=>
   (instance ?TUMOR Tumor)
   (forall (?PART)
      (=>
         (part ?PART ?TUMOR)
         (instance ?PART Tissue))))

(subclass Tendon Tissue)
(subclass Tendon AnimalSubstance)
(documentation Tendon EnglishLanguage "&%Tissue that connects &%Muscle to &%Bone.")

(=>
  (instance ?T Tendon)
  (exists (?M ?B)
    (and
      (instance ?M Muscle)
      (instance ?B Bone)
      (connects ?T ?M ?B))))

(subclass Sweat AnimalSubstance)
(documentation Sweat EnglishLanguage "An &%AnimalSubstance that contains &%SodiumChloride 
and is produced by the sweat glands.")

(=>
   (instance ?SWEAT Sweat)
   (exists (?PART)
      (and
         (instance ?PART SodiumChloride)
         (part ?PART ?SWEAT))))

(subclass PlantLeaf PlantAnatomicalStructure)
(subclass PlantLeaf Organ)
(documentation PlantLeaf EnglishLanguage "An &%Organ of &%Plants whose main purpose is 
photosynthesis.")

(subclass PlantBranch PlantAnatomicalStructure)
(subclass PlantBranch BodyPart)
(documentation PlantBranch EnglishLanguage "The stem of a &%Plant or any shoot arising from 
the stem of a &%Plant.")

(subclass BotanicalTree FloweringPlant)
(=>
  (instance ?X BotanicalTree)
  (material Wood ?X))
  
(documentation BotanicalTree EnglishLanguage "&%BotanicalTree is an imprecise term 
for a perennial woody plant that is larger than a bush or shrub, 
generally understood to describe a large growth having one main trunk 
with few or no branches projecting from its base, a well-developed crown 
of foliage, and a height at maturity of at least 12 feet.")

(subclass TreeBranch PlantBranch)
(documentation TreeBranch EnglishLanguage "Any &%PlantBranch which is part of a 
&%BotanicalTree.")

(=>
  (instance ?B TreeBranch)
  (exists (?T)
    (and
      (instance ?T BotanicalTree)
      (part ?B ?T))))

(subclass WillowTree BotanicalTree)
(documentation WillowTree EnglishLanguage "A &%BotanicalTree of the genus &%Salix.")

(subclass PlantRoot PlantAnatomicalStructure)
(subclass PlantRoot Organ)
(documentation PlantRoot EnglishLanguage "An &%Organ of &%Plants whose main purpose is 
twofold, viz. to absorb nutrients from the ground and to anchor the &%Plant 
in place.")

(subclass Flower PlantAnatomicalStructure)
(subclass Flower Organ)
(documentation Flower EnglishLanguage "The reproductive organ of &%FloweringPlants.")

(=>
  (instance ?FLOWER Flower)
  (exists (?PLANT ?TIME)
    (and
      (instance ?PLANT FloweringPlant)
      (holdsDuring ?TIME
        (part ?FLOWER ?PLANT)))))

(subclass Antibody Protein)
(documentation Antibody EnglishLanguage "An immunoglobulin which is produced by the body 
and which has the ability to neutralize &%Antigens.")

(=>
   (instance ?BODY Antibody)
   (hasPurpose ?BODY (exists (?DEST ?ANTI)
                        (and
                           (instance ?DEST Destruction)
                           (agent ?DEST ?BODY)
                           (patient ?DEST ?ANTI)
                           (instance ?ANTI Antigen)))))

(subclass Antibiotic BiologicallyActiveSubstance)
(documentation Antibiotic EnglishLanguage "A &%BiologicallyActiveSubstance than can kill 
instances of &%Bacterium.")

(subclass Antigen BiologicallyActiveSubstance)
(documentation Antigen EnglishLanguage "Any &%BiologicallyActiveSubstance that has the 
capacity to stimulate the production of &%Antibodies.")

(subclass AntigenA Antigen)
(documentation AntigenA EnglishLanguage "An &%Antigen that is carried in the red blood 
cells of those with &%BloodTypeA.")

(subclass AntigenB Antigen)
(documentation AntigenB EnglishLanguage "An &%Antigen that is carried in the red blood 
cells of those with &%BloodTypeB.")

(subclass BloodCell Cell)
(subclass BloodCell AnimalAnatomicalStructure)
(documentation BloodCell EnglishLanguage "A &%Cell that is normally present in &%Blood.")
(=>
  (instance ?C BloodCell)
  (exists (?B)
    (and
      (instance ?B Blood)
      (part ?C ?B))))

(subclass RedBloodCell BloodCell)
(documentation RedBloodCell EnglishLanguage "&%BloodCells that contain hemoglobin, lack a 
&%CellNucleus, and carry &%Oxygen to the tissues of the body.")
(=>
  (instance ?C RedBloodCell)
  (not 
    (exists (?N)
      (and
        (instance ?N CellNucleus)
        (part ?N ?C)))))

(subclass WhiteBloodCell BloodCell)
(documentation WhiteBloodCell EnglishLanguage "&%BloodCells that lack hemoglobin, contain a 
&%CellNucleus, and have no color.")
(=>
  (instance ?C WhiteBloodCell)
  (exists (?N)
    (and
      (instance ?N CellNucleus)
      (part ?N ?C))))

(subclass BloodTypeA Blood)
(documentation BloodTypeA EnglishLanguage "The subclass of &%Blood that contains &%AntigenA 
and does not contain &%AntigenB.")
(=>
  (instance ?B BloodTypeA)
  (exists (?A)
    (and
      (instance ?A AntigenA)
      (part ?A ?B))))

(=> 
  (instance ?B BloodTypeA)
  (not 
    (exists (?A)
      (and
        (instance ?A AntigenB)
        (part ?A ?B)))))

(subclass BloodTypeAB Blood)
(documentation BloodTypeAB EnglishLanguage "The subclass of &%Blood that contains both 
&%AntigenA and &%AntigenB.")
(=>
  (instance ?B BloodTypeAB)
  (exists (?A)
    (and
      (instance ?A AntigenA)
      (part ?A ?B))))

(=>
   (instance ?B BloodTypeAB)
   (exists (?A)
      (and
         (instance ?A AntigenB)
         (part ?A ?B))))

(subclass BloodTypeB Blood)
(documentation BloodTypeB EnglishLanguage "The subclass of &%Blood that contains &%AntigenB 
and does not contain &%AntigenA.")
(=>
  (instance ?B BloodTypeB)
  (exists (?A)
    (and
      (instance ?A AntigenB)
      (part ?A ?B))))

(=> 
  (instance ?B BloodTypeB)
  (not 
    (exists (?A)
      (and
        (instance ?A AntigenA)
        (part ?A ?B)))))

(subclass BloodTypeO Blood)
(documentation BloodTypeO EnglishLanguage "The subclass of &%Blood that contains neither 
&%AntigenA nor &%AntigenB.")
(=> 
  (instance ?B BloodTypeO)
  (not 
    (exists (?A)
      (and
        (instance ?A AntigenA)
        (part ?A ?B)))))

(=> 
  (instance ?B BloodTypeO)
  (not 
    (exists (?A)
      (and
        (instance ?A AntigenB)
        (part ?A ?B)))))

(subclass NerveCell Cell)
(subclass NerveCell AnimalAnatomicalStructure)
(documentation NerveCell EnglishLanguage "The &%Cells that make up a &%NervousSystem.")
(=>
  (instance ?N NerveCell)
  (exists (?S)
    (and
      (instance ?S NervousSystem)
      (part ?N ?S))))

(subclass LiquidBodySubstance BodySubstance)
(documentation LiquidBodySubstance EnglishLanguage "Any &%BodySubstance which is &%Liquid 
under normal circumstances.")

(=>
   (instance ?SUBSTANCE LiquidBodySubstance)
   (attribute ?SUBSTANCE Liquid))

(subclass Serum LiquidBodySubstance)
(disjoint Serum Blood)
(documentation Serum EnglishLanguage "Any &%LiquidBodySubstance other than &%Blood.")

(subclass TearSubstance LiquidBodySubstance)
(subclass TearSubstance SalineSolution)
(documentation TearSubstance EnglishLanguage "The class of &%SalineSolutions produced by 
the lacrimal glands of the &%Eyes.")

(=>
  (instance ?T TearSubstance)
  (exists (?P ?E)
    (and
      (instance ?E Eye)
      (instrument ?P ?E)
      (result ?P ?T))))

(subclass Milk LiquidBodySubstance)
(subclass Milk Beverage)
(documentation Milk EnglishLanguage "A nutritious &%BodySubstance produced by &%Mammals
that has evolved to provide nourishment for their offspring during
their initial period of life.")

(=>
   (instance ?MILK Milk)
   (exists (?PROCESS ?MAMMAL)
      (and
         (instance ?MAMMAL Mammal)
         (attribute ?MAMMAL Female)
         (instrument ?PROCESS ?MAMMAL)
         (result ?PROCESS ?MILK))))

(subclass CellPart BodyPart)
(documentation CellPart EnglishLanguage "&%part of a &%Cell")

(=>
 (instance ?OBJ1 CellPart)
 (exists (?CELL)
  (and
   (instance ?CELL Cell)
   (properPart ?OBJ1 ?CELL))))

(subclass CellNucleus CellPart)          
;; KJN: Removing this as CellPart is already an OrganicObject         
;;(subclass CellNucleus OrganicObject)
(documentation CellNucleus EnglishLanguage "The part of the &%Cell that contains DNA and 
RNA.")

(=>
   (instance ?NUCLEUS CellNucleus)
   (exists (?CELL)
      (and
         (instance ?CELL Cell)
         (part ?NUCLEUS ?CELL))))

(subclass Tea Beverage)
(subclass Tea PreparedFood)
(documentation Tea EnglishLanguage "A &%Beverage which is prepared by infusing tea leaves 
into hot water.")

(subclass AlcoholicBeverage Beverage)
(subclass AlcoholicBeverage Depressant)
(documentation AlcoholicBeverage EnglishLanguage "Any &%Beverage that contains &%Alcohol.")

(=>
   (instance ?BEVERAGE AlcoholicBeverage)
   (exists (?ALCOHOL)
      (and
         (instance ?ALCOHOL Alcohol)
         (part ?ALCOHOL ?BEVERAGE))))

(subclass Wine AlcoholicBeverage)
; doc moved to Society.kif
;(documentation Wine EnglishLanguage "An &%AlcoholicBeverage that is prepared by fermenting  the juice of grapes.")

(subclass DistilledAlcoholicBeverage AlcoholicBeverage)
(documentation DistilledAlcoholicBeverage EnglishLanguage "An &%AlcoholicBeverage that has 
had some part of its &%Water content removed by distillation.  This class 
covers drinks of unmixed, hard liquor.")

(=>
   (instance ?BEVERAGE DistilledAlcoholicBeverage)
   (exists (?REMOVE ?WATER)
      (and
         (instance ?REMOVE Removing)
         (patient ?REMOVE ?WATER)
         (instance ?WATER Water)
         (origin ?REMOVE ?BEVERAGE))))

(subclass Beer AlcoholicBeverage)
; doc moved to Society.kif
;(documentation Beer EnglishLanguage "An &%AlcoholicBeverage that is prepared by fermenting malt and hops.") 

;; KJN: Moving this to Food.kif to remove dependency to Economy.kif
;;(subclass Brandy DistilledAlcoholicBeverage)
;;(documentation Brandy EnglishLanguage "A &%DistilledAlcoholicBeverage that is prepared by 
;;distilling &%Wine.")
;;(=>
;;  (instance ?B Brandy)
;;  (exists (?D ?W)
;;    (and
;;      (instance ?D Distilling)
;;      (instance ?W Wine)
;;      (resource ?D ?W)
;;      (result ?D ?B))))

(subclass SpinalColumn Organ) 
(subclass SpinalColumn AnimalAnatomicalStructure)
(documentation SpinalColumn EnglishLanguage "A flexible column made out of bones called 
vertebrae. The main function of the &%SpinalColumn is to protect the 
spinal cord.") 

(<=> 
   (instance ?VERT Vertebrate) 
   (exists (?SPINE) 
      (and 
         (instance ?VERT Animal)
         (component ?SPINE ?VERT) 
         (instance ?SPINE SpinalColumn)))) 

(subclass SpinalCord Organ)
(documentation SpinalCord EnglishLanguage "A cord of nerves that carries impulses to 
and from the &%Brain.  It is contained within the &%SpinalColumn.")

(=>
  (instance ?C SpinalCord)
  (exists (?S)
    (and
      (instance ?S NervousSystem)
      (part ?C ?S))))

(=>
  (instance ?C SpinalCord)
  (exists (?S)
    (and
      (instance ?S SpinalColumn)
      (contains ?S ?C)))) 

(subclass Tail AnimalAnatomicalStructure)
(documentation Tail EnglishLanguage "A &%BodyPart which extends from the rear of the 
main body of some &%Vertebrates.")

(=>
  (instance ?T Tail)
  (exists (?V)
    (and
      (instance ?V Vertebrate)
      (part ?T ?V)
      (not (instance ?V Human)))))

(subclass Wing Limb)
(documentation Wing EnglishLanguage "Any &%Limb which is capable of being an 
instrument in &%Flying.")

(subclass Skin BodyCovering)
(subclass Skin AnimalAnatomicalStructure)
(documentation Skin EnglishLanguage "A BodyCovering that comprises part of the surface 
of &%Animals.")

(=>
   (instance ?SKIN Skin)
   (exists (?SURFACE ?ANIMAL)
      (and
         (surface ?SURFACE ?ANIMAL)
         (part ?SKIN ?ANIMAL)
         (instance ?ANIMAL Animal)
         (overlapsSpatially ?SKIN ?SURFACE)))) 

(subclass Retina Organ)
(subclass Retina AnimalAnatomicalStructure)
(documentation Retina EnglishLanguage "A membrane that covers the &%Eye and converts 
the image formed by the lens of the &%Eye into neurochemical impulses 
which can be processed by the &%Brain.")

(=>
  (instance ?R Retina)
  (exists (?E)
    (and
      (instance ?E Eye)
      (part ?R ?E))))

(subclass BronchialDuct BodyVessel)
(subclass BronchialDuct AnimalAnatomicalStructure)
(documentation BronchialDuct EnglishLanguage "Any &%BodyVessel which is located in a 
&%Lung and which carries oxygen from the trachea to the alveoli.")

(=>
   (instance ?DUCT BronchialDuct)
   (exists (?LUNG)
      (and
         (instance ?LUNG Lung)
         (located ?DUCT ?LUNG))))

(subclass BloodVessel BodyVessel)
(subclass BloodVessel AnimalAnatomicalStructure)
(documentation BloodVessel EnglishLanguage "Any &%BodyVessel which is used to circulate 
&%Blood from one part of the body to another.")

(=>
   (instance ?VESSEL BloodVessel)
   (exists (?BLOOD ?TRANSFER)
      (and
         (instance ?BLOOD Blood)
         (instance ?TRANSFER Transfer)
         (patient ?TRANSFER ?BLOOD)
         (instrument ?TRANSFER ?VESSEL))))

(subclass Alveolus BodyVessel)
(subclass Alveolus AnimalAnatomicalStructure)
(documentation Alveolus EnglishLanguage "Tiny sacs in the &%Lung which absorb &%Oxygen 
which is delivered to them by the &%BronchialDucts.")
(=>
   (instance ?A Alveolus)
   (exists (?L)
      (and
         (instance ?L Lung)
         (located ?A ?L))))

(subclass Artery BloodVessel)
(documentation Artery EnglishLanguage "Any &%BloodVessel which transfers &%Blood from 
the &%Heart to the extremities of the body.")

(=>
   (and
      (instance ?ARTERY Artery)
      (instance ?TRANSFER Transfer)
      (patient ?TRANSFER ?BLOOD)
      (instrument ?TRANSFER ?ARTERY)
      (instance ?BLOOD Blood))
   (exists (?HEART)
      (and
         (instance ?HEART Heart)
         (origin ?TRANSFER ?HEART))))

(subclass Vein BloodVessel)
(relatedInternalConcept Vein Artery)
(documentation Vein EnglishLanguage "Any &%BloodVessel which transfers &%Blood from 
the extremities of the body to the &%Heart.")

(=>
  (and
    (instance ?V Vein)
    (instance ?T Transfer)
    (patient ?T ?B)
    (instrument ?T ?V)
    (instance ?B Blood))
  (exists (?H)
    (and
      (instance ?H Heart)
      (destination ?T ?H))))

(subclass PulmonaryArtery Artery)
(documentation PulmonaryArtery EnglishLanguage "An &%Artery that carries &%Blood from 
the &%Heart to a &%Lung.")

(=>
  (and
    (instance ?ARTERY PulmonaryArtery)
    (instance ?TRANSFER Transfer)
    (patient ?TRANSFER ?BLOOD)
    (instrument ?TRANSFER ?ARTERY)
    (instance ?BLOOD Blood))
  (exists (?LUNG)
    (and
      (instance ?LUNG Lung)
      (destination ?TRANSFER ?LUNG))))

(subclass PulmonaryVein Vein)
(documentation PulmonaryVein EnglishLanguage "A &%Vein that carries &%Blood from the 
&%Lungs to the &%Heart.")

(=>
  (and
    (instance ?V PulmonaryVein)
    (instance ?T Transfer)
    (patient ?T ?B)
    (instrument ?T ?V)
    (instance ?B Blood))
  (exists (?L ?H ?P)
    (and
      (instance ?L Lung)
      (origin ?T ?L)
      (part ?V ?P)
      (part ?L ?P)
      (part ?H ?P)
      (instance ?H Heart)
      (destination ?T ?H))))

(subclass Capillary BloodVessel)
(documentation Capillary EnglishLanguage "A very small &%BloodVessel that connects arterioles 
(very small &%Arteries) with venules (very small &%Veins).")
(=>
  (instance ?C Capillary)
  (exists (?A ?V)
    (and
      (instance ?A Artery)
      (instance ?V Vein)
      (connects ?C ?A ?V))))

(subclass Lung Organ)
(subclass Lung AnimalAnatomicalStructure)
(documentation Lung EnglishLanguage "A respiratory organ of &%Vertebrates.  Its function is 
to furnish the blood with oxygen and to remove carbon dioxide.")

(=>
   (capability Breathing experiencer ?ANIMAL)
   (exists (?LUNG)
      (and
         (component ?LUNG ?ANIMAL)
         (instance ?LUNG Lung))))

(subclass Kidney Organ)
(subclass Kidney AnimalAnatomicalStructure)
(documentation Kidney EnglishLanguage "An &%Organ that separates urine from other 
&%BodySubstances and passes it to the bladder.")

(subclass Spleen Organ)
(subclass Spleen AnimalAnatomicalStructure)
(documentation Spleen EnglishLanguage "An &%Organ on the left side of the body that produces 
&%Cells that play a crucial role in immune response.")

(subclass Inhaling Breathing)
(documentation Inhaling EnglishLanguage "Any instance of &%Breathing where the breath is 
taken into the &%Lungs.")

(=>
  (instance ?I Inhaling)
  (exists (?L)
    (and
      (instance ?L Lung)
      (destination ?I ?L))))

(subclass Exhaling Breathing)
(documentation Exhaling EnglishLanguage "Any instance of &%Breathing where the breath is 
expelled from the &%Lungs.")
(=>
  (instance ?E Exhaling)
  (exists (?L)
    (and
      (instance ?L Lung)
      (origin ?E ?L))))

(subclass Nostril BodyVessel)
(subclass Nostril AnimalAnatomicalStructure)
(documentation Nostril EnglishLanguage "Either of two &%BodyVessels that run through the &%Nose 
and connect it to the &%Throat.")

(=>
  (instance ?NOSE Nose)
  (exists (?N1 ?N2)
    (and
      (instance ?N1 Nostril)
      (instance ?N2 Nostril)
      (not (equal ?N1 ?N2))
      (connected ?N1 ?NOSE)
      (connected ?N2 ?NOSE))))

(=>
  (instance ?NOS Nostril)
  (exists (?N ?T)
    (and
      (instance ?N Nose)
      (instance ?T Throat)
      (connects ?NOS ?N ?T))))

(subclass Heart Organ)
(subclass Heart AnimalAnatomicalStructure)
(documentation Heart EnglishLanguage "The &%Organ that pumps &%Blood throughout the body.")

(=>
   (instance ?HEART Heart)
   (exists (?TRANSFER ?BLOOD)
      (and
         (instance ?TRANSFER Transfer)
         (instance ?BLOOD Blood)
         (instrument ?TRANSFER ?HEART)
         (patient ?TRANSFER ?BLOOD)))) 

(subclass Liver Organ)
(subclass Liver AnimalAnatomicalStructure)
(documentation Liver EnglishLanguage "An &%Organ that secretes bile and serves metabolic 
functions.")

(subclass Mouth AnimalAnatomicalStructure)
(subclass Mouth BodyPart)
(documentation Mouth EnglishLanguage "Part of the &%Face, used for &%Ingesting Food 
and &%Vocalizing.")

(=>
   (instance ?MOUTH Mouth)
   (exists (?FACE)
      (and
         (instance ?FACE Face)
         (part ?MOUTH ?FACE))))

(subclass Tongue AnimalAnatomicalStructure)
(subclass Tongue BodyPart)
(documentation Tongue EnglishLanguage "Part of the &%Mouth, used for &%Tasting Food, 
&%Vocalizing, and the initial stage of &%Digesting.")

(=>
   (instance ?TONGUE Tongue)
   (exists (?MOUTH)
      (and
         (instance ?MOUTH Mouth)
         (part ?TONGUE ?MOUTH))))

(subclass NervousSystem Organ)
(subclass NervousSystem AnimalAnatomicalStructure)
(documentation NervousSystem EnglishLanguage "A system in &%Vertebrates that is made up of 
the &%Brain, the spinal cord, nerves, etc.")

(=>
  (and
    (instance ?S NervousSystem)
    (part ?S ?A)
    (instance ?A Animal))
  (instance ?A Vertebrate))

(subclass Hoof AnimalAnatomicalStructure)
(subclass Hoof BodyPart)
(documentation Hoof EnglishLanguage "The hard end of the &%Foot of a &%HoofedMammal.")

(=>
  (instance ?H Hoof)
  (exists (?F ?A)
    (and
      (instance ?F Foot)
      (instance ?A HoofedMammal)
      (part ?H ?F)
      (part ?F ?A))))

(subclass Tooth Bone)
(documentation Tooth EnglishLanguage "Part of the &%Mouth, used for biting and chewing.")

(=>
   (instance ?TOOTH Tooth)
   (exists (?MOUTH)
      (and
         (instance ?MOUTH Mouth)
         (part ?TOOTH ?MOUTH))))

(subclass Skull Bone)
(documentation Skull EnglishLanguage "The &%Bone that is found in the &%Heads of &%Vertebrates.")
(=>
  (instance ?S Skull)
  (exists (?V ?H)
    (and
      (instance ?V Vertebrate)
      (instance ?H Head)
      (part ?H ?V)
      (part ?S ?H))))

(subclass Horn Bone)
(documentation Horn EnglishLanguage "An outgrowth of &%Bone that is found on some 
&%HoofedMammals.")

(=>
  (instance ?H Horn)
  (exists (?M)
    (and
      (instance ?M HoofedMammal)
      (part ?H ?M))))

(subclass Ivory Bone)
(documentation Ivory EnglishLanguage "A very hard substance that makes up the tusks of 
elephants and walruses.")

(subclass AnimalShell AnimalAnatomicalStructure)
(subclass AnimalShell BodyPart)
(documentation AnimalShell EnglishLanguage "A hard shell of calcium that serves as a 
supporting structure for some &%Invertebrates.")
(=>
  (and
    (instance ?A Animal)
    (instance ?S AnimalShell)
    (part ?S ?A))
  (or
    (instance ?A Invertebrate)
    (instance ?A Reptile)))

(subclass Ossification OrganOrTissueProcess)
(documentation Ossification EnglishLanguage "Any &%BiologicalProcess that results in the 
formation of &%Bones.")

(=>
  (instance ?O Ossification)
  (exists (?B)
    (and
      (instance ?B Bone)
      (result ?O ?B))))

(subclass Chewing BodyMotion)
(documentation Chewing EnglishLanguage "Breaking up or mashing Food with one's teeth.")

(=>
   (and
      (instance ?CHEW Chewing)
      (resource ?CHEW ?FOOD))
   (instance ?FOOD (FoodForFn Organism)))

(=>
   (and
      (instance ?CHEW Chewing)
      (instrument ?CHEW ?TOOTH))
   (instance ?TOOTH Tooth))

(=>
   (instance ?CHEW Chewing)
   (exists (?EAT)
      (and
         (instance ?EAT Eating)
         (subProcess ?CHEW ?EAT))))

(subclass Feeding Giving)
(documentation Feeding EnglishLanguage "Giving Food to a &%Human or &%Animal.")
(=>
  (and
    (instance ?F Feeding)
    (patient ?F ?O))
  (instance ?O (FoodForFn Animal)))

(=>
  (and
    (instance ?F Feeding)
    (destination ?F ?A))
  (instance ?A Animal))

(subclass Lip AnimalAnatomicalStructure)
(subclass Lip BodyPart)
(documentation Lip EnglishLanguage "Folds of &%Tissue surrounding the mouths of some 
&%Vertebrates.")

(=>
   (instance ?LIP Lip)
   (exists (?MOUTH)
      (and
         (instance ?MOUTH Mouth)
         (part ?LIP ?MOUTH))))

(subclass Kissing Touching)
(documentation Kissing EnglishLanguage "The class of &%Touching processes where the lips 
of two persons are brought into contact with each other.")

(=>
  (instance ?KISS Kissing)
  (exists (?PERSON1 ?PERSON2 ?LIP1 ?LIP2)
    (and
      (agent ?KISS ?PERSON1)
      (agent ?KISS ?PERSON2)
      (instance ?PERSON1 Human)
      (instance ?PERSON2 Human)
      (not (equal ?PERSON1 ?PERSON2))
      (instance ?LIP1 Lip)
      (instance ?LIP2 Lip)
      (part ?LIP1 ?PERSON1)
      (part ?LIP2 ?PERSON2)
      (holdsDuring 
	(BeginFn (WhenFn ?KISS)) 
	(not 
	  (meetsSpatially ?LIP1 ?LIP2)))
      (holdsDuring 
	(EndFn (WhenFn ?KISS)) 
	(meetsSpatially ?LIP1 ?LIP2)))))

(subclass Licking Touching)
(documentation Licking EnglishLanguage "The class of &%Touching processes where the &%Tongue 
is brought into contact with something else.")

(=>
  (instance ?L Licking)
  (exists (?T)
    (and
      (instance ?T Tongue)
      (instrument ?L ?T))))

(subclass Embracing Touching)
(documentation Embracing EnglishLanguage "The class of &%Touching processes where one &%Human 
hugs another one.")
(=>
  (instance ?E Embracing)
  (exists (?P1 ?P2)
    (and
      (instance ?P1 Human)
      (instance ?P2 Human)
      (not (equal ?P1 ?P2))
      (agent ?E ?P1)
      (agent ?E ?P2))))

(subclass Skeleton AnimalAnatomicalStructure)
(subclass Skeleton BodyPart)
(documentation Skeleton EnglishLanguage "The system of &%Bones that make up the supporting structure 
of &%Vertebrates.")

(=>
   (and
      (instance ?ANIMAL Animal)
      (instance ?SKELETON Skeleton)
      (part ?SKELETON ?ANIMAL))
   (instance ?ANIMAL Vertebrate))

(=>
  (instance ?S Skeleton)
  (exists (?A)
    (and
      (instance ?A Animal)
      (interiorPart ?S ?A))))

(subclass Exoskeleton AnimalAnatomicalStructure)
(subclass Exoskeleton BodyPart)
(documentation Exoskeleton EnglishLanguage "The system of &%Bones that are on the &%Outside of an organism and 
make up the supporting structure of many &%Invertebrates.")

(=>
   (and
      (instance ?ANIMAL Animal)
      (instance ?SKELETON Exoskeleton)
      (part ?SKELETON ?ANIMAL))
   (instance ?ANIMAL Invertebrate))

(<=>
   (instance ?BONE Bone)
   (exists (?SKELETON)
      (and
        (or
           (instance ?SKELETON Skeleton)
           (instance ?SKELETON Exoskeleton))
         (part ?BONE ?SKELETON))))

(=>
  (instance ?X Exoskeleton)
  (exists (?A)
    (and
      (instance ?A Animal)
      (part ?X ?A)
      (not
        (exists (?PART)
          (and
            (properPart ?PART ?A)
            (orientation ?PART ?X Outside)))))))

(subclass BodyJoint BodyJunction)
(documentation BodyJoint EnglishLanguage "&%BodyJunctions where different parts of the same 
&%Skeleton come together.")
(=>
  (instance ?J BodyJoint)
  (exists (?S ?P1 ?P2)
    (and
      (instance ?S Skeleton)
      (component ?P1 ?S)
      (component ?P2 ?S)
      (component ?J ?S)
      (connects ?J ?P1 ?P2))))

(subclass Airway Transitway)
(documentation Airway EnglishLanguage "The class of Transitways used to transport Air 
to a location where it is absent or insufficient.")

(subclass Throat AnimalAnatomicalStructure)
(subclass Throat BodyVessel)
(subclass Throat Airway)
(documentation Throat EnglishLanguage "A &%BodyVessel which connects the &%Mouth to the 
lungs and stomach.")

(=>
   (instance ?THROAT Throat)
   (exists (?MOUTH)
      (and
         (instance ?MOUTH Mouth)
         (connected ?THROAT ?MOUTH))))

(subclass Hair AnimalAnatomicalStructure)
(documentation Hair EnglishLanguage "A filament that covers part of the body of many 
&%Mammals.")

(=>
   (instance ?HAIR Hair)
   (exists ( ?MAMMAL ?TIME)
      (and
         (instance ?MAMMAL Mammal)
         (holdsDuring ?TIME (part ?HAIR ?MAMMAL)))))

(subclass FacialHair Hair)
(documentation FacialHair EnglishLanguage "&%Hair that grows on the &%Face.  This 
class covers beards, mustaches, sideburns, midnight shadow, etc.")
(=>
  (instance ?H FacialHair)
  (exists (?F)
    (and
      (instance ?F Face)
      (part ?H ?F))))

(subclass HairRemoval Removing)
(documentation HairRemoval EnglishLanguage "&%Removing (some or all) the &%Hair from the 
body of an &%Animal.  Note that this covers shaving hair, cutting hair, 
pulling hair out by the roots, etc.")

(=>
   (and
      (instance ?REMOVE HairRemoval)
      (resource ?REMOVE ?HAIR))
   (instance ?HAIR Hair))
      
(subclass Peeling Removing)
(documentation Peeling EnglishLanguage "Removing the &%Skin (or part of the &%Skin) from 
an &%Organism.  Note that this class covers a large range of cases, including 
peeling an orange, pelting an &%Animal, etc.")

(=>
  (and
    (instance ?P Peeling)
    (patient ?P ?O))
  (exists (?S)
    (and
      (instance ?S Skin)
      (part ?O ?S))))

(subclass Brain Organ)
(subclass Brain AnimalAnatomicalStructure)
(documentation Brain EnglishLanguage "The seat of the central nervous system.")

(documentation intelligenceQuotient EnglishLanguage "(intelligenceQuotient ?PERSON ?NUMBER) 
means that ?NUMBER is the I.Q. of ?PERSON.  The I.Q. of a person is the ratio 
of their mental age (determined by a standardized test) divided by their 
chronological age, multiplied by 100.")
(instance intelligenceQuotient BinaryPredicate)
(instance intelligenceQuotient SingleValuedRelation)
(domain intelligenceQuotient 1 Human)
(domain intelligenceQuotient 2 RationalNumber)

(subclass Stomach Organ)
(subclass Stomach AnimalAnatomicalStructure)
(documentation Stomach EnglishLanguage "A muscular sac that is the principal organ of 
digestion.")

(=>
  (instance ?S Stomach)
  (capability Digesting instrument ?S))

(subclass Intestine BodyVessel)
(subclass Intestine AnimalAnatomicalStructure)
(documentation Intestine EnglishLanguage "A &%BodyVessel which connects the &%Stomach to 
the anus and which is used in digesting Food.")

(=>
  (instance ?I Intestine)
  (capability Digesting instrument ?I))

(=>
  (instance ?I Intestine)
  (exists (?S)
    (and
      (instance ?S Stomach)
      (connected ?I ?S))))

(subclass Hypothalamus BodyPart)
(subclass Hypothalamus AnimalAnatomicalStructure)
(documentation Hypothalamus EnglishLanguage "The part of the &%Brain lying below the 
thalamus that serves to regulate &%AutonomicProcesses.")

(=>
   (instance ?HYPO Hypothalamus)
   (exists (?BRAIN)
      (and
         (instance ?BRAIN Brain)
         (part ?HYPO ?BRAIN))))

(subclass Eye Organ)
(subclass Eye AnimalAnatomicalStructure)
(documentation Eye EnglishLanguage "The &%Organ of sight.")

(=>
   (instance ?EYE Eye)
   (capability Seeing instrument ?EYE))

(=>
   (instance ?EYE Eye)
   (exists (?HEAD)
      (and
         (instance ?HEAD Head)
         (part ?EYE ?HEAD))))

(subclass Ear Organ)
(subclass Ear AnimalAnatomicalStructure)
(documentation Ear EnglishLanguage "The &%Organ of hearing.")

(=>
   (instance ?EAR Ear)
   (capability Hearing instrument ?EAR))

(=>
   (instance ?EAR Ear)
   (exists (?HEAD)
      (and
         (instance ?HEAD Head)
         (part ?EAR ?HEAD))))

(subclass Eyelid Skin)
(documentation Eyelid EnglishLanguage "Folds of &%Skin that can be manipulated to 
cover or uncover &%Eyes.")
(=>
  (instance ?E Eyelid)
  (capability Covering instrument ?E))

(=>
  (instance ?E Eyelid)
  (hasPurpose ?E
    (exists (?EYE ?P ?C)
      (and
        (instance ?C Covering)
        (instance ?C BodyMotion)
        (instance ?P Human)
        (experiencer ?C ?P)
        (instrument ?C ?E)
        (patient ?C ?EYE)
        (instance ?EYE Eye)
        (part ?EYE ?P)
        (part ?E ?P)))))

(subclass EyeIris Organ)
(documentation EyeIris EnglishLanguage "The iris is a thin, circular structure in the &%Eye, responsible for controlling the diameter and size of the pupils.")

(=>
  (instance ?I EyeIris)
  (exists (?E)
      (and
          (instance ?E Eye)
          (part ?I ?E))))

(subclass Nose Organ)
(subclass Nose AnimalAnatomicalStructure)
(documentation Nose EnglishLanguage "The &%Organ of &%Smelling.")

(=>
   (instance ?NOSE Nose)
   (capability Smelling instrument ?NOSE))

(=>
   (instance ?NOSE Nose)
   (exists (?FACE)
      (and
         (instance ?FACE Face)
         (part ?NOSE ?FACE))))

(documentation secretesSubstance EnglishLanguage "(secretesSubstance ?OBJ ?STUFF) means 
that the subclass of &%OrganicObject (either &%Organism or &%BodyPart) 
?OBJ produces the subclass of &%Substance ?STUFF.")
(instance secretesSubstance BinaryPredicate)
(domainSubclass secretesSubstance 1 OrganicObject)
(domainSubclass secretesSubstance 2 NaturalSubstance)

(=>
  (secretesSubstance ?O ?S)
  (forall (?I1)
    (=>
      (instance ?I1 ?O)
      (exists (?P ?I2)
        (and
          (instance ?P BiologicalProcess)
          (eventLocated ?P ?I1)
          (result ?P ?I2)
          (instance ?I2 ?S))))))

(subclass ThyroidGland Gland)
(documentation ThyroidGland EnglishLanguage "A &%Gland in the neck that produces 
&%HormoneTSH, which regulates body weight, metabolic rate, etc.")

(subclass ThyroidHormone Hormone)
(documentation ThyroidHormone EnglishLanguage "A &%Hormone secreted by the &%ThyroidGland.")

(subclass PituitaryGland Gland)
(documentation PituitaryGland EnglishLanguage "The main &%Gland of the endocrine system.")

(subclass HormoneTSH Hormone)
(documentation HormoneTSH EnglishLanguage "A &%Hormone secreted by the &%ThyroidGland.")

(=>
   (instance ?HORMONE HormoneTSH)
   (exists (?PROC ?GLAND)
      (and
         (instance ?GLAND ThyroidGland)
         (instrument ?PROC ?GLAND)
         (result ?PROC ?HORMONE))))

(subclass Pancreas Gland)
(documentation Pancreas EnglishLanguage "A large &%Gland that secretes &%Insulin and other 
substances.")

(=>
  (instance ?P Pancreas)
  (secretesSubstance ?P Insulin))

(subclass Insulin Hormone)
(documentation Insulin EnglishLanguage "A &%Hormone secreted by the &%Pancreas that is used 
to regulate the metabolism of &%Carbohydrates.")

(subclass Arm Limb)
(documentation Arm EnglishLanguage "The upper &%Limbs of a &%Primate.")

(=>
   (instance ?ARM Arm)
   (exists (?PRIMATE)
      (and
         (instance ?PRIMATE Primate)
         (part ?ARM ?PRIMATE))))

(subclass Hand AnimalAnatomicalStructure)
(subclass Hand BodyPart)
(documentation Hand EnglishLanguage "The grasping, fingered part of an upper limb of a 
&%Primate.")

(=>
   (instance ?HAND Hand)
   (exists (?ARM)
      (and
         (instance ?ARM Arm)
         (part ?HAND ?ARM))))

(subclass DigitAppendage AnimalAnatomicalStructure)
(subclass DigitAppendage BodyPart)
(documentation DigitAppendage EnglishLanguage "Any of the extremities of &%Limbs that are 
found in the higer &%Vertebrates and the &%Amphibians.")
(=>
  (instance ?DIGIT DigitAppendage)
  (exists (?LIMB)
    (and
      (instance ?LIMB Limb)
      (part ?DIGIT ?LIMB))))

(subclass Toad Amphibian)
(documentation Toad EnglishLanguage "An &%Amphibian that lacks a &%Tail and lives at least 
partially outside of water.")

(=>
  (instance ?A Toad)
  (not 
    (exists (?T)
      (and
        (instance ?T Tail)
        (part ?T ?A)))))

(initialPart DigitAppendage Limb)

(subclass Finger DigitAppendage)
(documentation Finger EnglishLanguage "The five extremities of &%Hands.")

(=>
   (instance ?FINGER Finger)
   (exists (?HAND)
      (and
         (instance ?HAND Hand)
         (part ?FINGER ?HAND))))

(subclass Thumb Finger)
(documentation Thumb EnglishLanguage "The thick, short &%Finger of each &%Hand.")

(subclass NailDigit AnimalAnatomicalStructure)
(documentation NailDigit EnglishLanguage "Any of the horny structures which are found 
on the &%DigitAppendages of &%Primates and other &%Animals.  This includes
fingernails and toenails.")

(=>
   (instance ?N NailDigit)
   (exists (?D)
      (and
         (instance ?D DigitAppendage)
         (part ?N ?D))))

(subclass Fingerprint ShapeAttribute)
(subclass Fingerprint BiologicalAttribute)
(documentation Fingerprint EnglishLanguage "That pattern of arches, loops, and whorls that mark 
the imprint of a &%Finger.")
(=>
  (and
    (attribute ?O ?P)
    (instance ?P Fingerprint)
    (not (instance ?O Finger)))
  (exists (?PR ?F)
    (and
      (instrument ?PR ?F)
      (instance ?F Finger)
      (attribute ?F ?P)
      (patient ?PR ?O)))) 

(subclass Limb AnimalAnatomicalStructure)
(subclass Limb BodyPart)
(documentation Limb EnglishLanguage "Any of the limbs of a &%Vertebrate.
Animal Appendages with joints that are used for movement 
and grasping.")

(=>
   (instance ?LIMB Limb)
   (exists (?VERTEBRATE)
      (and
         (instance ?VERTEBRATE Vertebrate)
         (part ?LIMB ?VERTEBRATE))))

(subclass Snake Reptile)
(documentation Snake EnglishLanguage "A long and narrow &%Reptile which lacks &%Limbs.")

(=>
   (instance ?SNAKE Snake)
   (not (exists (?LIMB)
      (and
         (instance ?LIMB Limb)
         (part ?LIMB ?SNAKE)))))

(subclass Rattlesnake Snake)
(documentation Rattlesnake EnglishLanguage "A subclass of &%Snake which derives its name 
from the fact that it can manipulate its tail in such a way as to produce 
a sound like that of a rattle.")

(subclass ConstrictorSnake Snake)
(documentation ConstrictorSnake EnglishLanguage "A &%Snake that lacks venom and kills its 
prey by crushing it to death.")

(subclass AntInsect Insect)
(documentation AntInsect EnglishLanguage "A colony &%Insect of three types:  males, 
&%QueenInsect, and worker ants.")

(subclass Anaconda ConstrictorSnake)
(documentation Anaconda EnglishLanguage "A very large Boa that is found in South America.")

(subclass Bee Insect)
(documentation Bee EnglishLanguage "A hairy &%Insect, some species of which produce honey 
and/or sting.")

(subclass BumbleBee Bee)
(documentation BumbleBee EnglishLanguage "A large &%Bee which lacks a stinger.")

(subclass FlyInsect Insect)
(documentation FlyInsect EnglishLanguage "&%Insects with &%Wings and two &%Limbs.")

(subclass Grasshopper Insect)
(documentation Grasshopper EnglishLanguage "&%Insects with enormous legs that are used for 
jumping.")

(subclass Moth Insect)
(documentation Moth EnglishLanguage "Nocturnal &%Insect with a large body and antennae.")

(subclass QueenInsect Insect)
(disjoint QueenInsect WorkerInsect)
(documentation QueenInsect EnglishLanguage "A &%Female &%Insect which is the sole member of 
her colony with the capability to reproduce.") 

(=>
  (instance ?INSECT QueenInsect)
  (and
    (attribute ?INSECT Female)
    (capability Replication agent ?INSECT)))

(=>
  (instance ?INSECT QueenInsect)
  (exists (?GROUP)
    (and
      (instance ?GROUP Group)
      (member ?INSECT ?GROUP)
      (not 
        (exists (?MEMBER) 
          (and
            (member ?MEMBER ?GROUP)
            (capability Replication agent ?MEMBER)
            (not 
	      (equal ?MEMBER ?INSECT))))))))

(subclass WorkerInsect Insect)
(documentation WorkerInsect EnglishLanguage "Sterile members of an &%Insect colony which 
are responsible for locating food and caring for eggs, larvae, etc.")

;;a structure in animals that is similar to a human leg and used for locomotion. 
(subclass Leg Limb)
(documentation Leg EnglishLanguage "The lower &%Limbs of &%Animals, used for locomotion.")

(=>
  (instance ?LEG Leg)
  (exists (?ANIMAL)
    (and
      (instance ?ANIMAL Animal)
      (part ?LEG ?ANIMAL))))

(subclass Foot AnimalAnatomicalStructure)
(subclass Foot BodyPart)
(documentation Foot EnglishLanguage "The lower part of a &%Limb, the part which makes contact 
with the ground in locomotion of the &%Animal.")

(=>
  (instance ?FOOT Foot)
  (exists (?LIMB)
    (and
      (instance ?LIMB Leg)
      (part ?FOOT ?LIMB))))

(subclass Ankle BodyJoint)
(documentation Ankle EnglishLanguage "The joint in the &%Leg that connects the tibia and the 
fibula to the talus.")
(=>
  (instance ?A Ankle)
  (exists (?L)
    (and
      (instance ?L Leg)
      (part ?A ?L))))

(subclass Elbow BodyJoint)
(documentation Elbow EnglishLanguage "The joint in the &%Arm connecting the forearm and the 
upper arm.")
(=>
  (instance ?E Elbow)
  (exists (?A)
    (and
      (instance ?A Arm)
      (part ?E ?A))))

(subclass Wrist BodyJoint)
(documentation Wrist EnglishLanguage "The joint in the &%Arm connecting the radius and carpal 
bones.")

(=>
  (instance ?W Wrist)
  (exists (?A)
    (and
      (instance ?A Arm)
      (part ?W ?A))))

(subclass Toe AnimalAnatomicalStructure)
(subclass Toe BodyPart)
(subclass Toe DigitAppendage)
(documentation Toe EnglishLanguage "The five extremities of a &%Foot.")

(=>
   (instance ?TOE Toe)
   (exists (?FOOT)
      (and
         (instance ?FOOT Foot)
         (part ?TOE ?FOOT))))

(subclass Knee BodyJoint)
(documentation Knee EnglishLanguage "The joint in the &%Leg connecting the tibia and fibula 
with the femur.")

(=>
   (instance ?KNEE Knee)
   (exists (?LEG)
      (and
         (instance ?LEG Leg)
         (part ?KNEE ?LEG))))

(subclass Shoulder AnimalAnatomicalStructure)
(subclass Shoulder BodyPart)
(documentation Shoulder EnglishLanguage "The part of a &%Primate between the &%Arm and 
the neck.")

(=>
   (instance ?SHOULDER Shoulder)
   (exists (?PRIMATE)
      (and
         (instance ?PRIMATE Primate)
         (part ?SHOULDER ?PRIMATE))))

(subclass Knuckle BodyJoint)
(documentation Knuckle EnglishLanguage "Any joint in a &%Finger.")

(=>
   (instance ?KNUCKLE Knuckle)
   (exists (?FINGER)
      (and
         (instance ?FINGER Finger)
         (part ?KNUCKLE ?FINGER))))

(subclass HipJoint BodyJoint)
(documentation HipJoint EnglishLanguage "The hip joint is a synovial joint formed by the articulation of the rounded head of the femur and the cup-like acetabulum of the pelvis.")

(subclass Torso AnimalAnatomicalStructure)
(subclass Torso BodyPart)
(documentation Torso EnglishLanguage "The body of a &%Primate excluding its &%Limbs.")

(=>
   (and
      (instance ?TORSO Torso)
      (instance ?LIMB Limb))
   (not (overlapsSpatially ?TORSO ?LIMB)))

(subclass Waist BodyPart)
(documentation Waist EnglishLanguage "The waist is the part of the abdomen between the rib cage and hips. On proportionate people, the waist is the narrowest part of the torso.")

(subclass Breast AnimalAnatomicalStructure)
(subclass Breast Organ)
(documentation Breast EnglishLanguage "The paired &%Organs which are part of the chests 
of &%Primates.")
(=>
  (instance ?B Breast)
  (exists (?T)
    (and
      (instance ?T Torso)
      (part ?B 
        (FrontFn ?T)))))

(=>
  (instance ?B Breast)
  (exists (?P)
    (and
      (instance ?P Primate)
      (part ?B ?P))))

(subclass Bust BodyPart)  
(documentation Bust EnglishLanguage "Bust is the chest of a woman.")
      
(subclass Head AnimalAnatomicalStructure)
(subclass Head BodyPart)
(documentation Head EnglishLanguage "The part of the body containing the sense organs and 
the brain.")

(subclass Neck AnimalAnatomicalStructure)
(subclass Neck BodyPart)
(documentation Neck EnglishLanguage "The part of the body that connects the &%Head to the 
rest of the body.")

(=>
   (instance ?NECK Neck)
   (exists (?HEAD)
      (and
         (instance ?HEAD Head)
         (connected ?NECK ?HEAD))))

(subclass Face AnimalAnatomicalStructure)
(subclass Face BodyPart)
(documentation Face EnglishLanguage "The part of the &%Head from forehead to chin and 
from ear to ear.")

(=>
   (instance ?FACE Face)
   (exists (?HEAD)
      (and
         (instance ?HEAD Head)
         (part ?FACE ?HEAD))))

(=>
   (instance ?FACE Face)
   (exists (?VERTEBRATE)
      (and
         (instance ?VERTEBRATE Vertebrate)
         (part ?FACE ?VERTEBRATE))))

(subclass Chin AnimalAnatomicalStructure)
(subclass Chin BodyPart)
(documentation Chin EnglishLanguage "A part of the &%Face which protrudes slightly and which 
is lower than all other parts of the &%Face.")

(=>
   (instance ?CHIN Chin)
   (exists (?FACE)
      (and
         (instance ?FACE Face)
         (part ?CHIN ?FACE))))

(=>
   (instance ?CHIN Chin)
   (forall (?PART)
      (=>
         (and
            (part ?PART ?FACE)
            (not (part ?PART ?CHIN)))
         (orientation ?PART ?CHIN Below))))
   

(partition Expressing Gesture ExpressingInLanguage)
(disjointDecomposition Expressing ExpressingApproval ExpressingDisapproval)

(subclass ExpressingApproval Expressing)
(documentation ExpressingApproval EnglishLanguage "&%Expressing favor about a physical thing 
or a state of affairs.")

(=>
   (and
      (instance ?EXPRESS ExpressingApproval)
      (agent ?EXPRESS ?AGENT)
      (patient ?EXPRESS ?THING))
   (or
      (wants ?AGENT ?THING)
      (desires ?AGENT ?THING)))

(subclass ExpressingDisapproval Expressing)
(documentation ExpressingDisapproval EnglishLanguage "&%Expressing disfavor about a physical 
thing or a state of affairs.")

(=>
   (and
      (instance ?EXPRESS ExpressingDisapproval)
      (agent ?EXPRESS ?AGENT)
      (patient ?EXPRESS ?THING))
   (or
      (dislikes ?AGENT ?THING)
      (disapproves ?AGENT ?THING)))

(subclass Regretting ExpressingDisapproval)
(documentation Regretting EnglishLanguage "&%ExpressingDisapproval about a state of affairs 
that has already occurred.")

(=>
  (and
    (instance ?R Regretting)
    (patient ?R ?T)
    (instance ?T Sentence))
  (truth ?T True))

(subclass ExpressingFarewell Expressing)
(documentation ExpressingFarewell EnglishLanguage "Any instance of &%Expressing an acknowledgment 
of a person's departure.  Note that this class is not a subclass of 
&%LinguisticCommunication, because it covers gestures of departure, e.g. &%Waving 
and &%Nodding in certain circumstances.")

(subclass Congratulating ExpressingApproval)
(documentation Congratulating EnglishLanguage "Any &%ExpressingApproval to a person for 
something that the person did in the past and that is regarded as being 
to the benefit of the person congratulated.")
(=>
  (instance ?C Congratulating)
    (exists (?P ?A ?D)
      (and
        (destination ?C ?D)
        (agent ?P ?D)
        (agent ?C ?A)
        (wants ?A ?P)
        (refers ?C ?P))))

(subclass FacialExpression Gesture)
(documentation FacialExpression EnglishLanguage "Any &%Gesture whose &%instrument is the &%Face.")

(=>
   (and
      (instance ?EXPRESS FacialExpression)
      (agent ?EXPRESS ?AGENT))
   (exists (?FACE)
      (and
         (part ?FACE ?AGENT)
         (instance ?FACE Face)
         (instrument ?EXPRESS ?FACE))))

(subclass Smiling FacialExpression)
(documentation Smiling EnglishLanguage "Spreading the lips in such a way as to convey 
happiness.")

(=>
   (and
      (instance ?SMILE Smiling)
      (agent ?SMILE ?AGENT))
   (holdsDuring (WhenFn ?SMILE) (attribute ?AGENT Happiness)))

(subclass Frowning FacialExpression)
(documentation Frowning EnglishLanguage "Furrowing the forehead in such a way as to convey 
unhappiness.")

(=>
   (and
      (instance ?FROWN Frowning)
      (agent ?FROWN ?AGENT))
   (holdsDuring (WhenFn ?FROWN) (attribute ?AGENT Unhappiness)))

(subclass Laughing Vocalizing)
(subclass Laughing FacialExpression)
(documentation Laughing EnglishLanguage "Expressing happiness by &%Vocalizing in a 
certain way.")

(=>
   (instance ?LAUGH Laughing)
   (exists (?SMILE)
      (and
         (instance ?SMILE Smiling)
         (subProcess ?SMILE ?LAUGH))))

(subclass Weeping FacialExpression)
(documentation Weeping EnglishLanguage "&%Expressing unhappiness by shedding tears.")

(=>
   (and
      (instance ?WEEP Weeping)
      (agent ?WEEP ?AGENT))
   (holdsDuring (WhenFn ?WEEP) (attribute ?AGENT Unhappiness))) 

(subclass Nodding Gesture)
(documentation Nodding EnglishLanguage "Moving the &%Head up and down or side to side 
to indicate approval or disapproval.")

(=>
   (and
      (instance ?NOD Nodding)
      (patient ?NOD ?HEAD))
   (instance ?HEAD Head))

(subclass HandGesture Gesture)
(documentation HandGesture EnglishLanguage "Any &%Gesture which involves the &%Hands.")
(=>
  (instance ?HG HandGesture)
  (exists (?H)
    (and
      (instance ?H Hand)
      (patient ?HG ?H))))

(subclass Waving HandGesture)
(documentation Waving EnglishLanguage "Moving a &%Hand to indicate a greeting, farewell, 
recognition, goodwill, etc.")

(=>
   (and
      (instance ?WAVE Waving)
      (patient ?WAVE ?HAND))
   (instance ?HAND Hand))

(subclass Clapping HandGesture)
(subclass Clapping RadiatingSound)
(subclass Clapping Impacting)
(documentation Clapping EnglishLanguage "Bringing the &%Hands together repeatedly to make 
a loud noise.")

(subclass Inclining BodyMotion)
(subclass Inclining MotionDownward)
(documentation Inclining EnglishLanguage "Moving one's body downward from a vertical position.  
Note that this class covers cases of leaning forward, as well as those of 
reclining backwards.")

(subclass Bowing Gesture)
(subclass Bowing Inclining)
(subclass Bowing MotionDownward)
(documentation Bowing EnglishLanguage "Any downward motion of the body that indicates respect 
for or submission to another &%Agent.")

(subclass Sinking Falling)
(documentation Sinking EnglishLanguage "The class of &%Falling processes that occur 
in a &%WaterArea.")

(=>
  (instance ?S Sinking)
  (exists (?W)
    (and
      (instance ?W WaterArea)
      (eventLocated ?S ?W))))

(subclass Ducking IntentionalProcess)
(subclass Ducking BodyMotion)
(subclass Ducking MotionDownward)
(documentation Ducking EnglishLanguage "Purposely moving one's body downward in such a way as 
to avoid being hit by something.")

(=>
  (and
    (instance ?MOTION Ducking)
    (agent ?MOTION ?AGENT))
  (hasPurpose ?MOTION (not (exists (?IMPACT)
    (and
      (instance ?IMPACT Impacting)
      (patient ?IMPACT ?AGENT))))))

(subclass ExpressingInLanguage Expressing)
(subclass ExpressingInLanguage LinguisticCommunication)
(documentation ExpressingInLanguage EnglishLanguage "Any instance of &%Expressing that is also an 
instance of &%LinguisticCommunication, e.g. thanking someone, expressing condolence, 
expressing disapproval with an utterance rather than a &%Gesture, etc.")

(subclass TonalLanguage SpokenHumanLanguage)
(documentation TonalLanguage EnglishLanguage "Any &%SpokenHumanLanguage that uses pitch to 
differentiate otherwise identical words, e.g. Chinese.")

(subclass Thanking ExpressingInLanguage)
(subclass Thanking ExpressingApproval)
(documentation Thanking EnglishLanguage "Any &%ExpressingInLanguage of appreciation to a person 
for something that the person did in the past.")

(=>
   (and
      (instance ?THANK Thanking)
      (agent ?THANK ?AGENT)
      (patient ?THANK ?THING)
      (destination ?THANK ?PERSON))
   (and
      (instance ?PERSON Human)
      (or
         (holdsDuring (WhenFn ?THANK) (wants ?AGENT ?THING))
         (holdsDuring (WhenFn ?THANK) (desires ?AGENT ?THING)))))

(=>
  (and
    (instance ?T Thanking)
    (destination ?T ?P))
  (instance ?P Human))
   
(subclass Greeting Expressing)
(documentation Greeting EnglishLanguage "Any instance of &%Expressing an acknowledgment of a 
person's arrival.  Note that this class is not a subclass of &%ExpressingInLanguage, 
because it covers gestures of greeting, e.g. &%Waving and &%Nodding in certain 
circumstances.")

(subrelation half part)
(documentation half EnglishLanguage "(&%half ?HALF ?WHOLE) means that ?HALF is one half 
of ?WHOLE.")

(=>
   (half ?HALF ?WHOLE)
   (exists (?OTHER)
      (and
         (half ?OTHER ?WHOLE)
         (not (equal ?OTHER ?HALF))
         (equal ?WHOLE (MereologicalSumFn ?HALF ?OTHER)))))

(documentation third EnglishLanguage "(third ?THIRD ?WHOLE) means that ?THIRD is one 
third of ?WHOLE.")
(subrelation third part)

(=>
  (third ?T ?W)
  (exists (?O1 ?O2)
    (and
      (third ?O1 ?W)
      (third ?O2 ?W)
      (not (equal ?O1 ?T))
      (not (equal ?O2 ?T))
      (not (equal ?O1 ?O2))
      (equal ?W 
        (MereologicalSumFn ?T 
	  (MereologicalSumFn ?O1 ?O2))))))

(documentation quarter EnglishLanguage "(quarter ?QUART ?WHOLE) means that ?QUART is a 
quarter of ?WHOLE.")
(subrelation quarter part)

(<=>
  (quarter ?Q ?W)
  (exists (?H)
    (and
      (half ?H ?W)
      (half ?Q ?H))))

(subrelation most part)
(documentation most EnglishLanguage "(&%most ?MOST ?WHOLE) means that ?MOST is a &%part 
of ?WHOLE that is greater than &%half of ?WHOLE.")

(=>
   (most ?MOST ?WHOLE)
   (exists (?HALF ?NUMBER1 ?NUMBER2 ?UNIT)
      (and
         (half ?HALF ?WHOLE)
         (measure ?HALF (MeasureFn ?NUMBER1 ?UNIT))
         (measure ?MOST (MeasureFn ?NUMBER2 ?UNIT))
         (greaterThan ?NUMBER2 ?NUMBER1))))

(subclass Blueprint Icon)
(documentation Blueprint EnglishLanguage "An &%Icon which is a scale model of an &%Artifact, 
whether the &%Artifact actually exists or not.")

(=>
  (instance ?PLAN Blueprint)
  (hasPurpose ?PLAN
    (exists (?ARTIFACT)
      (and
        (instance ?ARTIFACT Artifact)
        (represents ?PLAN ?ARTIFACT)))))

(subclass Chart Icon)
(documentation Chart EnglishLanguage "An &%Icon which depicts one or more quantities.")

(=>
   (instance ?CHART Chart)
   (exists (?QUANTITY)
      (and
         (instance ?QUANTITY PhysicalQuantity)
         (refers ?CHART ?QUANTITY))))

(subclass Flag Icon)
(documentation Flag EnglishLanguage "An &%Icon made of &%Fabric that refers to a particular 
&%GeopoliticalArea.")

(=>
   (instance ?FLAG Flag)
   (exists (?FABRIC)
      (and
         (instance ?FABRIC Fabric)
         (part ?FABRIC ?FLAG))))

(subclass NationalFlag Flag)
(documentation NationalFlag EnglishLanguage "A &%Flag that is the official flag of a &%Nation, 
e.g. the stars and stripes is the &%NationalFlag of the United States.")

(=>
  (instance ?F NationalFlag)
  (exists (?N)
    (and
      (instance ?N Nation)
      (refers ?F ?N))))

(subclass GraphDiagram Icon)
(documentation GraphDiagram EnglishLanguage "An &%Icon which depicts one or more quantities.")
(=>
  (instance ?G GraphDiagram)
  (exists (?Q)
    (and
      (instance ?Q PhysicalQuantity)
      (refers ?G ?Q))))

(subclass ArrowIcon Icon)
(documentation ArrowIcon EnglishLanguage "An &%Icon which has the shape of an arrow and which 
is used to indicate direction or a relationship between two things.")

(subclass Map Icon)
(documentation Map EnglishLanguage "An &%Icon which represents one or more &%GeographicAreas 
(or even the entire &%Earth).")

(=>
  (instance ?M Map)
  (exists (?A)
    (and
      (instance ?A GeographicArea)
      (represents ?M ?A))))

(subclass Photograph Image)
(subclass Photograph Recording)      
(documentation Photograph EnglishLanguage "An &%Image that is the result of a process of 
&%Photographing.")

(subclass Photographing ContentDevelopment)
(documentation Photographing EnglishLanguage "&%ContentDevelopment where the &%instrument 
is a camera and the &%result is a &%Photograph.")

(=>
   (instance ?SHOOT Photographing)
   (exists (?PHOTO ?CAMERA)
      (and
         (instance ?PHOTO Photograph)
         (result ?SHOOT ?PHOTO)
         (instrument ?SHOOT ?CAMERA)
         (instance ?CAMERA Camera))))

(subclass Camera Device)
(documentation Camera EnglishLanguage "A &%Device which is capable of &%Photographing.")

(=>
   (instance ?CAMERA Camera)
   (capability Photographing instrument ?CAMERA))

;; KJN: Removing this as it is basically the same as ComposingMusic.   
;;(subclass Composing ContentDevelopment)
;;(documentation Composing EnglishLanguage "&%ContentDevelopment which results in a 
;;&%MusicalComposition.")

;;(=>
;;   (instance ?COMPOSE Composing)
;;   (exists (?MUSIC)
;;      (and
;;         (instance ?MUSIC MusicalComposition)
;;         (result ?COMPOSE ?MUSIC)))) 

(instance TonMass UnitOfMass)
(documentation TonMass EnglishLanguage "English mass unit that is equal to 2000 pounds.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER TonMass)
        (MeasureFn (MultiplicationFn ?NUMBER 2000) PoundMass)))

(instance MetricTon UnitOfMass)
(documentation MetricTon EnglishLanguage "&%MetricTon is a &%UnitOfMeasure that represents 
a weight of 2,205 &%PoundMass.")

(equal 
  (MeasureFn 1 MetricTon) 
  (MeasureFn 2205 PoundMass))

(<=>
  (measure ?O 
    (MeasureFn ?A MetricTon))
  (measure ?O 
    (MeasureFn 
      (MultiplicationFn ?A 2205) 
    PoundMass)))

(instance LongTon UnitOfMass)
(documentation LongTon EnglishLanguage "&%LongTon is the &%UnitOfMeasure, 
equal to 2,240 &%PoundMass, which is used to measure Dead Weight 
Tonnage capacity of &%Ships.")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER LongTon)
    (MeasureFn (MultiplicationFn ?NUMBER 2240) PoundMass)))

(instance CubicFoot UnitOfVolume)
(documentation CubicFoot EnglishLanguage "&%CubicFoot is a unit for measuring volume, 
equal to a volume of one foot length in each dimension of length, width, 
and height.")

(equal 
  (MeasureFn 1 CubicFoot) 
  (MultiplicationFn 
    (MeasureFn 1 FootLength) 
    (MultiplicationFn 
      (MeasureFn 1 FootLength) 
      (MeasureFn 1 FootLength))))

(=>
  (and
    (equal ?N4 (MultiplicationFn ?N1 (MultiplicationFn ?N2 ?N3)))
    (equal 
      ?QUANT
      (MultiplicationFn 
        (MeasureFn ?N1 FootLength) 
        (MultiplicationFn 
          (MeasureFn ?N2 FootLength) 
          (MeasureFn ?N3 FootLength)))))
  (equal ?QUANT (MeasureFn ?N4 CubicFoot)))

(names "Registry Ton" RegistryTon)
(names "Gross Ton" RegistryTon)
(instance RegistryTon UnitOfVolume)
(documentation RegistryTon EnglishLanguage "&%RegistryTon is a unit of
measure used to represent the Gross Registered Tonnage (GRT) capacity
of &%Ships.  GRT is based on a volume measure, with one &%RegistryTon
equal to a volume of 100 cubic feet.")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER RegistryTon)
    (MeasureFn (MultiplicationFn ?NUMBER 100) CubicFoot)))    
    
(instance Page UnitOfInformation)
(documentation Page EnglishLanguage "A single page of &%Text.")

(instance LiquorShot UnitOfVolume)
(documentation LiquorShot EnglishLanguage "A &%UnitOfMeasure used in preparing &%AlcoholicBeverages.")

(instance MillenniumDuration UnitOfDuration)
(documentation MillenniumDuration EnglishLanguage "The &%UnitOfDuration of 1000 years.")

(=>
  (equal ?N (MultiplicationFn 1 ?N))
  (equal
    (MeasureFn ?N MillenniumDuration)
    (MeasureFn (MultiplicationFn ?N 1000) YearDuration)))

(instance Acre UnitOfArea)
(documentation Acre EnglishLanguage "A &%UnitOfMeasure equal to 4840 square yards.")

(instance SquareMile UnitOfArea)
(documentation SquareMile EnglishLanguage "&%SquareMile represents a &%UnitOfMeasure 
equal to one square &%Mile.")

(equal 
  (MeasureFn 1 SquareMile) 
  (PerFn 
    (MeasureFn 1 Mile)
    (MeasureFn 1 Mile)))

(instance SquareYard UnitOfArea)
(documentation SquareYard EnglishLanguage "&%SquareYard represents a &%UnitOfMeasure 
equal to one square &%YardLength.")

(equal 
  (MeasureFn 1 SquareYard) 
  (PerFn 
    (MeasureFn 1 YardLength)
    (MeasureFn 1 YardLength)))

;; KJN: Removing this and replacing it with new definitions    
;;(subclass MusicalComposition Text)
;;(documentation MusicalComposition EnglishLanguage "A &%Text that expresses the notes, 
;;words, etc. of a song or other sort of &%MakingMusic.")

;;(=>
;;   (and
;;      (instance ?COMP MusicalComposition)
;;      (containsInformation ?COMP ?INFO)
;;      (realization ?MUSIC ?INFO))
;;   (instance ?MUSIC MakingMusic))

;;(subclass Song MusicalComposition)
;;(documentation Song EnglishLanguage "Any &%MusicalComposition which contains &%Lyrics.")

;;(=>
;;  (instance ?S Song)
;;  (exists (?L)
;;    (and
;;      (instance ?L Lyrics)
;;      (part ?L ?S))))


(instance creator BinaryPredicate)
(domain creator 1 Agent)
(domain creator 2 Entity)
(documentation creator EnglishLanguage "(creator ?AGENT ?ENTITY) means that 
some &%Agent ?AGENT is the creator of some &%Entity ?ENTITY")
(termFormat EnglishLanguage creator "creator")
(=>      
  (creator ?AGENT ?ENTITY)
  (exists (?CREATION)
    (and
      (instance ?CREATION Creation)
      (agent ?CREATION ?AGENT)
      (result ?CREATION ?ENTITY))))

(subclass Music Proposition)
(documentation Music EnglishLanguage "&%Music refers to the conception of music - it's
notes, tempo, arrangement, lyrics, etc. as thought by its composers and lyricist.  Some
types of &%Music are conceptualized with only the background instrumentation thought of,
while some types of &%Music are conceptualized with the thought of having both lyrics
and musical composition combined.")
(termFormat EnglishLanguage Music "music")

(=>
  (and
    (instance ?MC Music)
    (realization ?MUSIC ?MC))
  (instance ?MUSIC MakingMusic))

(subclass MusicalComposition Music)
(documentation MusicalComposition EnglishLanguage "&%MusicalComposition refers to the
the conception of a musical arrangement not including any &%LyricalContent.")
(termFormat EnglishLanguage MusicalComposition "musical composition")
(comment MusicalComposition "Currently, MusicalComposition is treated as text, and there 
is no propositional content related to it.  This is dangerous, as there could be millions 
of instances of (for instance) sheet music containing Beethoven's Fifth Symphony, and 
only having MusicalComposition equal to an object would imply that all of this different 
instances are different from each other.  You could also have many different arrangements 
of the same musical composition.  As such, I propose making MusicalComposition a Proposition, 
which refers more to the conception of the music, and SheetMusic the content bearing 
object that contains information about a particular MusicalComposition.  (09-13-2011)" 
"KJN")

(=> 
  (and
    (instance ?MC MusicalComposition)
    (realization ?MC ?MUSIC))
  (not
    (exists (?LC ?V)
      (and
        (instance ?V Singing)
        (patient ?V ?LC)
        (instance ?LC LyricalContent)
        (subProcess ?V ?MUSIC)))))
        
(subclass Song Music)
(documentation Song EnglishLanguage "&%Song refers to the conception of music that 
includes both &%MusicalComposition and &%LyricalComposition.  While a &%Song can be
interpreted without its &%LyricalContent, or its &%LyricalContent is used elsewhere, 
the idea of &%Song as it was originally conceptualized is that it contains both.")
(termFormat EnglishLanguage Song "song")

(=>
  (and
    (instance ?S Song)
    (realization ?S ?MUSIC))
  (exists (?MM ?MV ?LC ?MC)
    (and
      (instance ?MM MakingMusic)
      (instance ?MV Singing)
      (instance ?LC LyricalContent)
      (instance ?MC MusicalComposition)
      (patient ?MM ?MC)
      (patient ?MV ?LC)
      (subProcess ?MM ?MUSIC)
      (subProcess ?MV ?MUSIC))))
  
(subclass LyricalContent Proposition)
(documentation LyricalContent EnglishLanguage "&%LyricalContent is the conceptual 
idea of &%Lyrics.")
(comment LyricalContent "It is important to distinguish the propositional 
content of &%Lyrics from the text that displays it.  Some songs are translated from one 
language to another, but use essentially the same Lyrical content. (09-15-2011)" "KJN")
(termFormat EnglishLanguage LyricalContent "lyrical content")

(=>
  (instance ?X LyricalContent)
  (hasPurpose ?X
    (exists (?S)
      (and
        (instance ?S Singing)
        (patient ?S ?X))))) 

(=>
  (instance ?L LyricalContent)
  (exists (?W ?I)
    (and
      (instance ?W Word)
      (containsInformation ?W ?I)
      (subProposition ?I ?L))))
        
(instance LegislativeBill DeonticAttribute)
(documentation LegislativeBill EnglishLanguage "The &%Attribute of being a proposed law, 
i.e. being under consideration by a legislative body of &%Government.")

(=>
   (holdsDuring ?TIME1 (modalAttribute ?TEXT Law))
   (exists (?TIME2)
      (and
         (holdsDuring ?TIME2 (attribute ?TEXT LegislativeBill))
         (earlier ?TIME2 ?TIME1))))

(subclass PassingABill PoliticalProcess)
(subclass PassingABill Declaring)
(documentation PassingABill EnglishLanguage "The &%Process of converting a &%LegislativeBill 
into &%Law by a duly authorized legislative body of &%Government.")

;; KJN: Moving this to Government.kif as definition for LegislativeOrganization is there
;;(=>
;;   (instance ?ORG LegislativeOrganization)
;;   (capability PassingABill agent ?ORG))

(=>
   (and
      (instance ?PASS PassingABill)
      (patient ?PASS ?TEXT))
   (and
      (holdsDuring (BeginFn (WhenFn ?PASS)) (attribute ?TEXT LegislativeBill))
      (holdsDuring (EndFn (WhenFn ?PASS)) (attribute ?TEXT Law))))

(subAttribute InternationalLaw Law)
(documentation InternationalLaw EnglishLanguage "An &%Attribute that applies to &%Propositions 
that express &%Laws concerning the relations between &%Nations.")

(subAttribute Illegal Prohibition)
(contraryAttribute Illegal Legal)
(documentation Illegal EnglishLanguage "A proposition is &%Illegal just in case it is inconsistent 
with any proposition that is a &%Law.")

(subAttribute Legal Permission)
(documentation Legal EnglishLanguage "A proposition is &%Legal just in case it is not inconsistent 
with any proposition that is a &%Law.")

(<=>
  (modalAttribute ?F1 Legal)
  (not 
    (exists (?F2)
      (and
        (modalAttribute ?F2 Law)
        (not 
	  (consistent ?F1 ?F2))))))

(subclass CriminalAction IntentionalProcess)
(documentation CriminalAction EnglishLanguage "Any &%IntentionalProcess that violates a &%Law.")

(=>
   (instance ?ACTION CriminalAction)
   (exists (?LAW ?CONTENT ?CRIME)
      (and
         (modalAttribute ?LAW Law)
         (containsInformation ?LAW ?CONTENT)
         (realization ?ACTION ?CRIME)
         (not (consistent ?CONTENT ?CRIME)))))

(subclass PoliticalCrime CriminalAction)
(subclass PoliticalCrime PoliticalProcess)
(documentation PoliticalCrime EnglishLanguage "A &%CriminalAction that is committed by or 
against &%Governments.")

(subclass PoliticalRevolution PoliticalProcess)
(subclass PoliticalRevolution ViolentContest)
(documentation PoliticalRevolution EnglishLanguage "The violent overthrow of one &%Government 
and its replacement by another.  This covers grass-roots revolutions, as well 
as coups d'etat.")

(=>
  (and
    (instance ?R PoliticalRevolution)
    (patient ?R ?A))
  (instance ?A GeopoliticalArea))

(=>
  (and
    (instance ?R PoliticalRevolution)
    (patient ?R ?A))
  (exists (?GOV1 ?GOV2)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?R)) 
	(equal ?GOV1 (GovernmentFn ?A)))
      (holdsDuring 
        (EndFn (WhenFn ?R)) 
	(equal ?GOV2 (GovernmentFn ?A)))
      (not (equal ?GOV1 ?GOV2)))))

(subclass LawEnforcement PoliticalProcess)
(subclass LawEnforcement RegulatoryProcess)
(documentation LawEnforcement EnglishLanguage "Any &%RegulatoryProcess where the agent is either 
a &%PoliceOrganization or a member of a &%PoliceOrganization.  This covers 
everything from issuing a traffic ticket to arresting someone on suspicion of having 
committed a &%Murder.")

(=>
  (and
    (instance ?L LawEnforcement)
    (agent ?L ?AGENT))
  (or
    (instance ?P PoliceOrganization)
    (exists (?O)
      (and
        (instance ?O PoliceOrganization)
        (member ?P ?O)))))

(subclass Imprisoning Confining)
(documentation Imprisoning EnglishLanguage "The class of &%Confining processes where the detainee 
is put in &%Prison.")

(=>
  (instance ?I Imprisoning)
  (exists (?P)
    (and
      (instance ?P Prison)
      (eventLocated ?I ?P))))

(subclass Espionage PoliticalProcess)
(subclass Espionage Investigating)
(documentation Espionage EnglishLanguage "Any Investigating by one &%Government of another 
&%Government where the second Government does not know that it is being 
spied upon.")
(=>
  (instance ?S Espionage)
  (exists (?GOV1 ?GOV2)
    (and
      (instance ?GOV1 Government)
      (instance ?GOV2 Government)
      (agent ?S ?GOV1)
      (patient ?S ?GOV2)
      (not 
        (equal ?GOV1 ?GOV2))))) 

(subclass Polling Investigating)
(documentation Polling EnglishLanguage "Investigating what people believe (and in what proportions) 
by asking a set of structured questions to a random sample of people.")

(subclass MilitaryInfiltration MilitaryProcess)
(subclass MilitaryInfiltration Translocation)
(documentation MilitaryInfiltration EnglishLanguage "Any &%Process by a &%MilitaryOrganization 
which involves moving through enemy positions without detection by the enemy.")

(subclass Agreement Proposition)
(documentation Agreement EnglishLanguage "&%Agreement is the class of &%Propositions 
that express the contents of agreements entered into by &%CognitiveAgents. &%Agreement 
includes treaties, contracts, purchase orders, pledges, marriage vows, etc.  An 
&%Agreement may be written down in a document or other &%ContentBearingObject, it
can be verbal &%Communication, it can even be an implied agreement.")
(termFormat EnglishLanguage Agreement "agreement")

(=>
  (instance ?COMPACT Agreement)
  (exists (?COMM)
    (and
      (instance ?COMM Committing)
      (represents ?COMM ?COMPACT))))

(=>
  (instance ?AGREEMENT Agreement)
  (exists (?AGENT1 ?AGENT2)
    (and
      (partyToAgreement ?AGENT1 ?AGREEMENT)
      (partyToAgreement ?AGENT2 ?AGREEMENT)
      (not (equal ?AGENT1 ?AGENT2)))))
      

;; Initially modeled Contract (which is an enforcaeble agreement as a subclass of
;; Agreement, but later realized that an agreement is only a "contract" or is only
;; enforceable for a certain period of time, meaning that the same provision or 
;; clause can exist with the same people agreeing to it, but it's not a valid 
;; contract because it is not within a specified date.  So instead of subclassing
;; it from Agreement, a Normative attribute, ActiveAgreement, is now created describing
;; attaching a validity / contractual time interval to the agreement      

;; ---------------------------------------------------------------------------------
;; Agreement Relationships
;; ---------------------------------------------------------------------------------

(instance partyToAgreement BinaryPredicate)
(documentation partyToAgreement EnglishLanguage "(&%partyToAgreement ?AGENT ?PROP) 
means that the &%Agent ?AGENT has committed to the agreement ?PROP.")
(termFormat EnglishLanguage partyToAgreement "party to agreement")

(domain partyToAgreement 1 CognitiveAgent)
(domain partyToAgreement 2 Agreement)

(=>
  (partyToAgreement ?AGENT ?CONTENT)
  (exists (?C)
    (and
      (instance ?C Committing)
      (agent ?C ?AGENT)
      (patient ?C ?CONTENT))))

(instance agreementPeriod BinaryPredicate)
(domain agreementPeriod 1 Agreement)
(domain agreementPeriod 2 TimeInterval)
(documentation agreementPeriod EnglishLanguage "(&%agreementPeriod ?AGREEMENT ?DURATION) 
holds if ?DURATION specifies a &%TimeDuration, which is the length of time that the
?AGREEMENT is &%ActiveAgreement.")

(=>
  (and
    (agreementPeriod ?AGREEMENT ?DURATION)
    (agreementEffectiveDate ?AGREEMENT ?STARTDATE))
  (holdsDuring (TimePeriodFn ?STARTDATE ?DURATION)
    (property ?AGREEMENT ActiveAgreement)))
        
(instance agreementEffectiveDate BinaryPredicate)
(domain agreementEffectiveDate 1 Agreement)
(domain agreementEffectiveDate 2 TimePoint)
(documentation agreementEffectiveDate EnglishLanguage "(&%agreementEffectiveDate ?AGREEMENT 
?TIME) means that ?AGREEMENT goes into effect at &%TimePoint ?TIME, and remains an 
&%ActiveAgreement for &%TimeDuration ?DURATION.")
      
(instance TimePeriodFn BinaryFunction)
(documentation TimePeriodFn EnglishLanguage "(&%TimePeriodFn ?TIMEPOINT ?DURATION) 
accepts &%TimePoint ?TIMEPOINT and &%TimeDuration ?DURATION and returns a &%TimeInterval
that starts from ?TIMEPOINT and ends at the end of ?DURATION")
(termFormat EnglishLanguage TimePeriodFn "time period function")

(domain TimePeriodFn 1 TimePoint)
(domain TimePeriodFn 2 TimeDuration)
(range TimePeriodFn TimeInterval)

(=>
  (and
    (instance ?T1 TimePoint)
    (instance ?T2 TimePoint)
    (equal ?INTERVAL (TimeIntervalFn ?T1 ?T2))
    (duration ?INTERVAL ?PERIOD))
  (equal ?INTERVAL (TimePeriodFn ?T1 ?PERIOD)))

(instance agreementExpirationDate BinaryPredicate)
(domain agreementExpirationDate 1 Agreement)
(domain agreementExpirationDate 2 TimePoint)
(documentation agreementExpirationDate EnglishLanguage "(&%agreementExpirationDate 
?AGREEMENT ?ENDDATE) means that ?ENDDATE is the date on which ?AGREEMENT is no longer 
&%ActiveAgreement.")

(=>
  (agreementExpirationDate ?AGREEMENT ?ENDDATE)
  (holdsDuring (FutureFn ?ENDDATE)
    (not (property ?AGREEMENT ActiveAgreement))))
   
(instance agreementClause QuaternaryPredicate)
(documentation agreementClause EnglishLanguage "(&%agreementClause ?PROP ?ATTR
?AGREEMENT ?AGENT) means that &%Proposition ?PROP, which has &%modalAttribute ?ATTR, 
is part of &%Agreement ?AGREEMENT and, with &%CognitiveAgent ?AGENT being the one
responsible to make the statement true")
(termFormat EnglishLanguage agreementClause "agreement clause")

(domain agreementClause 1 Proposition)
(domain agreementClause 2 DeonticAttribute)
(domain agreementClause 3 Agreement)
(domain agreementClause 4 CognitiveAgent)

(=>
  (agreementClause ?PROP ?ATTR ?AGREEMENT ?AGENT)
  (and
    (exists (?CLAUSE)        
      (containsInformation ?CLAUSE ?PROP))
    (partyToAgreement ?AGENT ?AGREEMENT)))

(=>
  (and
    (agreementClause ?PROP ?ATTR ?AGREEMENT ?AGENT)
    (or
      (equal ?ATTR Obligation)
      (equal ?ATTR Promise)))
  (modalAttribute
    (exists (?PROC)
      (and
        (realization ?PROC ?PROP)
        (agent ?PROC ?AGENT))) Likely))
        
(=>
  (agreementClause ?PROP Prohibition ?AGREEMENT ?AGENT)
  (not
    (holdsRight
      (exists (?PROC)
        (and
          (realization ?PROC ?PROP)
          (agent ?PROC ?AGENT))) ?AGENT)))
        
(=>
  (agreementClause ?PROP Permission ?AGREEMENT ?AGENT)
  (holdsRight
    (exists (?PROC)
      (and
        (realization ?PROC ?PROP)
        (agent ?PROC ?AGENT))) ?AGENT))
      
(instance ActiveAgreement RelationalAttribute)
(documentation ActiveAgreement EnglishLanguage "&%ActiveAgreement describes an &%Agreement
that is still binding or is still in effect")
(termFormat EnglishLanguage ActiveAgreement "active agreement")

(=>
  (property ?AGREEMENT ActiveAgreement)
  (instance ?AGREEMENT Agreement))

(=>
  (property ?AGREEMENT ActiveAgreement)
  (modalAttribute
    (exists (?PROC)
      (realization ?PROC ?AGREEMENT)) Obligation))
      
 
;; (instance agreementActive BinaryPredicate)
;; (domain agreementActive 1 Agreement)
;; (domain agreementActive 2 TimeInterval)
;; (documentation agreementActive EnglishLanguage "(&%agreementActive ?AGREEMENT ?TIME) 
;; means that ?AGREEMENT is an &%Obligation within &%TimeInterval ?TIME")v
;;
;; (<=>
;;  (and
;;    (agreementPeriod ?Agreement ?Period)
;;    (overlapsTemporally ?Date ?Period))
;;  (agreementActive ?Agreement ?Date))
;; transform this into ActiveAgreement:

(=>
   (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.")

(subAttribute Contract ActiveAgreement)
(subAttribute Contract Promise)
(documentation Contract EnglishLanguage "&%Contract is a type of &%Agreement that is 
legally enforceable, meaning a &%CognitiveAgent can pursue other parties of the 
agreement in a court of law if provisions of the contract are not followed or kept.  
It follows that all subpropositions of the &%Contract is &%Legal.")
(termFormat EnglishLanguage Contract "contract")
(contraryAttribute NakedPromise Contract)

(=>
  (property ?AGREEMENT Contract)
  (forall (?X)
    (=>
      (subProposition ?X ?AGREEMENT)
      (modalAttribute ?X Legal))))
      
(=>
  (and
    (property ?AGREEMENT Contract)
    (partyToAgreement ?AGENT1 ?AGREEMENT)
    (partyToAgreement ?AGENT2 ?AGREEMENT)
    (instance ?PROC IntentionalProcess)
    (agent ?PROC ?AGENT1)
    (realization ?PROC ?PROP)
    (not (consistent ?PROP ?AGREEMENT)))
  (modalAttribute
    (exists (?LEGAL)
      (and
        (instance ?LEGAL LegalAction)
        (plaintiff ?LEGAL ?AGENT2)
        (defendant ?LEGAL ?AGENT1))) Possibility))

(subAttribute MarriageContract Contract)
(documentation MarriageContract EnglishLanguage "An &%Contract between a married couple 
about how assets owned by the couple will be distributed in the event 
that the couple is divorced.")

(=>
  (property ?C MarriageContract)
  (exists (?P1 ?P2)
    (and
      (partyToAgreement ?C ?P1)
      (partyToAgreement ?C ?P2)
      (spouse ?P1 ?P2))))    

(subAttribute PurchaseContract Contract)
(documentation PurchaseContract EnglishLanguage "A &%Contract between two &%Agents in 
which one &%Agent agrees to render the other some good or service in exchange for 
currency.")

(=>
  (property ?C PurchaseContract)
  (exists (?S)
    (and
      (instance ?S Selling)
      (agent ?S ?SELLER)
      (destination ?S ?BUYER)
      (realization ?S ?C)
      (partyToAgreement ?C ?SELLER)
      (partyToAgreement ?C ?BUYER))))

(subAttribute ServiceContract Contract)
(documentation ServiceContract EnglishLanguage "A &%Contract where an &%Agent agrees to 
perform a service for another &%Agent (usually for a price).")

(=>
  (property ?C ServiceContract)
  (exists (?SP)
    (and
      (instance ?SP ServiceProcess)
      (realization ?SP ?C)
      (serviceProvider ?SP ?SERVICE)
      (serviceRecipient ?SP ?CUST)
      (partyToAgreement ?C ?SERVICE)
      (partyToAgreement ?C ?CUST))))      
            
(subAttribute Warranty ServiceContract)
(documentation Warranty EnglishLanguage "A &%Contract that states the cirumstances 
under which defects in the product will be corrected for no charge.  
A &%Warranty is usually limited to a length of time that is specified 
in the &%Warranty itself.  A &%Warranty also includes information about 
what is not covered and actions that invalidate the &%Warranty.")
            
(subAttribute Treaty Contract)
(documentation Treaty EnglishLanguage "Any &%Contract which holds between two or more 
&%Nations.")

(=>
  (property ?T Treaty)
  (exists (?N1 ?N2)
    (and
      (partyToAgreement ?T ?N1)
      (partyToAgreement ?T ?N2)
      (instance ?N1 Nation)
      (instance ?N2 Nation)
      (not 
        (equal ?N1 ?N2)))))

(disjointDecomposition Sentence Statement Supposition Question Request Order)

(subclass Statement Sentence)
(documentation Statement EnglishLanguage "A &%Sentence that is stated to be true.")

(=>
   (and
      (instance ?STATE Stating)
      (result ?STATE ?SENTENCE)
      (instance ?SENTENCE Sentence))
   (instance ?SENTENCE Statement))

(subclass Fact Statement)
(documentation Fact EnglishLanguage "The class of &%Statements that are &%True.")

(=>
   (instance ?FACT Fact)
   (truth ?FACT True))

(subclass Question Sentence)
(documentation Question EnglishLanguage "An interrogative &%Sentence, a &%Sentence that 
poses a question.")

(=>
   (and
      (instance ?QUESTION Questioning)
      (result ?QUESTION ?SENTENCE)
      (instance ?SENTENCE Sentence))
   (instance ?SENTENCE Question))

(subclass Supposition Sentence)
(documentation Supposition EnglishLanguage "A &%Sentence that is assumed to be true, possibly 
just for the sake of argument.")

(=>
   (and
      (instance ?SUPPOSE Supposing)
      (result ?SUPPOSE ?SENTENCE)
      (instance ?SENTENCE Sentence))
   (instance ?SENTENCE Supposition))

(subclass Request Sentence)
(documentation Request EnglishLanguage "A &%Sentence that expresses a request for something or 
that something be done.")

(=>
   (and
      (instance ?REQUEST Requesting)
      (result ?REQUEST ?SENTENCE)
      (instance ?SENTENCE Sentence))
   (instance ?SENTENCE Request))

(subclass Order Sentence)
(documentation Order EnglishLanguage "A &%Sentence that expresses an order for something or 
that something be done.")

(=>
   (and
      (instance ?ORDER Ordering)
      (result ?ORDER ?SENTENCE)
      (instance ?SENTENCE Sentence))
   (instance ?SENTENCE Order))

(subclass AudioRecording Recording)
(comment AudioRecording "In ver 1.111 of Mid-level-ontology.kif , it says that 
(&%subclass &%AudioRecording &%Text).  This does not seem right.  Deleting that statement.  
Creating a parent class called &%Recording which means something that captures a 
&%Process that happened in real life.  &%AudioRecording and &%VideoRecording will 
inherit from there.  A &%Photograph is also a still recording of what happened in 
real life - as opposed to Graphic Art which is more of an &%ArtWork than a &%Recording, 
so it will also inherit from &%Recording. (09-14-2011)" "KJN")
(documentation AudioRecording EnglishLanguage "A representation of sound on some medium such
as wax cylinder, vinyl record, magnetic tape, CD or flash memory, that is 
intended to be used in some machine to reproduce that sound.")

(=>
  (instance ?X AudioRecording)
  (exists (?EV)
    (and
      (instance ?EV RadiatingSound)
      (represents ?X ?EV)
      (capability RadiatingSound patient ?X))))

(=>
  (instance ?RECORD AudioRecording)
  (exists (?INFO ?SOUND)
    (and
      (containsInformation ?RECORD ?INFO)
      (realization ?SOUND ?INFO)
      (instance ?SOUND RadiatingSound))))

(subrelation record represents)
(documentation record EnglishLanguage "(&%record ?OBJ ?PHYS), a more specific relationship
than &%represents, means that some &%Physical ?PHYS is captured and interpreted into a 
&%ContentBearingObject that is stored in some &%DataStorageDevice")
(termFormat EnglishLanguage record "record")
(comment record "Adding a more specific relation than &%represents.  While &%represents
can be something like a &%Logo that represents a &%Brand, &%record is more strict in 
the sense that it is an accurate rendering of some &%Process that occurred in real life. 
(09-14-2011)." "KJN")

(domain record 1 ContentBearingObject)
(domain record 2 Physical)    

(=>
  (record ?REC ?PHYS)
  (equivalentContentInstance ?REC ?PHYS))
  
(=>
  (record ?REC ?PHYS)
  (exists (?DS)
    (and
      (instance ?DS DataStorageDevice)
      (stored ?REC ?DS))))
      
(instance stored BinaryPredicate)
(instance stored AntisymmetricRelation)
(instance stored TransitiveRelation)
(documentation stored EnglishLanguage "(&%stored ?REC ?OBJ) means that some 
&%ContentBearingObject, encoded in some format, is saved in some &%DataStorageDevice
and can be accessed in some future date.")
(termFormat EnglishLanguage stored "stored")
(comment stored "Adding a stored method that is specific to storing &%ContentBearingObject
such as &%SymbolicString, &%Recording, etc. in a &%DataStorageDevice.  Will be changing
some axioms to use this instead of other, vaguer ways of describing it." "KJN")

(domain stored 1 ContentBearingObject)
(domain stored 2 DataStorageDevice)

(=>
  (stored ?O ?D)
  (exists (?P)
    (and
      (instance ?P Writing)
      (destination ?P ?D)
      (patient ?P ?O))))
      
(=>
  (equal ?TIME (WhenFn (stored ?O ?D)))
  (holdsDuring ?TIME
    (modalAttribute
      (exists (?P)
        (patient ?P ?O)) Possibility)))      

(instance Blank RelationalAttribute)
(documentation Blank EnglishLanguage "A &%RelationalAttribute meaning that there is no &%ContentBearingObject located on the &%Object with this attribute")

(=>
  (and
    (instance ?DSTORE DataStorageDevice)
    (attribute ?DSTORE Blank))
  (not
    (exists (?DATA)
      (stored ?DATA ?DSTORE))))

(subclass Recording ContentBearingObject)
(documentation Recording EnglishLanguage "&%Recording refers to a &%ContentBearingObject
that represents some &%Process that happened in real life")
(termFormat EnglishLanguage Recording "recording")

(=>
  (instance ?R Recording)
  (exists (?P)
    (and
      (instance ?P Process)
      (record ?R ?P))))

 
(subclass MusicRecording AudioRecording)
(documentation MusicRecording EnglishLanguage "&%MusicRecording refers to an &%AudioRecording
of the &%Process of &%MakingMusic.")
(termFormat EnglishLanguage MusicRecording "music recording")

(=>
  (instance ?M MusicRecording)
  (exists (?P)
    (and
      (instance ?P MakingMusic)
      (record ?M ?P))))

(subclass SheetMusic ContentBearingObject)
(documentation SheetMusic EnglishLanguage "&%SheetMusic refers to the &%ContentBearingObject
that contains a representation of a &%MusicalComposition, using different musical 
symbols")
(termFormat EnglishLanguage SheetMusic "sheet music")

(=>
  (instance ?SM SheetMusic)
  (exists (?MC)
    (and
      (instance ?MC MusicalComposition)
      (containsInformation ?SM ?MC))))

(subclass MusicText Text)
(documentation MusicText EnglishLanguage "A &%Text in a &%Language that represents a form
of music.")

(=>
  (instance ?X MusicText)
  (capability MakingMusic patient ?X))

(subclass VideoRecording Recording)
(documentation VideoRecording EnglishLanguage "A representation of video on some medium such
as film, videotape or DVD.  Instances of this class are also commonly
instances of &%AudioRecording.")

(=>
  (instance ?X VideoRecording)
  (exists (?EV)
    (and
      (instance ?EV Process)
      (represents ?X ?EV)
      (capability RadiatingLight patient ?X))))

(=>
  (instance ?VIDEO VideoRecording)
  (modalAttribute
    (exists (?AUDIO)
      (and
        (instance ?AUDIO AudioRecording)
        (part ?AUDIO ?VIDEO))) Possibility))
      
(subclass MediaSystem Collection)
(documentation MediaSystem EnglishLanguage "&%MediaSystem is a &%Collection of 
components that enable the &%RadiatingSound of &%AudioRecording and &%RadiatingLight 
of &%VideoRecording")
(termFormat EnglishLanguage MediaSystem "media system")

(=>
  (instance ?PLAYER MediaSystem)
  (hasPurpose ?PLAYER
    (or
      (exists (?VIDEO ?RL)
        (and
          (instance ?VIDEO VideoRecording)
          (instance ?RL RadiatingLight)
          (patient ?RL ?VIDEO)
          (instrument ?RL ?PLAYER)))
      (exists (?AUDIO ?RS)
        (and
          (instance ?AUDIO AudioRecording)
          (instance ?RS RadiatingSound)
          (patient ?RS ?AUDIO)
          (instrument ?RS ?PLAYER))))))

;; KJN: Moving this to Media.kif as that is where CompactDisc is defined.          
;;(subclass AudioCDSystem MediaSystem)
;;(documentation AudioCDSystem EnglishLanguage "&%AudioCDSystem is a type of &%MediaSystem that
;;plays &%AudioRecording")
;;(termFormat EnglishLanguage AudioCDSystem "cd player")

;;(=>
;;  (instance ?PLAYER AudioCDSystem)
;;  (hasPurpose ?PLAYER
;;    (exists (?DISC ?AUDIO ?RS ?DIGITAL ?PROC)
;;      (and
;;        (instrument ?PROC ?PLAYER)
;;       (patient ?PROC ?DISC)
;;        (instance ?DISC CompactDisc)
;;        (instance ?AUDIO AudioRecording)
;;        (represents ?DIGITAL ?AUDIO)
;;        (part ?DIGITAL ?DISC)
;;        (instance ?RS RadiatingSound)
;;        (subProcess ?RS ?PROC)
;;        (instrument ?RS ?PLAYER)
;;        (patient ?RS ?DISC)))))
                
;; KJN: Moving this to Media.kif as that is where DVD is defined.          
;;(subclass DVDSystem MediaSystem)
;;(documentation DVDSystem EnglishLanguage "&%DVDSystem is a type of &%MediaSystem
;;that is able to play the contents of &%VideoRecording and &%AudioRecording stored
;;in a &%DVD")
;;(termFormat EnglishLanguage DVDSystem "dvd player")

;;(=>
;;  (instance ?X DVDSystem)
;;  (hasPurpose ?X
;;    (exists (?DVD ?PROC)
;;      (and
;;        (instance ?DVD DVD)
;;        (instrument ?PROC ?X)
;;        (patient ?PROC ?DVD)
;;        (or
;;          (exists (?VIDEO ?DVIDEO ?RL)
;;            (and
;;              (instance ?VIDEO VideoRecording)
;;              (represents ?DVIDEO ?VIDEO)
;;              (part ?DVIDEO ?DVD)
;;              (instance ?RL RadiatingLight)
;;              (subProcess ?RL ?PROC)
;;              (instrument ?RL ?X)
;;              (patient ?RL ?VIDEO)))
;;          (exists (?AUDIO ?DAUDIO ?RS)
;;            (and        
;;              (instance ?AUDIO AudioRecording)
;;              (represents ?DAUDIO ?AUDIO)
;;              (part ?DAUDIO ?DVD)
;;              (instance ?RS RadiatingSound)
;;              (subProcess ?RS ?PROC)
;;              (instrument ?RS ?X)
;;              (patient ?RL ?AUDIO))))))))

;; KJN: Moving this to Media as VHSCassette is defined there.
;;(subclass VCRSystem MediaSystem)
;;(documentation VCRSystem EnglishLanguage "&%VCRSystem is a type of &%MediaSystem that
;;can play &%AudioRecording and &%VideoRecording that is stored in a &%VHS")
;;(termFormat EnglishLanguage VCRSystem "vcr system")

;;(=>
;; (instance ?VCR VCRSystem)
;;  (hasPurpose ?VCR
;;    (exists (?VHS ?PROC ?VIDEO ?AVIDEO ?RL ?AUDIO ?AAUDIO ?RS)
;;      (and
;;        (instance ?VHS VHSCassette)
;;        (instrument ?PROC ?VCR)
;;        (patient ?PROC ?VHS)
;;        (instance ?VIDEO VideoRecording)
;;        (represents ?AVIDEO ?VIDEO)
;;        (part ?VIDEO ?VHS)
;;        (instance ?AUDIO AudioRecording)
;;        (represents ?AAUDIO ?AUDIO)
;;        (part ?AAUDIO ?AVIDEO)
;;        (part ?AUDIO ?VHS)
;;        (instance ?RL RadiatingLight)
;;        (patient ?RL ?VIDEO)
;;        (subProcess ?RL ?PROC)
;;        (instance ?RS RadiatingSound)
;;        (patient ?RS ?AUDIO)
;;        (subProcess ?RS ?PROC)))))
      

(subclass Label Text)
(documentation Label EnglishLanguage "A very brief &%Text that is attached to an &%Object 
and that indicates very specific information about the &%Object, e.g. its 
name, its &%monetaryValue, etc.")

(=>
   (instance ?LABEL Label)
   (exists (?OBJ)
      (and
         (instance ?OBJ SelfConnectedObject)
         (connected ?LABEL ?OBJ)
         (refers ?LABEL ?OBJ))))

(subclass FormText Text)
(documentation FormText EnglishLanguage "A page or set of pages containing spaces where 
information is to be entered by an &%Agent.")

(subclass TestForm FormText)
(subclass TestForm MeasuringDevice)
(documentation TestForm EnglishLanguage "A &%FormText which is intended to measure some aspect 
of the cognitive capabilities, e.g. intelligence or knowledge of a domain, 
of the person taking the test.")

;; KJN: Moving all tax-related stuff to FinancialOntology.kif as the definition for Tax is there.
;;(subclass TaxReturn FormText)
;;(documentation TaxReturn EnglishLanguage "A &%FormText that is used for calculating the amount 
;;of income tax owed in a given year.")

;;(=>
;; (instance ?RETURN TaxReturn)
;; (hasPurpose ?RETURN 
;;    (exists (?CALCULATE ?AMOUNT ?TAX)
;;      (and
;;        (instance ?CALCULATE Calculating)
;;        (instrument ?CALCULATE ?RETURN)
;;        (result ?CALCULATE ?AMOUNT)
;;        (transactionAmount ?TAX ?AMOUNT)
;;        (instance ?TAX Tax)))))
 
;;(subclass IncomeTax Tax)
;;(documentation IncomeTax EnglishLanguage "A &%Tax on annual income.")

;;(subclass DutyTax Tax)
;;(documentation DutyTax EnglishLanguage "A &%Tax that is levied on imports and/or exports.")
;;(=>
;;  (and
;;    (instance ?X DutyTax)
;;    (refers ?X ?OBJ)
;;    (patient ?X ?OBJ))
;;  (exists (?T ?N1 ?N2)
;;    (and
;;      (instance ?T Transfer)
;;      (patient ?T ?OBJ)
;;      (origin ?T ?N1)
;;      (destination ?T ?N2)
;;      (instance ?N1 Nation)
;;      (instance ?N2 Nation)
;;      (not (equal ?N1 ?N2))
;;      (earlier (WhenFn ?T) (WhenFn ?X))
;;      (causes ?T ?X))))

(subclass Ballot FormText)
(documentation Ballot EnglishLanguage "A &%FormText which is used in &%Voting.  A list of 
candidates is printed on the form, and the voter selects the candidate he/she 
wants to vote for.")
(=>
  (instance ?B Ballot)
  (hasPurpose ?B 
    (exists (?V)
      (and
        (instance ?V Voting)
        (instrument ?V ?B)))))

(subclass Application FormText)
(documentation Application EnglishLanguage "A &%FormText whose purpose is to obtain admission 
to an &%Organization or to receive assistance from an &%Organization.")

(=>
  (instance ?APP Application)
  (hasPurpose ?APP 
    (exists (?JOIN ?GIVE) 
      (or 
        (instance ?JOIN JoiningAnOrganization)
        (instance ?GIVE UnilateralGiving)))))

(subclass Announcement FactualText)
(documentation Announcement EnglishLanguage "Any &%Text which contains information about 
an event in the future.")
(=>
  (instance ?A Announcement)
  (exists (?CD ?I)
    (and
      (instance ?CD ContentDevelopment)
      (result ?CD ?A)
      (refers ?A ?I)
      (instance ?I SocialInteraction)
      (earlier 
        (WhenFn ?CD) 
        (WhenFn ?I)))))

(subclass PerformanceProgram FactualText)
(documentation PerformanceProgram EnglishLanguage "A &%Text that describes the events 
and/or participants in a &%Performance.")

(=>
  (instance ?PROG PerformanceProgram)
  (exists (?PERF ?PROP)
    (and
      (containsInformation ?PROG ?PROP)
      (realization ?PERF ?PROP)
      (instance ?PERF Performance))))

(subclass MotionPictureShot MotionPicture)
(documentation MotionPictureShot EnglishLanguage "A unit of action in a &%MotionPicture, a 
&%MotionPictureShot is a sequence of images which are captured by a single 
camera without interruption.")

(=>
   (instance ?SHOT MotionPictureShot)
   (exists (?MOVIE)
      (and
         (instance ?MOVIE MotionPicture)
         (subsumesContentInstance ?MOVIE ?SHOT))))

(=>
  (instance ?SHOT MotionPictureShot)
  (exists (?C)
    (and
      (instance ?C Camera)
      (instrument ?SHOT ?C)
      (not
        (exists (?C2)
	  (and
	    (instance ?C2 Camera)
	    (not (equal ?C ?C2))
	    (instrument ?SHOT ?C2)))))))

(subclass MotionPictureScene MotionPicture)
(documentation MotionPictureScene EnglishLanguage "A discrete part of a &%MotionPicture which is set in 
the same time period and the same location.")

(=>
  (instance ?S MotionPictureScene)
  (exists (?M)
    (and
      (instance ?M MotionPicture)
      (subsumesContentInstance ?MOVIE ?S))))

(subclass Documentary MotionPicture)
(subclass Documentary FactualText)
(documentation Documentary EnglishLanguage "A &%MotionPicture which purports to represent the 
facts about a person, event, etc.")

(subclass BroadcastProgram Series)
(documentation BroadcastProgram EnglishLanguage "A &%Series of episodes that are broadcast 
on television or radio.")

(=>
   (instance ?PROGRAM BroadcastProgram)
   (exists (?BROADCAST)
      (and
         (instance ?BROADCAST Broadcasting)
         (patient ?BROADCAST ?PROGRAM))))

(subclass NewsProgram BroadcastProgram)
(documentation NewsProgram EnglishLanguage "A &%BroadcastProgram that is devoted to 
reporting the latest events in a city, region, nation or the world at 
large.")

(=>
   (and
      (subclass ?PROGRAM NewsProgram)
      (equal ?EPISODE (SeriesVolumeFn ?PROGRAM ?NUMBER)))
   (exists (?DISSEMINATE)
      (and
         (instance ?DISSEMINATE Disseminating)
         (patient ?DISSEMINATE ?EPISODE))))

(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))
         
         
(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)))))

(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))
                  
(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 Chapter Article)
(documentation Chapter EnglishLanguage "A numbered and/or titled
section of a &%Book, which is typically indicated in a table of
contents for the &%Book.")

(=>
   (instance ?CHAPTER Chapter)
   (exists (?BOOK)
      (and
         (instance ?BOOK Book)
         (subsumesContentInstance ?BOOK ?CHAPTER))))

(subrelation titles names)
(domain titles 1 SymbolicString)
(domainSubclass titles 2 ContentBearingPhysical)
(documentation titles EnglishLanguage "A &%BinaryPredicate used to
indicate the title of a &%ContentBearingPhysical.  Note that the
second argument type restriction is a subclass, rather than an
instance, of &%ContentBearingPhysical.  Thus, the title
Murder_on_the_Orient_Express corresponds to a large class of &%Books,
and not just to a single copy of the book.")

(documentation formerName EnglishLanguage "(formerName ?NAME ?THING) means that the 
string ?NAME is a name formerly used for ?THING.")
(subrelation formerName names)

(instance familyName BinaryPredicate)
(instance familyName AsymmetricRelation)
(domain familyName 1 SymbolicString)
(domain familyName 2 Human)
(subrelation familyName names)
(documentation familyName EnglishLanguage "(&%familyName ?STRING
?HUMAN) means that the &%SymbolicString ?STRING denotes a non-optional
name that ?HUMAN has inherited by virtue of being born into a
particular family (kin group).  surname is another word for this type
of name.  Cf. &%givenName.")

(documentation middleName EnglishLanguage "(middleName ?CHAR ?INDIV) means that the 
&%SymbolicString ?CHAR contains the middle name of the &%Human ?INDIV.")
(instance middleName BinaryPredicate)
(instance middleName AsymmetricRelation)
(domain middleName 1 SymbolicString)
(domain middleName 2 Human)
(subrelation middleName names)

(instance givenName BinaryPredicate)
(instance givenName AsymmetricRelation)
(subrelation givenName names)
(domain givenName 1 SymbolicString) 
(domain givenName 2 Human)
(documentation givenName EnglishLanguage "(&%givenName ?STRING ?HUMAN)
means that ?STRING is a name selected for ?HUMAN, usually from among
many options, as opposed to a mandatory name (cf. &%familyName) that
?HUMAN has inherited by virtue of being born into a certain kin group,
caste, or occupation.")

(instance localLongName BinaryPredicate)
(domain localLongName 1 SymbolicString)
(domain localLongName 2 Entity)
(documentation localLongName EnglishLanguage "(localLongName ?NAME ?THING) means that 
the string ?NAME is the long form of the name used for ?THING in its local 
area or language.")
(subrelation localLongName names)

(documentation localShortName EnglishLanguage "(localShortName ?NAME ?THING) means that 
the string ?NAME is the short form of the name used for ?THING in its 
local area or language.")
(subrelation localShortName names)
(instance localShortName BinaryPredicate)
(domain localShortName 1 SymbolicString)
(domain localShortName 2 Entity)

(subclass Message FactualText)
(documentation Message EnglishLanguage "A &%FactualText which is intended to be delivered to 
and read by a &%Human, &%GroupOfPeople or &%Organization.")

(subclass Report FactualText)
(subclass Report Article)
(documentation Report EnglishLanguage "A relatively brief &%FactualText, often it 
describes the findings of a study or experiment, or a series of 
observations.")

(subclass Newspaper Periodical)
(documentation Newspaper EnglishLanguage "A &%Periodical that is published on a daily or 
weekly basis, that contains &%Reports, and whose issues are printed on 
newsprint paper.")

(=>
  (instance ?PAPER Newspaper)
  (exists (?REPORT)
    (and
      (instance ?REPORT Report)
      (subsumesContentInstance ?PAPER ?REPORT))))

(=>
  (and
    (subclass ?PAPER Newspaper)
    (instance ?WEEK Week))
  (exists (?PUBLICATION ?ISSUE)
    (and
      (instance ?PUBLICATION Publication)
      (temporalPart (WhenFn ?PUBLICATION) ?WEEK)
      (result ?PUBLICATION ?ISSUE)
      (instance ?ISSUE ?PAPER))))

(subclass Magazine Periodical)
(documentation Magazine EnglishLanguage "A &%Periodical that is softbound and printed on 
glossy paper.")
   
(subclass Letter FactualText)
(documentation Letter EnglishLanguage "A brief message which is intended to be mailed 
to a person or &%Organization.")

(subclass Holiday TimeInterval)
(documentation Holiday EnglishLanguage "&%Holiday is the class of time periods that are 
observed as holidays in a country, culture, or religion.  Holidays may 
recur annually on the same date, or they may be moveable, for example, 
&%UnitedStatesThanksgivingDay falls on the last &%Thursday of each 
&%November.") 

(subclass FixedHoliday Holiday)
(documentation FixedHoliday EnglishLanguage "&%FixedHoliday is the class of &%Holidays 
whose observance is fixed to recurrences of the calendar day that the 
holiday commemorates.  See &%commemoratesDate.") 

(subclass MoveableHoliday Holiday)
(documentation MoveableHoliday EnglishLanguage "&%MoveableHoliday is the class of 
&%Holidays whose observance is not fixed to recurrences of any particular 
calendar day.  For example, &%UnitedStatesMemorialDay is observed on the 
last &%Monday of &%May.") 


(subclass HolidayCard ContentBearingObject)
(documentation HolidayCard EnglishLanguage "A stiff piece of &%Paper, usually folded over, which 
is sent to others in celebration of a &%Holiday.")

(=>
  (instance ?C HolidayCard)
  (material Paper ?C))

(=>
  (instance ?C HolidayCard)
  (exists (?H)
    (and
      (instance ?H Holiday)
      (refers ?C ?H))))

(subclass HistoricalAccount NarrativeText)
(subclass HistoricalAccount FactualText)
(documentation HistoricalAccount EnglishLanguage "A &%FactualAccount that describes 
significant events that occurred in the past.")

(=>
   (instance ?ACCOUNT HistoricalAccount)
   (exists (?EVENT)
      (and
         (represents ?ACCOUNT ?EVENT)
         (earlier (WhenFn ?EVENT) (WhenFn ?ACCOUNT)))))

(subclass Biography HistoricalAccount)
(documentation Biography EnglishLanguage "A &%HistoricalAccount which is concerned 
with the life of a single &%Human.")
(=>
  (instance ?B Biography)
  (exists (?H)
    (and
      (instance ?H Human)
      (refers ?B ?H))))

(subclass FinancialText Report)
(documentation FinancialText EnglishLanguage "A &%Report about monetary figures.  This 
class covers &%FinancialBills, balance sheets, account statements, etc.")

(subclass FinancialBill FinancialText)
(documentation FinancialBill EnglishLanguage "A brief statement that the stated amount 
of money is owed by the person to whom the bill is delivered.")

(subclass ReferenceBook Book)
(subclass ReferenceBook FactualText)
(documentation ReferenceBook EnglishLanguage "A &%Book which is not intended to be read 
from cover to cover, but which is meant to be consulted to answer specific 
factual questions, e.g. about the meaning of a word, the location of a 
country, etc.")

(subclass Dictionary ReferenceBook)
(documentation Dictionary EnglishLanguage "A &%ReferenceBook which specifies the meanings 
of the &%Words of a &%Language.")

(subclass NarrativeText Text)
(partition NarrativeText FictionalText HistoricalAccount)
(documentation NarrativeText EnglishLanguage "Any &%Text that tells a story, whether true 
or false.")

(subclass ShortStory FictionalText)
(subclass ShortStory Article)
(documentation ShortStory EnglishLanguage "A brief work of fiction, often bound with other 
short stories in a &%Book or &%Periodical.")

(subclass MysteryStory FictionalText)
(documentation MysteryStory EnglishLanguage "A &%FictionalText whose central plot element is a 
crime of some sort, usually a murder.")

(=>
  (instance ?S MysteryStory)
  (exists (?C)
    (and
      (instance ?C CriminalAction)
      (refers ?S ?C))))

(subclass Novel FictionalText)
(subclass Novel Book)
(documentation Novel EnglishLanguage "A &%FictionalText that is larger than a &%ShortStory 
and that is bound independently (i.e. it is a &%Book).")

(subclass DramaticPlay FictionalText)
(documentation DramaticPlay EnglishLanguage "A &%FictionalText that is intended to be realized 
as &%DramaticActing.")

(=>
   (instance ?PLAY DramaticPlay)
   (hasPurpose ?PLAY (exists (?ACT ?PROP)
                        (and
                           (instance ?ACT DramaticActing)
                           (containsInformation ?PLAY ?PROP)
                           (realization ?ACT ?PROP)))))

(subclass Opera DramaticPlay)
(documentation Opera EnglishLanguage "A &%DramaticPlay that is set to &%MakingMusic.")

(=>
   (and
      (instance ?OPERA Opera)
      (realization ?ACT ?OPERA))
   (instance ?ACT MakingMusic))

(instance FrenchLanguage SpokenHumanLanguage)
(instance FrenchLanguage NaturalLanguage)
(documentation FrenchLanguage EnglishLanguage "A &%Romance language that is the official language 
of France and Belgium, and is widely spoken in Africa.")

(instance GermanLanguage SpokenHumanLanguage)
(instance GermanLanguage NaturalLanguage)
(documentation GermanLanguage EnglishLanguage "A &%Germanic language that is spoken primarily in 
Germany and Austria.")

(instance GreekLanguage SpokenHumanLanguage)
(instance GreekLanguage NaturalLanguage)
(documentation GreekLanguage EnglishLanguage "An Indo-European language that is spoken in &%Greece.")

(instance LatinLanguage SpokenHumanLanguage)
(instance LatinLanguage NaturalLanguage)
(documentation LatinLanguage EnglishLanguage "A &%Language that was spoken in ancient &%Rome and 
is still the official language of the &%Vatican.")

(instance RussianLanguage SpokenHumanLanguage)
(instance RussianLanguage NaturalLanguage)
(documentation RussianLanguage EnglishLanguage "A Slavic language that is spoken in &%Russia.")

(instance SpanishLanguage SpokenHumanLanguage)
(instance SpanishLanguage NaturalLanguage)
(documentation SpanishLanguage EnglishLanguage "A &%Romance language that is the official language 
of Spain, Mexico, and many Central and South American countries.")

(<=>
  (attribute ?H LiteracyAttribute)
  (and
    (hasSkill Reading ?H)
    (hasSkill Writing ?H)))
(subclass LiteracyAttribute TraitAttribute)
(documentation LiteracyAttribute EnglishLanguage "If an individual has the &%attribute 
&%LiteracyAttribute, that individual is able to read and write.")

(subclass Industry Collection)
(documentation Industry EnglishLanguage "The class of &%Collections of &%Corporations 
which are in the same line of business.")

(=>
   (instance ?INDUSTRY Industry)
   (=>
      (and
         (member ?MEMB1 ?INDUSTRY)
         (member ?MEMB2 ?INDUSTRY))
      (exists (?CLASS)
         (and
            (subclass ?CLASS Corporation)
            (immediateInstance ?MEMB1 ?CLASS)
            (immediateInstance ?MEMB2 ?CLASS)))))

(subclass Chimney StationaryArtifact)
(subclass Chimney Device)
(documentation Chimney EnglishLanguage "A thin passageway through which &%Smoke from a controlled 
fire is conducted &%Outside of a &%Building or &%Room.")
(=>
  (instance ?C Chimney)
  (hasPurpose ?C 
    (exists (?S ?R)
      (and
        (instance ?S Smoke)
        (instance ?R Removing)
        (instrument ?R ?C)))))

(subclass Curb StationaryArtifact)
(documentation Curb EnglishLanguage "A raised concrete or asphalt structure that connects a 
&%Sidewalk with a &%Roadway.")
(=>
  (instance ?C Curb)
  (exists (?S ?R)
    (and
      (instance ?S Sidewalk)
      (instance ?R Roadway)
      (connects ?C ?S ?R))))

(instance Paved Attribute)
(instance Unpaved Attribute)
            
(subclass Stairway StationaryArtifact)
(documentation Stairway EnglishLanguage "A &%StationaryArtifact which allows one to climb, step 
by step, from one level to another.")

(=>
  (instance ?S Stairway)
  (and
    (capability MotionUpward instrument ?S)
    (capability MotionDownward instrument ?S)))

(=>
  (and
    (instance ?S Stairway)
    (part ?S ?B)
    (instance ?B Building))
  (hasPurpose ?S
    (exists (?L1 ?L2)
      (and
        (instance ?L1 BuildingLevel)
        (instance ?L2 BuildingLevel)
        (part ?L1 ?B)
        (part ?L2 ?B)
        (connects ?S ?L1 ?L2)))))

(subclass Steps StationaryArtifact)
(documentation Steps EnglishLanguage "A &%StationaryArtifact which allows one to climb, step 
by step, from one level to another.")

(=>
   (instance ?STEPS Steps)
   (and
      (capability MotionUpward instrument ?STEPS)
      (capability MotionDownward instrument ?STEPS)))

(=>
   (and
      (instance ?LEVEL1 BuildingLevel)
      (instance ?LEVEL2 BuildingLevel)
      (instance ?BUILDING Building)
      (part ?LEVEL1 ?BUILDING)
      (part ?LEVEL2 ?BUILDING))
   (exists (?STEPS)
      (and
         (instance ?STEPS Steps)
         (connects ?STEPS ?LEVEL1 ?LEVEL2))))
   
(subclass Ladder Artifact)
(documentation Ladder EnglishLanguage "An &%Artifact which consists of two parallel supports 
connected by a series of rungs which can be used to ascend or descend.")

(=>
   (instance ?LADDER Ladder)
   (and
      (capability MotionUpward instrument ?LADDER)
      (capability MotionDownward instrument ?LADDER)))

(instance Transparent InternalAttribute)
(documentation Transparent EnglishLanguage "A Transparent material is one through which
it is possible to have &%Seeing.")
(=>
  (attribute ?O Transparent)
  (modalAttribute
    (exists (?S)
      (and
        (instance ?S Seeing)
        (agent ?S ?A)
        (destination ?S ?D)
        (between ?O ?A ?D)))
    Possibility))

(subclass Curtain WindowCovering)
(subclass Curtain Fabric)
(documentation Curtain EnglishLanguage "A piece of &%Fabric whose purpose is &%Covering a 
&%Window so as to keep out the light or prevent people from seeing inside.")

(subclass Window Artifact)
(documentation Window EnglishLanguage "An &%Artifact composed of transparent material 
that admits light (and possibly air) into a &%Room, &%Building 
or &%Vehicle.")
(=>
  (instance ?W Window)
  (exists (?A)
    (and
      (part ?W ?A)
      (or
        (instance ?A Building)
        (instance ?A Room)
        (instance ?A Vehicle)))))

(=>
  (instance ?W Window)
  (attribute ?W Transparent))

(subclass Skylight Window)
(documentation Skylight EnglishLanguage "A &%Window that is part of the &%Ceiling of 
a &%Room.")

(=>
  (instance ?W Skylight)
  (exists (?C)
    (and
      (instance ?C Ceiling)
      (part ?W ?C))))

(subclass RearWindow VehicleWindow)
(documentation RearWindow EnglishLanguage "Any &%VehicleWindow which is located at the back 
of an &%RoadVehicle.")

(=>
  (instance ?W RearWindow)
  (exists (?A)
    (and
      (instance ?A RoadVehicle)
      (part ?W (BackFn ?A))))) 

(subclass WindowCovering Artifact)
(documentation WindowCovering EnglishLanguage "An &%Artifact that is used to cover 
Windows.  Note that this class includes blinds, drapes, shutters, 
etc.")
(=>
  (instance ?WC WindowCovering)
  (hasPurpose ?WC 
    (exists (?C ?W)
      (and
        (instance ?C Covering)
        (patient ?C ?W)
        (instance ?W Window)
        (instrument ?C ?WC)))))

(instance AdjoiningRoom RelationalAttribute)
(documentation AdjoiningRoom EnglishLanguage "&%AdjoiningRoom describes a &%Room that
has another Room &%Adjacent to it, and a doorway existing on their common wall to
allow access from one room to another")
(termFormat EnglishLanguage AdjoiningRoom "adjoining room")

(=>
  (attribute ?X AdjoiningRoom)
  (instance ?X Room))
  
(=>
  (attribute ?X AdjoiningRoom)
  (exists (?ROOM ?WALL ?DOOR)
    (and
      (attribute ?ROOM AdjoiningRoom)
      (not (equal ?ROOM ?X))
      (orientation ?X ?ROOM Adjacent)
      (instance ?WALL Wall)
      (part ?WALL ?ROOM)
      (part ?WALL ?X)
      (instance ?DOOR Door)
      (part ?DOOR ?WALL))))      

(subclass TransitwayObstacle Object)
(documentation TransitwayObstacle EnglishLanguage "&%TransitwayObstacle is the general 
class of &%Objects that can act as obstacles to &%Motion along a 
&%Transitway.")
      
(subclass Door TransitwayObstacle)
(subclass Door Device)
;; KJN: Removing this as Device is already an Artifact      
;;(subclass Door Artifact)
(documentation Door EnglishLanguage "An &%Artifact that restricts and permits access to a 
&%StationaryArtifact (e.g. &%Building or &%Room) depending on whether the 
&%Door is open or locked.  Note that the class &%Door also covers gates, 
because it is not possible to define objective criteria that reliably 
distinguish doors from gates.")

(=>
   (instance ?DOOR Door)
   (exists (?WAY)
      (and
         (part ?DOOR ?WAY)
         (instance ?WAY Doorway))))

(subclass Hinge EngineeringComponent)
(documentation Hinge EnglishLanguage "An &%EngineeringComponent that connects one thing to 
another in such a way that they can move relative to one another.")
(=>
   (instance ?HINGE Hinge)
   (hasPurpose ?HINGE 
     (exists (?OBJ1 ?OBJ2)
       (and
         (connects ?HINGE ?OBJ1 ?OBJ2)
	 (or
	   (capability Rotating patient ?OBJ1)
	   (capability Rotating patient ?OBJ2))))))

(subclass Doorway StationaryArtifact)
(documentation Doorway EnglishLanguage "A &%StationaryArtifact consisting of a frame that 
holds a &%Door.")

(=>
   (instance ?WAY Doorway)
   (exists (?ARTIFACT)
      (and
         (part ?WAY ?ARTIFACT)
         (or
            (instance ?ARTIFACT Building)
            (instance ?ARTIFACT Room)))))

(=>
   (instance ?DOOR Door)
   (exists (?ARTIFACT)
      (and
         (part ?DOOR ?ARTIFACT)
         (or
            (instance ?ARTIFACT Building)
            (instance ?ARTIFACT Room)))))

(subclass Wall StationaryArtifact)
(documentation Wall EnglishLanguage "A &%StationaryArtifact that supports a &%Building or 
partitions it into &%Rooms.")

(=>
   (instance ?WALL Wall)
   (exists (?ARTIFACT)
      (and
         (part ?WALL ?ARTIFACT)
         (or
            (instance ?ARTIFACT Building)
            (instance ?ARTIFACT Room)))))

(subclass Floor StationaryArtifact)
(documentation Floor EnglishLanguage "A &%StationaryArtifact that is the bottom surface 
of a &%Room.")

(=>
   (instance ?FLOOR Floor)
   (exists (?ARTIFACT)
      (and
         (part ?FLOOR ?ARTIFACT)
         (instance ?ARTIFACT Room))))

(subclass Ceiling StationaryArtifact)
(documentation Ceiling EnglishLanguage "A &%StationaryArtifact that is the top surface 
of a &%Room.")
(=>
  (instance ?C Ceiling)
  (exists (?R)
    (and
      (top ?C ?R)
      (instance ?R Room))))

(subclass Roof StationaryArtifact)
(documentation Roof EnglishLanguage "The &%top of a &%Building.")

(=>
   (instance ?ROOF Roof)
   (exists (?BUILDING)
      (and
         (instance ?BUILDING Building)
         (top ?ROOF ?BUILDING))))

(subclass Fireplace StationaryArtifact)
(subclass Fireplace Device)
(documentation Fireplace EnglishLanguage "A &%Device in a &%Building which is used for burning wood, 
coal, etc for heat.")
(=>
  (instance ?F Fireplace)
  (hasPurpose ?F 
    (exists (?C)
      (and
        (instance ?C Combustion)
        (eventLocated ?C ?F)))))

(=>
  (instance ?F Fireplace)
  (exists (?C)
    (and
      (instance ?C Chimney)
      (connected ?F ?C))))
       
(=>
  (instance ?F Fireplace)
  (exists (?B)
    (and
      (instance ?B Building)
      (part ?F ?B)))) 

(subclass Balcony StationaryArtifact)
(documentation Balcony EnglishLanguage "A &%Balcony is a platform projecting from the
wall of a building, surrounded by some type of railing")
(termFormat EnglishLanguage Balcony "balcony")

(=>
  (instance ?BALCONY Balcony)
  (exists (?WALL ?LANDAREA)
    (and
      (meetsSpatially ?WALL ?BALCONY)
      (instance ?LANDAREA LandArea)
      (located ?WALL ?LANDAREA)
      (orientation ?BALCONY ?LANDAREA Above))))
      
      
(subclass BuildingLevel StationaryArtifact)
(documentation BuildingLevel EnglishLanguage "The story or level of a building, e.g. the &%Basement, 
the &%Attic, the ground level, the fourteenth floor, etc.")

(=>
   (instance ?LEVEL BuildingLevel)
   (exists (?BUILDING)
      (and
         (instance ?BUILDING Building)
         (part ?LEVEL ?BUILDING))))

(subclass Basement BuildingLevel)
(documentation Basement EnglishLanguage "A &%BuildingLevel which satisfies two conditions, viz. it is 
lower than all of the other &%BuildingLevels in the same &%Building and it is below 
ground level.")

(=>
   (instance ?BASEMENT Basement)
   (not (exists (?LEVEL ?BUILDING)
      (and
         (instance ?LEVEL BuildingLevel)
         (instance ?BUILDING Building)
         (part ?LEVEL ?BUILDING)
         (part ?BASEMENT ?BUILDING)
         (not (equal ?LEVEL ?BASEMENT))
         (orientation ?LEVEL ?BASEMENT Below)))))

(subclass Elevator TransportationDevice)
(documentation Elevator EnglishLanguage "A &%TransportationDevice consisting of a car that moves 
up and down in a vertical shaft so that people or objects can move from one floor to another 
in a building.")
(=>
  (instance ?E Elevator)
  (hasPurpose ?E 
    (exists (?T ?L1 ?L2 ?B)
      (and
        (instance ?T Transportation)
        (origin ?T ?L1)
        (instance ?L1 BuildingLevel)
        (destination ?T ?L2)
        (instance ?L2 BuildingLevel)
        (not (equal ?L1 ?L2))
        (part ?L1 ?B)
        (part ?L2 ?B)
        (instance ?B Building)))))

(=>
  (instance ?E Elevator)
  (and
    (capability MotionUpward instrument ?E)
    (capability MotionDownward instrument ?E)))

(subclass Pump TransportationDevice)
(documentation Pump EnglishLanguage "A &%Device that moves &%Fluids by means of pressure or suction.")

(=> 
  (and
    (instance ?T Transportation)
    (instrument ?T ?D)
    (instance ?D Pump))
  (exists (?F)
    (and
      (instrument ?T ?F)
      (attribute ?F Fluid))))

(subclass Oar TransportationDevice)
(documentation Oar EnglishLanguage "A &%Device consisting of a flat, broad surface attached to a 
handle that is used as an instrument in &%Rowing.")

(=>
  (instance ?O Oar)
  (hasPurpose ?O 
    (exists (?R)
      (and
        (instance ?R Rowing)
        (instrument ?R ?O)))))

(subclass Garage StationaryArtifact)
(documentation Garage EnglishLanguage "A &%Building or part of a &%Building which is intended to house 
one or more &%RoadVehicle when they are not in use or are under
repair.")

(=>
  (instance ?GARAGE Garage)
  (hasPurpose ?GARAGE
    (exists (?AUTO)
      (and
        (instance ?AUTO RoadVehicle)
        (contains ?GARAGE ?Automobile)))))

(=>
   (instance ?GARAGE Garage)
   (exists (?BUILDING)
      (and
         (instance ?BUILDING Building)
         (part ?GARAGE ?BUILDING))))

(subclass Bathroom Room)
(documentation Bathroom EnglishLanguage "A &%Room that contains a &%WashBasin and 
possibly a &%Toilet.")

(=>
  (instance ?B Bathroom)
  (exists (?W)
    (and
      (instance ?W WashBasin)
      (located ?W ?B))))

(subclass Closet Room)
(documentation Closet EnglishLanguage "A relatively small &%Room used for storage.")
(=>
  (instance ?R Closet)
  (hasPurpose ?R 
    (exists (?K ?O)
      (and
        (instance ?K Keeping)
        (patient ?K ?O)
        (located ?O ?R)))))

(subclass DressingRoom Room)
(documentation DressingRoom EnglishLanguage "Any &%Room which is intended for 
&%ChangingClothing.")
(=>
  (instance ?R DressingRoom)
  (hasPurpose ?R 
    (exists (?C)
      (and
        (instance ?C ChangingClothing)
        (eventLocated ?C ?R)))))

(subclass SittingArea Region)
(documentation SittingArea EnglishLanguage "&%SittingArea refers to a &%Region, either
&%Indoor (like a Living Room) or &%Outdoor (like a Garden sitting area) where people
normally sit and entertain guests")
(termFormat EnglishLanguage SittingArea "sitting area")

(=>
  (instance ?AREA SittingArea)
  (exists (?SEAT)
    (and
      (instance ?SEAT Seat)
      (located ?SEAT ?AREA))))
        
(subclass KitchenArea Region)
(documentation KitchenArea EnglishLanguage "a &%KitchenArea refers to a 
&%Region, either &%Outdoors or &%Indoors, that is intended for &%Cooking")
(termFormat EnglishLanguage KitchenArea "kitchen area")

(=>
  (instance ?K KitchenArea)
  (hasPurpose ?K 
    (exists (?C)
      (and
        (instance ?C Cooking)
        (eventLocated ?C ?K)))))
        
(subclass Kitchen Room)
(subclass Kitchen KitchenArea)
(documentation Kitchen EnglishLanguage "A &%Room intended for &%Cooking.")

(=>
   (instance ?ROOM Kitchen)
   (hasPurpose ?ROOM (exists (?COOK)
                        (and
                           (instance ?COOK Cooking)
                           (located ?COOK ?ROOM)))))

(subclass DiningArea Region)
(documentation DiningArea EnglishLanguage "a &%DiningArea refers to a 
&%Region, either &%Outdoors or &%Indoors, that is intended for &%Eating")
(termFormat EnglishLanguage DiningArea "dining area")

(=> 
  (instance ?D DiningArea)
  (hasPurpose ?D
    (exists (?E)
      (and
        (instance ?E Eating)
        (eventLocated ?E ?D)))))                           
                           
                          
(subclass DiningRoom Room)
(subclass DiningRoom DiningArea)
(documentation DiningRoom EnglishLanguage "A &%Room intended primarily for &%Eating.")

(subclass Bedroom Room)
(documentation Bedroom EnglishLanguage "A &%Room intended primarily for sleeping.")

(=>
   (instance ?ROOM Bedroom)
   (exists (?BED)
      (and
         (instance ?BED Bed)
         (located ?BED ?ROOM))))

(subclass Classroom Room)
(documentation Classroom EnglishLanguage "Any Room in a &%School where education 
takes place.")
(=>
  (instance ?R Classroom)
  (exists (?S)
    (and
      (instance ?S School)
      (part ?R ?S))))

(=>
  (instance ?R Classroom)
  (hasPurpose ?R 
    (exists (?E)
      (and
        (instance ?E EducationalProcess)
        (eventLocated ?E ?R)))))

(subclass Porch StationaryArtifact)
(documentation Porch EnglishLanguage "A &%StationaryArtifact which is &%connected to a 
&%Building and which provides some shelter in entering or leaving the 
&%Building or in sitting outside.")

(=>
   (instance ?PORCH Porch)
   (exists (?BUILDING)
      (and
         (instance ?BUILDING Building)
         (connected ?PORCH ?BUILDING)))) 

(subclass Sidewalk StationaryArtifact)
(documentation Sidewalk EnglishLanguage "A prepared path for pedestrians alongside a &%Roadway.")

(=>
   (instance ?SIDE Sidewalk)
   (hasPurpose ?SIDE (exists (?WALK)
                        (and
                           (instance ?WALK Walking)
                           (path ?WALK ?SIDE)))))

(=>
   (instance ?SIDE Sidewalk)
   (exists (?ROAD)
      (and
         (instance ?ROAD Roadway)
         (orientation ?SIDE ?ROAD Near))))

(subclass Fence StationaryArtifact)
(documentation Fence EnglishLanguage "A &%StationaryArtifact that serves to demarcate or
to prevent access to or from the area that the &%Fence surrounds.")

(subclass SportsGround StationaryArtifact)
(documentation SportsGround EnglishLanguage "A specially designated and maintained area 
where &%Sports are played.")

(=>
   (instance ?GROUND SportsGround)
   (hasPurpose ?GROUND (exists (?SPORT) 
                          (and
                             (instance ?SPORT Sport)
                             (eventLocated ?SPORT ?GROUND)))))

(subclass IndustrialPlant StationaryArtifact)
(documentation IndustrialPlant EnglishLanguage "A &%Building or part of a &%Building or group 
of &%Buildings whose purpose is to &%Manufacture something.")

(=>
   (instance ?PLANT IndustrialPlant)
   (or
      (instance ?PLANT Building)
      (exists (?BUILDING)
         (and
            (instance ?BUILDING Building)
            (located ?BUILDING ?PLANT)))))

(=>
   (instance ?PLANT IndustrialPlant)
   (hasPurpose ?PLANT (exists (?MANUFACTURE)
                         (and
                            (instance ?MANUFACTURE Manufacture)
                            (eventLocated ?MANUFACTURE ?PLANT)))))

(subclass Laboratory StationaryArtifact)
(documentation Laboratory EnglishLanguage "A &%Building, &%Room or suite of &%Rooms where 
scientific research, i.e. &%Experimenting, is conducted.")

(=>
   (instance ?LAB Laboratory)
   (exists (?EXPERIMENT)
      (and
         (instance ?EXPERIMENT Experimenting)
         (eventLocated ?EXPERIMENT ?LAB))))

(documentation experimentalControl EnglishLanguage "(experimentalControl ?EXPERIMENT ?OBJ) 
means that the Object ?OBJ serves as a control in the instance of 
&%Experimenting ?EXPERIMENT, i.e. ?OBJ is the standard against which something 
else in the experiment can be compared.")
(instance experimentalControl CaseRole)
(domain experimentalControl 1 Experimenting)
(domain experimentalControl 2 Object)
(subrelation experimentalControl patient)

(subclass MilitaryInstallation StationaryArtifact)
(subclass MilitaryInstallation MilitaryArtifact)
(documentation MilitaryInstallation EnglishLanguage "A &%StationaryArtifact consisting of grounds 
and &%Buildings that is intended to be used by a &%MilitaryOrganization.")

(subclass Farm StationaryArtifact)
(documentation Farm EnglishLanguage "A &%StationaryArtifact consisting of a cultivated 
&%LandArea and &%Buildings for maintaining the land and/or the &%Animals 
on the land.") 

(subclass Barn Building)
(disjoint Barn ResidentialBuilding)
(documentation Barn EnglishLanguage "A &%Building on a &%Farm that is used for keeping 
&%DomesticAnimals, &%Fodder or harvested crops.")

(=>
   (instance ?BARN Barn)
   (exists (?FARM)
      (and
         (instance ?FARM Farm)
         (located ?BARN ?FARM))))

(subclass PerformanceStage StationaryArtifact)
(documentation PerformanceStage EnglishLanguage "A large platform for theatrical plays, 
lectures, dances, music recitals, etc, which can be observed by an audience.")

(=>
  (instance ?STAGE PerformanceStage)
  (hasPurpose ?STAGE 
    (exists (?PERF)
      (and
        (instance ?PERF Demonstrating)
        (eventLocated ?PERF ?STAGE)))))

(=>
  (instance ?STAGE PerformanceStage)
  (exists (?AUDITORIUM)
    (and
      (instance ?AUDITORIUM Auditorium)
      (part ?STAGE ?AUDITORIUM))))

(subclass PerformanceStageWing StationaryArtifact)
(documentation PerformanceStageWing EnglishLanguage "A part of the &%PerformanceStage that is not 
visible to members of the audience.")

(=> 
  (instance ?W PerformanceStageWing)
  (exists (?S)
    (and
      (instance ?S PerformanceStage)
      (part ?W ?S))))

(subclass Magnetism RadiatingElectromagnetic)
(documentation Magnetism EnglishLanguage "Any instance of &%RadiatingElectromagnetic which 
involves the attraction of &%Iron.")

(subclass RadioEmission RadiatingElectromagnetic)
(documentation RadioEmission EnglishLanguage "Any instance of &%RadiatingElectromagnetic 
where the waves have a wavelength between 5 milimeters and 30,000 meters.")

(subclass Broadcasting Disseminating)
(subclass Broadcasting RadioEmission)
(documentation Broadcasting EnglishLanguage "&%Disseminating information by using a 
&%CommunicationDevice that radiates &%RadioEmissions.")

(=>
   (instance ?BROADCAST Broadcasting)
   (exists (?DEVICE)
      (and
         (instance ?DEVICE CommunicationDevice)
         (instrument ?BROADCAST ?DEVICE))))

(subclass RadioBroadcasting Broadcasting)
(documentation RadioBroadcasting EnglishLanguage "Any instance of &%Broadcasting which is 
intended to be received by a &%RadioReceiver.")

(=>
  (instance ?RADIO RadioReceiver)
  (capability RadioBroadcasting patient ?RADIO))

(subclass TelevisionBroadcasting Broadcasting)
(documentation TelevisionBroadcasting EnglishLanguage "Any instance of &%Broadcasting which 
is intended to be received by a &%Television.")

;; KJN: Moving this to Communications.kif as TelevisionReceiver is defined there.
;;(=>
;;	(instance ?TELEVISION TelevisionReceiver)
;;  (capability TelevisionBroadcasting patient ?TELEVISION))

(subclass PeriodicalPublisher Publisher)
(documentation PeriodicalPublisher EnglishLanguage "Any &%Publisher that publishes 
&%Periodicals, e.g. newspaper and magazine publishing houses.")

(=>
  (instance ?C PeriodicalPublisher)
  (exists (?PUBLISH ?PERIODICAL)
    (and
      (instance ?PUBLISH Publication)
      (agent ?PUBLISH ?C)
      (patient ?PUBLISH ?PERIODICAL)
      (instance ?PERIODICAL Periodical))))

(subclass Antenna CommunicationDevice)
(documentation Antenna EnglishLanguage "A &%CommunicationDevice which enables or improves 
the reception of &%RadioEmissions by another &%CommunicationDevice (the 
radio or television receiver).")

(=>
   (instance ?ANTENNA Antenna)
   (capability RadioEmission instrument ?ANTENNA))

(subclass Explosion Radiating)
(documentation Explosion EnglishLanguage "Any sudden and massive release of energy that is 
the product of a chemical reaction.")

(=>
   (instance ?EXPLOSION Explosion)
   (exists (?PROC)
      (and
         (instance ?PROC ChemicalProcess)
         (causes ?PROC ?EXPLOSION))))

(=>
   (instance ?EXPLOSION Explosion)
   (capability Damaging instrument ?EXPLOSION))

(subclass Performance Demonstrating)
(documentation Performance EnglishLanguage "A &%Demonstrating which includes &%DramaticActing 
and/or &%MakingMusic and which is intended to entertain the audience.")

(=>
   (instance ?PERFORMANCE Performance)
   (exists (?SUB)
      (and
         (subProcess ?SUB ?PERFORMANCE)
         (or
            (instance ?SUB DramaticActing)
            (instance ?SUB MakingMusic)))))

(=>
   (instance ?PERFORMANCE Performance)
   (exists (?STAGE)
      (and
         (instance ?STAGE PerformanceStage)
         (eventLocated ?PERFORMANCE ?STAGE))))

(subclass PerformanceAct Performance)
(documentation PerformanceAct EnglishLanguage "A discrete &%subProcess of a &%Performance, 
e.g. an act of a play, a movement of a performance of a symphony, etc.")

(subclass Lecture Demonstrating)
(subclass Lecture Speaking)
(documentation Lecture EnglishLanguage "Any instance of &%Speaking which is done before an 
assembled audience.")

(subclass Proclaiming Lecture)
(subclass Proclaiming Declaring)
(documentation Proclaiming EnglishLanguage "Any instance of &%Speaking before an assembled 
audience that effects an institutional change, e.g. a change in the laws of 
the government.")

(subclass Commenting IntentionalProcess)
(documentation Commenting EnglishLanguage "Commenting is an &%IntentionalProcess 
where an &%Agent speaks about a &%Process it is &%Looking at.")
(termFormat EnglishLanguage Commenting "commenting")

(=>
  (and
    (instance ?COMMENTING Commenting)
    (instance ?PROCESS Process)
    (patient ?COMMENTING ?PROCESS))
  (exists (?AGENT ?SPEAKING ?LOOKING)
    (and
      (instance ?AGENT Agent)
      (instance ?SPEAKING Speaking)
      (instance ?LOOKING Looking)
      (agent ?SPEAKING ?AGENT)
      (agent ?LOOKING ?AGENT)
      (patient ?LOOKING ?PROCESS)
      (refers ?SPEAKING ?PROCESS))))
      
(instance commentator BinaryPredicate)
(domain commentator 1 Agent)
(domain commentator 2 Process)
(documentation commentator EnglishLanguage "(commentator ?AGENT ?PROCESS) means that some &%Agent 
?AGENT is &%Looking at some &%Process ?PROCESS and &%Speaking about it simultaneously.")
(termFormat EnglishLanguage commentator "commentator")
(=>
  (commentator ?AGENT ?PROCESS)
  (exists (?COMMENTING)
    (and
      (instance ?COMMENTING Commenting)
      (agent ?COMMENTING ?AGENT)
      (patient ?COMMENTING ?PROCESS))))
      

(subclass Reciting Speaking)
(documentation Reciting EnglishLanguage "Any instance of &%Speaking where what is 
uttered is contained within a &%Text.")

(=>
  (instance ?R Reciting)
  (exists (?P ?T)
    (and
      (realization ?R ?P)
      (containsInformation ?T ?P)
      (instance ?T Text))))

(subclass MusicalPerformance Performance)
(documentation MusicalPerformance EnglishLanguage "A &%Performance that consists exclusively of 
&%MakingMusic, e.g. an orchestra playing a symphony to an assembled audience.")

(=>
  (and
    (instance ?P MusicalPerformance)
    (subProcess ?M ?P))
  (instance ?M MakingMusic))

(subclass Sermon Lecture)
(documentation Sermon EnglishLanguage "A &%Lecture that is part of a &%ReligiousService.")

(=>
   (instance ?SERMON Sermon)
   (exists (?SERVICE)
      (and
         (instance ?SERVICE ReligiousService)
         (subProcess ?SERMON ?SERVICE))))

(subclass DramaticActing Pretending)
(documentation DramaticActing EnglishLanguage "Playing a character in a &%Performance, 
&%MotionPicture, etc.") 

(subclass DramaticPerformance Performance)
(documentation DramaticPerformance EnglishLanguage "A &%Performance that consists exclusively of 
&%DramaticActing, e.g. a live performance of Death_of_a_Salesman in front 
of an audience.")
(=>
  (and
    (instance ?P DramaticPerformance)
    (subProcess ?A ?P))
  (instance ?A DramaticActing))

(subclass DramaticCast GroupOfPeople)
(documentation DramaticCast EnglishLanguage "The &%GroupOfPeople who engage in &%DramaticActing 
as part of the realization of a single &%FictionalText.")

(=>
   (instance ?CAST DramaticCast)
   (exists (?TEXT ?PROP ?PROC)
      (and
         (instance ?TEXT FictionalText)
         (containsInformation ?TEXT ?PROP)
         (realization ?PROC ?PROP)
         (forall (?MEMBER)
            (=>
               (member ?MEMBER ?CAST)
               (exists (?SUB)
                  (and
                     (instance ?SUB DramaticActing)
                     (agent ?SUB ?MEMBER)
                     (subProcess ?SUB ?PROC))))))))

(subclass SocialParty Meeting)
(subclass SocialParty RecreationOrExercise)
(documentation SocialParty EnglishLanguage "Any &%Meeting where the intent is primarily 
to socialize and be entertained.")

(subclass FormalMeeting Meeting)
(disjoint FormalMeeting SocialParty)
(documentation FormalMeeting EnglishLanguage "Any &%Meeting which is the result of &%Planning 
and whose purpose is not socializing.")

(=>
   (instance ?MEETING FormalMeeting)
   (exists (?PLANNING)
      (and
         (instance ?PLANNING Planning)
         (result ?PLANNING ?MEETING)
         (earlier (WhenFn ?PLANNING) (WhenFn ?MEETING)))))


(subclass Funeral Ceremony)
(subclass Funeral FormalMeeting)
(documentation Funeral EnglishLanguage "A &%FormalMeeting whose purpose is to commemorate 
the &%Death of someone.")
(=>
  (instance ?F Funeral)
  (exists (?D)
    (and
      (instance ?D Death)
      (refers ?F ?D))))

(subclass Interviewing FormalMeeting)
(documentation Interviewing EnglishLanguage "A &%FormalMeeting whose purpose is to acquire 
information from the interviewee that can be used in a media report.")

(subclass Choreographing Planning)
(documentation Choreographing EnglishLanguage "&%Planning that results in a sequence of dance 
steps that are executed as part of a &%Performance.")
(=>
  (and
    (instance ?G Choreographing)
    (result ?G ?P) 
    (realization ?D ?P))
  (instance ?D Dancing))

(subclass Resolution Deciding)
(documentation Resolution EnglishLanguage "Any instance of &%Deciding which is conducted at a 
&%FormalMeeting and where the &%agent is an &%Organization.")

(=>
   (instance ?RESOLUTION Resolution)
   (exists (?AGENT ?MEETING)
      (and
         (instance ?AGENT Organization)
         (agent ?RESOLUTION ?AGENT)
         (subProcess ?RESOLUTION ?MEETING)
         (instance ?MEETING FormalMeeting))))

(subclass Smoking RecreationOrExercise)
(documentation Smoking EnglishLanguage "Inhaling and exhaling &%Smoke produced by a 
&%CigarOrCigarette.")

(=>
   (instance ?SMOKING Smoking)
   (exists (?BURN ?CIGAR ?BREATHE ?SMOKE)
      (and
         (subProcess ?BURN ?SMOKING)
         (instance ?BURN Combustion)
         (resource ?BURN ?CIGAR)
         (instance ?CIGAR CigarOrCigarette)
         (result ?BURN ?SMOKE)
         (patient ?BREATHE ?SMOKE)
         (instance ?BREATHE Breathing)
         (subProcess ?BREATHE ?SMOKING))))
   
(subclass Jury GroupOfPeople)
(documentation Jury EnglishLanguage "A &%GroupOfPeople who are given the duty of rendering a 
verdict with respect to a &%LegalAction.")

(=>
   (instance ?JURY Jury)
   (holdsRight (exists (?DECISION)
                  (and
                     (instance ?DECISION LegalDecision)
                     (agent ?DECISION ?JURY))) ?JURY))

(subclass CriminalGang GroupOfPeople)
(documentation CriminalGang EnglishLanguage "A &%GroupOfPeople which exists (partially or 
wholly) for the purpose of CriminalAction.")
(=>
  (instance ?G CriminalGang)
  (hasPurpose ?G 
    (exists (?A)
      (and
        (instance ?A CriminalAction)
        (agent ?A ?G)))))

(subclass LegalCharge LegalAction)
(documentation LegalCharge EnglishLanguage "Any &%LegalAction of which a &%Government is 
the &%agent.")

(=>
   (instance ?CHARGE LegalCharge)
   (exists (?GOV)
      (and
         (instance ?GOV Government)
         (agent ?CHARGE ?GOV))))
   
(subclass LegalAppeal Requesting)
(subclass LegalAppeal JudicialProcess)
(documentation LegalAppeal EnglishLanguage "Asking that a higher court reconsider a &%LegalDecision 
of a lower court.")

(subclass Pleading Stating)
(documentation Pleading EnglishLanguage "&%Stating in a court of law a claim about whether or 
not one is guilty of the crime of which one has been accused.")

(=>
  (instance ?P Pleading)
  (exists (?J)
    (and
      (instance ?J JudicialProcess)
      (subProcess ?P ?J))))

(=>
  (instance ?P Pleading)
  (exists (?C)
    (and
      (instance ?C CriminalAction)
      (refers ?P ?C))))

(instance describes BinaryPredicate)
(domain describes 1 Formula)
(domain describes 2 Object)
(documentation describes EnglishLanguage "(describes ?FORMULA ?OBJECT) means that some 
&%Formula ?FORMULA, as said by some &%Agent, is a statement regarding some &%Object ?OBJECT")
(termFormat EnglishLanguage describes "describes")      
(=>
  (describes ?FORMULA ?OBJECT)
  (exists (?STATING ?AGENT)
    (and
      (instance ?STATING Stating)
      (agent ?STATING ?AGENT)
      (patient ?STATING ?FORMULA)
      (refers ?STATING ?OBJECT))))      
      
(subclass Testifying Stating)
(documentation Testifying EnglishLanguage "Giving testimony as part of a &%JudicialProcess.")

(=>
   (instance ?TESTIFY Testifying)
   (exists (?PROC)
      (and
         (instance ?PROC JudicialProcess)
         (subProcess ?TESTIFY ?PROC))))

(subclass CourtRoom Room)
(documentation CourtRoom EnglishLanguage "Any &%Room whose purpose is to realize 
&%JudicialProcesses.")

(=>
   (instance ?PROCESS JudicialProcess)
   (exists (?ROOM)
      (and
         (instance ?ROOM CourtRoom)
         (eventLocated ?PROCESS ?ROOM))))

(subclass LegalOpinion Argument)
(documentation LegalOpinion EnglishLanguage "An &%Argument that explains the reasoning behind a 
&%LegalDecision.")

(=>
   (instance ?OPINION LegalOpinion)
   (exists (?DECISION ?TEXT ?PROPOSITION)
      (and
         (instance ?DECISION LegalDecision)
         (result ?DECISION ?TEXT)
         (containsInformation ?TEXT ?PROPOSITION)
         (conclusion ?PROPOSITION ?OPINION))))

(subclass LegalAward LegalDecision)
(documentation LegalAward EnglishLanguage "Any &%LegalDecision which gives to the plaintiff of 
the corresponding &%LegalAction some amount of monetary compensation.")

(=>
   (and
      (instance ?AWARD LegalAward)
      (refers ?AWARD ?ACTION)
      (instance ?ACTION LegalAction)
      (agent ?ACTION ?PLAINTIFF))
   (confersRight (exists (?GET ?OBJ ?VALUE)
                    (and
                       (instance ?GET Getting)
                       (experiencer ?GET ?PLAINTIFF)
                       (patient ?GET ?OBJ)
                       (monetaryValue ?OBJ ?VALUE))) ?AWARD ?PLAINTIFF))

(subclass LegalConviction LegalDecision)
(documentation LegalConviction EnglishLanguage "Any &%LegalDecision where the defendant is found 
guilty of the crime for which the corresponding trial was held.")

(subclass LegalDismissal LegalDecision)
(documentation LegalDismissal EnglishLanguage "Any &%LegalDecision where the &%LegalAction of 
the plaintiff is dismissed by the court, e.g. for lack of merit.")

(subclass LegalSummons Ordering)
(subclass LegalSummons JudicialProcess)
(documentation LegalSummons EnglishLanguage "An official order that a person appear at a 
&%CourtRoom at a specified time.")

(=>
  (and
    (instance ?S LegalSummons)
    (patient ?S ?O)
    (destination ?S ?P))
  (exists (?C ?T)
    (and
      (instance ?C CourtRoom)
      (containsInformation ?O 
        (modalAttribute 
	  (holdsDuring ?T 
	    (located ?P ?C)) 
	  Law))))) 

(subclass LegalAquittal LegalDecision)
(documentation LegalAquittal EnglishLanguage "Any &%LegalDecision where the defendant is found 
not to be guilty of the crime for which the corresponding trial was held.")

(subclass Sentencing LegalDecision)
(documentation Sentencing EnglishLanguage "Any &%LegalDecision where the defendant is assigned 
a punishment for a &%CriminalAction which was the subject of an earlier 
&%LegalConviction.")

(=>
  (and
    (instance ?S Sentencing)
    (patient ?S ?P))
  (exists (?C)
    (and
      (causes ?C ?S)
      (instance ?C LegalConviction)
      (patient ?C ?P)
      (earlier (WhenFn ?C) (WhenFn ?S)))))

(documentation defendant EnglishLanguage "(defendant ?AGENT ?ACTION) means the &%LegalAction 
?ACTION makes a legal claim against ?AGENT.")
(domain defendant 1 LegalAction)
(domain defendant 2 CognitiveAgent)
(subrelation defendant patient)
(instance defendant CaseRole)

(documentation plaintiff EnglishLanguage "(plaintiff ?ACTION ?AGENT) means that ?AGENT 
is responsible for initiating the &%LegalAction ?ACTION.")
(domain plaintiff 1 LegalAction)
(domain plaintiff 2 CognitiveAgent)
(subrelation plaintiff agent)
(instance plaintiff CaseRole)

(subclass GameCall Deciding)
(subclass GameCall Declaring)
(documentation GameCall EnglishLanguage "A decision issued by an official referee in a 
&%Game.  Note that &%GameCall is a subclass of &%Declaring, because these 
decisions have binding, normative force.")

(=>
   (instance ?CALL GameCall)
   (exists (?GAME)
      (and
         (instance ?GAME Game)
         (refers ?CALL ?GAME))))

(subclass BeginningOperations OrganizationalProcess)
(disjoint BeginningOperations CeasingOperations)
(documentation BeginningOperations EnglishLanguage "The process of an &%Organization 
commencing operations.  In the case of a &%Corporation, this would be 
the process of going into business.")

(=>
   (and
      (instance ?OP BeginningOperations)
      (instance ?ORG Organization)
      (agent ?OP ?ORG))
   (starts ?OP (WhenFn ?ORG)))

(subclass OrganizationalMerging OrganizationalProcess)
(documentation OrganizationalMerging EnglishLanguage "The process of two or more 
&%Organizations merging into a single &%Organization.")

(=>
  (and
    (instance ?M OrganizationalMerging)
    (patient ?M ?ORG1)
    (patient ?M ?ORG2)
    (not (equal ?ORG1 ?ORG2)))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?M)) 
      (not 
        (exists (?S1) 
          (and 
            (subOrganization ?ORG1 ?S1)
            (subOrganization ?ORG2 ?S1)))))
    (holdsDuring 
      (EndFn (WhenFn ?M)) 
      (exists (?S2) 
        (and 
          (subOrganization ?ORG1 ?S2)
          (subOrganization ?ORG2 ?S2))))))

(subclass CeasingOperations OrganizationalProcess)
(documentation CeasingOperations EnglishLanguage "The process of an &%Organization 
ceasing operations, i.e. its folding or going out of business in 
some other fashion.")

(=>
   (and
      (instance ?OP CeasingOperations)
      (instance ?ORG Organization)
      (agent ?OP ?ORG))
   (finishes ?OP (WhenFn ?ORG)))

(subclass BecomingDrunk PsychologicalProcess)
(disjoint BecomingDrunk SoberingUp)
(documentation BecomingDrunk EnglishLanguage "The process of transitioning from a state of 
being &%Sober to a state of being &%Drunk.")
(=>
  (and
    (instance ?B BecomingDrunk)
    (experiencer ?B ?A))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?B)) 
      (attribute ?A Sober))
    (holdsDuring 
      (EndFn (WhenFn ?B)) 
      (attribute ?A Drunk))))

(instance Sober ConsciousnessAttribute)
(documentation Sober EnglishLanguage "The &%ConsciousnessAttribute of someone whose motor and
cognitive faculties are not significantly impaired by a &%BiologicallyActiveSubstance.")

(subclass SoberingUp PsychologicalProcess)
(documentation SoberingUp EnglishLanguage "The process of transitioning from a state of 
being &%Drunk to a state of being &%Sober.")

(=>
  (and
    (instance ?B SoberingUp)
    (experiencer ?B ?A))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?B)) 
      (attribute ?A Drunk))
    (holdsDuring 
      (EndFn (WhenFn ?B)) 
      (attribute ?A Sober)))) 

(subclass FallingAsleep PsychologicalProcess)
(disjoint FallingAsleep WakingUp)
(documentation FallingAsleep EnglishLanguage "The process of transitioning from a state of 
being &%Awake to a state of being &%Asleep.")

(=>
   (and
      (instance ?FALL FallingAsleep)
      (experiencer ?FALL ?AGENT))
   (exists (?START ?FINISH)
      (and
         (starts ?START (WhenFn ?FALL))
         (finishes ?FINISH (WhenFn ?FALL))
         (holdsDuring ?START (attribute ?AGENT Awake))
         (holdsDuring ?FINISH (attribute ?AGENT Asleep))))) 

(subclass WakingUp PsychologicalProcess)
(documentation WakingUp EnglishLanguage "The process of transitioning from a state of being 
&%Asleep to a state of being &%Awake.")

(=>
   (and
      (instance ?WAKE WakingUp)
      (experiencer ?WAKE ?AGENT))
   (exists (?START ?FINISH)
      (and
         (starts ?START (WhenFn ?WAKE))
         (finishes ?FINISH (WhenFn ?WAKE))
         (holdsDuring ?START (attribute ?AGENT Asleep))
         (holdsDuring ?FINISH (attribute ?AGENT Awake))))) 

(subclass GainingConsciousness PsychologicalProcess)
(documentation GainingConsciousness EnglishLanguage "The process of transitioning from a state 
of being &%Unconscious to a state of being &%Awake.")
(=>
  (and
    (instance ?G GainingConsciousness)
    (experiencer ?G ?A))
  (and
    (holdsDuring 
      (BeginFn 
        (WhenFn ?G)) 
      (attribute ?A Unconscious))
    (holdsDuring 
      (EndFn 
        (WhenFn ?G)) 
      (attribute ?A Awake)))) 

(subclass LosingConsciousness PsychologicalProcess)
(disjoint LosingConsciousness GainingConsciousness)
(documentation LosingConsciousness EnglishLanguage "The process of transitioning from a state 
of being &%Awake to a state of being &%Unconscious.")

(=>
  (and
    (instance ?L LosingConsciousness)
    (experiencer ?L ?A))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?L)) 
      (attribute ?A Awake))
    (holdsDuring 
      (EndFn (WhenFn ?L)) 
      (attribute ?A Unconscious))))

(instance issuedBy BinaryPredicate)
(domain issuedBy 1 Certificate)
(domain issuedBy 2 CognitiveAgent)
(documentation issuedBy EnglishLanguage "(&%issuedBy ?Certificate ?Agent) means that a 
&%Certificate ?Certificate is produced and offered by ?Agent.")

(=>
  (issuedBy ?CERT ?AGENT)
  (exists (?P)
    (and
      (instance ?P IntentionalProcess)
      (agent ?P ?AGENT)
      (result ?P ?CERT))))
      
(subclass AcademicDegree Certificate)
(documentation AcademicDegree EnglishLanguage "A &%Certificate that demonstrates that the holder 
of the &%Certificate has successfully completed an &%EducationalProgram.")

(=>
   (and
      (instance ?DEGREE AcademicDegree)
      (possesses ?AGENT ?DEGREE))
   (exists (?PROGRAM ?STUDY)
      (and
         (instance ?PROGRAM EducationalProgram)
         (realization ?STUDY ?PROGRAM)
         (experiencer ?STUDY ?AGENT))))

(subclass License Certificate)
(documentation License EnglishLanguage "License is the subclass of &%Certificates that 
are granted by a &%GovernmentOrganization and that authorize the performance 
of a kind of action, e.g., driving, exporting, travelling to another 
country, etc.")

(=>
  (instance ?L License)
  (exists (?ORG)
    (and
      (instance ?ORG GovernmentOrganization)
      (issuedBy ?L ?ORG))))

(subclass Ticket Certificate)
(documentation Ticket EnglishLanguage "A &%Certificate that allows the holder to perform 
a specified act once, e.g. ride a bus, attend a concert, obtain a prize, 
etc.")

;; KJN: Changing this to be more accurate by including a holdsDuring relation, as 
;; having a ticket doesn't give you perpetual permission to something
;;(=>
;;  (and
;;    (instance ?T Ticket)
;;    (possesses ?A ?T))
;;  (confersNorm ?T 
;;    (exists (?P) 
;;     (agent ?P ?A)) 
;;    Permission))

(=>
  (and
    (issuedBy ?TICKET ?AGENT)
    (instance ?TICKET Ticket)
    (possesses ?CUST ?TICKET))
  (confersNorm ?AGENT
    (exists (?T)
      (holdsDuring ?T
        (exists (?P)
          (and
            (instance ?P Process)
            (agent ?P ?AGENT)
            (experiencer ?P ?CUST))))) Permission))
      
    
(subclass Passport License)
(documentation Passport EnglishLanguage "A &%License which identifies the holder and permits 
travel between different countries.")

(=>
  (and
    (instance ?P Passport)
    (possesses ?A ?P))
  (confersNorm ?P 
    (exists (?T ?N1 ?N2)
      (and
        (instance ?T Translocation)
        (agent ?T ?A)
        (origin ?T ?N1)
        (destination ?T ?N2)
	(instance ?N1 Nation)
        (instance ?N2 Nation)
        (not (equal ?N1 ?N2))))
  Permission))

(subclass PassCertificate Certificate)
(documentation PassCertificate EnglishLanguage "A &%Certificate that allows the holder to 
be at or away from a specified location, e.g. a pass for a leave of 
absence, a hall pass, a pass to enter a cleared facility, etc.")

(=>
  (and
    (instance ?P PassCertificate)
    (possesses ?A ?P))
  (exists (?L)
    (confersNorm ?P 
      (located ?A ?L) 
      Permission)))

(subclass Testament Certificate)
(documentation Testament EnglishLanguage "A &%Certificate that describes how a person's 
property is to be distributed after the death of the person.")

(=>
  (instance ?T Testament)
  (exists (?B)
    (and
      (instance ?B Bequeathing)
      (refers ?T ?B))))

(documentation registeredItem EnglishLanguage "(registeredItem ?DOCUMENT ?ITEM) means 
that the &%Text ?DOCUMENT contains an official record of the &%Physical 
thing ?ITEM.  The registered item could be an object or an event, e.g., 
an automobile, a ship, a marriage, an adoption.")
(instance registeredItem BinaryPredicate)
(domain registeredItem 1 Text)
(domain registeredItem 2 Physical)
(subrelation registeredItem refers)

(subclass EducationalProgram Plan)
(documentation EducationalProgram EnglishLanguage "A series of &%EducationalCourses that must 
be completed to receive an &%AcademicDegree or other &%Certificate.  Note that 
an &%EducationalProgram, unlike an &%EducationalCourse, may be realized at more 
than one &%EducationalOrganization.")

(=>
   (instance ?PROGRAM EducationalProgram)
   (exists (?COURSE1 ?COURSE2)
      (and
         (instance ?COURSE1 EducationalCourse)
         (instance ?COURSE2 EducationalCourse)
         (not (equal ?COURSE1 ?COURSE2))
         (subPlan ?COURSE1 ?PROGRAM)
         (subPlan ?COURSE2 ?PROGRAM))))

(subclass EducationalCourse EducationalProgram)
(documentation EducationalCourse EnglishLanguage "A schedule of class meetings offered by an 
&%EducationalOrganization.")

(=>
   (instance ?COURSE EducationalCourse)
   (exists (?CLASS ?ORG)
      (and
         (realization ?CLASS ?COURSE)
         (instance ?CLASS EducationalProcess)
         (eventLocated ?CLASS ?ORG)
         (instance ?ORG EducationalOrganization))))  

(subclass SportsPlay Plan)
(documentation SportsPlay EnglishLanguage "A &%Plan for a &%Maneuver within a &%TeamSport.")

(=>
  (and
    (instance ?SP SportsPlay)
    (realization ?P ?SP))
  (exists (?S)
    (and
      (instance ?S TeamSport)
      (instance ?P Maneuver)
      (subProcess ?P ?S))))

(subclass School EducationalOrganization)
(documentation School EnglishLanguage "An &%EducationalOrganization with a curriculum, 
teachers, and students.  Most &%Schools are housed in a &%Building 
dedicated to the &%EducationalOrganization.")

(subclass PublicSchool School)
(subclass PublicSchool GovernmentOrganization)
(documentation PublicSchool EnglishLanguage "A &%School which is financed primarily by taxes.")

(subclass PrivateSchool School)
(disjoint PrivateSchool GovernmentOrganization)
(documentation PrivateSchool EnglishLanguage "A &%School which is not publicly owned.")

(subclass HighSchool School)
(documentation HighSchool EnglishLanguage "A &%School which admits &%students who have 
graduated from a middle school and which normally covers the ninth through 
twelfth grades.  A &%HighSchool confers a high school diploma.")

(=>
   (and
      (instance ?ENTER Matriculation)
      (agent ?ENTER ?COLLEGE)
      (patient ?ENTER ?STUDENT)
      (instance ?COLLEGE College))
   (exists (?GRAD ?SCHOOL)
      (and
         (instance ?GRAD Graduation)
         (agent ?GRAD ?SCHOOL)
         (patient ?GRAD ?STUDENT)
         (instance ?SCHOOL HighSchool)
         (earlier (WhenFn ?GRAD) (WhenFn ?ENTER)))))

(subclass SecondarySchool School)
(documentation SecondarySchool EnglishLanguage "A &%School which admits students who have 
graduated from a middle school and which normally covers the ninth through 
twelfth grades.  A &%SecondarySchool confers a high school diploma.")

(=>
  (and
    (instance ?E Matriculation)
    (agent ?E ?C)
    (patient ?E ?P)
    (instance ?C College))
  (exists (?G ?S)
    (and
      (instance ?G Graduation)
      (agent ?G ?S)
      (patient ?G ?P)
      (instance ?S SecondarySchool)
      (earlier (WhenFn ?G) (WhenFn ?E)))))

(subclass VocationalSchool School)
(documentation VocationalSchool EnglishLanguage "Any &%School whose aim is to teach 
students an &%OccupationalTrade.")

(=>
  (instance ?VS VocationalSchool)
  (hasPurpose ?VS 
    (exists (?P ?S ?T)
      (and
        (instance ?P EducationalProcess)
        (eventLocated ?P ?VS)
        (student ?S ?VS)
	(experiencer ?P ?S)
        (instance ?T OccupationalTrade)
        (holdsDuring 
	  (EndFn (WhenFn ?P)) 
	  (attribute ?S ?T))))))

(subclass PostSecondarySchool School)
(partition PostSecondarySchool JuniorCollege College University)
(documentation PostSecondarySchool EnglishLanguage "The class of &%Schools that offer 
an associate's degree or a bachelor's degree.")

(subclass JuniorCollege PostSecondarySchool)
(documentation JuniorCollege EnglishLanguage "The class of &%PostSecondarySchools that 
offer an associate's degree and do not offer a bachelor's degree.")
   
(subclass College PostSecondarySchool)
(documentation College EnglishLanguage "A &%School which admits &%students who have 
graduated from high school and which confers a bachelor's degree, 
normally requiring four years of study.  Note that a &%College does 
not confer any graduate degrees.  For institutions that confer both 
bachelor's and graduate degrees, the concept &%University should be 
used.") 

(subclass University PostSecondarySchool)
(documentation University EnglishLanguage "A &%School which admits &%students that 
have graduated from high school (known as undergraduate students) and 
&%students who have received a bachelor's degree (known as graduate 
students).  A &%University confers both bachelor's and graduate 
degrees.")

(subclass GraduateSchool PostSecondarySchool)
(documentation GraduateSchool EnglishLanguage "A &%School which is devoted to a specific 
subject area, which admits students that have a bachelor's degree, which 
grants masters and/or doctorate degrees, and which is part of a &%University.")
(=>
  (instance ?S GraduateSchool)
  (exists (?U)
    (and
      (instance ?U University)
      (part ?S ?U))))

(subclass MedicalSchool GraduateSchool)
(documentation MedicalSchool EnglishLanguage "A &%GraduateSchool that is devoted to 
&%MedicalScience and that grants the degree of doctor of medicine.")

(subclass ArtSchool School)
(documentation ArtSchool EnglishLanguage "Any &%School whose aim is to teach students 
how to create &%ArtWorks.")
(=>
   (and
      (instance ?AS ArtSchool)
      (instance ?P EducationalProcess)
      (eventLocated ?P ?AS))
   (exists (?M ?ART)
      (and
         (instance ?M Making)
         (patient ?M ?ART)
         (instance ?ART ArtWork)
         (refers ?P ?M))))

(subclass DaySchool School)
(documentation DaySchool EnglishLanguage "A &%School that does not board its students, i.e. 
students attend classes during the day and then return to a private residence 
for the night.")
(=>
  (instance ?DS DaySchool)
  (not 
    (exists (?S)
      (and
        (student ?S ?DS)
        (home ?S ?DS)))))

(subrelation student member)
(domain student 1 Human)
(domain student 2 EducationalOrganization)
(documentation student EnglishLanguage "(&%student ?AGENT ?ORG) means that ?AGENT is enrolled 
in the &%EducationalOrganization ?ORG.")

(=>
  (student ?AGENT ?ORG)
  (exists (?PROCESS)
    (and
      (instance ?PROCESS EducationalProcess)
      (eventLocated ?PROCESS ?ORG)
      (destination ?PROCESS ?AGENT))))

(subrelation teacher member)
(domain teacher 1 Human)
(domain teacher 2 EducationalOrganization)
(documentation teacher EnglishLanguage "(&%teacher ?AGENT ?ORG) means that ?AGENT is a 
teacher at the &%EducationalOrganization ?ORG.")

(=>
   (teacher ?AGENT ?ORG)
   (exists (?PROCESS)
      (and
         (instance ?PROCESS EducationalProcess)
	 (eventLocated ?PROCESS ?ORG)
         (agent ?PROCESS ?AGENT))))

(subclass DriversLicense License)
(documentation DriversLicense EnglishLanguage "A &%License which identifies the holder and 
indicates that he has the right to drive a certain class of &%RoadVehicle.")
(=>
  (and
    (instance ?L DriversLicense)
    (possesses ?A ?L))
  (confersNorm ?L 
    (exists (?D ?V)
      (and
        (instance ?D Driving)
        (agent ?D ?A)
        (patient ?D ?V)
        (instance ?V RoadVehicle))) 
    Permission))

    
(subclass InsurancePolicy Certificate)
(documentation InsurancePolicy EnglishLanguage "A &%Certificate that states the terms of an 
insurance contract.")

(subclass EconomicRelation BinaryRelation)
(documentation EconomicRelation EnglishLanguage "A class of &%Relations which are used 
to specify various economic measures, e.g. the GDP, the consumer price 
index, and the trade deficit.")

(=>
   (and
      (instance ?REL EconomicRelation)
      (domain ?REL 1 ?CLASS))
   (subclass ?CLASS GeopoliticalArea))

(subclass LaborStriking OrganizationalProcess)
(documentation LaborStriking EnglishLanguage "A &%Process in which some or all of the 
employees of an &%Organization refuse to work until their pay is 
increased or their working conditions are improved in some respect.")

(=>
   (and
      (instance ?STRIKE LaborStriking)
      (agent ?STRIKE ?PERSON)
      (instance ?PERSON Human)
      (patient ?STRIKE ?ORG)
      (instance ?ORG Organization))
   (employs ?ORG ?PERSON))

(subclass EmploymentFiring TerminatingEmployment)
(documentation EmploymentFiring EnglishLanguage "Involuntarily ending one's employment.  
Note that this covers termination due to inadequate performance, as 
well as layoffs.")

(subclass Resigning TerminatingEmployment)
(documentation Resigning EnglishLanguage "Voluntarily ending one's employment.")

(=>
  (and
    (instance ?R Resigning)
    (agent ?R ?A))
  (wants ?A ?R))

(subclass Retiring Resigning)
(documentation Retiring EnglishLanguage "Voluntarily leaving employment at the end of one's 
career in order to take time off in the later years of one's life.")

(subclass TransferringPosition OrganizationalProcess)
(documentation TransferringPosition EnglishLanguage "Any process within an &%Organization 
where a person is moved from one &%Position to another, e.g. the promotion 
or demotion of an employee.")

(=>
  (and
    (instance ?T TransferringPosition)
    (experiencer ?T ?H))
  (exists (?P1 ?P2 ?ORG)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?T)) 
	(occupiesPosition ?H ?P1 ?ORG))
      (holdsDuring 
        (EndFn (WhenFn ?T)) 
	(occupiesPosition ?H ?P2 ?ORG))
      (not 
        (equal ?P1 ?P2)))))

(instance monetaryWage QuaternaryPredicate)
(domain monetaryWage 1 Organization)
(domain monetaryWage 2 Human)
(domain monetaryWage 3 TimeDuration)
(domain monetaryWage 4 CurrencyMeasure)
(documentation monetaryWage EnglishLanguage "(&%monetaryWage ?ORG ?PERSON ?TIME ?MONEY) means 
that the &%Organization employs ?PERSON and pays him/her the amount of money 
?MONEY per &%TimeDuration ?TIME.") 

(=>
   (monetaryWage ?ORG ?PERSON ?TIME ?MONEY)
   (employs ?ORG ?PERSON))

(subclass GameArtifact Artifact)
(disjointDecomposition GameArtifact GameBoard GamePiece)
(documentation GameArtifact EnglishLanguage "An &%Artifact that is designed to be used as an 
&%instrument in a &%Game.")

(=>
   (instance ?ARTIFACT GameArtifact)
   (exists (?GAME)
      (and
         (subclass ?GAME Game)
         (capability ?GAME instrument ?ARTIFACT))))

(subclass GameBoard GameArtifact)
(documentation GameBoard EnglishLanguage "A &%GameArtifact which is intended to be used as the 
game area for playing a particular game.")

(=>
   (instance ?BOARD GameBoard)
   (hasPurpose ?BOARD (exists (?GAME)
                         (and
                            (instance ?GAME Game)
                            (eventLocated ?GAME ?BOARD)))))

(subclass GamePiece GameArtifact)
(documentation GamePiece EnglishLanguage "A &%GameArtifact that is moved around in a game 
area.")

(subclass GameDie GamePiece)
(documentation GameDie EnglishLanguage "A small cube with 1 to 6 dots on each face that is 
used to generate numbers at random in a &%Game.")

(subclass Ball GamePiece)
(documentation Ball EnglishLanguage "Any &%GamePiece which has the shape of a sphere.")
(=>
  (instance ?B Ball)
  (attribute ?B Sphere))

(subclass ShotBall Ball)
(documentation ShotBall EnglishLanguage "A solid metal &%Ball that is used in the sport of 
shotput.")

(subclass GameShot Impelling)
(subclass GameShot Maneuver)
(documentation GameShot EnglishLanguage "Impelling a &%GamePiece for the purpose of 
scoring a point or preventing the opposing player or team from scoring 
a point.  Note that this class does not cover shots which are disallowed 
by the rules of the game.")

(=>
   (instance ?SHOT GameShot)
   (exists (?PIECE)
      (and
         (instance ?PIECE GamePiece)
         (patient ?SHOT ?PIECE))))

(=>
   (instance ?SHOT GameShot)
   (exists (?GAME)
      (and
         (instance ?GAME Game)
         (subProcess ?SHOT ?GAME))))

(=>
   (instance ?SHOT GameShot)
   (hasPurpose ?SHOT (instance ?SHOT Score)))

(subclass Score GameShot)
(documentation Score EnglishLanguage "A successful attempt to score a point in a &%Game.")

(subclass GameGoal GameArtifact)
(documentation GameGoal EnglishLanguage "The location where a &%GameShot must end up if it 
is to constitute a &%Score.")

(=>
   (and
      (instance ?GOAL GameGoal)
      (instrument ?GAME ?GOAL)
      (instance ?GAME Game)
      (subProcess ?SCORE ?GAME)
      (instance ?SCORE Score))
   (exists (?PIECE ?TIME)
      (and
         (instance ?PIECE GamePiece)
         (patient ?SCORE ?PIECE)
         (temporalPart ?TIME (WhenFn ?SCORE))
         (holdsDuring ?TIME (located ?PIECE ?GOAL)))))

(subclass SportServe GameShot)
(documentation SportServe EnglishLanguage "A &%GameShot which is part of a &%Sport and 
which serves to start the &%Sport, e.g. the beginning shot in &%Tennis, 
&%Badminton or &%Squash.")

(=>
  (instance ?SS SportServe)
  (exists (?S)
    (and
      (instance ?S Sport)
      (subProcess ?SS ?S)
      (starts (WhenFn ?SS) (WhenFn ?S)))))

(subclass Throwing Impelling)
(subclass Throwing BodyMotion)
(documentation Throwing EnglishLanguage "Any instance of &%Impelling where the &%instrument is 
an &%Arm.")

(=>
   (instance ?THROW Throwing)
   (exists (?ARM)
      (and
         (instance ?ARM Arm)
         (instrument ?THROW ?ARM))))

(subclass Pitching Throwing)
(subclass Pitching GameShot)
(documentation Pitching EnglishLanguage "&%Throwing a &%Ball to the batter in a game of 
&%Baseball or softball.")

(=>
   (and
      (instance ?PITCH Pitching)
      (patient ?PITCH ?BALL))
   (instance ?BALL Ball))

(subclass Catching Touching)
(subclass Catching Maneuver)
(documentation Catching EnglishLanguage "Any &%Maneuver in a &%Game which results in a 
situation where the &%agent &%grasps the &%Ball.")

(=>
   (and
      (instance ?CATCH Catching) 
      (patient ?CATCH ?BALL))
   (instance ?CATCH Ball))

(=>
   (and
      (instance ?CATCH Catching)
      (agent ?CATCH ?AGENT)
      (patient ?CATCH ?BALL))
   (holdsDuring (EndFn (WhenFn ?CATCH)) (grasps ?AGENT ?BALL)))

;; KJN: Moving to Sports.kif   
;;(subclass HomeBase BaseballBase)
;;(documentation HomeBase EnglishLanguage "The final &%BaseballBase which must be touched 
;;by the batter in order to achieve a BaseballRun.")
;;(=>
;;  (and
;;    (instance ?R BaseballRun)
;;    (agent ?R ?A))
;;  (exists (?T ?H)
;;    (and
;;      (instance ?T Touching)
;;      (subProcess ?T ?R)
;;      (agent ?T ?A)
;;      (patient ?T ?H)
;;      (instance ?H HomeBase))))

;; KJN: Moving this to Sports.kif      
;;(subclass PitchersMound GameArtifact)
;;(documentation PitchersMound EnglishLanguage "The place where the pitcher in &%Baseball 
;;stands when he is throwing balls to the batter.")

;;(=>
;;  (and
;;    (instance ?G Baseball)
;;    (instance ?P Pitching)
;;    (subProcess ?P ?G))
;;  (exists (?M)
;;    (and
;;      (instance ?M PitchersMound)
;;      (origin ?P ?M))))

(subclass Sign ContentBearingObject)      
(subclass Sign DisplayArtifact)
(documentation Sign EnglishLanguage "A Sign is a &%DisplayArtifact that displays any range of information")
(termFormat EnglishLanguage Sign "Sign")

(subclass PlayingCard GameArtifact)
(subclass PlayingCard ContentBearingObject)
(documentation PlayingCard EnglishLanguage "A small piece of stiff paper with markings 
which is intended to be used for playing card games.")

(=>
  (instance ?C PlayingCard)
  (material Paper ?C))

(subclass Stretching Motion)
(documentation Stretching EnglishLanguage "Moving two sides of an object in opposite 
directions so that the object becomes both longer and thinner.")
(subclass Stretching Lengthening)

(subclass Accelerating Translocation)
(subclass Accelerating Increasing)
(documentation Accelerating EnglishLanguage "Increasing the speed with which someone 
or something is moving.")

(=>
   (and
      (instance ?ACCELERATE Accelerating)
      (agent ?ACCELERATE ?AGENT))
   (exists (?LENGTH1 ?LENGTH2 ?TIME1 ?TIME2)
      (and
         (holdsDuring (BeginFn (WhenFn ?ACCELERATE)) (measure ?AGENT (SpeedFn ?LENGTH1 ?TIME1)))
         (holdsDuring (EndFn (WhenFn ?ACCELERATE)) (measure ?AGENT (SpeedFn ?LENGTH2 ?TIME2)))
         (or
            (greaterThan ?LENGTH2 ?LENGTH1)
            (greaterThan ?TIME2 ?TIME1))))) 

(subclass Decelerating Translocation)
(subclass Decelerating Decreasing)
(documentation Decelerating EnglishLanguage "Decreasing the speed with which someone 
or something is moving.")
(=>
  (and
    (instance ?D Decelerating)
    (agent ?D ?A))
  (exists (?L1 ?L2 ?T1 ?T2)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?D)) 
        (measure ?A (SpeedFn ?L1 ?T1)))
      (holdsDuring 
        (EndFn (WhenFn ?D)) 
        (measure ?A (SpeedFn ?L2 ?T2)))
      (or
        (greaterThan ?L1 ?L2)
        (greaterThan ?T1 ?T2))))) 

(=>
  (and
    (instance ?A Accelerating)
    (equal ?T (WhenFn ?A))
    (experiencer ?A ?E))
  (not
    (exists (?D)
      (and
        (instance ?D Decelerating)
        (experiencer ?D ?E)
        (equal ?T (WhenFn ?D))))))

(subclass Shortening Decreasing)
(documentation Shortening EnglishLanguage "Decreasing the length of something.")

(=>
  (and
    (instance ?S Shortening)
    (patient ?S ?O))
  (exists (?L1 ?L2)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?S)) 
	(length ?O ?L1))
      (holdsDuring 
        (EndFn (WhenFn ?S)) 
	(length ?O ?L2))
      (greaterThan ?L1 ?L2))))

(subclass Flying Translocation)
(documentation Flying EnglishLanguage "Any instance of &%Translocation which is through an 
&%AtmosphericRegion and which is powered by the wings of an &%Animal.")

(=>
   (instance ?FLY Flying)
   (exists (?REGION)
      (and
         (instance ?REGION AtmosphericRegion)
         (eventLocated ?FLY ?REGION))))

(subclass TakingOff Translocation)
(documentation TakingOff EnglishLanguage "Any instance of &%Translocation which starts on something other 
than an &%AtmosphericRegion and which has an instance of &%Flying as a &%subProcess.")

(=>
   (instance ?OFF TakingOff)
   (exists (?REGION ?FLYING)
      (and
         (not (instance ?REGION AtmosphericRegion))
         (holdsDuring (BeginFn (WhenFn ?OFF)) (eventLocated ?OFF ?REGION))
         (subProcess ?FLYING ?OFF)
         (instance ?FLYING Flying))))

(subclass Landing Translocation)
(documentation Landing EnglishLanguage "Any instance of &%Translocation which ends up on something other 
than an &%AtmosphericRegion and which has an instance of &%Flying as a &%subProcess.")

(=>
   (instance ?LAND Landing)
   (exists (?REGION ?FLYING)
      (and
         (not (instance ?REGION AtmosphericRegion))
         (holdsDuring (EndFn (WhenFn ?LAND)) (eventLocated ?LAND ?REGION))
         (subProcess ?FLYING ?LAND)
         (instance ?FLYING Flying))))

(subclass Returning Translocation)
(documentation Returning EnglishLanguage "Any instance of &%Translocation where the &%agent 
goes to a location where he/she had been before the &%Translocation took place.")

(=>
   (and
      (instance ?RETURN Returning)
      (experiencer ?RETURN ?AGENT)
      (destination ?RETURN ?DEST))
   (exists (?TIME)
      (and
         (earlier ?TIME (WhenFn ?RETURN))
         (holdsDuring ?TIME (located ?AGENT ?DEST)))))

(subclass Escaping Translocation)
(documentation Escaping EnglishLanguage "Any instance of &%Translocation where the &%agent brings 
it about that he/she is no longer confined without having the right to do 
so.")

(=>
   (and
      (instance ?ESCAPE Escaping)
      (agent ?ESCAPE ?AGENT))
   (exists (?CONFINE)
      (and
         (instance ?CONFINE Confining)
         (patient ?CONFINE ?AGENT)
         (meetsTemporally (WhenFn ?CONFINE) (WhenFn ?ESCAPE)))))

(=>
   (instance ?ESCAPE Escaping)
   (not (holdsRight (agent ?ESCAPE ?AGENT) ?AGENT)))
   
(subclass Leaving Translocation)
(documentation Leaving EnglishLanguage "The initial part of any instance of &%Translocation.")

(=>
   (instance ?LEAVE Leaving)
   (exists (?GO)
      (and
         (instance ?GO Translocation)
         (subProcess ?LEAVE ?GO)
         (starts (WhenFn ?LEAVE) (WhenFn ?GO)))))

(subclass Arriving Translocation)
(documentation Arriving EnglishLanguage "The final part of any instance of &%Translocation.")

(=>
   (instance ?ARRIVE Arriving)
   (exists (?GO)
      (and
         (instance ?GO Translocation)
         (subProcess ?ARRIVE ?GO)
         (finishes (WhenFn ?ARRIVE) (WhenFn ?GO)))))

(subclass Disappearing Translocation)
(documentation Disappearing EnglishLanguage "A &%Translocation of an &%Object ?OBJ after which a &%Searching of the ?OBJ occurs but for a &%TimeInterval ?TIME it is not possible for the &%Agent of the search to discover the ?OBJ")

(=>
 (instance ?D Disappearing)
 (exists (?OBJ ?AGENT ?SEARCH ?TIME)
   (and
      (instance ?SEARCH Searching)
      (earlier 
        (WhenFn ?D)
        (WhenFn ?SEARCH))
      (agent ?SEARCH ?AGENT)
      (instance ?OBJ Object)
      (patient ?D ?OBJ)
      (patient ?SEARCH ?OBJ)
      (instance ?TIME TimeInterval)
      (temporalPart ?TIME 
        (WhenFn ?SEARCH))
      (holdsDuring ?TIME
        (not
          (modalAttribute
            (exists (?DISC)
              (and
                (instance ?DISC Discovering)
                (agent ?DISC ?AGENT)
                (patient ?DISC ?OBJ)))Possibility))))))

(subclass Immigrating Translocation)
(documentation Immigrating EnglishLanguage "Any &%Translocation by a Human from one &%Nation 
to another &%Nation where the person is not a citizen for the purpose of taking 
up residence.")

(=>
  (and
    (instance ?I Immigrating)
    (agent ?I ?A))
  (exists (?N1 ?N2)
    (and
      (instance ?N1 Nation)
      (instance ?N2 Nation)
      (origin ?I ?N1)
      (destination ?I ?N2)
      (not 
        (equal ?N1 ?N2))
      (member ?A (CitizenryFn ?N1))
      (not 
        (member ?A (CitizenryFn ?N2)))
      (hasPurpose ?I 
        (inhabits ?A ?N2)))))

(=>
  (and
    (instance ?I Immigrating)
    (agent ?I ?A))
  (instance ?A Human))

(subclass Boarding Translocation)
(documentation Boarding EnglishLanguage "Getting on a &%Vehicle, e.g. getting into an 
&%Automobile, boarding an &%Aircraft, etc.")
(=>
  (and
    (instance ?B Boarding)
    (patient ?B ?V))
  (instance ?V Vehicle))

(=>
  (and
    (instance ?B Boarding)
    (agent ?B ?AGENT)
    (patient ?B ?V))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?B)) 
      (not (onboard ?A ?V)))
    (holdsDuring 
      (EndFn (WhenFn ?B)) 
      (onboard ?A ?V))))

(documentation onboard EnglishLanguage "(onboard ?OBJ ?VEHICLE) means that the 
&%SelfConnectedObject ?OBJ is inside the &%Vehicle ?VEHICLE.")
(domain onboard 1 SelfConnectedObject)
(domain onboard 2 Vehicle)
(subrelation onboard located)

(=>
  (onboard ?O ?V)
  (contains ?V ?O))

(=>
  (and
    (onboard ?O ?V)
    (instrument ?T ?V)
    (instance ?T Transportation))
  (patient ?T ?O))

(subclass Deboarding Translocation)
(relatedInternalConcept Boarding Deboarding)
(documentation Deboarding EnglishLanguage "Getting off a &%Vehicle, e.g. getting out of an 
Automobile, deplaning, getting off a &%WaterVehicle, etc.")
(=>
  (and
    (instance ?B Deboarding)
    (patient ?B ?VEHICLE))
  (instance ?VEHICLE Vehicle))

(=>
  (and
    (instance ?B Deboarding)
    (agent ?B ?A)
    (patient ?B ?V))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?B)) 
      (onboard ?A ?V))
    (holdsDuring 
      (EndFn (WhenFn ?B)) 
      (not 
        (onboard ?A ?V)))))

(subclass Rotating Motion)
(documentation Rotating EnglishLanguage "&%Motion that begins and ends at the same point, 
because the trajectory of the &%Motion is circular.")

(=>
  (and
    (instance ?R Rotating)
    (patient ?R ?A))
  (exists (?L)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?R)) 
	(located ?A ?L))
      (holdsDuring 
        (EndFn (WhenFn ?R)) 
	(located ?A ?L)))))

(subclass Tremor Rotating)
(documentation Tremor EnglishLanguage "&%Motion that involves rapidly &%Rotating between 
two positions.")

(instance axis BinaryPredicate)
(documentation axis EnglishLanguage "(axis ?A ?OBJ) means that a &%part ?A of an &%Object ?OBJ
is the axis of rotation in a &%Rotating.")
(domain axis 1 Object)
(domain axis 2 Object)

(=>
  (axis ?AXIS ?OBJ)
  (exists (?R)
    (and
      (instance ?R Rotating)
      (part ?AXIS ?OBJ)
      (experiencer ?R ?OBJ)
      (not
        (exists (?R2)
          (and
            (instance ?R2 Rotating)
            (subProcess ?R2 ?R)
            (experiencer ?R2 ?AXIS)))))))

(subclass CentrifugalMotion Rotating)
(disjoint CentrifugalMotion CentripetalMotion)
(documentation CentrifugalMotion EnglishLanguage "Any instance of &%Rotating where there is 
&%Motion away from the center of the &%Rotating.")
(=>
  (instance ?CM CentrifugalMotion)
  (exists (?R ?A ?O1 ?O2)
    (and
      (instance ?R Rotating)
      (axis ?A ?O1)
      (origin ?CM ?A)
      (experiencer ?R ?O1)
      (experiencer ?CM ?O2)
      (causes ?R ?CM))))

(subclass CentripetalMotion Rotating)
(documentation CentripetalMotion EnglishLanguage "Any instance of &%Rotating where there is 
&%Motion towards the center of the &%Rotating.")
(=>
  (instance ?CM CentripetalMotion)
  (exists (?R ?A ?O1 ?O2)
    (and
      (instance ?R Rotating)
      (axis ?A ?O1)
      (destination ?CM ?A)
      (experiencer ?R ?O1)
      (experiencer ?CM ?O2)
      (causes ?R ?CM))))

(subclass Reversing Motion)
(documentation Reversing EnglishLanguage "Moving something in such a way that its &%top 
becomes its &%bottom and vice versa.")

(=>
   (and
      (instance ?REVERSE Reversing)
      (patient ?REVERSE ?OBJ)
      (holdsDuring (BeginFn (WhenFn ?REVERSE)) (and (top ?TOP ?OBJ) (bottom ?BOTTOM ?OBJ))))
   (holdsDuring (EndFn (WhenFn ?REVERSE)) (and (top ?BOTTOM ?OBJ) (bottom ?TOP ?OBJ))))

(subclass Dripping LiquidMotion)
(documentation Dripping EnglishLanguage "Any &%LiquidMotion where the &%Liquid is moved 
drop by drop.")

(subclass Stirring LiquidMotion)
(subclass Stirring Combining)
(documentation Stirring EnglishLanguage "Any instance of &%LiquidMotion which is also an 
instance of &%Combining two or more &%Liquids.")

(subclass Pouring LiquidMotion)
(subclass Pouring Transfer)
(documentation Pouring EnglishLanguage "Any instance of &%Transfer from one &%Container to 
another, where the thing transferred is a &%Liquid.")

(=>
   (instance ?POUR Pouring)
   (exists (?LIQUID ?CONTAINER1 ?CONTAINER2)
      (and
         (origin ?POUR ?CONTAINER1)
         (destination ?POUR ?CONTAINER2)
         (instance ?CONTAINER1 Container)
         (instance ?CONTAINER2 Container)
         (not (equal ?CONTAINER1 ?CONTAINER2))
         (patient ?POUR ?LIQUID)
         (attribute ?LIQUID Liquid)
         (instance ?LIQUID Substance))))

(subclass WaterWave LiquidMotion)
(documentation WaterWave EnglishLanguage "A &%WaterWave is a raised ridge of water 
moving along the surface of a body of water.  The &%WaterWave moves 
in a direction approximately transverse to the crest line of the wave.  
The &%patient of the &%WaterWave is successive regions of water, which 
do not travel in the direction of the wave or with it.")

(=>
   (instance ?WAVE WaterWave)
   (exists (?AREA)
      (and
         (instance ?AREA WaterArea)
         (eventLocated ?WAVE ?AREA))))

(instance waterDepth BinaryPredicate)
(domain waterDepth 1 WaterArea)
(domain waterDepth 2 LengthMeasure)
(subrelation waterDepth length)
(documentation waterDepth EnglishLanguage "(&%waterDepth ?AREA ?LENGTH) means that the 
depth of water at the &%Region ?AREA is ?LENGTH.")

(=>
  (waterDepth ?AREA ?DEPTH)
  (exists (?BOTTOM ?TOP)
    (and
      (depth ?TOP ?BOTTOM ?DEPTH)
      (top ?TOP ?AREA)
      (bottom ?BOTTOM ?AREA))))
         
(subclass Flooding LiquidMotion)
(documentation Flooding EnglishLanguage "Flooding is the subclass of &%LiquidMotion 
processes in which the water level of a &%Waterway rises or water spreads 
over a flood plain along a &%Waterway.")
(=>
  (and
    (instance ?F Flooding)
    (eventLocated ?F ?P))
  (exists (?L1 ?L2)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?F)) 
        (waterDepth ?P ?L1))
      (holdsDuring 
        (EndFn (WhenFn ?F)) 
        (waterDepth ?P ?L2))
      (greaterThan ?L2 ?L1))))

(subclass Spraying LiquidMotion)
(subclass Spraying Transfer)
(documentation Spraying EnglishLanguage "Any instance of &%Transfer of a &%Liquid which is 
accomplished by converting the &%Liquid into a mist.")

;; KJN: Need to rethink this definition.  It is used as the more traditional
;; notion of pulling (like 'pulling the trigger' instead of being specifically 
;; a transportation device pulling something else
;;(subclass Pulling LandTransportation)
;;(documentation Pulling EnglishLanguage "Any instance of ;;&%LandTransportation, where a 
;;&%TransportationDevice is dragged by something else, whether the something 
;;else is an &%Animal or a self-powered &%TransportationDevice.")

;;(=>
;;  (and
;;    (instance ?P Pulling)
;;    (patient ?P ?D))
;;  (instance ?D TransportationDevice))

(subclass Pulling Motion)
(documentation Pulling EnglishLanguage "&%Pulling describe the exertion of force so as
to cause or tend to cause motion towards the agent.")

;; KJN: Moving this to MilitaryDevices.kif as it has a more exhaustive discussion on
;; MilitaryVehicle  
;;(subclass MilitaryVehicle MilitaryPlatform)
;;(subclass MilitaryVehicle Vehicle)
;;(documentation MilitaryVehicle EnglishLanguage "Any &%Vehicle which is intended to be 
;;used by a &%MilitaryOrganization. Military platforms which are also vehicles. 
;;This would include things like airplanes and tanks, but exclude things like 
;;towed platforms.")

;;(=>
;;  (instance ?V MilitaryVehicle)
;;  (hasPurpose ?V 
;;    (exists (?O)
;;      (and
;;        (instance ?O MilitaryOrganization)
;;        (uses ?V ?O)))))

;;(subclass MilitaryWaterVehicle WaterVehicle)
;;(documentation MilitaryWaterVehicle EnglishLanguage "&%MilitaryWaterVehicle is the class of 
;;all &%WaterVehicle owned or leased for use by some &%MilitaryOrganization.")

(subclass Submarine WaterVehicle)
(documentation Submarine EnglishLanguage "A &%WaterVehicle which is capable of travelling 
under the water level by filling tanks with water.")

;;(subclass MilitaryTank MilitaryVehicle)
;;(subclass MilitaryTank RoadVehicle)
;;(subclass MilitaryTank ArtilleryGun)
;;(documentation MilitaryTank EnglishLanguage "A &%MilitaryVehicle that moves along the ground 
;;on treaded wheels and that contains a large cannon.")


;;(subclass TractorTrailer RoadVehicle)
;;(documentation TractorTrailer EnglishLanguage "&%TractorTrailer is the subclass of 
;;&%RoadVehicles that are truck tractor- truck trailer combinations.")

;;(=>
;;  (instance ?TT TractorTrailer)
;;  (exists (?TRAC ?TRAIL)
;;    (and
;;      (instance ?TRAC TruckTractor)
;;      (instance ?TRAIL TruckTrailer)
;;      (part ?TRAC ?TT)
;;      (part ?TRAIL ?TT)
;;      (connected ?TRAC ?TRAIL))))

;; KJN: Moving to Transportation.kif where Truck is
;;(subclass TruckTractor Truck)
;;(documentation TruckTractor EnglishLanguage "&%TruckTractor is the subclass of &%Trucks 
;;that are used to tow truck trailers.  Truck tractors are the cab portions 
;;of tractor-trailers.  See also &%TruckTrailer.")

;;(subclass TruckTrailer Wagon)
;;(documentation TruckTrailer EnglishLanguage "&%TruckTrailer is the subclass of &%Wagons 
;;that are towed by &%TruckTractors.  These are the trailers used in 
;;tractor-trailer (semi-trailer) rigs.")

(subclass AirTransportation Transportation)
(documentation AirTransportation EnglishLanguage "Any instance of &%Transportation where the 
&%instrument is an &%Aircraft and which is through an &%AtmosphericRegion.")

(=>
  (instance ?TRANSPORT AirTransportation)
  (exists (?CRAFT ?REGION)
    (and
      (instance ?CRAFT Aircraft)
      (instance ?REGION AtmosphericRegion)
      (instrument ?TRANSPORT ?CRAFT)
      (eventLocated ?TRANSPORT ?REGION))))

(subclass SpaceTransportation Transportation)
(documentation SpaceTransportation EnglishLanguage "Any instance of &%Transportation where the 
&%instrument is a &%Spacecraft and which is through a &%SpaceRegion.")

(=>
  (instance ?TRANSPORT SpaceTransportation)
  (exists (?CRAFT ?REGION)
    (and
      (instance ?CRAFT Spacecraft)
      (instance ?REGION SpaceRegion)
      (instrument ?TRANSPORT ?CRAFT)
      (eventLocated ?TRANSPORT ?REGION))))

(subclass Spacecraft Vehicle)
(documentation Spacecraft EnglishLanguage "Any &%Vehicle which is capable of 
&%SpaceTransportation.")

(=>
   (instance ?CRAFT Spacecraft)
   (capability SpaceTransportation instrument ?CRAFT))

(subclass Rocket Spacecraft)
(documentation Rocket EnglishLanguage "A &%Spacecraft which has the shape of a cylinder 
with a cone on top and which is powered by a jet engine.")

(subclass Missile Projectile)
(subclass Missile SelfPoweredDevice)
(documentation Missile EnglishLanguage "A &%Projectile which is propelled by a rocket and 
contains a &%Bomb.") 

(=>
  (instance ?M Missile)
  (exists (?B)
    (and
      (instance ?B Bomb)
      (part ?B ?M))))

(subclass BallisticMissile Missile)
(documentation BallisticMissile EnglishLanguage "A &%Missile which is guided for the first stage 
of its flight but then falls to its target for the second stage.")
      
(subclass WaterTransportation Transportation)
(documentation WaterTransportation EnglishLanguage "Any instance of &%Transportation where 
the &%instrument is a &%WaterVehicle.")

(=>
  (instance ?TRANSPORT WaterTransportation)
  (exists (?CRAFT ?AREA)
    (and
      (instance ?CRAFT WaterVehicle)
      (instance ?AREA WaterArea)
      (instrument ?TRANSPORT ?CRAFT)
      (eventLocated ?TRANSPORT ?AREA))))

(=>
  (instance ?CRAFT WaterVehicle)
  (capability WaterTransportation instrument ?CRAFT))
  
(subclass Rowing WaterTransportation)
(documentation Rowing EnglishLanguage "Any instance of &%WaterTransportation where the 
instrument is an &%Oar that is manually powered.")

(=>
  (instance ?R Rowing)
  (exists (?O)
    (and
      (instance ?O Oar)
      (instrument ?R ?O))))
  
(subclass LandTransportation Transportation)
(documentation LandTransportation EnglishLanguage "Any instance of &%Transportation where the 
&%instrument is a &%LandVehicle.")

(=>
  (instance ?LAND LandTransportation)
  (exists (?CRAFT ?AREA)
    (and
      (instance ?CRAFT LandVehicle)
      (instance ?AREA LandArea)
      (instrument ?LAND ?CRAFT)
      (located ?CRAFT ?AREA))))

(=>
  (instance ?VEHICLE LandVehicle)
  (capability LandTransportation instrument ?VEHICLE))

(=>
  (and
    (instance ?T LandTransportation)
    (path ?T ?P))
  (instance ?P LandTransitway))

(subclass TransportViaRoadVehicle Transportation)
(subclass TransportViaRoadVehicle LandTransportation)
(documentation TransportViaRoadVehicle EnglishLanguage
"&%TransportViaRoadVehicle is the class of &%Transportation
events in which the &%instrument is an instance of
&%RoadVehicle.")  
  
(subclass FlyingAircraft Driving)
(documentation FlyingAircraft EnglishLanguage "Controlling the direction, speed, 
and altitude of an &%Aircraft")
(termFormat EnglishLanguage FlyingAircraft "flying")

(=>
  (instance ?FLY FlyingAircraft)
  (exists (?CRAFT)
    (and
      (instance ?CRAFT Aircraft)
      (patient ?FLY ?CRAFT))))

(=>
  (instance ?FLY FlyingAircraft)
  (exists (?FLIGHT)
    (and
      (instance ?FLIGHT AirTransportation)
      (subProcess ?FLY ?FLIGHT))))
       
  
(subclass Aircraft Vehicle)
(documentation Aircraft EnglishLanguage "Any Vehicle which is capable of 
AirTransportation.  Note that this class covers both fixed-wing aircraft
and helicopters.")

(=>
  (instance ?CRAFT Aircraft)
  (capability AirTransportation instrument ?CRAFT))


;; KJN: Moving this to Transportation.kif as it makes more sense there.
;;(subclass AirTransportation Transportation)
;;(documentation AirTransportation EnglishLanguage "Any instance of &%Transportation where the 
;;&%instrument is an &%Aircraft and which is through an &%AtmosphericRegion.")

;;(=>
;;   (instance ?TRANSPORT AirTransportation)
;;   (exists (?CRAFT ?REGION)
;;      (and
;;         (instance ?CRAFT Aircraft)
;;         (instance ?REGION AtmosphericRegion)
;;         (instrument ?TRANSPORT ?CRAFT)
;;         (eventLocated ?TRANSPORT ?REGION))))

;;(=>
;;   (instance ?CRAFT Aircraft)
;;   (capability AirTransportation instrument ?CRAFT))

;;(=>
;;  (and
;;    (instance ?T AirTransportation)
;;    (path ?T ?P))
;;  (instance ?P AirTransitway))

(subclass Helicopter Aircraft)
(documentation Helicopter EnglishLanguage "Any &%Aircraft with rapidly rotating wings.")

(subclass MilitaryArtifact Artifact)
(documentation MilitaryArtifact EnglishLanguage "Any &%Artifact which is made for a 
&%MilitaryOrganization.")

(=>
  (instance ?A MilitaryArtifact)
  (hasPurpose ?A
    (exists (?O)
      (and
        (instance ?O MilitaryOrganization)
        (uses ?A ?O)))))

;;(subclass MilitaryAircraft Aircraft)
;;(subclass MilitaryAircraft MilitaryVehicle)
;;(documentation MilitaryAircraft EnglishLanguage "Any &%Aircraft which is made for a 
;;&%MilitaryOrganization.  This includes fighters, &%Bombers, attack 
;;helicopters, etc.")

;;(subclass Fighter MilitaryAircraft)
;;(documentation Fighter EnglishLanguage "Any high-speed &%MilitaryAircraft whose purpose is 
;;to destroy enemy &%MilitaryAircraft.")
;;(=>
;;  (instance ?F Fighter)
;;  (hasPurpose ?F 
;;    (exists (?A ?MA)
;;      (and
;;        (instance ?A Attack)
;;        (instrument ?A ?F)
;;        (patient ?A ?MA)
;;        (instance ?MA MilitaryAircraft)))))

;;(subclass Bomber MilitaryAircraft)
;;(documentation Bomber EnglishLanguage "Any &%MilitaryAircraft whose purpose is to deliver 
;;&%ExplosiveDevices.")
;;(=>
;;  (instance ?B Bomber)
;;  (hasPurpose ?B 
;;    (exists (?T ?D)
;;      (and
;;        (instance ?T Transportation)
;;        (instrument ?T ?B)
;;        (patient ?T ?D)
;;        (instance ?D ExplosiveDevice)))))

;;(subclass MilitaryShip Ship)
;;(subclass MilitaryShip MilitaryWaterVehicle)
;;(documentation MilitaryShip EnglishLanguage "Any &%Ship which is made for a &%MilitaryOrganization.  
;;This includes aircraft carriers, destroyers, etc.")

(subclass ExplosiveDevice Device)
(documentation ExplosiveDevice EnglishLanguage "A &%Device whose purpose is to explode.  Note 
that &%ExplosiveDevice is not a subclass of &%Weapon, since explosives can be 
used in demolition work and in fireworks displays, for example.")
(=>
  (instance ?ED ExplosiveDevice)
  (hasPurpose ?ED 
    (exists (?E ?D)
      (and
        (instance ?E Explosion)
        (instrument ?E ?ED)
        (causes ?E ?D)
        (instance ?D Damaging)))))

(subclass ExplosiveMine ExplosiveDevice)
(subclass ExplosiveMine Weapon)
(documentation ExplosiveMine EnglishLanguage "An &%ExplosiveDevice which is designed to 
explode when there is movement over it, e.g. by a person on foot, by a 
&%RoadVehicle, etc.")

(subclass ExplosiveSubstance Substance)
(documentation ExplosiveSubstance EnglishLanguage "Any &%Substance which is capable of exploding.")
(=>
  (instance ?S ExplosiveSubstance)
  (capability Explosion instrument ?S))

(=>
  (instance ?D ExplosiveDevice)
  (exists (?S)
    (and
      (instance ?S ExplosiveSubstance)
      (part ?S ?D))))


;; =============== TRANSPORTATION ======================  
;; KJN: Moving to Transportation.kif where TransitSystem is defined
;;(subclass RoadTransportationSystem TransitSystem)
;;(documentation RoadTransportationSystem EnglishLanguage "&%RoadTransportationSystem 
;;is the subclass of &%TransportationSystems whose routes are &%Roadways.")

;;(=>
;;  (and
;;    (instance ?S RoadTransportationSystem)
;;    (routeInSystem ?P ?S))
;;  (instance ?P Roadway))

;; KJN: Moving this to Transportation.kif where RailTransportationSystem is defined  
;;(subclass SubwaySystem RailTransportationSystem)
;;(documentation SubwaySystem EnglishLanguage "Any &%RailTransportationSystem that runs 
;;exclusively through &%Tunnels.")

;;(=>
;;  (and
;;    (instance ?S SubwaySystem)
;;    (routeInSystem ?P ?S))
;;  (instance ?P Tunnel))

(subclass Driveway Roadway)
(documentation Driveway EnglishLanguage "A small, private &%Roadway that is used for parking 
&%Automobiles or for connecting a &%Garage to a public &%Roadway.")

(instance OperatingFn UnaryFunction)
(documentation OperatingFn EnglishLanguage "(&%OperatingFn ?DEVICE) denotes the class 
of events in which a &%Device of type ?device is operated.")

(domain OperatingFn 1 Device)
(rangeSubclass OperatingFn Process)


;; KJN: Moving Truck with other Land Vehicles in Transportation.kif
;;(subclass Truck SelfPoweredRoadVehicle)
;;(subclass Truck CargoVehicle)
;;(documentation Truck EnglishLanguage "Any &%Vehicle that is intended to carry substantial
;;amounts of cargo, in addition to passengers.  This includes 18-wheelers,
;;pickup trucks, tanker trucks etc.  Consumer vehicles with trunks or enclosed
;;rear areas that can carry cargo are not defined as trucks. Truck is the subclass of &%RoadVehicles that 
;;are designed primarily for transporting various kinds of non-passenger 
;;loads.  Truck is the class of single-bodied trucks or &%TruckTractors.  
;;Note: TractorTrailer combinations are a distinct class.")

;;(=>
;;  (instance ?T Truck)
;;  (exists (?L)
;;    (and
;;      (subclass ?L Object)
;;      (cargoType ?T ?L))))


;; KJN: Moving this to Transportation.kif as ElectrifiedRailwayCar is defined there
;;(subclass Streetcar ElectrifiedRailwayCar)
;;(documentation Streetcar EnglishLanguage "Streetcar is the subclass of 
;;&%ElectrifiedRailwayCars that run on tracks laid into, along, or 
;;beside city &%Streets.")

(subclass Installing Putting)
(documentation Installing EnglishLanguage "&%Putting a &%Device in a location and configuring 
the &%Device so that it can be used as intended after the installation.")

(=>
   (and
      (instance ?INSTALL Installing)
      (patient ?INSTALL ?DEVICE))
   (instance ?DEVICE Device))

(=>
   (and
      (instance ?INSTALL Installing)
      (patient ?INSTALL ?DEVICE)
      (hasPurpose ?DEVICE ?PURPOSE))
   (holdsDuring (EndFn (WhenFn ?INSTALL)) (truth ?PURPOSE True)))

(subclass Rock Substance)
(documentation Rock EnglishLanguage "&%Rock is any naturally formed aggregate of one or more 
minerals, consolidated or not, with some degree of mineralogic and chemical 
constancy, in popular use the term is usually restricted to those aggregates 
that are hard, compact, and coherent.") 

(=>
  (instance ?Rock Rock)
  (attribute ?Rock Solid))

(=>
  (instance ?Rock Rock)
  (exists (?Mineral)
    (and
      (instance ?Mineral Mineral)
      (part ?Mineral ?Rock))))
   
(subclass Soil Mixture)
(documentation Soil EnglishLanguage "&%Soil is a substance composed of fine rock material 
disintegrated by geological processes, mixed with humus, the organic remains of decomposed vegetation.")

(=>
  (instance ?Soil Soil)
  (exists (?Humus ?Mineral)
    (and
      (instance ?Humus Humus)
      (instance ?Mineral Mineral)
      (part ?Humus ?Soil)
      (part ?Mineral ?Soil))))

(subclass Clay Soil)
(documentation Clay EnglishLanguage "Fine-grained soil consisting of mineral particles, not 
necessarily clay minerals, that are less than 0.002 mm in their maximum dimension.") 

(=>
  (and
    (part ?Particle ?Soil)
    (instance ?Soil Clay)
    (diameter ?Particle (MeasureFn ?Size Centimeter)))
  (greaterThan 0.0002 ?Size))

(subclass Humus Mixture)
(documentation Humus EnglishLanguage "&%Humus is decaying organic matter found in &%Soil 
and derived from dead animal and plant material.")

(=>
  (instance ?Humus Humus)
  (exists (?Soil)
    (and
      (instance ?Soil Soil)
      (part ?Humus ?Soil))))

  
(subclass Burying Putting)
(subclass Burying Digging)
(documentation Burying EnglishLanguage "Putting something in the ground and then covering 
it with &%Soil.")
(=>
  (instance ?B Burying)
  (exists (?C ?S)
    (and
      (instance ?C Covering)
      (instrument ?C ?S)
      (instance ?S Soil)
      (subProcess ?C ?B))))

(subclass Digging IntentionalProcess)
(subclass Digging SurfaceChange)
(documentation Digging EnglishLanguage "Any &%Process of removing or turning over the &%Soil.")
(=>
  (instance ?D Digging)
  (exists (?S)
    (and
      (patient ?D ?S)
      (instance ?S Soil))))

(subclass Tilling Digging)
(documentation Tilling EnglishLanguage "Any &%Process of &%Digging, e.g. breaking and 
turning over &%Soil that facilitates &%Agriculture.")
(subclass Tilling IntentionalProcess)
(subclass Tilling SurfaceChange)

(=>
   (and
      (instance ?TILL Tilling)
      (patient ?TILL ?SOIL))
   (instance ?SOIL Soil))

(=>
  (instance ?T Tilling)
  (exists (?A)
    (and
      (instance ?A Agriculture)
      (subProcess ?T ?A))))

(subclass Entombing Putting)
(documentation Entombing EnglishLanguage "More commonly known as burying, this is the class 
of processes of putting a &%HumanCorpse into a Tomb.  Note that this class 
is not a subclass of &%Burying, since some &%Tombs are not covered with &%Soil, 
e.g. those in a mausoleum.")
(=>
  (and
    (instance ?E Entombing)
    (patient ?E ?C))
  (instance ?C HumanCorpse))

(=>
  (and
    (instance ?E Entombing)
    (destination ?E ?T))
  (instance ?T Tomb))

(subclass MovingResidence Transfer)
(documentation MovingResidence EnglishLanguage "The process of changing one's residence, i.e. 
moving one's belongs to a new &%home.")

(=>
   (and
      (instance ?MOVE MovingResidence)
      (agent ?MOVE ?AGENT))
   (exists (?HOME1 ?HOME2)
      (and
         (holdsDuring (BeginFn (WhenFn ?MOVE)) (home ?AGENT ?HOME1))
         (holdsDuring (EndFn (WhenFn ?MOVE)) (home ?AGENT ?HOME2))
         (not (equal ?HOME1 ?HOME2)))))

(subclass Harvesting Removing)
(documentation Harvesting EnglishLanguage "Gathering the plant results of &%Agriculture.")

(=>
  (instance ?H Harvesting)
  (exists (?A)
    (and
      (instance ?A Agriculture) 
      (subProcess ?H ?A))))

(=>
  (and
    (instance ?H Harvesting)
    (result ?H ?C))
  (or
    (instance ?C PlantAnatomicalStructure)
    (instance ?C PlantSubstance)))

(subclass Drilling IntentionalProcess)
(subclass Drilling SurfaceChange)
(documentation Drilling EnglishLanguage "Any &%Process of producing a &%hole in a 
&%SelfConnectedObject which involves rotating a long, thin bit.")

(=>
   (and
      (instance ?DRILL Drilling)
      (patient ?DRILL ?OBJ))
   (exists (?HOLE)
      (and
         (holdsDuring (BeginFn (WhenFn ?DRILL)) (not (hole ?HOLE ?OBJ)))
         (holdsDuring (EndFn (WhenFn ?DRILL)) (hole ?HOLE ?OBJ)))))

(subclass Drill CuttingDevice)
(documentation Drill EnglishLanguage "A &%Device that has the purpose of creating a 
&%Hole.  This covers manual drills as well as electric or pneumatic
drills.")

(=>
  (instance ?D Drill)
  (hasPurpose ?D
    (exists (?E ?H)
      (and 
        (instance ?E Cutting)
        (instance ?H Hole)
        (result ?E ?H)
        (instrument ?E ?D)))))

(subclass Saw CuttingDevice)
(documentation Saw EnglishLanguage "A &%CuttingDevice that uses linear &%Motion of a &%Blade, &%Chain or &%Wire to cut.")
(=>
  (and
    (instance ?SAW Saw)
    (instance ?CUT Cutting)
    (instrument ?CUT ?SAW)
    (instance ?OBJ Object)
    (patient ?CUT ?OBJ))
  (exists (?MOTION ?DIR1 ?DIR2 ?TIME ?T1 ?T2 ?PART)
    (and
      (instance ?MOTION Motion)
      (subProcess ?MOTION ?CUT)
      (instance ?PART CuttingDevice)
      (part ?PART ?SAW)
      (meetsSpatially ?PART ?OBJ)
      (patient ?MOTION ?PART)
      (instance ?T2 TimeInterval)
      (instance ?T2 TimeInterval)
      (equal (WhenFn ?MOTION) ?TIME)
      (temporalPart ?TIME ?T1)
      (temporalPart ?TIME ?T2)
      (instance ?DIR1 DirectionalAttribute)
      (instance ?DIR2 DirectionalAttribute)
      (=>
        (holdsDuring ?T1
          (direction ?MOTION ?DIR1))
        (holdsDuring ?T2
          (and
            (direction ?MOTION ?DIR2)
            (or
              (equal ?DIR1 ?DIR2)
              (oppositeDirection ?DIR1 ?DIR2))
            (not
              (and
                (equal ?DIR1 ?DIR2)
                (oppositeDirection ?DIR1 ?DIR2)))))))))

(subclass PaperShredder CuttingDevice)
(documentation PaperShredder EnglishLanguage "A &%CuttingDevice used to cut &%Paper into small pieces so that the contained information can not be decoded again.")

(=>
  (instance ?X PaperShredder)
  (hasPurpose ?X
    (exists (?CUT ?PAPER)
      (and
        (instance ?CUT Cutting)
        (instrument ?CUT ?X)
        (instance ?PAPER Paper)
        (patient ?CUT ?PAPER)))))
        
(=>
  (and
    (instance ?X PaperShredder)
    (instance ?CUT Cutting)
    (instrument ?CUT ?X))
  (hasPurpose ?CUT
    (=>
      (and
        (instance ?CBO VisualContentBearingObject)
        (containsInformation ?CBO ?INFO)
        (instance ?PAPER Paper)
        (located ?CBO ?PAPER))
      (decreasesLikelihood
        (patient ?CUT ?PAPER)
        (exists (?READ)
          (and
            (instance ?READ Interpreting)
            (patient ?READ ?INFO)
            (earlier
              (WhenFn ?CUT)
              (WhenFn ?READ))))))))
(subclass Memorizing Learning)
(documentation Memorizing EnglishLanguage "The process of committing a &%Text to memory.")

(=>
  (and
    (instance ?M Memorizing)
    (patient ?M ?T))
  (instance ?T Text))

(subclass Imagining PsychologicalProcess)
(documentation Imagining EnglishLanguage "Forming a mental picture of something which 
is not present.")

(subclass Dreaming Imagining)
(disjoint Dreaming IntentionalProcess)
(documentation Dreaming EnglishLanguage "A &%Process of producing metal images which occurs 
while one is &%Asleep.")

(=>
   (and
      (instance ?DREAM Dreaming)
      (experiencer ?DREAM ?AGENT))
   (holdsDuring (WhenFn ?DREAM) (attribute ?AGENT Asleep)))

(subclass Frightening PsychologicalProcess)
(documentation Frightening EnglishLanguage "Any &%PsychologicalProcess where the &%patient 
comes to feel &%Anxiety.")

(=>
   (and
      (instance ?FRIGHTEN Frightening)
      (experiencer ?FRIGHTEN ?AGENT))
   (and
      (holdsDuring (BeginFn (WhenFn ?FRIGHTEN)) (not (attribute ?AGENT Anxiety)))
      (holdsDuring (EndFn (WhenFn ?FRIGHTEN)) (attribute ?AGENT Anxiety))))

(subclass Execution Killing)
(documentation Execution EnglishLanguage "&%Killing of a &%Human by a &%Government for 
the commission of a &%CriminalAction.")

(=>
  (instance ?E Execution)
  (exists (?G)
    (and
      (instance ?G Government)
      (agent ?E ?G))))

(=>
  (instance ?E Execution)
  (exists (?P)
    (and
      (patient ?E ?P)
      (instance ?P Human))))

(subclass Suicide Killing)
(documentation Suicide EnglishLanguage "Any instance of &%Killing where the &%agent and 
the &%experiencer are identical.")

(=>
  (instance ?S Suicide)
  (exists (?A)
    (and
      (agent ?S ?A)
      (experiencer ?S ?A))))

(subclass Trespassing CriminalAction)
(subclass Trespassing Translocation)
(documentation Trespassing EnglishLanguage "Entering property that does not belong to one and without 
the permission of the owner of the property.")

;; KJN: Moving this to FinancialOntology.kif to remove dependences, as RealEstate is
;; defined there.
;;(=>
;;  (and
;;    (instance ?T Trespassing)
;;    (patient ?T ?P))
;;  (instance ?P RealEstate))

(=>
  (and
    (instance ?T Trespassing)
    (agent ?T ?H)
    (patient ?T ?P))
  (and
    (not 
      (possesses ?H ?P))
    (modalAttribute 
      (located ?H ?P) 
      Illegal)))

(subclass Protecting Maintaining)
(documentation Protecting EnglishLanguage "An &%IntentionalProcess which purpose is to decrease likelihood of &%Damaging or &%CriminalAction done to the &%patient of the &%Process.")
(=>
  (instance ?X Protecting)
  (hasPurpose ?X
    (exists (?OBJ)
      (and
        (instance ?OBJ Object)
        (patient ?X Object)
        (subclass ?HARM
          (KappaFn ?H
            (and
              (or
                (instance ?H CriminalAction)
                (instance ?H Damaging))
              (=>
                (holdsDuring ?T
                  (patient ?H ?OBJ))
                (not
                  (holdsDuring ?T 
                    (patient ?X ?OBJ)))))))
        (or
          (prevents ?X ?HARM)
          (hinders ?X ?HARM))))))
          
(subclass Murder Killing)
(subclass Murder CriminalAction)
(documentation Murder EnglishLanguage "Impermissible &%Killing of a &%Human.")

(=>
   (instance ?MURDER Murder)
   (exists (?PERSON)
      (and
         (patient ?MURDER ?PERSON)
         (instance ?PERSON Human))))

(subclass Suffocating Killing)
(documentation Suffocating EnglishLanguage "&%Killing someone by asphyxiation, i.e. by 
depriving them of &%Oxygen.")

(=>
  (instance ?S Suffocating)
  (holdsDuring (EndFn (WhenFn ?H))
    (and
      (experiencer ?S ?P)
      (not
        (exists (?B)
	  (and
	    (instance ?B Breathing)
	    (experiencer ?B ?P)))))))

(subclass Hanging Suffocating)
(documentation Hanging EnglishLanguage "Suffocating someone by suspending him/her from 
a rope wound around the neck until asphyxiation occurs.")
(=>
  (instance ?H Hanging)
  (exists (?S ?N ?P)
    (and
      (instance ?P Human)
      (instance ?S String)
      (instance ?N Neck)
      (experiencer ?H ?P)
      (properPart ?N ?P)
      (instrument ?H ?S)
      (holdsDuring (WhenFn ?H)
        (meetsSpatially ?S ?N)))))

(subclass Starving Killing)
(documentation Starving EnglishLanguage "&%Killing someone by depriving them of food.")

(subclass MusicalConducting Guiding)

;; NS: edit.
(documentation MusicalConducting EnglishLanguage "An &%instance
of &%MusicalConducting is a &%Guiding in which the
patient (entity guided) is a &%Musician or a &%MusicalGroup.")

;; NS: edit.
(=>
   (instance ?CONDUCT MusicalConducting)
   (exists (?MUSIC)
      (and
         (instance ?MUSIC MusicalPerformance)
         (subProcess ?CONDUCT ?MUSIC))))

;; NS: edit.
(=>
   (and
      (instance ?CONDUCT MusicalConducting)
      (patient ?CONDUCT ?PATIENT))
   (or
     (instance ?PATIENT MusicalGroup)
     (holdsDuring (WhenFn ?CONDUCT) (attribute ?PATIENT Musician))))


(subclass OrchestralConducting MusicalConducting)
(documentation OrchestralConducting EnglishLanguage "&%OrchestralConducting is a type
of &%MusicalConducting where the patient is an &%Orchestra.")

(=>
  (and
    (instance ?CONDUCT OrchestralConducting)
    (patient ?CONDUCT ?GRP))
  (instance ?CONDUCT Orchestra))

(subclass MusicalGroup GroupOfPeople)
(documentation MusicalGroup EnglishLanguage "A &%GroupOfPeople that create &%MakingMusic 
together.")

;; NS. delete.  See the more specific, nearly identical version below.
;; (=>
;;    (instance ?ORCHESTRA Orchestra)
;;    (hasPurpose ?ORCHESTRA (exists (?MUSIC)
;;                              (and
;;                                 (instance ?MUSIC Music)
;;                                 (agent ?MUSIC ?ORCHESTRA)))))

(subclass Orchestra MusicalGroup)
(documentation Orchestra EnglishLanguage "A &%GroupOfPeople that create &%MakingInstrumentalMusic 
together.")

(=>
  (instance ?ORCHESTRA Orchestra)
  (hasPurpose ?ORCHESTRA 
    (exists (?MUSIC)
      (and
        (instance ?MUSIC MakingInstrumentalMusic)
        (agent ?MUSIC ?ORCHESTRA)))))

(subclass DramaticDirecting Guiding)
(documentation DramaticDirecting EnglishLanguage "The process of directing a &%DramaticActing 
in a &%MotionPicture or the &%Performance of a &%DramaticPlay.")

(=>
  (and
    (instance ?DIRECT DramaticDirecting)
    (patient ?DIRECT ?ACT))
 (instance ?ACT DramaticActing))

(subclass Sharing ChangeOfPossession)
(documentation Sharing EnglishLanguage "The subclass of &%ChangeOfPossession where a 
&%properPart of the &%patient is given by the &%agent or the &%destination.")

(=>
   (and
      (instance ?SHARE Sharing)
      (agent ?SHARE ?AGENT1)
      (destination ?SHARE ?AGENT2)
      (patient ?SHARE ?OBJ))
   (exists (?GIVE ?PART)
      (and
         (instance ?GIVE Giving)
         (subProcess ?GIVE ?SHARE)
         (patient ?GIVE ?PART)
         (properPart ?PART ?OBJ)
         (agent ?GIVE ?AGENT1)
         (destination ?GIVE ?AGENT2))))

(subclass Stealing UnilateralGetting)
(subclass Stealing CriminalAction)
(documentation Stealing EnglishLanguage "Any &%UnilateralGetting which is not permitted by the 
&%origin of the &%UnilateralGetting.  These cases of &%UnilateralGetting are 
distinguished from ones where the &%destination is the subject of charity or 
other forms of benefaction.")

(=>
   (and
      (instance ?STEAL Stealing)
      (destination ?STEAL ?AGENT)
      (origin ?STEAL ?VICTIM)
      (instance ?VICTIM CognitiveAgent))
   (not (confersRight (destination ?STEAL ?AGENT) ?VICTIM ?AGENT)))

(subclass Robbing Stealing)
(documentation Robbing EnglishLanguage "Any instance of &%Stealing which involves the threat 
of the use of force.")

(=>
  (and
    (instance ?R Robbing)
    (agent ?R ?P)
    (patient ?R ?P2))
  (exists (?T)
    (and
      (instance ?T Threatening)
      (subProcess ?T ?R)
      (patient ?T 
        (exists (?A)
          (and
            (instance ?A Attack)
            (agent ?A ?P)
            (patient ?A ?P2))))))) 

(subclass Inheriting UnilateralGetting)
(documentation Inheriting EnglishLanguage "Any &%UnilateralGetting where the &%agent 
receives some part of the property of a person upon the death of the 
person.")

(=>
   (and
      (instance ?INHERIT Inheriting)
      (agent ?INHERIT ?HEIR)
      (origin ?INHERIT ?PERSON)
      (patient ?INHERIT ?PROPERTY))
   (exists (?DEATH)
      (and
         (instance ?DEATH Death)
         (experiencer ?DEATH ?PERSON)
         (earlier (WhenFn ?DEATH) (WhenFn ?INHERIT))
         (holdsDuring (ImmediatePastFn (WhenFn ?DEATH)) (possesses ?PERSON ?PROPERTY))
         (confersRight (possesses ?HEIR ?PROPERTY) ?PERSON ?HEIR))))

(subclass Awarding UnilateralGiving)
(documentation Awarding EnglishLanguage "&%Giving to any &%Agent for doing some &%Process.")
(termFormat EnglishLanguage Awarding "awarding")
(=>
  (instance ?A Awarding)
  (exists (?RECIPIENT ?GIVER ?PROCESS ?AWARD)
    (and
      (instance ?RECIPIENT Agent)
      (instance ?GIVER Agent)
      (instance ?PROCESS Process)
      (instance ?AWARD Object)
      (agent ?PROCESS ?RECIPIENT)
      (agent ?A ?GIVER)
      (patient ?A ?AWARD)
      (destination ?A ?RECIPIENT)
      (causes ?PROCESS ?A))))

(instance hasAward BinaryPredicate)
(domain hasAward 1 Agent)
(domain hasAward 2 Object)
(documentation hasAward EnglishLanguage "(hasAward ?RECIPIENT ?AWARD) means the &%Agent 
?RECIPIENT recieved the &%Object ?AWARD as an award for some action they did.")
(termFormat EnglishLanguage hasAward "has award")
(=>
  (hasAward ?RECIPIENT ?AWARD)
  (exists (?A)
    (and
      (instance ?A Awarding)
      (destination ?A ?RECIPIENT)
      (patient ?A ?AWARD))))
      
         
(subclass Bequeathing UnilateralGiving)
(documentation Bequeathing EnglishLanguage "Any &%UnilateralGiving where the agent 
wills some part of his/her property to someone else upon his/her death.")
(=>
  (and
    (instance ?B Bequeathing)
    (agent ?B ?P)
    (destination ?B ?H)
    (patient ?I ?PROP))
  (exists (?D)
    (and
      (instance ?D Death)
      (experiencer ?D ?P)
      (earlier (WhenFn ?D) (WhenFn ?B))
      (holdsDuring 
        (ImmediatePastFn (WhenFn ?D)) 
        (possesses ?P ?PROP))
      (confersNorm ?P 
        (possesses ?H ?PROP) 
        Permission))))

(subclass SeizingProperty UnilateralGetting)
(documentation SeizingProperty EnglishLanguage "Any instance of &%UnilateralGetting which is done by 
a &%Government and which is not permitted by the origin of the &%UnilateralGetting.")

(=>
  (and
    (instance ?S SeizingProperty)
    (destination ?S ?A)
    (origin ?S ?V)
    (instance ?V CognitiveAgent))
  (and
    (instance ?A Government)
    (not 
      (confersNorm ?V 
        (destination ?S ?A) 
        Permission))))

(contraryAttribute FullTimePosition PartTimePosition)
;msvarny: Changed from partition to contraryAttribute, since partition of Position into PartTimePosition and FullTimePosition was a too strong statement and subclasses and instances of Position are not necessarily defined by being PartTimePosition or FullTimePosition.
;(partition Position FullTimePosition PartTimePosition)

(instance FullTimePosition Position)
(documentation FullTimePosition EnglishLanguage "Any &%Position where the employee is either 
salaried or paid for at least 40 hour of work per week.")

(instance PartTimePosition Position)
(documentation PartTimePosition EnglishLanguage "Any &%Position where the employee is not 
salaried and is paid for less than 40 hours of work per week.")

(instance CollegeFreshman CollegeStudentPosition)
(documentation CollegeFreshman EnglishLanguage "The &%Positions of a student at a &%PostSecondarySchool 
who has completed less than one year at the school.")

(=>
  (and
    (attribute ?P CollegeFreshman)
    (occupiesPosition ?H ?P ?ORG))
  (exists (?T)
    (and
      (holdsDuring ?T 
        (student ?H ?ORG))
      (lessThan ?T (MeasureFn 1 YearDuration)))))

(instance CollegeJunior CollegeStudentPosition)
(documentation CollegeJunior EnglishLanguage "The &%Positions of a student at a &%PostSecondarySchool 
who has completed at least two years and less than three years at the school.")

(=>
  (and
    (attribute ?P CollegeJunior)
    (occupiesPosition ?H ?P ?ORG))
  (exists (?T)
    (and
      (holdsDuring ?T 
        (student ?H ?ORG))
      (greaterThanOrEqualTo ?T 
        (MeasureFn 2 YearDuration))
      (lessThan ?T 
        (MeasureFn 3 YearDuration)))))

(instance CollegeSenior CollegeStudentPosition)
(documentation CollegeSenior EnglishLanguage "The &%Positions of a student at a &%PostSecondarySchool 
who has completed at least three years and less than four years at the school.")

(=>
  (and
    (attribute ?P CollegeSenior)
    (occupiesPosition ?H ?P ?ORG))
  (exists (?T)
    (and
      (holdsDuring ?T 
        (student ?H ?ORG))
      (greaterThanOrEqualTo ?T 
        (MeasureFn 3 YearDuration))
      (lessThan ?T 
        (MeasureFn 4 YearDuration)))))

(instance CollegeSophomore CollegeStudentPosition)
(documentation CollegeSophomore EnglishLanguage "The &%Positions of a student at a &%PostSecondarySchool 
who has completed at least one year and less than two years at the school.")

(=>
  (and
    (attribute ?P CollegeSophomore)
    (occupiesPosition ?H ?P ?ORG))
  (exists (?T)
    (and
      (holdsDuring ?T 
        (student ?H ?ORG))
      (greaterThanOrEqualTo ?T 
        (MeasureFn 1 YearDuration))
      (lessThan ?T 
        (MeasureFn 2 YearDuration)))))

(subclass CollegeStudentPosition Position)
(documentation CollegeStudentPosition EnglishLanguage "Any &%Position at a &%PostSecondarySchool 
which is occupied exclusively by students.")

(instance Comedian EntertainmentProfession)
(documentation Comedian EnglishLanguage "&%Positions which involve performing stand-up comedy, which 
is recorded and/or performed in front of live audiences.")

(=>
  (attribute ?P Comedian)
  (exists (?PERF ?L)
    (and
      (instance ?PERF Performance)
      (agent ?PREF ?P)
      (instance ?L Laughing)
      (causes ?PERF ?L))))
      
(instance Actor EntertainmentProfession)
(documentation Actor EnglishLanguage "A &%SkilledOccupation describing a theatrical %&Performer, someone with expertise on &%DramaticActing.")

;(subAttribute Actor Performer)

(=>
    (attribute ?PERSON Actor)
    (hasSkill DramaticActing ?PERSON))

(=>
    (and
        (instance ?GROUP DramaticCast)
        (holdsDuring ?T1
            (member ?MEM ?GROUP)))
    (holdsDuring ?T1
        (attribute ?MEM Actor)))
  
(=>
    (and
        (instance ?P DramaticPerformance)
        (agent ?P ?A))
    (holdsDuring
        (WhenFn ?P)
        (attribute ?A Actor)))  

        
(instance Artist EntertainmentProfession)
(documentation Artist EnglishLanguage "This &%RelationalAttribute
describes an &%Agent that contributes to a &%Performance, or to
some form of &%ContentDevelopment that &%results in an
&%ArtWork.")

(=>
  (and
    (agent ?PROCESS ?AGENT)
    (result ?PROCESS ?WORK)
    (instance ?WORK ArtWork))
  (holdsDuring (WhenFn ?PROCESS) 
    (attribute ?AGENT Artist)))

(instance Performer EntertainmentProfession)
(subAttribute Performer Artist)
(documentation Performer EnglishLanguage "This
&%RelationalAttribute describes an &%agent of a &%Performance.")

(=>
  (and
    (instance ?P Performance)
    (agent ?P ?A))
  (holdsDuring (WhenFn ?P) 
    (attribute ?A Performer)))
    
;; KJN: Moving this to FinancialOntology.kif to remove dependency through Bank-FinancialOrganization      
;;(instance Banker SkilledOccupation)
;;(documentation Banker EnglishLanguage "Any &%SkilledOccupation which involves working in a 
;;&%Bank-FinancialOrganization.")

;;(=>
;;   (and
;;      (instance ?H Human)
;;      (occupiesPosition ?H ?B ?O)
;;      (attribute ?B Banker))
;;   (instance ?O Bank-FinancialOrganization))

;; KJN: Moved this to Government.kif to remove dependency to CountriesAndRegions.kif
;;(instance PresidentOfTheUnitedStates Position)
;;(documentation PresidentOfTheUnitedStates EnglishLanguage "The position of being head of the 
;;&%UnitedStates.")

;;(=>
;;  (attribute ?H PresidentOfTheUnitedStates)
;;  (leader ?H UnitedStates))

(instance Treasurer SkilledOccupation)
(documentation Treasurer EnglishLanguage "Any &%SkilledOccupation which involves receiving 
and disbursing money.")

;; KJN: Moving this to Government.kif where these positions are discussed in more detail.
;;(instance Governor Position)
;; KJN: Added this to be more general StateOrProvince instead of AmericanState
;;(documentation Governor EnglishLanguage "The head of the &%Government of a &%StateOrProvince.")
;;(=>
;;  (headOfGovernment ?S Governor ?H)
;;  (instance ?S StateOrProvince))
  
;; KJN: changing this definition as a Governor can exist not only in an AmericanState.
;;(documentation Governor EnglishLanguage "The head of the &%Government of an &%AmericanState.")

;;(=>
;;  (headOfGovernment ?A Governor ?H)
;;  (instance ?A AmericanState))

;;(instance LieutenantGovernor Position)
;;(documentation LieutenantGovernor EnglishLanguage "The second-in-command of some &%Governments 
;;of &%AmericanStates.")

;;(instance Mayor Position)
;;(documentation Mayor EnglishLanguage "The head of the &%Government of a &%City.")

;;(=>
;;  (headOfGovernment ?A Mayor ?H)
;;  (instance ?A City))

;; KJN: Moving this to People.kif where Religions are defined
;;(instance Pope ReligiousPosition)
;;(documentation Pope EnglishLanguage "The &%ReligiousPosition of head of the &%RomanCatholicChurch.")

;;(=>
;;  (occupiesPosition ?H Pope RomanCatholicChurch)
;;  (leader RomanCatholicChurch ?H))

(subclass SalesPosition SkilledOccupation)
(documentation SalesPosition EnglishLanguage "Any &%Position which involves &%Selling 
or trying to sell items.")

(instance ClericalSecretary SkilledOccupation)
(documentation ClericalSecretary EnglishLanguage "The class of &%Positions where the position 
holder is responsible for clerical duties, e.g. typing documents, answering 
phones, keeping schedules, etc.")

(subclass ServicePosition SkilledOccupation)
(documentation ServicePosition EnglishLanguage "Any &%Position which involves working 
as a waiter or servant, either for an &%Organization (e.g. a restaurant) 
or for a person or family.")

(instance Dentist Profession)
(documentation Dentist EnglishLanguage "The &%Profession of being a dentist, i.e. diagnosing 
and treating problems related to the teeth.")

(=>
  (attribute ?P Dentist)
  (exists (?D ?T)
    (and
     (instance ?D DiagnosticProcess)
     (agent ?D ?P)
     (instance ?T Tooth)
     (patient ?D ?T))))

(instance Pharmacist Profession)
(documentation Pharmacist EnglishLanguage "The &%Profession of being a pharmacist, i.e. 
preparing and dispensing &%BiologicallyActiveSubstances.")

(instance Researcher Profession)
(documentation Researcher EnglishLanguage "The &%Profession of being a scientific 
researcher.")

(=>
   (attribute ?P Researcher)
   (exists (?S)
      (and
         (instance ?S Science)
         (hasExpertise ?P ?S))))

(instance Teacher Profession)
(documentation Teacher EnglishLanguage "The &%Profession of being a teacher.")

(=>
  (and
    (instance ?T Teacher)
    (occupiesPosition ?P ?T ?O))
  (teacher ?T ?O))

(=>
  (instance ?T Teacher)
  (hasSkill EducationalProcess ?T))

(subclass EntertainmentProfession SkilledOccupation)
(documentation EntertainmentProfession EnglishLanguage "Positions which involve creating 
content or performances that are intended to entertain.  This class covers 
the &%TheaterProfession, &%FilmMakingProfession, being a comedian, etc.")

(=>
  (and
    (instance ?EP EntertainmentProfession)
    (attribute ?P ?EP))
  (or
    (occupation ?P (OccupationFn Performance))
    (occupation ?P (OccupationFn ContentDevelopment))))

(subclass SportsPosition SkilledOccupation)
(documentation SportsPosition EnglishLanguage "A &%Position which is filled by someone on a 
&%SportsTeam and which represents the role played by the person on the team.")

(=>
  (and
    (occupiesPosition ?H ?P ?O)   
    (instance ?P SportsPosition))
  (instance ?O SportsTeam))

(subclass GovernmentPosition Profession)
(documentation GovernmentPosition EnglishLanguage "Any
&%Profession where the position occupied is within a
&%GovernmentOrganization.")

(=>
  (and
    (instance ?O GovernmentPosition)
    (occupiesPosition ?P ?O ?ORG))
  (instance ?ORG GovernmentOrganization))

(instance Journalist Profession)
(documentation Journalist EnglishLanguage "The &%Profession of being a news reporter, i.e. 
investigating and reporting, in a publication or broadcast program, current 
events.")

(=>
  (attribute ?P Journalist)
  (and
    (occupation ?P (OccupationFn ContentDevelopment))
    (occupation ?P (OccupationFn Disseminating))))

(subclass ModellingPosition Position)
(documentation ModellingPosition EnglishLanguage "Any &%Position which involves posing for an 
artist or photographer.")

;; NS: edit.

(instance Soldier GovernmentPosition)
;; NS: edit.
(documentation Soldier EnglishLanguage "This &%Attribute
describes someone serving in the armed forces of a
&%Nation.")

;; NS: edit.
;; KJN: More exhaustively defined in Military.kif making this definition redundant.
;; so commenting this out for now.
;;(instance RedcoatSoldier GovernmentPosition)
;; NS: add.
;;(subAttribute RedcoatSoldier Soldier)
;; NS: edit.
;;(documentation RedcoatSoldier EnglishLanguage "This
;;&%Attribute describes a &%Soldier who served with the
;;British (Loyalists) during the American Revolutionary War.")

;; NS: edit.
(instance ConfederateSoldier GovernmentPosition)
;; NS: add.
(subAttribute ConfederateSoldier Soldier)
;; NS: edit.
(documentation ConfederateSoldier EnglishLanguage "This
&%Attribute describes a &%Soldier who served on the
Confederate side during the American Civil War.")

;; NS: edit.
;; KJN: More exhaustively defined in Military.kif, so commenting this out for now.
;;(instance UnionSoldier GovernmentPosition)
;; NS: add.
;;(subAttribute UnionSoldier Soldier)
;; NS: edit.
;;(documentation UnionSoldier EnglishLanguage "This
;;&%Attribute describes a &%Soldier who served on the Union
;;side during the American Civil War.")

(instance Sailor SkilledOccupation)
(documentation Sailor EnglishLanguage "The class of &%Positions which involve working on a 
ship, whether a merchant ship or a navy ship.")

(subAttribute ShipCaptain Sailor)
(documentation ShipCaptain EnglishLanguage "The class of &%Positions which involve the command 
of a ship.")

(subAttribute ShipOfficer Sailor)
(documentation ShipOfficer EnglishLanguage "The class of &%Sailors which have a position of 
responsibility on a &%Ship.")

(subAttribute ShipMate Sailor)
(documentation ShipMate EnglishLanguage "The class of &%Positions that involve some responsibility 
on a ship and are lower in rank than &%ShipCaptain.")


;; Moving this to Government.kif to remove dependencies.
;;(instance ConfederateStatesOfAmerica GeopoliticalArea)
;;(documentation ConfederateStatesOfAmerica EnglishLanguage "The eleven states of the &%UnitedStates 
;;that tried to secede from the &%UnitedStates.")

;;(instance UnionStatesOfAmerica GeopoliticalArea)
;;(documentation UnionStatesOfAmerica EnglishLanguage "The states of the &%UnitedStates that the 
;;&%ConfederateStatesOfAmerica seceded from.")


;; NS: add.
(instance MilitaryPrivate GovernmentPosition)
;; NS: edit.
(subAttribute MilitaryPrivate Soldier)
;; NS: edit.
(documentation MilitaryPrivate EnglishLanguage "This
&%Attribute describes an enlisted &%Soldier of the lowest
rank.")

;; NS: edit.
(subAttribute MilitaryOfficer Soldier)
;; NS: add.
(instance MilitaryOfficer GovernmentPosition)
;; NS: edit.
(documentation MilitaryOfficer EnglishLanguage "This
&%Attribute describes a &%Soldier who has command
authority.")

(=>
   (instance ?OFFICER MilitaryOfficer)
   (exists (?MANAGE ?PATIENT)
      (and
         (instance ?MANAGE Managing)
         (agent ?MANAGE ?OFFICER)
         (patient ?MANAGE ?PATIENT)
         (or
            (instance ?PATIENT MilitaryOrganization)
            (instance ?PATIENT Soldier)))))

;; NS: add.
(subAttribute MilitaryGeneral MilitaryOfficer)
;;(instance MilitaryGeneral Position)
;;(subclass MilitaryGeneral MilitaryOfficer)
(documentation MilitaryGeneral EnglishLanguage "&%MilitaryGeneral is a generic &%Position 
that indicates holding (or having held) the rank of General in some 
military force.  An indicator that someone uses the title, without 
committing to his or her exact rank or military affiliation.") 

(instance Admiral GovernmentPosition)    
(subAttribute Admiral MilitaryOfficer)
(documentation Admiral EnglishLanguage "Admiral is the rank, or part of the name of the ranks, of the highest naval officers, ranks above a vice admiral and below a fleet admiral.")

(instance Major GovernmentPosition)    
(subAttribute Major MilitaryOfficer)
(documentation Major EnglishLanguage "In the US, Major is a field grade military officer rank just above the rank of captain and just below the rank of lieutenant colonel.")

;; NS: edit.
(subAttribute MajorGeneral MilitaryGeneral)
;; NS: add.
(instance MajorGeneral GovernmentPosition)
(documentation MajorGeneral EnglishLanguage "A &%MilitaryGeneral that ranks above a 
&%BrigadierGeneral.")

;; NS: edit.
(subAttribute BrigadierGeneral MilitaryGeneral)
;; NS: add.
(instance BrigadierGeneral GovernmentPosition)
(documentation BrigadierGeneral EnglishLanguage "A &%MilitaryGeneral that ranks below 
a &%MajorGeneral.")

;; NS: edit.
(subAttribute Lieutenant MilitaryOfficer)
;; NS: add.
(instance Lieutenant GovernmentPosition)
(documentation Lieutenant EnglishLanguage "A commissioned &%MilitaryOfficer.")

;; NS: edit.
(subAttribute CaptainOfficer MilitaryOfficer)
;; NS: add.
(instance CaptainOfficer GovernmentPosition)
(documentation CaptainOfficer EnglishLanguage "A commissioned &%MilitaryOfficer who ranks 
above a &%Lieutenant but below a &%MajorOfficer.")

;; NS: edit.
(subAttribute Colonel MilitaryOfficer)
;; NS: add.
(instance Colonel GovernmentPosition)
(documentation Colonel EnglishLanguage "A commissioned &%MilitaryOfficer who ranks above 
a lieutenant colonel and below a brigadier general.")

(subAttribute Sergeant MilitaryOfficer)
;; NS: add.
(instance Sergeant GovernmentPosition)
(documentation Sergeant EnglishLanguage "A noncomissioned &%MilitaryOfficer.")

;; NS: edit.
(subAttribute Corporal MilitaryOfficer)
;; NS: add.
(instance Corporal GovernmentPosition)
(documentation Corporal EnglishLanguage "A noncomissioned &%MilitaryOfficer.")

(instance CenturyDuration UnitOfDuration)
(documentation CenturyDuration EnglishLanguage "The &%TimeDuration of 100 years.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER CenturyDuration)
        (MeasureFn (MultiplicationFn ?NUMBER 100) YearDuration)))

(instance DecadeDuration UnitOfDuration)
(documentation DecadeDuration EnglishLanguage "The &%TimeDuration of 10 years.")

(=>
   (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
   (equal
        (MeasureFn ?NUMBER DecadeDuration)
        (MeasureFn (MultiplicationFn ?NUMBER 10) YearDuration)))

(instance YardLength UnitOfLength)
(documentation YardLength EnglishLanguage "English unit of length, equal to 3 &%FeetLength.")

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER YardLength)
    (MeasureFn (MultiplicationFn 3 ?NUMBER) FootLength)))

(documentation Nanometer EnglishLanguage "Submultiple of Meter. Symbol: nm. It is a unit of length in the metric system, equal to one billionth of a metre.")
(instance Nanometer UnitOfLength)
(=>
  (equal ?NUMBER
    (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER Nanometer)
    (MeasureFn
      (MultiplicationFn ?NUMBER 0.000000001) Meter)))
      
(subclass NightTime TimeInterval)
(documentation NightTime EnglishLanguage "The class of &%TimeIntervals that begin at &%Sunset
and end at &%Sunrise.")

(=>
   (instance ?NIGHT NightTime)
   (exists (?DAY1 ?DAY2)
      (and
         (instance ?DAY1 DayTime)
         (instance ?DAY2 DayTime)
         (meetsTemporally ?NIGHT ?DAY1)
         (meetsTemporally ?DAY2 ?NIGHT))))

(=>
   (instance ?NIGHT NightTime)
   (exists (?RISE ?SET)
      (and
         (instance ?RISE Sunrise)
         (instance ?SET Sunset)
         (starts ?SET ?NIGHT)
         (finishes ?RISE ?NIGHT))))

(subclass DayTime TimeInterval)
(documentation DayTime EnglishLanguage "The class of &%TimeIntervals that begin at &%Sunrise 
and end at &%Sunset.")

(=>
   (instance ?DAY DayTime)
   (exists (?NIGHT1 ?NIGHT2)
      (and
         (instance ?NIGHT1 NightTime)
         (instance ?NIGHT2 NightTime)
         (meetsTemporally ?DAY ?NIGHT1)
         (meetsTemporally ?NIGHT2 ?DAY))))

(=>
   (instance ?DAY DayTime)
   (exists (?RISE ?SET)
      (and
         (instance ?RISE Sunrise)
         (instance ?SET Sunset)
         (starts ?RISE ?DAY)
         (finishes ?SET ?DAY))))

(subclass Morning DayTime)
(documentation Morning EnglishLanguage "The class of &%TimeIntervals that begin at &%Sunrise 
and end at noon.")

(=>
   (instance ?MORNING Morning)
   (exists (?HOUR)
      (and
         (instance ?HOUR (HourFn 12 ?DAY))
         (finishes ?HOUR ?MORNING))))

(subclass AnteMeridiem TimeInterval)
(documentation AnteMeridiem EnglishLanguage "The class of &%TimeIntervals that begin at midnight 
and end at noon.")
(=>
   (instance ?AM AnteMeridiem)
   (exists (?D ?HOUR1 ?HOUR2)
      (and
         (instance ?HOUR1 (HourFn 24 ?D))
         (starts ?HOUR1 ?AM)
  	   (instance ?HOUR2 (HourFn 12 ?D))
         (finishes ?HOUR2 ?AM))))

(subclass PostMeridiem TimeInterval)
(documentation PostMeridiem EnglishLanguage "The class of &%TimeIntervals that begin at noon and 
end at midnight.")
(=>
   (instance ?PM PostMeridiem)
   (exists (?D ?HOUR1 ?HOUR2)
      (and
         (instance ?HOUR1 (HourFn 12 ?D))
         (starts ?HOUR1 ?PM)
  	   (instance ?HOUR2 (HourFn 24 ?D))
         (finishes ?HOUR2 ?PM))))

(subclass Afternoon DayTime)
(documentation Afternoon EnglishLanguage "The class of &%TimeIntervals that begin at noon and 
end at &%Sunset.")

(=>
   (instance ?AFTERNOON Afternoon)
   (exists (?HOUR)
      (and
         (instance ?HOUR (HourFn 12 ?DAY))
         (starts ?HOUR ?AFTERNOON))))

(subclass Sunrise TimeInterval)
(documentation Sunrise EnglishLanguage "The &%TimeInterval of each &%Day when the sun is rising 
and is partially overlapped by the horizon line.")

(subclass Sunset TimeInterval)
(documentation Sunset EnglishLanguage "The &%TimeInterval of each &%Day when the sun is setting 
and is partially overlapped by the horizon line.") 

(subclass Weekend TimeInterval)
(documentation Weekend EnglishLanguage "Any &%Saturday and &%Sunday which are contiguous.")

(=>
   (instance ?WEEKEND Weekend)
   (exists (?SATURDAY ?SUNDAY)
      (and
         (instance ?SATURDAY Saturday)
         (instance ?SUNDAY Sunday)
         (starts ?SATURDAY ?WEEKEND)
         (finishes ?SUNDAY ?WEEKEND)
         (meetsTemporally ?SATURDAY ?SUNDAY))))

(subclass SeasonOfYear TimeInterval)
(partition SeasonOfYear WinterSeason SpringSeason SummerSeason FallSeason)
(documentation SeasonOfYear EnglishLanguage "&%SeasonOfYear is the class of four 
seasons correlated with the calendar &%Year and associated with 
changes in the length of daylight and with overall temperature 
changes. Depending upon the &%GeographicArea, a &%SeasonOfYear 
may also be associated with weather patterns (e.g., rainy, dry, 
windy). The characteristics of seasons (cold vs. hot temperatures, 
long vs. short days) are reversed from the &%NorthernHemisphere 
to the &%SouthernHemisphere.")

(subclass WinterSeason SeasonOfYear)
(documentation WinterSeason EnglishLanguage "The &%SeasonOfYear that begins at the winter 
solstice and ends at the spring equinox.")

(=>
   (instance ?WINTER WinterSeason)
   (exists (?SPRING)
      (and
         (instance ?SPRING SpringSeason)
         (meetsTemporally ?WINTER ?SPRING))))

(=>
   (instance ?WINTER WinterSeason)
   (exists (?AUTUMN)
      (and
         (instance ?AUTUMN FallSeason)
         (meetsTemporally ?AUTUMN ?WINTER))))

(subclass SpringSeason SeasonOfYear)
(documentation SpringSeason EnglishLanguage "The &%SeasonOfYear that begins at the spring 
equinox and ends at the summer solstice. &%SpringSeason is the class of 
&%TimeIntervals associated with the calendar months of &%March 
through &%May.")

(=>
   (instance ?SPRING SpringSeason)
   (exists (?SUMMER)
      (and
         (instance ?SUMMER SummerSeason)
         (meetsTemporally ?SPRING ?SUMMER))))

(=>
   (instance ?SPRING SpringSeason)
   (exists (?WINTER)
      (and
         (instance ?WINTER WinterSeason)
         (meetsTemporally ?WINTER ?SPRING))))

(subclass SummerSeason SeasonOfYear)
(documentation SummerSeason EnglishLanguage "The &%SeasonOfYear that begins at the summer 
solstice and ends at the autumnal equinox.")

(=>
   (instance ?SUMMER SummerSeason)
   (exists (?SPRING)
      (and
         (instance ?SPRING SpringSeason)
         (meetsTemporally ?SPRING ?SUMMER))))

(=>
   (instance ?SUMMER SummerSeason)
   (exists (?AUTUMN)
      (and
         (instance ?AUTUMN FallSeason)
         (meetsTemporally ?SUMMER ?AUTUMN))))

(subclass FallSeason SeasonOfYear)
(documentation FallSeason EnglishLanguage "The &%SeasonOfYear that begins at the autumnal 
equinox and ends at the winter solstice.")

(=>
   (instance ?AUTUMN FallSeason)
   (exists (?SUMMER)
      (and
         (instance ?SUMMER SummerSeason)
         (meetsTemporally ?SUMMER ?AUTUMN))))

(=>
   (instance ?AUTUMN FallSeason)
   (exists (?WINTER)
      (and
         (instance ?WINTER WinterSeason)
         (meetsTemporally ?AUTUMN ?WINTER))))

(instance Upstairs PositionalAttribute)
(documentation Upstairs EnglishLanguage "A &%PositionalAttribute to indicate that one thing is 
one or more floors above a second thing in the same building.")

(=>
   (orientation ?OBJ1 ?OBJ2 Upstairs)
   (exists (?LEVEL1 ?LEVEL2 ?BUILDING)
      (and
         (instance ?LEVEL1 BuildingLevel)
         (instance ?LEVEL2 BuildingLevel)
         (instance ?BUILDING Building)
         (part ?LEVEL1 ?BUILDING)
         (part ?LEVEL2 ?BUILDING)
         (located ?OBJ1 ?LEVEL1)
         (located ?OBJ2 ?LEVEL2)
         (orientation ?LEVEL1 ?LEVEL2 Above))))

(instance Downstairs PositionalAttribute)
(documentation Downstairs EnglishLanguage "A &%PositionalAttribute to indicate that one thing is 
one or more floors below a second thing in the same building.")

(=>
   (orientation ?OBJ1 ?OBJ2 Downstairs)
   (exists (?LEVEL1 ?LEVEL2 ?BUILDING)
      (and
         (instance ?LEVEL1 BuildingLevel)
         (instance ?LEVEL2 BuildingLevel)
         (instance ?BUILDING Building)
         (part ?LEVEL1 ?BUILDING)
         (part ?LEVEL2 ?BUILDING)
         (located ?OBJ1 ?LEVEL1)
         (located ?OBJ2 ?LEVEL2)
         (orientation ?LEVEL1 ?LEVEL2 Below))))

(subclass LinguisticAttribute InternalAttribute)
(documentation LinguisticAttribute EnglishLanguage "Any &%Attribute that is 
expressed by a &%Language or class of &%Languages.")

(instance Happiness EmotionalState)
(documentation Happiness EnglishLanguage "The state of being happy, experiencing pleasure, 
joy or contentment.  Note that this &%Attribute covers both active enjoyment, 
as well as the emotional state of simply being free from anxiety or fear.")

(=>
  (attribute ?PERSON Happiness)
  (not 
    (exists (?PROP)
      (fears ?PERSON ?PROP))))

(subAttribute Satisfaction Happiness)
(documentation Satisfaction EnglishLanguage "The state of being happy about a state of
affairs that occurred in the past.  In cases where that state of affairs 
is the product of one's own doing, this is known as pride.")

(subAttribute Tranquility Happiness)
(contraryAttribute Tranquility Anxiety)
(documentation Tranquility EnglishLanguage "The state of being free from &%Anxiety.")

(instance Unhappiness EmotionalState) 
(contraryAttribute Unhappiness Happiness)
(documentation Unhappiness EnglishLanguage "The state of being unhappy, experiencing pain, 
sorrow or unease.")

(subAttribute Excitement Happiness)
(documentation Excitement EnglishLanguage "The state of being happy about a state of 
affairs that might occur in the future.")

(subAttribute Anxiety Unhappiness)
(documentation Anxiety EnglishLanguage "The state of being worried, troubled or uneasy.")

(=>
   (attribute ?PERSON Anxiety)
   (exists (?PROP)
      (fears ?PERSON ?PROP)))

(subAttribute Anger Unhappiness)
(documentation Anger EnglishLanguage "The state of being wrathful, irate or indignant.")

(=>
   (attribute ?PERSON Anger)
   (exists (?PROP)
      (disapproves ?PERSON ?PROP)))

(subAttribute Pain Unhappiness)
(documentation Pain EnglishLanguage "A physical sensation of discomfort which can vary widely 
in intensity.")

(subAttribute Headache Pain)
(documentation Headache EnglishLanguage "&%Pain that that is restricted to the &%Head.")

(=>
  (attribute ?E Headache)
  (exists (?H)
    (and
      (instance ?H Head)
      (part ?H ?E)
      (attribute ?H Pain))))

(instance Surprise EmotionalState)
(documentation Surprise EnglishLanguage "The &%EmotionalState that one experiences when something 
unexpected and of significance occurs.")

(=>
   (holdsDuring ?TIME (attribute ?AGENT Surprise))
   (exists (?PART ?PROP)
      (and
         (temporalPart ?PART (PastFn ?TIME))
         (holdsDuring ?PART (expects ?AGENT ?PROP))
         (holdsDuring ?TIME (truth ?PROP False)))))

(instance structure BinaryPredicate)
(instance structure IrreflexiveRelation)
(instance structure AsymmetricRelation)
(subrelation structure attribute)
(domain structure 1 Object)
(domain structure 2 StructureAttribute)
                  
;; KJN: Delete. Redundant as attribute already is an instance of these 3         
(instance color BinaryPredicate)
;;(instance color IrreflexiveRelation)
;;(instance color AsymmetricRelation)
(subrelation color attribute)
(domain color 1 Object)
(domain color 2 ColorAttribute)

;; NS: Narrowing attribute -> color.
(=>
  (and
    (instance ?ATTR ColorAttribute)
    (holdsDuring ?T1 
      (attribute ?OBJ ?ATTR)))
  (holdsDuring ?T1
    (color ?OBJ ?ATTR)))

(subclass SpectralColor ColorAttribute)
(documentation SpectralColor EnglishLanguage "Colors that can be produced by visible light of a narrow band of wavelengths (monochromatic light) are called 
pure spectral colors.")

(subclass SecondaryColor ColorAttribute)
(documentation SecondaryColor EnglishLanguage "A color that is the product of mixing together 
two or more &%PrimaryColors.")

(=>
   (and
      (instance ?COLOR SecondaryColor)
      (attribute ?OBJ ?COLOR))
   (exists (?PROCESS ?RESOURCE1 ?RESOURCE2 ?PRIMARY1 ?PRIMARY2)
      (and
         (result ?PROCESS ?OBJ)
         (resource ?PROCESS ?RESOURCE1)
         (resource ?PROCESS ?RESOURCE2)
         (attribute ?RESOURCE1 ?PRIMARY1)
         (attribute ?RESOURCE2 ?PRIMARY2)
         (instance ?PRIMARY1 PrimaryColor)
         (instance ?PRIMARY2 PrimaryColor)
         (not (equal ?PRIMARY1 ?PRIMARY2)))))

(instance VioletColor SpectralColor)
(instance VioletColor SecondaryColor)
(documentation VioletColor EnglishLanguage "The &%Attribute of being violet in color.")

(instance GrayColor SecondaryColor)
(documentation GrayColor EnglishLanguage "A &%SecondaryColor that results from mixing &%Black and 
&%White.")

(instance Pink SecondaryColor)
(documentation Pink EnglishLanguage "A &%SecondaryColor that results from mixing &%Red and 
&%White.")

(instance Brown SecondaryColor)
(documentation Brown EnglishLanguage "A &%SecondaryColor that resembles the color of wood or 
of soil.")

(instance OrangeColor SecondaryColor)
(instance OrangeColor SpectralColor)
(documentation OrangeColor EnglishLanguage "A &%SecondaryColor that results from mixing &%Red 
and &%Yellow and resembles the color of a ripe orange fruit.")

(instance Green SecondaryColor)
(instance Green SpectralColor)
(documentation Green EnglishLanguage "A &%SecondaryColor that resembles the color of fresh 
grass.")

(instance Purple SecondaryColor)
(documentation Purple EnglishLanguage "A &%SecondaryColor that results from mixing &%Red and 
&%Blue.")

(instance LineFormation ShapeAttribute)
(documentation LineFormation EnglishLanguage "A &%ShapeAttribute that applies to 
&%Collections and indicates that all of the &%members of the &%Collection 
are arrayed in a line, i.e. each &%member (except possibly the first) is 
behind or to the side of exactly one other &%member.")

(=>
   (attribute ?COLLECTION LineFormation)
   (instance ?COLLECTION Collection))

(instance Stressed SoundAttribute)
(documentation Stressed EnglishLanguage "A &%SoundAttribute of &%Syllables.  It denotes 
the quality of being emphasized over the other &%Syllables in the same 
&%Word.")

(=>
   (attribute ?SYLLABLE Stressed)
   (instance ?SYLLABLE Syllable))

(=>
   (and
      (attribute ?SYLLABLE Stressed)
      (instance ?WORD Word)
      (part ?SYLLABLE ?WORD))
   (not (exists (?SYLLABLE2)
      (and
         (instance ?SYLLABLE2 Syllable)
         (part ?SYLLABLE2 ?WORD)
         (attribute ?SYLLABLE2 Stressed)
         (not (equal ?SYLLABLE2 ?SYLLABLE))))))

(subclass Syllable SymbolicString)
(documentation Syllable EnglishLanguage "A sequence of &%Characters from the same &%Word 
that denote a single sound.")

(=>
   (instance ?WORD Word)
   (exists (?SYLLABLE)
      (and
         (instance ?SYLLABLE Syllable)
         (part ?SYLLABLE ?WORD))))

(subclass AlphabeticCharacter Character)
(documentation AlphabeticCharacter EnglishLanguage "Any &%Character that is comprised of a single 
alphabetical character, e.g. A, B, C, D, ...")

(subclass DigitCharacter Character)
(documentation DigitCharacter EnglishLanguage "Any &%Character that is comprised of a single digit, 
i.e. one of the numerals 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.")

(subclass Consonant AlphabeticCharacter)
(documentation Consonant EnglishLanguage "An &%AlphabeticCharacter that denotes a speech sound 
that results in audible friction when it is pronounced.")

(subclass Vowel AlphabeticCharacter)
(documentation Vowel EnglishLanguage "An &%AlphabeticCharacter that denotes a speech sound that 
does not result in audible friction when it is pronounced.")

(instance Lost ContestAttribute)
(contraryAttribute Lost Won)
(documentation Lost EnglishLanguage "The &%ContestAttribute that applies to a &%Contest 
participant who has lost the &%Contest.")

(instance Won ContestAttribute)
(documentation Won EnglishLanguage "The &%ContestAttribute that applies to a &%Contest 
participant who has won the &%Contest.")

(instance TieScore ContestAttribute)
(documentation TieScore EnglishLanguage "The &%ContestAttribute that applies to all &%contestParticipants 
in a &%Contest when none of them have &%Won or &%Lost the &%Contest.")

(subclass GameAttribute ContestAttribute)
(documentation GameAttribute EnglishLanguage "Any &%ContestAttribute that is specific 
to a &%Game.")

(=>
   (and
      (property ?THING ?ATTR)
      (instance ?ATTR GameAttribute))
   (exists (?GAME)
      (and
         (instance ?GAME Game)
         (or
            (agent ?GAME ?THING)
            (patient ?GAME ?THING)
            (subProcess ?THING ?GAME)))))

(subclass SportsAttribute GameAttribute)
(documentation SportsAttribute EnglishLanguage "Any &%GameAttribute that is specific to 
a &%Sport.")

(=>
   (and
      (property ?THING ?ATTR)
      (instance ?ATTR SportsAttribute))
   (exists (?SPORT)
      (and
         (instance ?SPORT Game)
         (or
            (agent ?SPORT ?THING)
            (patient ?SPORT ?THING)
            (subProcess ?THING ?SPORT)))))

(instance Foul SportsAttribute)
(documentation Foul EnglishLanguage "A &%SportsAttribute that indicates that the &%GamePiece of 
a &%Sport is no longer in play because it has gone beyond the limits of the 
sports field.")

(instance SportsOut SportsAttribute)
(documentation SportsOut EnglishLanguage "A &%SportsAttribute that indicates that a player in 
a &%Sport can no longer compete because he has been tagged with the &%GamePiece.")

(subclass PoliticoEconomicAttribute RelationalAttribute)
(partition PoliticoEconomicAttribute FormOfGovernment EconomicAttribute)
(documentation PoliticoEconomicAttribute EnglishLanguage "Any &%Attribute of a &%Government 
which specifies some aspect of the political or economic system of the 
&%Government.")

(=>
   (and
      (instance ?ATTRIBUTE PoliticoEconomicAttribute)
      (attribute ?GOVERNMENT ?ATTRIBUTE))
   (instance ?GOVERNMENT Government))

(subclass EconomicAttribute PoliticoEconomicAttribute)
(documentation EconomicAttribute EnglishLanguage "&%EconomicAttribute is the class 
of terms including all &%Attributes used to characterize the 
economic systems or development levels of &%Nations or dependent 
&%GeopoliticalAreas.")   

(subclass FormOfGovernment PoliticoEconomicAttribute)
(documentation FormOfGovernment EnglishLanguage "&%FormOfGovernment is a class of 
&%Attributes used to describe the characteristics of a government, 
especially a &%NationalGovernment.  The concept &%FormOfGovernment is 
interpreted broadly enough to include &%Anarchy and &%Factionalism.")

(subclass ChemicalReduction ChemicalSynthesis)
(disjoint ChemicalReduction Oxidation)
(documentation ChemicalReduction EnglishLanguage "Any &%ChemicalProcess where &%Electrons 
are added to the substance undergoing the &%ChemicalProcess.")
(=>
  (and
    (instance ?R ChemicalReduction)
    (patient ?R ?S)
    (holdsDuring 
      (BeginFn (WhenFn ?R)) 
      (electronNumber ?S ?L)))
  (and
    (greaterThan ?G ?L)
    (holdsDuring 
      (EndFn (WhenFn ?R)) 
      (electronNumber ?S ?G))))

(subclass Oxidation ChemicalDecomposition)
(documentation Oxidation EnglishLanguage "Any &%ChemicalProcess where &%Electrons 
are removed from the substance undergoing the &%ChemicalProcess.")

(=>
  (and
    (instance ?O Oxidation)
    (patient ?O ?S)
    (holdsDuring 
      (BeginFn (WhenFn ?O)) 
      (electronNumber ?S ?G)))
  (exists (?L)
    (and
      (lessThan ?L ?G)
      (holdsDuring 
        (EndFn (WhenFn ?O)) 
	(electronNumber ?S ?L)))))

(subclass Dialysis Separating)
(documentation Dialysis EnglishLanguage "Any process of &%Separating a &%Solution into two or more 
constituent &%PureSubstances by means of their unequal diffusion through membranes 
that are partially permeable.")

(=>
   (instance ?DIALYSIS Dialysis)
   (exists (?SOLUTION ?SUBSTANCE1 ?SUBSTANCE2)
      (and
         (resource ?DIALYSIS ?SOLUTION)
         (instance ?SOLUTION Solution)
         (result ?DIALYSIS ?SUBSTANCE1)
         (instance ?SUBSTANCE1 PureSubstance)
         (result ?DIALYSIS ?SUBSTANCE2)
         (instance ?SUBSTANCE2 PureSubstance)
         (not (equal ?SUBSTANCE1 ?SUBSTANCE2)))))
      
(subclass Diluting Putting)
(documentation Diluting EnglishLanguage "Adding a &%Liquid to a &%Solution to decrease 
the concentration of the &%Solution.")

(=>
  (instance ?D Diluting)
  (exists (?S)
    (and
      (patient ?D ?S)
      (instance ?S Solution)
      (attribute ?S Liquid))))

(instance ChemicalEquilibrium InternalAttribute)
(documentation ChemicalEquilibrium EnglishLanguage "The &%Attribute of being in a chemically 
stable state, i.e. the relative proportions of &%resources and &%results will 
not longer change.")

(=>
   (property ?PROCESS ChemicalEquilibrium)
   (instance ?PROCESS ChemicalProcess))

(=>
   (property ?PROCESS ChemicalEquilibrium)
   (exists (?RATIO)
      (=>
         (and
            (holdsDuring ?TIME (resource ?PROCESS ?RESOURCE))
            (holdsDuring ?TIME (result ?PROCESS ?RESULT)))
         (equal ?RATIO (DivisionFn ?RESOURCE ?RESULT)))))

(subclass Chromatography Separating)
(documentation Chromatography EnglishLanguage "&%Processes of &%Separating a &%LiquidMixture or 
a &%GasMixture into some or all of the &%PureSubstances that comprise it.")

(=>
  (instance ?C Chromatography)
  (exists (?M)
    (and
      (resource ?C ?M)
      (or
        (instance ?M LiquidMixture)
        (instance ?M GasMixture)))))

(=>
  (instance ?C Chromatography)
  (exists (?S)
    (and
      (instance ?S PureSubstance)
      (result ?C ?S))))

(subclass BreakabilityAttribute InternalAttribute)
(documentation BreakabilityAttribute EnglishLanguage "A subclass of &%Attributes for 
characterizing the breakability of &%CorpuscularObjects.")

(instance Fragile BreakabilityAttribute)
(documentation Fragile EnglishLanguage "An &%Attribute which indicates that the 
associated &%Object is very breakable.")

(instance Unbreakable BreakabilityAttribute)
(contraryAttribute Unbreakable Fragile)
(documentation Unbreakable EnglishLanguage "An &%Attribute which indicates that the 
associated &%Object cannot be broken under normal usage conditions.")

(subrelation contestParticipant agent)
(instance contestParticipant CaseRole)
(instance contestParticipant TotalValuedRelation)
(domain contestParticipant 1 Contest)
(domain contestParticipant 2 Agent)
(documentation contestParticipant EnglishLanguage "(&%contestParticipant ?CONTEST ?AGENT) 
means that ?AGENT is one of the sides in the &%Contest ?CONTEST.  For 
example, if the ?CONTEST is a football game, then ?AGENT would be one of 
the opposing teams.  For another example, if ?CONTEST is a &%Battle, then 
?AGENT would be one of the sides fighting each other.")

(subclass CivilWar War)
(documentation CivilWar EnglishLanguage "A &%War in which the fighting &%GeopoliticalAreas 
are both part of the same &%Nation.")

(=>
   (instance ?WAR CivilWar)
   (exists (?NATION)
      (and
         (instance ?NATION Nation)
         (forall (?AGENT)
            (=>
               (contestParticipant ?WAR ?AGENT)
               (geopoliticalSubdivision ?AGENT ?NATION))))))

(subclass Debating Contest)
(subclass Debating LinguisticCommunication)
(documentation Debating EnglishLanguage "A &%Contest where each participant holds a different 
view regarding some issue, and each participant attempts to prove, by 
rhetoric or evidence, that his/her own views about a particular matter are 
correct and/or that the views of the other participants are incorrect.")

(subclass Negotiating Contest)
(subclass Negotiating LinguisticCommunication)
(documentation Negotiating EnglishLanguage "A &%Contest where each participant attempts to 
maximize his self-interest in a &%Promise that marks the end of the &%Contest.")

(=>
   (instance ?NEGOTIATE Negotiating)
   (hasPurpose ?NEGOTIATE (exists (?COMMIT)
                             (and
                                (instance ?COMMIT Committing)
                                (subProcess ?COMMIT ?NEGOTIATE)
                                (finishes (WhenFn ?COMMIT) (WhenFn ?NEGOTIATE))))))

(subclass BusinessCompetition Contest)
(documentation BusinessCompetition EnglishLanguage "Any &%Contest where the &%contestParticipants 
are &%Corporations and the aim is to win as many customers as possible.")

(=>
   (and
      (instance ?CONTEST BusinessCompetition)
      (contestParticipant ?CONTEST ?AGENT))
   (instance ?AGENT Corporation))

(subclass VisualAcuityAttribute BiologicalAttribute)
(documentation VisualAcuityAttribute EnglishLanguage "The
&%BiologicalAttributes in this &%Class describe the visual
capabilities of an &%Organism.")

(instance ColorBlind VisualAcuityAttribute)
(documentation ColorBlind EnglishLanguage "This
&%VisualAcuityAttribute describes an &%Organism that is
unable to perceive a distinction in color between certain
wavelength ranges within the larger range of typically
visible electro-magnetic radiation (light).  Among &%Humans,
there are several forms and degrees of color blindness.
Color blindness is generally considered to be a mild to
moderate disability among &%Humans, but individuals with
certain types of color blindness excel at some visual
pattern recognition tasks, and it's not clear that the
condition should be considered a &%DiseaseOrSyndrome.")
   
   
(subclass Disability DiseaseOrSyndrome)
;; english definition taken from Wikipedia
(documentation Disability EnglishLanguage "&%Disability is a class of 
&%DiseaseOrSyndrome that describes impairments, activity limitations or participation 
restriction that may be physical, cognitive, mental, sensory, emotional, 
developmental or some combination")
(termFormat EnglishLanguage Disability "disability")

(subclass PhysicalDisability Disability)
;; english definition taken from Wikipedia
(documentation PhysicalDisability EnglishLanguage "&%PhysicalDisability is any 
impairment that limits the physical function of limbs or fine or gross motor ability, 
or limit the facets of daily living")
(termFormat EnglishLanguage PhysicalDisability "physical disability")

(subclass SensoryDisability Disability)
;; english definition taken from Wikipedia
(documentation SensoryDisability EnglishLanguage "&%SensoryDisability is any 
impairement of one of the five senses")
(termFormat EnglishLanguage SensoryDisability "sensory disability")

(instance Blind VisualAcuityAttribute)
(instance Blind SensoryDisability)
;; KJN: Removing this as Disability already inherits from BiologicalAttribute
;; (instance Blind BiologicalAttribute)
(documentation Blind EnglishLanguage "The &%Attribute that applies to &%Animals and &%Humans 
that are unable to see.")

(=>
   (attribute ?AGENT Blind)
   (not (capability Seeing agent ?AGENT)))

;; KJN: Removing this as Disability already inherits from BiologicalAttribute
;;(instance Deaf BiologicalAttribute)
(instance Deaf SensoryDisability)
(documentation Deaf EnglishLanguage "The &%Attribute that applies to &%Animals and &%Humans 
that are unable to hear.")

(=>
  (attribute ?A Deaf)
  (not 
    (capability Hearing agent ?A)))

(instance Hungry BiologicalAttribute)
(documentation Hungry EnglishLanguage "The &%Attribute that applies to &%Animals and &%Humans 
when they want food.")

(=>
  (attribute ?A Hungry)
  (desires ?A 
    (exists (?E)
      (and
        (instance ?E Eating)
        (agent ?E ?A)))))

(instance Pregnant BiologicalAttribute)
(documentation Pregnant EnglishLanguage "The &%Attribute that applies to &%Female &%Animals and 
&%Humans that have an embryo or fetus growing inside of them as the result of 
having one of the &%Female's &%Eggs fertilized.")

(=>
  (attribute ?H Pregnant)
  (attribute ?H Female))

(subAttribute Puberty NonFullyFormed)
(documentation Puberty EnglishLanguage "The &%DevelopmentalAttribute of having functional sex 
glands which are not fully mature.")

(instance Fist BodyPosition) 
(documentation Fist EnglishLanguage "The &%BodyPosition of having the fingers drawn into 
the palm so that the hand can be used for striking something.")

(=>
   (attribute ?HAND Fist)
   (instance ?HAND Hand))

(subclass LyingDown BodyMotion)
(subclass LyingDown MotionDownward)
(documentation LyingDown EnglishLanguage "The &%BodyMotion of moving from a &%Sitting 
to a &%Prostrate position.")

(=>
   (and
      (instance ?LIE LyingDown)
      (agent ?LIE ?AGENT))
   (and
      (holdsDuring 
        (BeginFn (WhenFn ?LIE)) 
	(attribute ?AGENT Sitting))
      (holdsDuring 
        (EndFn (WhenFn ?LIE)) 
	(attribute ?AGENT Prostrate))))

(instance Handstand BodyPosition)
(documentation Handstand EnglishLanguage "The &%BodyPosition where one rests on one's hands 
and extends one's feet in the air.")

(instance Kneeling BodyPosition)
(documentation Kneeling EnglishLanguage "The &%BodyPosition of resting one's weight on one's 
&%Knees.")

(instance Splitting BodyPosition)
(documentation Splitting EnglishLanguage "The &%BodyPosition of extending one's &%Legs at 
right angles to one's &%Torso.")

(subAttribute Squatting Sitting)
(documentation Squatting EnglishLanguage "&%Sitting on one's heels.")

(subclass SittingDown BodyMotion)
(subclass SittingDown MotionDownward)
(documentation SittingDown EnglishLanguage "The &%BodyMotion of moving from a &%Standing 
to a &%Sitting position.")

(=>
   (and
      (instance ?SIT SittingDown)
      (agent ?SIT ?AGENT))
   (and
      (holdsDuring 
        (BeginFn (WhenFn ?SIT)) 
	(attribute ?AGENT Standing))
      (holdsDuring 
        (EndFn (WhenFn ?SIT)) 
	(attribute ?AGENT Sitting))))
   
(subclass StandingUp BodyMotion)
(subclass StandingUp MotionUpward)
(documentation StandingUp EnglishLanguage "The &%BodyMotion of moving from a &%Sitting 
to a &%Standing position.")

(=>
   (and
      (instance ?STAND StandingUp)
      (agent ?STAND ?AGENT))
   (and
      (holdsDuring 
        (BeginFn (WhenFn ?STAND)) 
	(attribute ?AGENT Sitting))
      (holdsDuring 
        (EndFn (WhenFn ?STAND)) 
	(attribute ?AGENT Standing))))

(subclass EyeMotion BodyMotion)
(documentation EyeMotion EnglishLanguage "Any &%Motion where a patient is the agent's 
own &%Eyelid or &%Eyelids.")

(=>
  (and
    (instance ?EM EyeMotion)
    (agent ?EM ?A))
  (exists (?E)
    (and
      (instance ?E Eyelid)
      (part ?E ?A)
      (patient ?EM ?E))))

(subclass OpeningEyes EyeMotion)
(subclass OpeningEyes Opening)
(disjoint OpeningEyes ClosingEyes)
(documentation OpeningEyes EnglishLanguage "The &%BodyMotion of relaxing the eye lids so that 
the corneas are exposed to light.")

(subclass ClosingEyes EyeMotion)
(subclass ClosingEyes Closing)
(documentation ClosingEyes EnglishLanguage "The &%EyeMotion of tensing the eye lids so that 
the corneas are not exposed to light.")

(subclass Winking ClosingEyes)
(subclass Winking Gesture)
(documentation Winking EnglishLanguage "Any instance of &%ClosingEyes which is intended to 
express something to someone else.")

(subclass Shrugging BodyMotion)
(subclass Shrugging Gesture)
(documentation Shrugging EnglishLanguage "Moving the &%Shoulders in such a way that the motion 
is intended to express something to someone else.")

(=>
   (and
      (instance ?SHRUG Shrugging)
      (patient ?SHRUG ?SHOULDER))
   (instance ?SHOULDER Shoulder))

(subclass Trembling BodyMotion)
(subclass Trembling AutonomicProcess)
(subclass Trembling Tremor)
(disjoint Trembling IntentionalProcess)
(documentation Trembling EnglishLanguage "Any &%BodyMotion which is involuntary and which is 
repeated many times over a short time frame, e.g. a tremor in the hands,
shivering etc.") 

(subclass ReflexiveProcess AutonomicProcess)
(documentation ReflexiveProcess EnglishLanguage "Any &%Muscle reaction which is a response 
to a specific stimulus and which does not reach the level of consciousness.")

(=>
  (instance ?P ReflexiveProcess)
  (exists (?M)
    (and
      (instance ?M Muscle)
      (patient ?P ?M))))

(subclass Dismounting BodyMotion)
(documentation Dismounting EnglishLanguage "Any &%BodyMotion which results in not being &%On 
something else.")
(=>
  (and
    (instance ?D Dismounting)
    (agent ?D ?A)
    (patient ?D ?O))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?D)) 
      (orientation ?A ?O On))
    (holdsDuring 
      (EndFn (WhenFn ?D)) 
      (not 
        (orientation ?A ?O On)))))

(subclass DomesticAnimal Animal)
(disjoint DomesticAnimal Human)
(documentation DomesticAnimal EnglishLanguage "Any &%Animal that is kept by a &%Human, as 
a pet, as livestock, for exhibition, etc.")

(=>
  (instance ?ANIMAL DomesticAnimal)
  (exists (?KEEP ?PERSON)
    (and
      (instance ?KEEP Keeping)
      (agent ?KEEP ?PERSON)
      (instance ?PERSON Human)
      (patient ?KEEP ?ANIMAL))))

(subclass Fodder (FoodForFn DomesticAnimal))
(subclass Fodder OrganicObject)
(documentation Fodder EnglishLanguage "&%Fodder is the class of &%OrganicObjects that 
is used as food for &%DomesticAnimals.")
(=>
  (instance ?FEED Fodder)
  (hasPurpose ?FEED 
    (exists (?ANIMAL ?EAT)
      (and
        (instance ?ANIMAL DomesticAnimal)
        (instance ?EAT Eating)
        (agent ?EAT ?ANIMAL)
        (patient ?EAT ?FEED)))))

(subclass Herbivore Mammal)
(disjoint Herbivore Carnivore)
(documentation Herbivore EnglishLanguage "A plant-eating &%Mammal.")

(=>
  (and
    (instance ?A Herbivore)
    (agent ?E ?A)
    (instance ?E Eating)
    (patient ?E ?F))
  (instance ?F Plant))

(subclass Antelope HoofedMammal)
(documentation Antelope EnglishLanguage "A &%HoofedMammal with long legs and backward-facing horns.  
This class includes gazelles, addax, blackbucks, etc.")

(subclass Buffalo HoofedMammal)
;; NS: delete.  Buffalo is neither disjoint from
;; DomesticAnimal, nor a subclass of DomesticAnimal.
;; (disjoint Buffalo DomesticAnimal)
(documentation Buffalo EnglishLanguage "A &%HoofedMammal with long hair whose habitat is the 
plains of &%NorthAmerica.")

(subclass DomesticCat DomesticAnimal)
(subclass DomesticCat Feline)
(documentation DomesticCat EnglishLanguage "A variety of &%Feline which has been domesticated 
by selective breeding.")

(subclass DomesticDog DomesticAnimal)
(subclass DomesticDog Canine)
(documentation DomesticDog EnglishLanguage "Canines which have evolved from the common 
wolf by selective breeding.")

(subclass Fox Canine)
(documentation Fox EnglishLanguage "&%Canines with a bushy tail and pointed ears and nose.  
&%Foxes tend to be much smaller than most &%DomesticDogs.")

(subclass Elephant Herbivore)
(documentation Elephant EnglishLanguage "A very large, almost hairless &%Herbivore with a long 
trunk.")

(documentation Goat EnglishLanguage "A domesticated &%HoofedMammal that is raised primarily 
for &%Milk.")

(subclass Horse HoofedMammal)
;;(subclass Horse Livestock)
(documentation Horse EnglishLanguage "A domesticated &%HoofedMammal that is used for 
transportation and work.")

(subclass Pig HoofedMammal)
;;(subclass Pig Livestock)
(documentation Pig EnglishLanguage "A domesticated &%HoofedMammal that is raised for pork.")

(subclass Donkey HoofedMammal)
;;(subclass Donkey Livestock)
(documentation Donkey EnglishLanguage "A domesticated &%HoofedMammal that is used for 
work.")

(subclass Gastropod Mollusk)
(documentation Gastropod EnglishLanguage "A &%Mollusk with a distinct head that has no 
shell (e.g. slugs) or a univalve shell (e.g. snails).")

(subclass Mule HoofedMammal)
(subclass Mule DomesticAnimal)
(documentation Mule EnglishLanguage "The product of a &%Male &%Donkey and a &%Female 
&%Horse.  &%Mules are always sterile.")

(=>
  (instance ?MULE Mule)
  (exists (?DONKEY ?HORSE)
    (and
      (father ?MULE ?DONKEY)
      (instance ?DONKEY Donkey)
      (mother ?MULE ?HORSE)
      (instance ?HORSE Horse))))

(=>
  (instance ?MULE Mule)
  (not 
    (capability SexualReproduction agent ?MULE)))

(subclass Sheep HoofedMammal)
(subclass Sheep DomesticAnimal)
(documentation Sheep EnglishLanguage "A domesticated &%HoofedMammal that is bred for its 
wool and for its meat (known as mutton).")

(subclass Lamb Sheep)
(documentation Lamb EnglishLanguage "A young &%Sheep, i.e. a &%Sheep that is &%NonFullyFormed.")

(<=>
  (instance ?L Lamb)
  (and
    (instance ?L Sheep)
    (attribute ?L NonFullyFormed)))

(subclass Cow HoofedMammal)
(subclass Cow DomesticAnimal)
(documentation Cow EnglishLanguage "A domesticated &%HoofedMammal that is raised for milk 
and beef, and is also used for work.")

(subclass Calf Cow)
(documentation Calf EnglishLanguage "A young &%Cow, i.e. a &%Cow that is &%NonFullyFormed.")
(<=>
  (instance ?C Calf)
  (and
    (instance ?C Cow)
    (attribute ?C NonFullyFormed)))

(subclass Bull Cow)
(documentation Bull EnglishLanguage "A &%Cow that is &%Male.")
(<=>
  (instance ?B Bull)
  (and
    (instance ?B Cow)
    (attribute ?B Male)))

(subclass FemaleCow Cow)
(documentation FemaleCow EnglishLanguage "A &%Cow that is &%Female.")

(<=>
   (instance ?COW FemaleCow)
   (and
      (instance ?COW Cow)
      (attribute ?COW Female)))

;; KJN: Moving all Livestock statements to Economy.kif as the definition for Livestock
;; is there.
;;(subclass Poultry Livestock)
(subclass Poultry Bird)
(subclass Chicken Poultry)
(documentation Chicken EnglishLanguage "A subclass of &%Bird that is raised for its meat 
and for its eggs.")

(subclass Hen Chicken)
(documentation Hen EnglishLanguage "A &%Female &%Chicken.")

(<=>
  (instance ?H Hen)
  (and
    (instance ?H Chicken)
    (attribute ?H Female)))

(subclass Rooster Chicken)
(documentation Rooster EnglishLanguage "A &%Male &%Chicken.")

(<=>
  (instance ?R Rooster)
  (and
    (instance ?R Chicken)
    (attribute ?R Male)))

(documentation Duck EnglishLanguage "A subclass of &%Bird with webbed feet and a large bill.  
Some ducks live in the wild, and some are raised for meat and/or eggs.")
(subclass Duck Poultry)

(subclass Goose Poultry)
(documentation Goose EnglishLanguage "A subclass of &%Bird with webbed feet and a long neck 
and a large body.  These &%Birds are often raised for their &%Meat.")

(subclass Owl Bird)
(documentation Owl EnglishLanguage "A nocturnal bird of prey with a large head and 
forward-facing eyes.")

(subclass Pigeon Bird)
(documentation Pigeon EnglishLanguage "A subclass of &%Bird with a stout body and short legs.")

(subclass Vulture Bird)
(documentation Vulture EnglishLanguage "A diurnal bird of prey with a bald head that 
feeds on carrion.")

(subclass Feather AnimalAnatomicalStructure)
(subclass Feather BodyPart)
(documentation Feather EnglishLanguage "Each instance of this class is one of the structures 
that make up the external covering of &%Birds.")
(=>
  (instance ?F Feather)
  (exists (?B)
    (and
      (instance ?B Bird)
      (part ?F ?B))))

(instance meatOfAnimal BinaryPredicate)

;; NS: edit.
(documentation meatOfAnimal EnglishLanguage "(&%meatOfAnimal
?MEATCLASS ?ANIMALCLASS) means that every instance of ?MEATCLASS
was once part of some instance of ?ANIMALCLASS.")
(domainSubclass meatOfAnimal 1 Meat)
(domainSubclass meatOfAnimal 2 Animal)

;; NS: delete.
;; (=>
;;   (meatOfAnimal ?MEAT ?ANIMAL)
;;   (exists (?TIME ?A)
;;     (and
;;       (instance ?A ?ANIMAL)
;;       (instance ?M ?MEAT)
;;       (during ?TIME (WhenFn ?A))
;;       (part ?MEAT ?A))))

;; NS: add.  Here we're using &%part in a "substance" sense.
;; Note that &%material takes a subclass of &%Substance as its
;; first argument, and so is not useful here.
(=>
  (and
    (meatOfAnimal ?MEAT ?ANIMAL)
    (instance ?M ?MEAT))
  (exists (?TIME ?A)
    (and
      (instance ?A ?ANIMAL)
      (finishes ?TIME (WhenFn ?A))
      (holdsDuring ?TIME 
        (part ?M ?A)))))

(subclass Beef Meat)
(documentation Beef EnglishLanguage "&%Meat that was originally part of a &%Cow.")
(meatOfAnimal Beef Cow)

(documentation ChickenMeat EnglishLanguage "&%Meat that was originally part of a &%Chicken.")
(subclass ChickenMeat Meat)
(meatOfAnimal ChickenMeat Chicken)
(subclass Pork Meat)
(documentation Pork EnglishLanguage "&%Meat that was originally part of a &%Pig.")
(meatOfAnimal Pork Pig)

;; KJN: MOving this to Food.kif as the definition for Seafood is there.
;;(subclass FishMeat Seafood)
;;(documentation FishMeat EnglishLanguage "&%Meat that was originally part of a &%Fish.")
;;(meatOfAnimal FishMeat Fish)

(subclass Mouse Rodent)
(documentation Mouse EnglishLanguage "A &%Rodent that has a hairless tail like a rat but that 
is smaller than a &%Rat.")

(subclass Rat Rodent)
(documentation Rat EnglishLanguage "A &%Rodent that has a hairless tail like a &%Mouse 
but that is larger than a &%Mouse.")

(subclass Rabbit Rodent)
(documentation Rabbit EnglishLanguage "A burrowing &%Rodent with a short tail and long ears.")

(subclass Squirrel Rodent)
(documentation Squirrel EnglishLanguage "A tree-dwelling &%Rodent with a bushy tail.")

(subclass Hay Fodder)
(documentation Hay EnglishLanguage "&%Grass that has been cut and cured for use as &%Fodder.")

(=>
   (instance ?HAY Hay)
   (exists (?MAKE ?GRASS)
      (and
         (instance ?MAKE Making)
         (resource ?MAKE ?GRASS)
         (instance ?GRASS Grass)
         (result ?MAKE ?HAY))))

(subclass Copying Making)
(documentation Copying EnglishLanguage "&%Making a &%copy of something.")

(=>
   (and
      (instance ?COPY Copying)
      (resource ?COPY ?THING1)
      (result ?COPY ?THING2))
   (copy ?THING1 ?THING2))

(subclass Vacationing RecreationOrExercise)
(documentation Vacationing EnglishLanguage "Taking time off from &%Working.")

(=>
   (and
      (instance ?VACATION Vacationing)
      (instance ?WORK Working)
      (agent ?VACATION ?PERSON)
      (agent ?WORK ?PERSON)
      (instance ?PERSON Human))
   (not (overlapsTemporally (WhenFn ?VACATION) (WhenFn ?WORK))))

(documentation OccupationFn EnglishLanguage "(OccupationFn ?PROCESS) denotes the 
subclass of ?PROCESS where instances of ?PROCESS are performed as 
one's occupation, i.e. as part of a &%FinancialTransaction where one 
earns money for the performance of ?PROCESS.")
(instance OccupationFn UnaryFunction)
(domain OccupationFn 1 IntentionalProcess)
(rangeSubclass OccupationFn FinancialTransaction)

(documentation occupation EnglishLanguage "(occupation ?PERSON ?TYPE) means that the occupation 
of ?PERSON is ?TYPE.  This predicate is most often used in combination with the 
function &%OccupationFn, e.g. (&%occupation PoliceOfficerWilkins (&%OccupationFn 
&%LawEnforcement)).")
(instance occupation BinaryPredicate)
(domain occupation 1 Human)
(domain occupation 2 FinancialTransaction)

(subclass Working FinancialTransaction)
(documentation Working EnglishLanguage "Any &%FinancialTransaction where someone exchanges 
his/her labor for an instance of &%CurrencyMeasure.")

(subclass Farming Working)
(documentation Farming EnglishLanguage "Operating a farm, e.g. planting and harvesting crops, 
tending livestock, etc.")

(=>
   (and
      (instance ?FARMING Farming)
      (agent ?FARMING ?FARMER))
   (exists (?FARM)
      (and
         (instance ?FARM Farm)
         (holdsDuring (WhenFn ?FARMING) (located ?FARMER ?FARM)))))

(subclass Serving Working)
(documentation Serving EnglishLanguage "Working as a waiter or servant, either for an 
&%Organization (e.g. a &%Restaurant) or for a person or family.")

(subclass Sales Working)
(documentation Sales EnglishLanguage "Any instance of &%Working that involves &%Selling or 
trying to sell items.")

(subAttribute Retired Unemployed)
(documentation Retired EnglishLanguage "Voluntary unemployment toward the end of one's life.")

(subAttribute Housewife Unemployed)
(documentation Housewife EnglishLanguage "A role occupied by a wife who manages the home 
while her husband earns income for the family.")

(=>
  (attribute ?W Housewife)
  (exists (?H)
    (wife ?W ?H)))

(instance Waiter ServicePosition)
(documentation Waiter EnglishLanguage "&%Waiter refers to the &%ServicePosition present
in &%Restaurant that brings food from the kitchen to the customer's table")
(termFormat EnglishLanguage Waiter "waiter")

(=>
  (attribute ?X Waiter)
  (instance ?X Human))

(=>
  (and
    (attribute ?X Waiter)
    (instance ?X Human)
    (employs ?REST ?X)
    (instance ?REST Restaurant)
    (customer ?CUST ?REST)
    (located ?CUST ?TABLE)
    (instance ?TABLE Table))
  (and
    (possesses ?REST ?KITCHEN)
    (instance ?KITCHEN KitchenArea)
    (instance ?DINING DiningArea)
    (located ?TABLE ?DINING)
    (hasPurpose ?X
      (and
        (instance ?C Carrying)
        (agent ?C ?X)
        (origin ?C ?KITCHEN)
        (destination ?C ?TABLE)
        (patient ?C ?FOOD)
        (instance ?FOOD (FoodForFn Human))))))

;; NS: edit.
(instance Maid ServicePosition)

;; NS: deleted for now, since ServicePosition is a subclass
;; of SkilledOccupation, and so is disjoint from
;; UnskilledOccupation.
;; (instance Maid UnskilledOccupation)

;; NS: delete.
;; (documentation Maid EnglishLanguage "Any &%ServicePosition where various needs of a person 
;; or family are served over a long period of time.  Note that these &%Positions 
;; are, by definition, filled only by &%Women.")

;; NS: delete.
;; (documentation Maid EnglishLanguage "A &%Position which involves &%Serving a person 
;; or family.  Note that this &%Position is filled only by a &%Woman.")

;; NS: add.
(documentation Maid EnglishLanguage "This &%Attribute
describes a &%Woman who works in a &%ServicePosition that
entails performing various domestic tasks (cleaning,
cooking, child care) for an individual or family over an
extended period of time, typically months or years.")

;; NS: TO DO: Review and edit all instances of
;; SkilledOccupation, UnskilledOccupation.

;; NS: edit.
(=>
   (holdsDuring ?T1 (attribute ?MAID Maid))
   (exists (?SERVE)
      (and
         (during ?SERVE ?T1)
         (instance ?SERVE Serving)
         (agent ?SERVE ?MAID))))

(subclass Janitor UnskilledOccupation)
(documentation Janitor EnglishLanguage "Any &%Position which involves cleaning a &%Building 
or some of the &%Rooms within a &%Building.")

(=>
  (and
    (instance ?J Janitor)
    (attribute ?P ?J))
  (occupation ?P (OccupationFn Washing)))

;; NS: delete.
;; (instance TheaterProfession SkilledOccupation)

(subclass TheaterProfession EntertainmentProfession)

;; NS: edit.
(documentation TheaterProfession EnglishLanguage "Instances
of this &%Class describe the &%Positions of people whose
work involves putting on plays (theatrical performanes).")

;; NS: edit.
(instance FilmDirector FilmMakingProfession)
;; NS: edit.
(documentation FilmDirector EnglishLanguage "A &%Position that
describes a person who directs &%MotionPictures as a
profession.")

(subclass FilmMaking ContentDevelopment)
(documentation FilmMaking EnglishLanguage "&%ContentDevelopment where the result is a 
&%MotionPicture.")
(=>
  (instance ?FM FilmMaking)
  (exists (?M ?F)
    (and
      (instance ?M MotionPicture)
      (result ?FM ?M)
      (instance ?F PhotographicFilm)
      (resource ?FM ?F))))

(subclass FilmMakingProfession EntertainmentProfession)
(documentation FilmMakingProfession EnglishLanguage "&%Positions which involve &%FilmMaking, 
i.e. acting in films, directing films, producing films, etc.")
(=>
  (and
    (instance ?P FilmMakingProfession)
    (attribute ?H ?P))
  (occupation ?H (OccupationFn FilmMaking)))

;; NS: edit.
(instance FilmProducer FilmMakingProfession)
;; NS: edit.
(documentation FilmProducer EnglishLanguage "A &%Position that
describes a person who produces &%MotionPictures as a profession,
i.e., who arranges the financing for a &%MotionPicture and
supervises its production.")

(instance directed BinaryPredicate)
(domain directed 1 Human)
(domain directed 2 MotionPicture)
(documentation directed EnglishLanguage "(directed ?DIRECTOR ?MOVIE) means that the &%Human 
?DIRECTOR was in charge of the &%FilmMaking &%Process that produced the &%MotionPicture ?MOVIE")

(=>
  (directed ?DIRECTOR ?MOVIE)
  (exists (?FILMMAKING ?FILMCREW)
    (and
      (instance ?FILMMAKING FilmMaking)
      (instance ?FILMCREW Organization)
      (leader ?FILMCREW ?DIRECTOR)
      (agent ?FILMMAKING ?FILMCREW)
      (result ?FILMMAKING ?MOVIE))))

(instance Coach SkilledOccupation)
(documentation Coach EnglishLanguage "Any occupation that involves training an athlete or a 
sports team.")

;; NS: edit.
(instance GameReferee SkilledOccupation)
;; NS: edit.
(documentation GameReferee EnglishLanguage "This &%Attribute
describes a person who adjudicates &%Maneuvers in a &%Game, i.e.,
who decides whether or not the &%Maneuvers are permitted by the
rules of the &%Game.")

(instance Carpenter OccupationalTrade)
(documentation Carpenter EnglishLanguage "Any occupation that involves creating and repairing 
structural and decorative portions of &%Buildings that are made chiefly of &%Wood.
This does not include plumbing, roofing, electrical, foundation and site work.")
(=>
  (attribute ?P Carpenter)
  (hasSkill Carpentry ?P))

(subclass Carpentry Making)
(documentation Carpentry EnglishLanguage "&%Making &%Buildings out of &%Wood.")
(=>
  (instance ?C Carpentry)
  (exists (?B)
    (and
      (instance ?B Building)
      (instance ?W Wood)
      (part ?W ?B)
      (result ?C ?B))))

(instance constructionPeriod BinaryPredicate)
(domain constructionPeriod 1 StationaryArtifact)
(domain constructionPeriod 2 TimeInterval)
(documentation constructionPeriod EnglishLanguage "(constructionPeriod ?OBJECT ?INTERVAL) 
means that some &%StationaryArtifact ?OBJECT was built over &%TimeInterval ?INTERVAL")
(termFormat EnglishLanguage constructionPeriod "construction period")
(=>
  (constructionPeriod ?OBJECT ?INTERVAL)
  (holdsDuring ?INTERVAL
    (exists (?CONSTRUCTING)
      (and
        (instance ?CONSTRUCTING Constructing)
        (result ?CONSTRUCTING ?OBJECT)))))
      
(instance contractor BinaryPredicate)
(domain contractor 1 StationaryArtifact)
(domain contractor 2 Agent)
(documentation contractor EnglishLanguage "(contractor ?BUILDING ?AGENT) means that some 
&%Agent ?AGENT has a contract with another ?AGENT to build a &%StationaryArtifact for
the agent.") 

(=>
  (contractor ?BUILDING ?CONTRACTOR)
  (exists (?CONTRACT ?AGENT)
    (and
      (property ?CONTRACT Contract)
      (partyToAgreement ?AGENT ?CONTRACT)
      (partyToAgreement ?CONTRACTOR ?CONTRACT)
      (confersObligation
        (exists (?CONSTRUCT ?BUILDING2)
          (and
            (instance ?CONSTRUCT Constructing)
            (agent ?CONSTRUCT ?CONTRACTOR)
            (result ?CONSTRUCT ?BUILDING2)
            (instance ?BUILDING2 StationaryArtifact))) ?AGENT ?CONTRACTOR))))     
      
(subclass Agriculture Maintaining)
(documentation Agriculture EnglishLanguage "&%Agriculture is a class of &%Processes 
in which land, plants, or animals are cultivated in order to produce 
food or other organic products.")

(=>
  (instance ?AGRO Agriculture)
  (exists (?GROWTH)
    (and
      (instance ?GROWTH Growth)
      (subProcess ?GROWTH ?AGRO))))
      
(instance FarmHand OccupationalTrade)
(documentation FarmHand EnglishLanguage "&%OccupationalTrades which involve &%Agriculture.")
(=>
  (attribute ?P FarmHand)
  (exists (?F)
    (and
      (instance ?F Agriculture)
      (agent ?F ?P)))) 

(instance Plumber OccupationalTrade)
(documentation Plumber EnglishLanguage "Any occupation that involves installing, repairing, and 
replacing pipes and pipe fixtures.")

;; KJN: Moving to Transportation.kif where Pipeline is defined
;;(subclass SewageSystem Pipeline)
;;(documentation SewageSystem EnglishLanguage "A &%Pipline which is used to transport human 
;;waste to an area where it can be treated and/or disposed of.")

;;(=>
;;  (and
;;    (instance ?T Transportation)
;;    (patient ?T ?S)
;;    (instrument ?T ?SS)
;;    (instance ?SS SewageSystem))
;;  (instance ?S Sewage))

(instance Potter OccupationalTrade)
(documentation Potter EnglishLanguage "Any occupation that involves the creation of &%Pottery.")

(=>
  (attribute ?H Potter)
  (exists (?M ?P)
    (and
      (instance ?P Pottery)
      (instance ?M Making)
      (agent ?M ?H)
      (result ?M ?P))))

(subclass ReligiousPosition Position)
(documentation ReligiousPosition EnglishLanguage "Any &%Position within a &%ReligousOrganization.")

(=>
   (and
      (occupiesPosition ?H ?P ?O)
      (instance ?P ReligiousPosition))
   (instance ?O ReligiousOrganization))

(instance Cleric Profession)
;; NS: edit.
(instance Cleric ReligiousPosition)
(documentation Cleric EnglishLanguage "The profession of
being in charge of or ministering to a
&%ReligousOrganization.")

;; NS: delete.  Not even good as a default.
;; (<=>
;;    (occupiesPosition ?PERSON Cleric ?ORG)
;;    (and
;;       (leader ?ORG ?PERSON)
;;       (instance ?ORG ReligiousOrganization)))

(instance Deacon ReligiousPosition)
(subAttribute Deacon PartTimePosition)
(documentation Deacon EnglishLanguage "Any &%Position within
a &%ReligiousOrganization that is held by a layman, which is
part-time, and which involves assisting a &%Cleric.")

;; NS: delete.
;; (=>
;;   (instance ?D Deacon)
;;   (exists (?O ?C)
;;     (and
;;       (instance ?O ReligiousOrganization)
;;       (instance ?C Cleric)
;;       (subordinateInOrganization ?O ?D ?C))))

;; NS: add.  Barely adequate as a default, probably wrong in
;; many cases.
(=>
  (holdsDuring ?TIME 
    (and
      (occupiesPosition ?PERSON Deacon ?ORG)
      (instance ?ORG ReligiousOrganization)))
  (exists (?C)
    (holdsDuring ?TIME
      (and
        (occupiesPosition ?C Cleric ?ORG)
        (subordinateInOrganization ?ORG ?PERSON ?C)))))

(instance PoliceOfficer SkilledOccupation)
(instance PoliceOfficer GovernmentPosition)
(documentation PoliceOfficer EnglishLanguage "The profession of being a police officer, i.e. 
working for a law enforcement agency that is part of a &%Government.")
(=>
  (attribute ?P PoliceOfficer)
  (hasSkill PlacingUnderArrest ?P))

(subAttribute PoliceCaptain PoliceOfficer)
(documentation PoliceCaptain EnglishLanguage "A &%PoliceOfficer who is in charge of a precinct.")

(subAttribute PoliceSergeant PoliceOfficer)
(documentation PoliceSergeant EnglishLanguage "A &%PoliceOfficer with the rank of sergeant.")

(subAttribute Sheriff PoliceOfficer)
(documentation Sheriff EnglishLanguage "A &%PoliceOfficer whose jurisdiction is a &%County.")

(subAttribute Marshal PoliceOfficer)
(documentation Marshal EnglishLanguage "A &%PoliceOfficer whose responsibility is to enforce 
the decisions of a law court.")

(subAttribute Deputy PoliceOfficer)
(documentation Deputy EnglishLanguage "A &%Position which authorizes the holder of the position 
to act as the sheriff when the sheriff is not available.")

(instance Coroner GovernmentPosition)
(documentation Coroner EnglishLanguage "A
&%GovernmentPosition who investigates deaths that are
suspected of being due to something other than natural
causes.")

(subAttribute PoliceDetective PoliceOfficer)
(documentation PoliceDetective EnglishLanguage "The &%Profession of being a police 
detective, i.e. being a &%PoliceOfficer whose duties include the 
investigation of crimes.") 

(instance PrivateDetective Profession)
(contraryAttribute PrivateDetective PoliceDetective)
(documentation PrivateDetective EnglishLanguage "The &%Profession of being a private detective, 
i.e. a detective who can be hired for a fee to investigate something.")

(instance Lawyer Profession)
(instance Attorney Profession)
(subAttribute Attorney Lawyer)

;; KJN: Removing this as the concept of Attorney isn't necessarily limited to those
;; in the US.  Plus, it creates a dependency to CountriesAndRegions.
;;(=>
;;  (instance ?L Attorney)
;;  (and
;;    (instance ?L Lawyer)
;;    (located ?L UnitedStates)))
    
;; NS: edit.
(documentation Lawyer EnglishLanguage "This &%Attribute
describes a person whose &%Profession is the practice of law,
whether as a &%Judge or as a legal advocate.")
(=>
  (attribute ?P Lawyer)
  (hasExpertise ?P FieldOfLaw))

(subAttribute AttorneyGeneral Attorney)
(instance AttorneyGeneral GovernmentPosition)
;; NS: edit.
(documentation AttorneyGeneral EnglishLanguage "This &%Attribute
designates the chief law officer of a &%GeopoliticalArea, usually
a &%Nation or &%StateOrProvince.")


(subAttribute PublicDefender Attorney)
(instance PublicDefender GovernmentPosition)
(documentation PublicDefender EnglishLanguage "An &%Attorney who defends criminal cases for a 
&%GovernmentOrganization.")

(subAttribute PublicProsecutor Attorney)
(instance PublicProsecutor GovernmentPosition)
(documentation PublicProsecutor EnglishLanguage "An &%Attorney who prosecutes criminal cases for 
a &%GovernmentOrganization.")

(subAttribute Judge Attorney)
(instance Judge GovernmentPosition)
(documentation Judge EnglishLanguage "An &%Attorney who has the power of deciding legal cases.")

(=>
  (and
    (instance ?J Judge)
    (occupiesPosition ?P ?J ?O))
  (modalAttribute 
    (exists (?D) 
      (and 
        (instance ?D LegalDecision)
        (agent ?D ?P))) Permission)) 

(=>
  (and
    (instance ?J Judge)
    (occupiesPosition ?P ?J ?O))
  (instance ?O JudicialOrganization))

(subAttribute Professor Teacher)
(documentation Professor EnglishLanguage "The &%Profession of being a &%teacher at a 
&%PostSecondarySchool.")

(=>
   (and
      (instance ?PROF Professor)
      (occupiesPosition ?PERSON ?PROF ?ORG))
   (and
      (teacher ?PROF ?ORG)
      (instance ?ORG PostSecondarySchool))) 

(instance MedicalDoctor Profession)
(documentation MedicalDoctor EnglishLanguage "The &%Profession of being a medical doctor, 
i.e. having attended medical school and being licensed to practice medicine.")

(=>
   (attribute ?DOCTOR MedicalDoctor)
   (exists (?PROCESS1 ?PROCESS2)
      (and
         (subclass ?PROCESS1 DiagnosticProcess)
         (subclass ?PROCESS2 TherapeuticProcess)
         (capability ?PROCESS1 agent ?DOCTOR)
         (capability ?PROCESS2 agent ?DOCTOR))))

(subAttribute Surgeon MedicalDoctor)
(documentation Surgeon EnglishLanguage "The &%Profession of being a surgeon, i.e. being a 
medical doctor who specializes in performing surgical operations.")

(documentation Circumision EnglishLanguage "&%Removing the foreskin of the penis.  This is
usually performed on infants, but is occasionally performed on adolescents
and adults, either for medical reasons, or after religious conversion. It is
often conducted as a religious rite, since it is prescribed by both the
&%Jewish and &%Muslim religions, although it is prevalent also as a social
norm in different nations.")
(subclass Circumision Removing)
(subclass Circumision Surgery)

(instance NewsReporter Profession)
(documentation NewsReporter EnglishLanguage "The &%Profession of being a news reporter, i.e. 
investigating and reporting, in a publication or broadcast program, current 
events.")
(=>
  (attribute ?H NewsReporter)
  (exists (?T ?EV)
    (and
      (instance ?EV Process)
      (overlapsTemporally 
        (WhenFn ?EV) 
        (WhenFn ?H))
      (authors ?H ?T)
      (refers ?T ?EV))))

(subAttribute ArtCritic Journalist)
(documentation ArtCritic EnglishLanguage "The &%Profession of reporting and critiquing current 
&%ArtWorks.")

(=>
  (attribute ?H ArtCritic)
  (exists (?T ?AW)
    (and
      (instance ?AW ArtWork)
      (authors ?H ?T)
      (refers ?T ?AW))))

(instance Accountant Profession)
(documentation Accountant EnglishLanguage "The &%Profession of being an &%Accountant.")
(=>
  (attribute ?X Accountant)
  (capability Calculating agent ?X))

  
;;KJN: Moving this to FinancialOntology.kif to remove dependencies  
;;(subclass PensionPlan FinancialAccount)
;;(documentation PensionPlan EnglishLanguage "A qualified retirement plan set up by a 
;;corporation, labor union, government, or other organization for its 
;;employees.  Examples include profit-sharing plans, stock bonus and 
;;employee stock ownership plans, thrift plans, target benefit plans, 
;;money purchase plans, and defined benefit plans.")

;;(=>
;;  (and
;;    (instance ?P PensionPlan)
;;    (accountHolder ?P ?A)
;;    (employs ?O ?A))
;;  (financialAccount ?P ?O))

;;(subclass ProfitSharingPlan PensionPlan)
;;(documentation ProfitSharingPlan EnglishLanguage "An arrangement in which an employer 
;;shares its profits with its employees.  The compensation can be stocks, 
;;bonds or cash, and can be immediate or deferred until retirement.")

;;(=>
;;  (and
;;    (instance ?PSP ProfitSharingPlan)
;;    (accountHolder ?PSP ?H)
;;    (employs ?O ?H)
;;    (profit ?A ?P)
;;    (agent ?A ?O))
;;    (exists (?C ?PAY)
;;      (and
;;        (instance ?PAY FinancialTransaction)
;;        (transactionAmount ?PAY ?C)
;;        (lessThan ?C ?P)
;;        (destination ?PAY ?PSP))))

(instance Literature FieldOfStudy)
(documentation Literature EnglishLanguage "The study of literature, i.e. instances of &%FictionalText 
that are regarded as having special merit.")

(instance Mathematics FieldOfStudy)
(documentation Mathematics EnglishLanguage "The &%FieldOfStudy dealing with quantities and their 
relations to one another.")

(instance InteriorDesign FieldOfStudy)
(documentation InteriorDesign EnglishLanguage "The &%FieldOfStudy of designing the interiors of 
&%Buildings.")

(subclass Science FieldOfStudy)
(documentation Science EnglishLanguage "Any &%FieldOfStudy which tests theories on the basis of 
careful observations and/or experiments and which has a cumulative body of results.") 

(subclass SocialScience Science)
(documentation SocialScience EnglishLanguage "Any &%Science which studies human behavior, either in 
the aggregate, as do, for example, &%Economics and &%Linguistics, or with respect to 
the individual, as does &%Psychology.")

(instance PoliticalScience SocialScience)
(documentation PoliticalScience EnglishLanguage "The field of political science.")

(instance Anthropology SocialScience)
(documentation Anthropology EnglishLanguage "The study of humanity.")

(instance ActuaryScience Science)
(documentation ActuaryScience EnglishLanguage "Actuarial &%Science is the discipline that applies mathematical (&%MathematicalMethod) and statistical methods to assess risk in the insurance (&%InsuranceCompany) and finance (&%FinancialCompany) industries.")

(instance Archeology FieldOfStudy)
(documentation Archeology EnglishLanguage "Archeology is a &%FieldOfStudy, its &%Arguments are refering to &%earlier discoverings of old &%Objects burried &%below the &%surface of &%LandArea or a &%BodyOfWater. Note that the minimal age of the &%Object is set arbitrarily.")
(=>
  (and
    (instance ?X Argument)
    (instance ?R Reasoning)
    (subProposition ?X Archeology)
    (realization ?R ?X))
  (exists (?D ?S ?O ?T)
    (and
      (instance ?D Discovering)
      (instance ?O Object)
      (patient ?D ?O)
      (refers ?R ?D)
      (earlier
        (WhenFn ?D)
        (WhenFn ?R))
      (age ?O ?T)
      (greaterThan ?T 
        (MeasureFn 50 YearDuration))
      (holdsDuring 
        (ImmediatePastFn
          (WhenFn ?D))
        (or
          (and
            (surface ?S ?W)
            (instance ?W BodyOfWater)
            (orientation ?O ?S Below))
          (and
            (surface ?S ?L)
            (instance ?L LandArea)
            (orientation ?O ?S Below)))))))

(instance Architecture FieldOfStudy)
(documentation Architecture EnglishLanguage "The &%FieldOfStudy of designing &%Buildings, i.e. 
creating &%Blueprints for &%Buildings.")

(=>
  (hasExpertise ?H Architecture)
  (exists (?D ?P ?B)
    (and
      (instance ?D ContentDevelopment)
      (agent ?D ?H)
      (result ?D ?P)
      (instance ?P Blueprint)
      (represents ?P ?B)
      (instance ?B Building))))

(instance Astronomy Science)
(documentation Astronomy EnglishLanguage "Astronomy is a natural &%Science that deals with the study of celestial objects (or &%AstronomicalBody), such as &%Star s, &%Planet s, comets, nebulae, star clusters and galaxies and phenomena that originate outside the (&%PlanetEarth) Earth's &%Atmosphere")

(instance ComputerScience Science)
(documentation ComputerScience EnglishLanguage "&%Computer Science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems.")

(instance Economics SocialScience)
(documentation Economics EnglishLanguage "The field of economics.")

(instance Geography Science)
(documentation Geography EnglishLanguage "Geography is the science that studies the lands, features, inhabitants, and phenomena of Earth. Also Earth's physical environment and human habitat.")

(subField Cartography Geography)
(instance Cartography Science)
(documentation Cartography EnglishLanguage "Cartography is the study and practice of making &%Map s.")

(instance Geology Science)
(documentation Geology EnglishLanguage "Geology is the science comprising the study of solid (&%PlanetEarth) Earth and the processes by which it evolves.")

(instance LibraryScience Science)
(documentation LibraryScience EnglishLanguage "&%Library science (or Library and Information science) is an interdisciplinary field that applies the practices,
perspectives, and tools of management, information technology, education, and other areas to libraries.")
; recently it tends to be called Library and Information Sciences or simply Information Sciences

(instance Linguistics SocialScience)
(documentation Linguistics EnglishLanguage "The field of linguistics.")

(instance Psychology SocialScience)
(documentation Psychology EnglishLanguage "The field of psychology.")

(instance Biology Science)
(documentation Biology EnglishLanguage "The study of the classification, development, and 
functioning of &%Organisms.")

(subField Physiology Biology)
(instance Physiology Science)
(documentation Physiology EnglishLanguage "The part of &%Biology dealing with the functioning of 
&%Organisms.")

(subField MedicalScience Biology)
(instance MedicalScience Science)
(documentation MedicalScience EnglishLanguage "The field of medicine.")

(subField VeterinaryScience MedicalScience)
(instance VeterinaryScience Science)
(documentation VeterinaryScience EnglishLanguage "is the branch of science that deals with the application of medical, surgical, public health, dental, diagnostic, and therapeutic principles to non-human animals, including wildlife and domesticated animals.")

(subField Botany Biology)
(instance Botany Science)
(documentation Botany EnglishLanguage "Botany, plant science(s), or plant biology is a branch of &%Biology that involves the scientific study of plant life.")

(subField Zoology Biology)
(instance Zoology Science)
(documentation Zoology EnglishLanguage "Zoology is the branch of &%Biology that relates to the animal kingdom, including the structure, embryology, evolution, classification, habits, and distribution of all animals, both living and extinct.")

(instance Biochemistry Science)
(instance Chemistry Science)
(documentation Chemistry EnglishLanguage "The study of the compositions, properties, and 
reactions of &%Substances.")

(instance Paleontology Science)
(documentation Paleontology EnglishLanguage "The earth science that studies fossil organisms and related remains.")

(instance Physics Science)
(documentation Physics EnglishLanguage "The study of matter and energy and their relations.")

(instance Engineering Science)
(documentation Engineering EnglishLanguage "The application of instances of &%Science to the solution 
of practical problems, i.e. the creation of various forms of technology.")

(instance Sociology SocialScience)
(documentation Sociology EnglishLanguage "Sociology is the study of society. It is considered one of the  &%SocialScience s, together with Political Science and Anthropology.")

(instance Statistics FieldOfStudy)
(documentation Statistics EnglishLanguage "Statistics is the study of the collection, organization, analysis, and interpretation of data.")

(subField Electronics Physics)
(subField Electronics Engineering)
(instance Electronics FieldOfStudy)
(documentation Electronics EnglishLanguage "The branch of &%Physics that deals with the theory 
and applications of electron emissions.")

(instance Theology FieldOfStudy)
(documentation Theology EnglishLanguage "The systematic study of religion.")
(=>
  (instance ?X Theology)
  (exists (?Y)
    (and
      (instance ?Y ReligiousProcess)
      (refers ?X ?Y))))

(instance MilitaryScience FieldOfStudy)
(documentation MilitaryScience EnglishLanguage "The study of the principles of war.")

(instance History FieldOfStudy)
(documentation History EnglishLanguage "The recording and interpretation of past events involving 
&%Humans, including political events and cultural practices.")

(instance Philosophy FieldOfStudy)
(documentation Philosophy EnglishLanguage "The study of first principles, including epistemology, 
metaphysics, and ethics.")

(instance FieldOfLaw FieldOfStudy)
(documentation FieldOfLaw EnglishLanguage "The study of legal principles and the framework of national 
and/or international laws.")

(subrelation subField subProposition)
(instance subField TransitiveRelation)
(instance subField IrreflexiveRelation)
(domain subField 1 FieldOfStudy)
(domain subField 2 FieldOfStudy)
(documentation subField EnglishLanguage "(&%subField ?FIELD1 ?FIELD2) means that ?FIELD1 is a proper 
part of the &%FieldOfStudy ?FIELD2.  For example, &%Physiology is a &%subField of 
&%Biology.")

(instance hasExpertise BinaryPredicate)
(domain hasExpertise 1 Human)
(domain hasExpertise 2 FieldOfStudy)
(documentation hasExpertise EnglishLanguage "(&%hasExpertise ?PERSON ?FIELD) means that ?PERSON has 
studied the &%FieldOfStudy ?FIELD and is regarded as an expert.")

(=>
   (hasExpertise ?PERSON ?FIELD)
   (exists (?LEARN)
      (and
         (instance ?LEARN Learning)
         (agent ?LEARN ?PERSON)
         (realization ?LEARN ?FIELD))))

(instance hasOccupation BinaryPredicate)
(domain hasOccupation 1 Human)
(domainSubclass hasOccupation 2 IntentionalProcess)
(documentation hasOccupation EnglishLanguage "(&%hasOccupation ?PERSON ?WORK) means that ?PERSON 
engages in activities of the class ?WORK as a means of earning a living.")

(=>
   (hasOccupation ?PERSON ?WORK)
   (exists (?INST)
      (and
         (instance ?INST ?WORK)
         (instance ?INST Working)
         (agent ?INST ?PERSON))))

(subclass Bleeding AutonomicProcess)
(documentation Bleeding EnglishLanguage "The release of &%Blood from an &%Animal in response 
to an &%Injuring of some sort.")

(=>
   (instance ?BLEED Bleeding)
   (exists (?INJURY)
      (and
         (instance ?INJURY Injuring)
         (causes ?INJURY ?BLEED))))

(=>
   (and
      (instance ?BLEED Bleeding)
      (experiencer ?BLEED ?ANIMAL))
   (instance ?ANIMAL Animal))

(=>
   (and
      (instance ?BLEED Bleeding)
      (experiencer ?BLEED ?ANIMAL))
   (exists (?BLOOD)
      (and
         (instance ?BLOOD Blood)
         (holdsDuring (BeginFn (WhenFn ?BLEED)) (part ?BLOOD ?ANIMAL))
         (holdsDuring (EndFn (WhenFn ?BLEED)) (not (part ?BLOOD ?ANIMAL))))))
   
(subclass Blushing AutonomicProcess)
(documentation Blushing EnglishLanguage "The process of turning red in response to a 
stimulus which has a deep emotional effect.")
(=>
  (and
    (instance ?B Blushing)
    (experiencer ?B ?A))
  (exists (?T1 ?T2 ?S1 ?S2)
    (and
      (instance ?S1 EmotionalState)
      (instance ?S2 EmotionalState)
      (not
        (equal ?S1 ?S2))
      (holdsDuring ?T1
        (attribute ?A ?S1))
      (holdsDuring ?T2
        (attribute ?A ?S2))
      (starts (WhenFn ?B) ?T2)
      (finishes (WhenFn ?B) ?T1))))

(subclass Aborting Removing)
(documentation Aborting EnglishLanguage "&%Removing a human fetus from a &%Pregnant woman 
in such a way that the fetus cannot survive.")

(=>
   (and
      (instance ?A Aborting)
      (patient ?A ?W)
      (instance ?W Woman))
   (and
      (holdsDuring 
        (BeginFn (WhenFn ?A)) 
        (attribute ?W Pregnant))
      (holdsDuring 
        (EndFn (WhenFn ?A)) 
        (not (attribute ?W Pregnant)))))

(subclass ClosingContract Committing)
(documentation ClosingContract EnglishLanguage "Completing a &%Contract of some sort, 
e.g. the purchase of a house, closing a business deal, etc.")

(=>
   (and
      (instance ?CLOSE ClosingContract)
      (agent ?CLOSE ?AGENT)
      (destination ?CLOSE ?CONTRACT))
   (partyToAgreement ?CONTRACT ?AGENT))

;; KJN: Moving this to FinancialOntology.kif as FinancialAccount is defined there.
;;(documentation financialAccount EnglishLanguage "A formal banking, brokerage, or business 
;;relationship established to provide for regular services, dealings, and 
;;other financial transactions.  (&%financialAccount ?ACCOUNT ?ORG) means that 
;;?ACCOUNT is a financial account opened at the &%FinancialCompany 
;;?ORG.")
;;(domain financialAccount 1 FinancialAccount)
;;(domain financialAccount 2 FinancialCompany)
;;(instance financialAccount BinaryPredicate)
;;(subrelation financialAccount partyToAgreement)

(subclass Opening Motion) 
(relatedInternalConcept Opening Closing) 
(documentation Opening EnglishLanguage "The &%Class of &%Processes where an aperture is 
created in an &%Object.  Note that the aperture may be created intentionally, 
as when one opens a door, or unintentionally, as when the ground ruptures 
in a seismic event.") 

(subclass Closing Motion) 
(documentation Closing EnglishLanguage "The &%Class of &%Processes where an aperture is 
closed in an &%Object.")

(subclass Diet Plan)
(documentation Diet EnglishLanguage "A &%Plan regarding what one is allowed to eat.")
(=>
  (and
    (instance ?D Diet)
    (realization ?P ?D))
  (exists (?E)
    (and
      (subProcess ?E ?P)
      (instance ?E Eating))))

(subclass PreparedFood Object) 
(documentation PreparedFood EnglishLanguage "&%PreparedFood refers to anything that 
undergoes some process intended to result in an object that has &%Nutrient which can be 
ingested by &%Animal, normally metabolized into energy and body tissue.")
(termFormat EnglishLanguage PreparedFood "food")

(=>
  (instance ?X PreparedFood)
  (instance ?X (FoodForFn Organism)))

(=>
  (instance ?X PreparedFood)
  (exists (?PROC)
    (and
      (instance ?PROC IntentionalProcess)
      (result ?PROC ?X))))
  
(subclass SolidFood PreparedFood)
(documentation SolidFood EnglishLanguage "&%SolidFood refers to &%PreparedFood that 
has &%Solid parts.")
(termFormat EnglishLanguage SolidFood "solid food")

(=>
  (instance ?X SolidFood)
  (exists (?ING)
    (and
      (part ?ING ?X)
      (attribute ?ING Solid))))

(subclass LiquidFood PreparedFood)
(documentation LiquidFood EnglishLanguage "&%LiquidFood refers to &%PreparedFood that 
has no &%Solid parts, only &%Liquid parts, therefore this does not cover stews, root
beer floats or other combinations of solid and liquid foods.")

(termFormat EnglishLanguage LiquidFood "liquid food")

(=>
  (instance ?X LiquidFood)
  (not
    (exists (?ING)
      (and
        (part ?ING ?X)
        (attribute ?ING Solid)))))
        
(subclass Beverage LiquidFood)
(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))

;; KJN: Removing this as am moving in CookedAttribute from Food.kif
;;(subclass RawFood (FoodForFn Organism))
;;(subclass RawFood Object)
;;(documentation RawFood EnglishLanguage "Food that is not the result of &%Cooking.")

;;(=>
;;  (instance ?F RawFood)
;;  (not 
;;    (exists (?C)
;;      (and
;;        (instance ?C Cooking)
;;        (result ?C ?F)))))

(instance CookedAttribute RelationalAttribute)
(documentation CookedAttribute EnglishLanguage "&%CookedAttribute describes how something
is a product of &%Cooking.")
(termFormat EnglishLanguage CookedAttribute "cooked")

(=>
  (attribute ?FOOD CookedAttribute)
  (exists (?PROC)
    (and
      (instance ?PROC Cooking)
      (result ?PROC ?FOOD))))
      
(instance RawAttribute RelationalAttribute)
(documentation RawAttribute EnglishLanguage "&%RawAttribute describes how cooking was
not involved in the making of something")
(termFormat EnglishLanguage RawAttribute "raw")

(=>
  (attribute ?FOOD RawAttribute)
  (instance ?FOOD (FoodForFn Organism)))

(=>
  (attribute ?FOOD RawAttribute)
  (not
    (exists (?PROC)
      (and
        (instance ?PROC Cooking)
        (result ?PROC ?FOOD)))))
        
(subclass Baking Cooking)
(subclass Baking Heating)
(documentation Baking EnglishLanguage "Any instance of &%Cooking where the instrument 
is an &%Oven.")
(=>
  (instance ?B Baking)
  (exists (?O)
    (and
      (instance ?O Oven)
      (instrument ?B ?O))))
      
(subclass BreadOrBiscuit PreparedFood)
(documentation BreadOrBiscuit EnglishLanguage "Food that consists largely of grain flour 
and water.  Note that this class covers crackers, cookies, as well as any 
self-connected instance of bread, whether it is a loaf, a slice, a chunk 
of bread, etc.")
(=>
  (instance ?B BreadOrBiscuit)
  (exists (?D ?BAKE)
    (and
      (instance ?D Dough)
      (instance ?BAKE Baking)
      (resource ?BAKE ?D)
      (result ?BAKE ?B))))

(subclass Sandwich PreparedFood)
(documentation Sandwich EnglishLanguage "Any food which consists of two or more pieces 
of bread and some sort of filling between the two pieces of bread.")

(=>
  (instance ?S Sandwich)
  (exists (?B1 ?B2 ?F)
    (and
      (instance ?B1 BreadOrBiscuit)
      (instance ?B2 BreadOrBiscuit)
      (instance ?F (FoodForFn Human))
      (between ?B1 ?F ?B2)
      (not (equal ?B1 ?B2))
      (not (equal ?B1 ?F))
      (not (equal ?B2 ?F))
      (part ?B1 ?S)
      (part ?B2 ?S)
      (part ?F ?S))))

(subclass Dough PreparedFood)
(subclass Dough Mixture)
(documentation Dough EnglishLanguage "A &%Mixture of &%Flour, &%Water, and possibly 
other ingredients (such as &%Butter and &%Salt), which is used in 
making &%BreadOrBiscuits.")
(=>
  (instance ?D Dough)
  (exists (?F ?W)
    (and
      (instance ?F Flour)
      (instance ?W Water)
      (part ?F ?D)
      (part ?W ?D))))

(subclass Butter PreparedFood)

;; KJN: Moving this to Economy.kif to remove dependencies.
;;(subclass Butter DairyProduct)

(documentation Butter EnglishLanguage "An emulsion of fat which is produced by churning &%Milk.")
(=>
  (instance ?B Butter)
  (exists (?C ?M)
    (and
      (instance ?C Cooking)
      (resource ?C ?M)
      (instance ?M Milk)
      (result ?C ?B))))

(subclass CerealGrain Seed)
;; KJN: Delete as not all CerealGrains are food for animals. 
;;(subclass CerealGrain (FoodForFn Animal))
(documentation CerealGrain EnglishLanguage "Any &%Seed which is produced by the cereal grasses, 
e.g. rice, corn, wheat, etc.")

(subclass RiceGrain CerealGrain)
(documentation RiceGrain EnglishLanguage "A &%CerealGrain which has short and long grain varieties 
and which is usually prepared for eating by steaming.")

(subclass WheatGrain CerealGrain)
(documentation WheatGrain EnglishLanguage "A long &%CerealGrain which is produced by certain grasses and 
which is used to make &%BreadOrBiscuits.")

(subclass Pea Seed)
(subclass Pea (FoodForFn Animal))
(documentation Pea EnglishLanguage "The edible &%Seed of a pea plant.")

;; KJN: Moving this to Economy.kif as the definition for RootVegetable is there
;;(subclass Radish RootVegetable)
;;(documentation Radish EnglishLanguage "A &%PlantRoot that is often used in salads.")

(subclass Flour PreparedFood)
(subclass Flour Powder)
(documentation Flour EnglishLanguage "A &%Powder that is prepared from &%CerealGrain, e.g. 
wheat flour, rice flour, etc.  Flour is most often used in the making 
of &%BreadOrBiscuits.")
(=>
  (instance ?F Flour)
  (exists (?P ?C)
    (and
      (instance ?P IntentionalProcess)
      (resource ?P ?C)
      (instance ?C CerealGrain)
      (result ?P ?F))))

(subclass Honey AnimalSubstance)
(subclass Honey (FoodForFn Animal))
(documentation Honey EnglishLanguage "An edible, sweet &%Substance produced by some species of 
&%Bees.")

(=>
  (instance ?H Honey)
  (exists (?P ?B)
    (and
      (instance ?P PhysiologicProcess)
      (agent ?P ?B)
      (instance ?B Bee)
      (result ?P ?H))))

(subclass Coconut FruitOrVegetable)
(subclass Coconut (FoodForFn Animal))
(documentation Coconut EnglishLanguage "A &%FruitOrVegetable that is produced by a type of palm 
and has an edible white meat.")

;; KJN: Moving this to Economy.kif as it has a wide range of Fruits discussed
;; under it.  This would also remove the dependency to Economy.kif
;;(subclass LemonFruit CitrusFruit)
;;(subclass LemonFruit (FoodForFn Animal))
;;(documentation LemonFruit EnglishLanguage "A citrus &%FruitOrVegetable that has a &%Yellow skin 
;;and a tart, acidic flavor.")

;; KJN: Moving this to Economy.kif and changing inheritance to CitrusFruit.
;;(subclass OrangeFruit FruitOrVegetable)
;;(subclass OrangeFruit (FoodForFn Animal))
;;(documentation OrangeFruit EnglishLanguage "A citrus &%FruitOrVegetable that has an &%OrangeColor 
;;skin and a sweet, acidic flavor.")

(subclass MaizeGrain CerealGrain)
(documentation MaizeGrain EnglishLanguage "A &%CerealGrain which is found on long ears of a &%Plant 
native to the Americas.")

;; KJN: Moving this to Economy.kif as definition for GroceryProduce is there.
;;(subclass MaizeGrain GroceryProduce)

(subclass SoupStock PreparedFood)
(documentation SoupStock EnglishLanguage "Food which is prepared by reducing &%Meat 
and/or &%FruitOrVegetables to a translucent broth which can be used as 
a base for soups or sauces.") 

(subclass Coffee Beverage)
(subclass Coffee PreparedFood)
(documentation Coffee EnglishLanguage "A &%Beverage which is prepared by infusing ground, 
roasted coffee beans into hot water.")

(subclass Apple FruitOrVegetable)
(subclass Apple (FoodForFn Animal))
(documentation Apple EnglishLanguage "A &%FruitOrVegetable that has a tart to sweet taste and 
a spherical shape.")

(subclass DateFruit FruitOrVegetable)
(subclass DateFruit (FoodForFn Animal))
(documentation DateFruit EnglishLanguage "A &%FruitOrVegetable that is produced by the date 
palm.")

(subclass PearFruit FruitOrVegetable)
(subclass PearFruit (FoodForFn Animal))
(documentation PearFruit EnglishLanguage "A &%FruitOrVegetable that has a thick skin and the 
shape of a tear drop.")

(subclass Avocado FruitOrVegetable)
(subclass Avocado (FoodForFn Animal))
(documentation Avocado EnglishLanguage "A &%FruitOrVegetable that is shaped like a pear and 
has a dark green skin and a rich meat.")

(subclass Ion PureSubstance)
(documentation Ion EnglishLanguage "An electronically charged &%Atom or &%Molecule.  In 
other words, a &%PureSubstance that has lost one of its &%Electrons.")

(subclass FreeAtom Atom)
(documentation FreeAtom EnglishLanguage "Any &%Atom which is not part of a &%Molecule.")
(=>
  (instance ?A FreeAtom)
  (not 
    (exists (?M)
      (and
        (instance ?M Molecule)
        (part ?A ?M)))))

(instance protonNumber BinaryPredicate)
(instance protonNumber SingleValuedRelation)
(instance protonNumber TotalValuedRelation)
(domain protonNumber 1 PureSubstance)
(domain protonNumber 2 PositiveInteger)
(documentation protonNumber EnglishLanguage "(&%protonNumber ?SUBSTANCE ?NUMBER) means that 
the &%PureSubstance ?SUBSTANCE has the number of &%Protons ?NUMBER.")

(=> 
   (protonNumber ?SUBSTANCE ?NUMBER) 
   (=> 
      (and 
         (part ?ATOM ?SUBSTANCE)
         (or 
            (instance ?ATOM Atom)
            (instance ?ATOM Molecule))) 
      (equal ?NUMBER (CardinalityFn (KappaFn ?PROTON 
                                       (and 
                                          (part ?PROTON ?ATOM) 
                                          (instance ?PROTON Proton))))))) 

(instance electronNumber BinaryPredicate)
(instance electronNumber SingleValuedRelation)
(instance electronNumber TotalValuedRelation)
(domain electronNumber 1 PureSubstance)
(domain electronNumber 2 PositiveInteger)
(documentation electronNumber EnglishLanguage "(&%electronNumber ?SUBSTANCE ?NUMBER) means that 
the &%PureSubstance ?SUBSTANCE has the number of &%Electrons ?NUMBER.")

(=> 
   (electronNumber ?TYPE ?NUMBER) 
   (=> 
      (and 
         (part ?ATOM ?SUBSTANCE)
         (or 
            (instance ?ATOM Atom)
            (instance ?ATOM Molecule))) 
      (equal ?NUMBER 
        (CardinalityFn 
          (KappaFn ?ELECTRON 
            (and 
              (part ?ELECTRON ?ATOM) 
              (instance ?ELECTRON Electron))))))) 

(subclass AtomicGroup CompoundSubstance)
(documentation AtomicGroup EnglishLanguage "Two or more &%Atoms that are bound together and 
comprise part of a &%Molecule.")
(=>
  (instance ?G AtomicGroup)
  (exists (?ATOM1 ?ATOM2)
    (and
      (instance ?ATOM1 Atom)
      (instance ?ATOM2 Atom)
      (not (equal ?ATOM1 ?ATOM2))
      (part ?ATOM1 ?G)
      (part ?ATOM2 ?G))))

(=>
  (instance ?G AtomicGroup)
  (exists (?M)
    (and
      (instance ?M Molecule)
      (part ?G ?M))))

(subclass Ambush Maneuver)
(documentation Ambush EnglishLanguage "Any &%Maneuver in a &%ViolentContest where one 
&%contestParticipant attempts to conceal himself from another 
contestParticipant so that he can &%Attack the other 
&%contestParticipant.") 

(=>
  (and
    (instance ?AMBUSH Ambush)
    (agent ?AMBUSH ?AG))
  (exists (?C)
    (and
      (instance ?C Concealing)
      (subProcess ?C ?AMBUSH)
      (hasPurpose ?C 
        (exists (?ATTACK) 
          (and 
            (instance ?ATTACK Attack) 
            (agent ?ATTACK ?AG)))))))

(subclass Blockade Maneuver)
(documentation Blockade EnglishLanguage "Any &%Maneuver in a &%Contest where one 
&%contestParticipant attempts to deny access to something that is wanted 
by another &%contestParticipant.") 

(=>
  (and
    (instance ?B Blockade)
    (instance ?C Contest)
    (subProcess ?B ?C)
    (contestParticipant ?C ?A1)
    (agent ?B ?A1))
  (exists (?C1 ?A2)
    (and
      (prevents ?C1 Translocation)
      (instance ?B ?C1)
      (contestParticipant ?C ?A2)
      (not 
        (equal ?A1 ?A2))
      (desires ?A2 
        (exists (?I) 
          (and 
            (instance ?I ?C1)
            (agent ?I ?A1) 
            (subProcess ?I ?C)))))))

(subclass MilitaryManeuver Maneuver)
(documentation MilitaryManeuver EnglishLanguage "Any &%Maneuver which takes place in a &%Battle 
and which is intended to secure a tactical advantage for one of the agents of 
the &%Battle.")

(=>
  (instance ?M MilitaryManeuver)
  (exists (?B)
    (and
      (instance ?B Battle)
      (subProcess ?M ?B))))

(subclass Fire Combustion)
(documentation Fire EnglishLanguage "&%Fire is the subclass of &%Combustion events in 
which flames are present.  Fires are slower combustion processes than 
explosions, though some fires may include explosive episodes.")

;; KJN: With the inclusion of Fire, will be subclassing Arson from Fire instead of Combustion            
;;(subclass Arson Combustion)
(subclass Arson Fire)
(subclass Arson Destruction)
(documentation Arson EnglishLanguage "An act where an agent sets something which it does not possess 
on fire in order to destroy it or its contents.")

(subclass Bombing Destruction)
(documentation Bombing EnglishLanguage "An act of &%Destruction where the thing destroyed
is destroyed by means of an explosive device.")

(subclass Bomb Weapon)
(subclass Bomb ExplosiveDevice)
(documentation Bomb EnglishLanguage "A weapon that explodes in order to cause damage.")

(=>
  (instance ?X Bombing)
  (exists (?BOMB)
    (and
      (instance ?BOMB Bomb)
      (instrument ?X ?BOMB))))

(subclass CarBombing Bombing)
(documentation CarBombing EnglishLanguage "A car bombing is an attack in which a car is
used as the delivery mechanism for a bomb.  The car is usually destroyed
in the blast if the bomb detonates successfully.")

(=>
  (instance ?X CarBombing)
  (exists (?BOMB ?CAR)
    (and
      (instance ?BOMB Bomb)
      (instance ?CAR TransportationDevice)
      (instrument ?X ?CAR)
      (instrument ?X ?BOMB)
      (connected ?CAR ?BOMB))))

(subclass ChemicalAttack ViolentContest)
(documentation ChemicalAttack EnglishLanguage "An attack against people or property in which
a chemical agent is used as the active ingredient of the attack.")

(=>
  (instance ?X ChemicalAttack)
  (exists (?CHEM)
    (and
      (instance ?CHEM Substance)
      (instrument ?X ?CHEM))))
      
(subclass HandgrenadeAttack Bombing)
(documentation HandgrenadeAttack EnglishLanguage "An attack in which a &%HandGrenade is 
employed as an explosive device for the purpose of &%Destruction.
A case in which a hand grenade is used as a blunt striking object in
an attack would not be in this class.")

(subclass HandGrenade Bomb)
(documentation HandGrenade EnglishLanguage "A hand grenade is a small explosive device
with a simple trigger mechanism, usually lasting a few seconds, designed
to be propelled by a human to its target.")

(=>
  (instance ?X HandGrenade)
  (and
    (measure ?X (MeasureFn ?N PoundMass))
    (lessThan ?N 10)))
    
(=>
  (instance ?X HandgrenadeAttack)
  (exists (?HG)
    (and
      (instance ?HG HandGrenade)
      (instrument ?X ?HG))))
      
(subclass Hijacking Robbing)
(documentation Hijacking EnglishLanguage "&%Robbing a &%Vehicle and then driving
or piloting it away.")

(=>
  (instance ?H Hijacking)
  (exists (?V)
    (and
      (instance ?V Vehicle)
      (patient ?H ?V))))

(=>
  (instance ?H Hijacking)
  (exists (?D)
    (and
      (subProcess ?D ?H)
      (instance ?D Driving)))) 

(=>
  (instance ?X Hijacking)
  (exists (?V ?A)
    (and 
      (agent ?X ?A)
      (instance ?V TransportationDevice)
      (holdsDuring 
        (ImmediatePastFn 
          (WhenFn ?X))
        (not 
          (possesses ?A ?V)))
      (holdsDuring
        (WhenFn ?X)
        (possesses ?A ?V)))))
        
(subclass HostageTaking UnilateralGetting)
(documentation HostageTaking EnglishLanguage "An event in which one agent keeps another
against his or her will, in order to force it or a third agent to 
accede to some demand.  The hostages are typically kept in the place
where they are first taken hostage, in contrast to a &%Kidnapping.
Hostage taking often involves a number of people (although it may be
just one), again, in contrast to a &%Kidnapping.")

(=>
  (instance ?X HostageTaking)
  (exists (?A)
    (and
      (instance ?A SentientAgent)
      (patient ?X ?A))))
           
(subclass IncendiaryDeviceAttack Combustion)
(subclass IncendiaryDeviceAttack ViolentContest)
(documentation IncendiaryDeviceAttack EnglishLanguage "An attack in which an agent
uses a device which causes fire in order to destroy life or property.")

(subclass Infiltration JoiningAnOrganization)
(documentation Infiltration EnglishLanguage "An event in which an agent joins an
organization under false pretenses.  The objective of such an act
is often to gather information helpful to a rival organization.")

(subclass Kidnapping Robbing)
(documentation Kidnapping EnglishLanguage "An event in which one agent keeps another
against his or her will, in order to force it or a third agent to 
accede to some demand.  The kidnapped party is normally removed from
the location where first attacked.  In contrast to a &%HostageTaking,
a kidnapping normally involves an attack on one, or a very small 
number of people, such as a couple.")

(=>
  (and
    (instance ?X Kidnapping)
    (instance ?G GroupOfPeople)
    (memberCount ?G ?N)
    (patient ?X ?G))
  (lessThan ?N 3))
      
(=>
  (instance ?X Kidnapping)
  (exists (?A ?LOC1 ?LOC2)
    (and
      (instance ?A SentientAgent)
      (instance ?LOC1 GeographicArea)
      (instance ?LOC2 GeographicArea)
      (not
        (equal ?LOC1 ?LOC2))
      (holdsDuring
        (ImmediatePastFn
          (WhenFn ?X))
        (located ?A ?LOC1))
      (holdsDuring
        (WhenFn ?X)
        (located ?A ?LOC2)))))

(subclass KnifeAttack ViolentContest)
(documentation KnifeAttack EnglishLanguage "An attack in which a knife is used.")

(subclass Knife CuttingDevice)

(documentation Knife EnglishLanguage "A sharp object used for cutting.  The object must 
have at least single blade or major protrusion which may be sharp at its 
end as well.  It may be sharp on both sides, or just one.  Unlike an awl 
it has a sharp edge rather than a point.  Unlike scissors, it is a single 
blade without additional articulated parts.  Unlike an axe, a knife is 
well-designed for slicing rather than chopping, although a heavy knife 
such as a broadsword can also be used for chopping, whereas a non-knife is 
not well designed for slicing meat for example.  A knife can be small like 
a pocket knife, or large like a two-handed broadsword.  A knife may also 
include other protrusions such as in the split swords and trident-like 
objects (that also possess a long sharp edge) in Chinese weaponry.") 

(subclass CuttingDevice Device)
(documentation CuttingDevice EnglishLanguage "Any &%Device whose purpose is &%Cutting something 
else.  This class covers knives of all times, axes, saws, razors, chisels etc.")
(=>
  (instance ?X CuttingDevice)
  (capability Cutting ?X instrument))

(=>
  (instance ?X KnifeAttack)
  (exists (?HG)
    (and
      (instance ?HG Knife)
      (instrument ?X ?HG))))
      
(subclass Blade CuttingDevice)
(documentation Blade EnglishLanguage "The &%Flat cutting part of a &%CuttingDevice.")

(=>
  (instance ?B Blade)
  (exists (?CD)
    (and
      (instance ?CD CuttingDevice)
      (part ?B ?CD))))
(=>
  (and
    (instance ?B Blade)
    (instance ?CUT Cutting)
    (instance ?OBJ Object)
    (instrument ?CUT ?B)
    (patient ?CUT ?OBJ))
  (meetsSpatially ?B ?OBJ))

(subclass LetterBombAttack Bombing)
(documentation LetterBombAttack EnglishLanguage "An attack with a bomb that is
concealed in a letter or package, which is typically designed to 
explode upon opening.")
                               
(subclass Lynching Killing)
(documentation Lynching EnglishLanguage "A lynching is a form of &%Killing conducted under 
a thin guise of legitimacy by a vigilante group.  It may be a purge of an 
individual from the group who is perceived to have gone astray, or it may 
be the summary execution of an individual outside the group that the group 
has determined has violated some law or code, either of the group, or the 
larger society.  A lynching is distinguished from a legal execution in 
that the laws of a government are not followed in carrying out the 
killing.  A lynching is distinguished from a murder in that there is the 
pretense of some process carried out by a group in the name of their own 
group or a higher power.") 

(subclass MortarAttack Bombing)
(documentation MortarAttack EnglishLanguage "An attack in which a &%Mortar weapon is
used.")

(subclass Mortar Weapon)
(documentation Mortar EnglishLanguage "A mortar is a bomb that is shot at a location.  A 
howitzer is a weapon that fires mortars.  The mortar may not include the 
propelling charge that provides the motive force for delivering it to its 
target, which distinguishes it from a rocket.  A mortar is distinguished 
from other bombs in that it is propelled rather than exploded in place, or 
dropped, or propelled by human power.") 
   
(=>
  (instance ?X MortarAttack)
  (exists (?MA)
    (and
      (instance ?MA Mortar)
      (instrument ?X ?MA))))
  
(subclass RocketMissileAttack Bombing)
(documentation RocketMissileAttack EnglishLanguage "An attack in which a rocket or
missile is used.")

(subclass Rocket Projectile)
                   
(subclass Stoning ViolentContest)
(documentation Stoning EnglishLanguage "An act where a victim or victims is attacked
with stones.  The stones may either be placed on top of a victim in
order to cause death by pressure and suffocation, in which case the act
is typically part of a ritualized legal sentence, or where the victim
is pelted with stones causing injury or death by trauma.  The intent
of such an act is usually the death of the victim.")
          
(=>
  (instance ?X Stoning)
  (exists (?ST)
    (and
      (instance ?ST Rock)
      (instrument ?X ?ST))))  

;; KJN: Moving this to Geography.kif as Rock is defined there.
;;(subclass Marble Rock)
;;(documentation Marble EnglishLanguage "A metamorphic &%Rock that is used in &%Constructing 
;;and in creating &%Sculptures.")

(subclass SuicideBombing Bombing)
(subclass SuicideBombing Killing)
(documentation SuicideBombing EnglishLanguage "A bomb attack in which the bomber
intends to blow himself up during the course of the attack.  The bomber
is the delivery mechanism for the explosive and the bomb is typically
in close contact with the bomber, such as being strapped around his
torso.  This action is distinguished from actions in which the bomber
merely happens to be blown up by his own bomb in that the bomber
knows that he is committing suicide.")

(=>
  (instance ?X SuicideBombing)
  (exists (?A)
    (and
      (agent ?X ?A)
      (holdsDuring
        (FutureFn
          (WhenFn ?X))
        (attribute ?A Dead)))))
        
(=>
  (and
    (instance ?X SuicideBombing)
    (agent ?X ?P))
  (believes ?P
    (holdsDuring
      (FutureFn
        (WhenFn ?X))
      (attribute ?P Dead))))
          
(subclass Vandalism Destruction)
(documentation Vandalism EnglishLanguage "An event where the objective of the agent
is to damage or destroy some property of another agent.  This is
distinguished from acts where the prime objective is damage or loss
of life of another agent.")
                          
(=>
  (instance ?X Vandalism)
  (not
    (exists (?A)
      (and
        (instance ?A Agent)
        (patient ?X ?A)))))
      
(subclass VehicleAttack ViolentContest)
(documentation VehicleAttack EnglishLanguage "An event in which a vehicle is used
by an agent in order to inflict injury, death or damage to people
or property.")
               
(=>
  (instance ?X VehicleAttack)
  (exists (?V)
    (and
      (instance ?V TransportationDevice)
      (instrument ?X ?V))))

;; KJN: Moving this to Geography.kif as Cave is defined there.      
;;(subclass Burrow Cave)
;;(documentation Burrow EnglishLanguage "A small &%Cave created by an &%Animal for the purpose 
;;of inhabiting it.")
;;(=>
;;  (instance ?B Burrow)
;;  (exists (?P ?A)
;;    (and
;;      (instance ?P Process)
;;      (agent ?P ?A)
;;      (instance ?A Animal)
;;      (not 
;;        (instance ?A Human))
;;      (result ?P ?B))))

;;(=>
;;  (instance ?B Burrow)
;;  (exists (?A)
;;    (hasPurpose ?B
;;      (inhabits ?A ?B))))

(instance BusinessPerson OccupationalRole)
(documentation BusinessPerson EnglishLanguage "Any of a class of people in a professional 
occupation such as banking, finance, management, or engineering.  This is 
distinguished from blue collar jobs that primarily involve manual labor 
rather than thought as the effort expended to derive remuneration.  It is 
also distinguished from professions that may be outwardly similar but are 
done in a non-profit organization.") 

(subAttribute BusinessExecutive BusinessPerson)
(documentation BusinessExecutive EnglishLanguage "&%BusinessExecutive refers to a person
responsible for the management of a business")
(termFormat EnglishLanguage BusinessExecutive "business executive")

(=>
  (attribute ?X BusinessExecutive)
  (exists (?BUSINESS ?MANAGE)
    (and
      (instance ?MANAGE Managing)
      (instance ?BUSINESS Organization)
      (patient ?MANAGE ?BUSINESS)
      (agent ?MANAGE ?X))))

(instance Celebrity SocialRole)
(documentation Celebrity EnglishLanguage "Anyone who is known by a large number of people,
either explicitly by name, or by action.")

(=>
  (attribute ?X Celebrity)
  (greaterThan 
    (CardinalityFn 
      (KappaFn ?A
        (knows ?A 
          (exists (?P)
            (equal ?P ?X)))))
    1000))
      
(instance Knight SocialRole)
(documentation Knight EnglishLanguage "A &%SocialRole that is assigned by the 
United Kingdom to persons for reasons of personal merit.")

(instance Musician ArtisticOccupation)
(documentation Musician EnglishLanguage "A Musician is someone who is capable of giving a &%MusicalPerformance.
This includes amateurs and others who don't formally make a living at the activity
or choose it as a profession.")

(=>
  (attribute ?X Musician)
  (hasSkill MusicalPerformance ?X))

(instance Veteran SocialRole)
(documentation Veteran EnglishLanguage "The &%Attribute that applies to someone who was a 
&%Soldier at one time, but is not currently a &%Soldier.")

(=>
  (holdsDuring ?T1 
    (attribute ?H Veteran))
  (exists (?T2 ?P)
    (and
      (temporalPart ?T2 
        (PastFn (WhenFn ?T1)))
      (instance ?P Soldier)
      (holdsDuring ?T2 
        (attribute ?H ?P))
      (not 
        (holdsDuring ?T1 
	  (attribute ?H ?P)))))) 

;; KJN: Moving this to Geography.kif to remove dependencies    
;;(subclass Checkpoint GeographicArea)
;;(documentation Checkpoint EnglishLanguage "An area on or very near a border, usually along 
;;a road connecting two regions, where &%MilitaryPersons or &%Police 
;;restrict the flow of traffic in order to extract tarrifs, deny movement to 
;;certain kinds of people or goods, or other enforement actions.  Because of 
;;the power relationship involved, such areas are often the site of illegal 
;;activities conducted by the officials in order to extract favors or 
;;bribes.") 

;;(=>
;;  (instance ?X Checkpoint)
;;  (or
;;    (exists (?ROAD)
;;      (and
;;        (instance ?ROAD Road)
;;        (orientation ?ROAD ?X Near)))
;;    (exists (?REG1 ?REG2)
;;      (orientation (BorderFn ?REG1 ?REG2) ?X Near)))) 
      
(subclass Road Region)
(subclass Road Roadway)
(documentation Road EnglishLanguage "A path along which vehicles travel.  It is typically,
although not necessarily, paved and intended for cars.")
(=>
  (instance ?X Road)
  (hasPurpose ?X
    (exists (?EV ?VEH)
      (and
        (instance ?EV Transportation)
        (eventLocated ?EV ?X)
        (instance ?VEH LandVehicle)
        (instrument ?EV ?VEH)))))
      
(contraryAttribute Civilian MilitaryPerson)
(subclass OccupationalRole Position)
(documentation OccupationalRole EnglishLanguage "A &%Role of a &%Human in a &%OrganizationalProcess.")

;; NS: edit.
(instance Civilian SocialRole)
(documentation Civilian EnglishLanguage "Someone who is not a member of an active
&%MilitaryOrganization.")

(=>
  (holdsDuring ?T1 (attribute ?X Civilian))
  (holdsDuring ?T1 (not (attribute ?X MilitaryPerson))))
    
(instance Widowed SocialRole)
(documentation Widowed EnglishLanguage "The &%Attribute that applies to someone who was 
married to someone who has died, and who has not remarried.")

(=>
  (holdsDuring ?NOW 
    (attribute ?P Widowed))
  (and
    (exists (?BEFORE ?SPOUSE)
      (and
        (earlier ?BEFORE ?NOW)
        (holdsDuring ?BEFORE
          (spouse ?SPOUSE ?P))      
        (holdsDuring ?NOW 
          (attribute ?SPOUSE Dead))))
    (not
      (exists (?OTHER)        
        (holdsDuring ?NOW
          (spouse ?OTHER ?P))))))

(subclass Convoy Collection)
(documentation Convoy EnglishLanguage "A group of vehicles that all are being driven
in formation (e.g., lines, rows, columns) to the same destination.
That destination may be an intermediate destination on the way to a
final destination for some of the vehicles however.  This is
distinguished from vehicles that have no common purpose, such as
traffic on a freeway.  This includes cases where some of the agents
driving the vehicles intend to reach a point but fail to do so.") 

;; Every convoy consists of at least two vehicles.  Note that, by
;; definition, the members of a Collection can change over time,
;; so a Convoy could still be considered the "same" Convoy even
;; if it has different members at different times.  The rule
;; below states that for any given Convoy, there exist at least
;; two Vehicles, and a TimeInterval during which the Vehicles are
;; members of the Convoy.

(=>
  (instance ?C Convoy)
  (exists (?V1 ?V2 ?TIME)
    (and
      (not (equal ?V1 ?V2))
      (instance ?V1 Vehicle)
      (instance ?V2 Vehicle)
      (instance ?TIME TimeInterval)
      (temporalPart ?TIME (WhenFn ?C))
      (holdsDuring ?TIME 
        (and
	  (member ?V1 ?C)
	  (member ?V2 ?C))))))
  
;; For every Vehicle that is a member of a Convoy, there exists
;; some Driving in which the Vehicle is the object driven (the
;; patient) and which temporally overlaps the Convoy. This is
;; intentionally weak, because (a) the vehicles in a convoy might
;; be parked, not moving (being driven), but the convoy would
;; nevertheless still exist with the vehicles stationary and (b)
;; a vehicle might join or leave a convoy, in which case the
;; driving event in which it is being driven only partially
;; overlaps the temporal extent of the convoy itself.
(=>
  (and 
    (instance ?C Convoy)
    (member ?VEH ?C))
  (exists (?DRIVE)
    (and
      (instance ?DRIVE Driving)
      (overlapsTemporally (WhenFn ?DRIVE) (WhenFn ?C))
      (patient ?DRIVE ?VEH))))

;; Convoy needs more work.  A Convoy is analogous to a flock
;; of birds.  When the birds are not in flight, do they still
;; constitute a flock?  (Yes, if they stay together.)  When some
;; birds leave or join the flock, is it still "the same" flock?
;; (Yes, according to the SUMO definition of Collection.)  We
;; still need to capture the notion that the members of a Convoy
;; move in formation.  The rule below needs to be expanded with
;; assertions describing what LineFormation means for the members
;; of a Convoy.  Also, we have not represented the notion that
;; the members of a Convoy, when moving, are heading toward a
;; common destination.

(=>
  (instance ?C Convoy)
  (attribute ?C LineFormation))

(instance Diplomat OccupationalRole)
(subAttribute Diplomat GovernmentPerson)
(documentation Diplomat EnglishLanguage "A person who works as a
facilitator for communication between countries, in the official
employ of one of the countries.")

(instance Dissident SocialRole)
(documentation Dissident EnglishLanguage "Someone who is opposed
to the leadership of a particular country.  Typically, a
dissident suffers punishment at the hands of the country whose
leadership he is opposing.")

(subclass EmbassyBuilding GovernmentBuilding)
(documentation EmbassyBuilding EnglishLanguage "An embassy is a
&%Building that is owned by a &%Government to house its
diplomatic and consular staff that is in another country.")

(=>
  (instance ?X EmbassyBuilding)
  (exists (?EGOV ?OTHERGOV)
    (and
      (instance ?EGOV Nation)
      (instance ?OTHERGOV Nation)
      (not
        (equal ?EGOV ?OTHERGOV))
      (possesses ?EGOV ?X)
      (located ?X ?OTHERGOV))))

;; KJN: Moved to CountriesAndRegions to remove dependencies.

;;(subclass EuropeanNation Nation)
;;(documentation EuropeanNation EnglishLanguage "The class of nations that are in &%Europe.")

;;(=>
;;  (instance ?N EuropeanNation)
;;  (part ?N Europe))

;;(instance UnitedKingdom EuropeanNation)
;;(documentation UnitedKingdom EnglishLanguage "The &%Nation comprising 
;;England, Scotland, Wales, and Northern Ireland.")

(subclass EntertainmentBuilding Building)
(documentation EntertainmentBuilding EnglishLanguage "A building that has the primary 
purpose of entertaining people.")

(=>
   (instance ?BUILDING EntertainmentBuilding)
   (hasPurpose ?BUILDING 
     (exists (?REC) 
       (and 
         (instance ?REC RecreationOrExercise) 
         (eventLocated ?REC ?BUILDING)))))

(subclass GovernmentBuilding Building)
(documentation GovernmentBuilding EnglishLanguage "A building belonging to a &%Government")

(=>
  (instance ?X GovernmentBuilding)
  (exists (?G)
    (and
      (instance ?G Government)
      (possesses ?G ?X))))
      
(instance GovernmentPerson OccupationalRole)
(documentation GovernmentPerson EnglishLanguage "A person who works for a &%Government.")
(=>
  (holdsDuring ?T1 (attribute ?X GovernmentPerson))
  (exists (?GOV)
    (and
      (instance ?GOV Government)
      (holdsDuring ?T1 (employs ?GOV ?X)))))

;; KJN: Moved Hotel definition to Hotel.kif
;; (subclass Hotel Building)
;; (documentation Hotel EnglishLanguage "A building which servers the purpose of a temporary
;; home for people, either for people who are travelling, or occasionally for
;; those who do not have another more permanent residence.  A hotel is 
;; distinguished from a homeless shelter, or a residence loaned to a friend
;; in that the primary purpose of the building is to generate revenue in
;; return for the priviledge of staying there.  Many hotels contains other 
;; facilities such as &%Restaurants or health clubs or even miscellaneous stores
;; although that is not their primary business or purpose.")
        
;;(=>
;;  (instance ?X Hotel)
;;  (hasPurpose ?X
;;    (exists (?OWN ?EMP ?EV ?P ?PAY)
;;      (and
;;        (employs ?OWN ?EMP)
;;        (possesses ?OWN ?X)
;;        (instance ?P Human)
;;        (instance ?PAY FinancialTransaction)
;;       (agent ?PAY ?P)
;;        (patient ?PAY ?EMP)
;;       (confersRight ?EMP ?EV ?P)
;;        (agent ?EV ?P)
;;        (located ?EV ?X)))))


(subclass Renting FinancialTransaction)
(subclass Renting Borrowing)
(documentation Renting EnglishLanguage "Giving money to the owner of an &%Object in 
exchange for the right to use the &%Object for a fixed time period.")

(=>
  (and
    (instance ?R Renting)
    (agent ?R ?A)
    (patient ?R ?O))
  (holdsDuring 
    (WhenFn ?R) 
    (modalAttribute (uses ?A ?O) Permission)))

(subclass Marketplace GeographicArea)
(documentation Marketplace EnglishLanguage "An area, building, or set of buildings
where &%FinancialTransactions are intended to take place.  There should
be more than one owner or renter of space or buildings within the
marketplace.")

(=>
  (instance ?X Marketplace)
  (hasPurpose ?X
    (exists (?EV)
      (and
        (instance ?EV FinancialTransaction)
        (eventLocated ?EV ?X)))))
        
(instance StoreOwner OccupationalRole)
(subAttribute StoreOwner BusinessPerson)
(documentation StoreOwner EnglishLanguage "Someone who operates a store which he
either owns or rents.")

(instance Militant SocialRole)
(documentation Militant EnglishLanguage "A militant is someone who is not 
officially authorized by a government to engage in combat, but who
does so on behalf of a &%PoliticalOrganization.")

(instance MilitaryPerson OccupationalRole)
(documentation MilitaryPerson EnglishLanguage "Someone who is a member of a
&%ModernMilitaryOrganization.")

(=>
  (holdsDuring ?T1 (attribute ?X MilitaryPerson))
  (exists (?ORG)
    (and
      (instance ?ORG MilitaryOrganization)
      (holdsDuring ?T1 (member ?X ?ORG)))))
    
(=> 
  (and
    (instance ?ORG MilitaryOrganization)
    (holdsDuring ?T1 (member ?X ?ORG))
    (instance ?X Human))
  (holdsDuring ?T1 (attribute ?X MilitaryPerson)))

(subclass OfficeBuilding Building)
(documentation OfficeBuilding EnglishLanguage "A building in which work activities take
place which is not primarily designed for manufacturing or retail sales.")

(subclass PeaceKeepingMission MilitaryOrganization)
(documentation PeaceKeepingMission EnglishLanguage "A military deployment which is intended
to prevent hostilities between two other entities located in the same rough
geographic area.")

(subclass PlaceOfWorship Building)
(documentation PlaceOfWorship EnglishLanguage "Any place designed for &%ReligiousProcesses.")
(=>
  (instance ?X PlaceOfWorship)
  (hasPurpose ?X
    (exists (?EV)
      (and
        (instance ?EV ReligiousProcess)
        (eventLocated ?EV ?X)))))
        
(subclass PoliceFacility Building)              
(documentation PoliceFacility EnglishLanguage "A building designed to house &%PolicePersons.")

(instance PolicePerson OccupationalRole)
(subAttribute PolicePerson GovernmentPerson)
(documentation PolicePerson EnglishLanguage "A member of a government whose occupation
has the primary purpose of preventing crime and arresting criminals.")

(subAttribute PoliticalFigure Celebrity)
(documentation PoliticalFigure EnglishLanguage "A well known person who participates
in a PoliticalProcess.  This must either be the person's principal
occupation, or what is intended to become his principal occupation
(for example, after an election).")

(=>
  (attribute ?X PoliticalFigure)
  (exists (?EV)
    (and
      (agent ?EV ?X)
      (instance ?EV PoliticalProcess))))
      
(=>
  (attribute ?X PoliticalFigure)
  (exists (?GOV)
    (and
      (instance ?GOV Government)
      (or
        (member ?X ?GOV)
        (desires ?X
          (member ?X ?GOV))))))

(subAttribute ReligiousFigure Celebrity)
(documentation ReligiousFigure EnglishLanguage "A well-known leader of a religious group.")

;;(=>
;;  (attribute ?X ReligiousFigure)
;;  (exists (?ORG)
;;    (and
;;      (instance ?ORG ReligiousOrganization)
;;      (occupiesPosition ?X Leader ?ORG))))
  
(subclass RestaurantBuilding Building)
(documentation RestaurantBuilding EnglishLanguage "A &%Building where people pay to be served food
and eat.  Some restaurants may also offer entertainment.")

(=>
  (instance ?X RestaurantBuilding)
  (hasPurpose ?X
    (exists (?OWN ?EMP ?EV ?P ?PAY)
      (and
        (employs ?OWN ?EMP)
        (possesses ?OWN ?X)
        (instance ?P Human)
        (instance ?PAY FinancialTransaction)
        (agent ?PAY ?P)
        (patient ?PAY ?EMP)
        (confersRight ?EMP ?EV ?P)
        (instance ?EV Eating)
        (agent ?EV ?P)
        (eventLocated ?EV ?X)))))

(subclass EducationalFacility StationaryArtifact)
(documentation EducationalFacility EnglishLanguage "A building or campus, owned by an
&%EducationalOrganization, which is intended as the location for
&%EducationalProcesses.")
(=>
  (instance ?X EducationalFacility)
  (exists (?ORG)
    (and
      (instance ?ORG EducationalOrganization)
      (possesses ?ORG ?X))))
      
(=>
  (instance ?X EducationalFacility)
  (hasPurpose ?X
    (exists (?EV)
      (and
        (instance ?EV EducationalProcess)
        (eventLocated ?EV ?X)))))
        
(instance Student SocialRole)
(documentation Student EnglishLanguage "A person who participates in an
&%EducationalProcess in order to learn something.")
(=>
  (attribute ?X Student)
  (exists (?EV)
    (and
      (instance ?EV EducationalProcess)
      (patient ?EV ?X))))
      
(subclass Subway Hole)
(documentation Subway EnglishLanguage "A subway is a hollow
area of the earth, typically under large cities, designed
for running trains that move people. It is distinguished
from other kinds of tunnels in that trains run through them,
primarily for the purpose of carrying people rather than
ore, for example.")
(=>
  (instance ?X Subway)
  (exists (?SURF)
    (and
      (surface ?SURF GeographicArea)
      (orientation ?X ?SURF Below))))
      
(=>
  (instance ?X Subway)
  (hasPurpose ?X
    (exists (?EV ?P)
      (and
        (instance ?EV Transportation)
        (instance ?P Human)
        (patient ?EV ?P)
        (eventLocated ?EV ?X)))))
        
(instance Tourist SocialRole)
(documentation Tourist EnglishLanguage "A tourist is a
person who is travelling to a place primarily for reasons of
entertainment or education, rather than business, although
business transaction may take place during the trip.")

(subclass TouristSite GeographicArea)
(documentation TouristSite EnglishLanguage "A tourist site is a location that has some
feature of interest to &%Tourists, which entertains or informs them.")
   
(subclass TerroristOrganization PoliticalOrganization)

(=>
  (instance ?X TerroristOrganization)
  (exists (?EV)
    (and
      (instance ?EV ViolentContest)
      (agent ?EV ?X))))
      
(documentation TerroristOrganization EnglishLanguage "A
 group that uses violent means in an attempt to bring about
 their political aims.  Those violent means are
 distinguished from a war between nations, or a civil war in
 that the group is at least partially clandestine and a
 significant proportion of its acts are against non-military
 targets.")

(instance memberCount BinaryPredicate)
(domain memberCount 1 Collection)
(domain memberCount 2 Integer)

(documentation memberCount EnglishLanguage "(&%memberCount ?ORG ?NUMBER) means that there 
is a total ?NUMBER of &%members in the &%Collection ?ORG.") 

(=>
  (memberCount ?ORG ?NUM)
  (equal
    ?NUM
    (CardinalityFn
      (KappaFn ?MEM
        (member ?MEM ?ORG)))))

;; KJN: Moving this to Government.kif as seatsInOrganizationCount is defined there       
;;(=>
;;  (and
;;    (seatsInOrganizationCount ?ORG ?SEATS)
;;    (memberCount ?ORG ?MEMBERS))
;;  (greaterThanOrEqualTo ?SEATS ?MEMBERS))

(instance memberType BinaryPredicate)
(domain memberType 1 Collection)
(domain memberType 2 SetOrClass)

(documentation memberType EnglishLanguage "(&%memberType ?GROUP ?TYPE) means that all 
the members of the &%Collection ?GROUP belong to the &%SetOrClass 
?TYPE.")

(=>
  (and
    (memberType ?GROUP ?TYPE)
    (member ?MEMBER ?GROUP))
  (instance ?MEMBER ?TYPE))

(instance memberTypeCount TernaryPredicate)
(domain memberTypeCount 1 Collection)
(domain memberTypeCount 2 SetOrClass)
(domain memberTypeCount 3 NonnegativeInteger)

(documentation memberTypeCount EnglishLanguage 
"(&%memberTypeCount ?GROUP ?TYPE ?NUMBER) means that the 
&%Collection ?GROUP has ?NUMBER members of the kind ?TYPE.")

(=>
 (memberTypeCount ?GROUP ?TYPE ?NUMBER)
 (exists (?SUBGROUP)
   (and
     (subCollection ?SUBGROUP ?GROUP)
     (memberCount ?SUBGROUP ?NUMBER)
     (memberType ?SUBGROUP ?TYPE))))

(=>
  (and
    (memberCount ?GROUP ?NUMBER1)
    (memberTypeCount ?GROUP ?TYPE ?NUMBER2))
  (greaterThanOrEqualTo ?NUMBER1 ?NUMBER2))

(=>
  (and
    (memberTypeCount ?GROUP ?TYPE ?NUMBER)
    (equal ?NUMBER 0))
  (not
    (exists (?ITEM)
      (and
        (instance ?ITEM ?TYPE)
        (member ?ITEM ?GROUP)))))

(instance memberAtTime TernaryPredicate)
(documentation memberAtTime EnglishLanguage "(&%memberAtTime ?MEMBER ?COLLECTION
?TIME) means that during the time period denoted by ?TIME,
?MEMBER is a &%member of ?COLLECTION.")
(domain memberAtTime 1 SelfConnectedObject)
(domain memberAtTime 2 Collection)
(domain memberAtTime 3 TimePosition)

(<=>
  (memberAtTime ?OBJ ?COLLECTION ?TIME)
  (holdsDuring ?TIME (member ?OBJ ?COLLECTION)))

(=>
  (and
    (locatedAtTime ?COLLECTION ?TIME ?PLACE)
    (memberAtTime ?OBJ ?COLLECTION ?TIME))
  (locatedAtTime ?OBJ ?TIME ?PLACE))

(documentation inventory EnglishLanguage "(inventory ?CBO ?COLLECTION) means that 
the &%ContentBearingObject ?CBO contains a list or enumeration of the 
members of the &%Collection ?COLLECTION.")
(instance inventory BinaryPredicate)
(domain inventory 1 ContentBearingObject)
(domain inventory 2 Collection)

(=>
  (and
    (inventory ?O ?C)
    (member ?I ?C))
  (refers ?O ?I))

(instance subordinateInOrganization TernaryPredicate)
(domain subordinateInOrganization 1 Organization)
(domain subordinateInOrganization 2 Human)
(domain subordinateInOrganization 3 Human)

(documentation subordinateInOrganization EnglishLanguage 
"(&%subordinateInOrganization ?ORG ?PERSON1 ?PERSON2) means that 
in the &%Organization ?ORG, ?PERSON1 is subordinate to ?PERSON2.")

(=>
    (subordinateInOrganization ?ORG ?PERSON1 ?PERSON2)
    (employs ?ORG ?PERSON1))

(=>
    (subordinateInOrganization ?ORG ?PERSON1 ?PERSON2)
    (employs ?ORG ?PERSON2))

(instance subordinatePosition TernaryPredicate)
(domain subordinatePosition 1 Organization)
(domain subordinatePosition 2 Position)
(domain subordinatePosition 3 Position)

(documentation subordinatePosition EnglishLanguage 
"(&%subordinatePosition ?ORG ?SUB ?SUPER) means that in 
the &%Organization ?ORG, the holder of role ?SUB is subordinate to 
the holder of role ?SUPER.")

(=>
  (and
    (subordinatePosition ?ORG ?ROLE1 ?ROLE2)
    (occupiesPosition ?PERSON1 ?ROLE1 ?ORG))
  (exists (?PERSON2)
    (and
      (instance ?PERSON2 Human)
      (occupiesPosition ?PERSON2 ?ROLE2 ?ORG)
      (subordinateInOrganization ?ORG ?PERSON1 ?PERSON2))))

(instance operator BinaryPredicate)
(instance operator AsymmetricRelation)
(instance operator IrreflexiveRelation)
(domain operator 1 Object)	
(domain operator 2 Agent)

(documentation operator EnglishLanguage "(&%operator ?OBJECT ?AGENT) means that ?AGENT 
determines how ?OBJECT is used, either by directly or indirectly operating 
it.")

(subclass ClassificationScheme Proposition)
(documentation ClassificationScheme EnglishLanguage "A &%ClassificationScheme is
a conceptual structure, an abstract arrangement of concepts and
the relations that link them.")

(subclass Taxonomy ClassificationScheme)
(documentation Taxonomy EnglishLanguage "A &%Taxonomy is a &%ClassificationScheme
that typically includes the salient concepts of a domain of
interest, plus, minimally, a binary `broader than'/`narrower
than' relation by which the concepts are linked.  The `broader
than'/`narrower than' relation is usually conceived as set- or
class-based subsumption, but taxonomies are notorious for
conflating the set membership and set subsumption (i.e.,
subset/superset) relations into a single `IS-A' relation.  Some
taxonomies include additional binary relations, such as
`subpart'/`superpart'.")

(documentation abstractPart EnglishLanguage "A meronymy relation similar to &%part, but
for abstract rather than physical things.")
(termFormat EnglishLanguage abstractPart "part")
(instance abstractPart PartialOrderingRelation)
(domain abstractPart 1 Abstract)
(domain abstractPart 2 Abstract)
(format EnglishLanguage abstractPart "%1 is %n a &%part of %2")

(subclass Ontology ClassificationScheme)
(documentation Ontology EnglishLanguage "An &%Ontology is a
&%ClassificationScheme that links concepts via many different
relations.  Ontologies typically are not restricted to binary
relations and are structured by several kinds of conceptual
hierarchies, including set- or class-based subsumption, spatial
containment, mereology
(theory of parts and wholes), and logical contexts.  Thus,
an ontology typically includes multiple taxonomies.")

;; Every ontology incorporates at least one taxonomy.
(=>
  (instance ?ONT Ontology)
  (exists (?TAX)
    (and
      (instance ?TAX Taxonomy)
      (abstractPart ?TAX ?ONT))))

;; transported
(instance transported BinaryPredicate)
(instance transported AsymmetricRelation)
(documentation transported EnglishLanguage "(&%transported ?EVENT ?OBJ)
means that ?OBJ is transported (carried/moved to a
different physical location) in the &%Transportation
?EVENT.")

(domain transported 1 Transportation)
(domain transported 2 Object)
(subrelation transported patient)
(instance transported CaseRole)

;; cargo
(instance cargo BinaryPredicate)
(instance cargo AsymmetricRelation)
(documentation cargo EnglishLanguage "(&%cargo ?EVENT ?OBJ) means that
?OBJ is transported as cargo in the &%Shipping event
?EVENT.")

(domain cargo 1 Shipping)
(domain cargo 2 Object)
(subrelation cargo transported)
(instance cargo CaseRole)

(instance serviceProvider BinaryPredicate)
(instance serviceProvider AsymmetricRelation)
(instance serviceProvider IntentionalRelation)
(domain serviceProvider 1 ServiceProcess)
(domain serviceProvider 2 CognitiveAgent)
(subrelation serviceProvider agent)
(instance serviceProvider CaseRole)
(documentation serviceProvider EnglishLanguage "(&%serviceProvider ?EVENT ?AGENT)
means that ?AGENT is the supplier of the service provided in
?EVENT.")

(instance serviceRecipient BinaryPredicate)
(instance serviceRecipient AsymmetricRelation)
(instance serviceRecipient IntentionalRelation)
(domain serviceRecipient 1 ServiceProcess)
(domain serviceRecipient 2 CognitiveAgent)
(subrelation serviceRecipient experiencer)
(instance serviceRecipient CaseRole)
(documentation serviceRecipient EnglishLanguage 
"(&%serviceRecipient ?EVENT ?AGENT) means that ?AGENT is the
receiver of the service provided in ?EVENT.")

;; Every ServiceProcess has some provider.
(=>
  (instance ?EVENT ServiceProcess)
  (exists (?PROVIDER)
    (and
      (instance ?PROVIDER CognitiveAgent)
      (serviceProvider ?EVENT ?PROVIDER))))

;; Every ServiceProcess has some recipient.
(=>
  (instance ?EVENT ServiceProcess)
  (exists (?RECEIVER)
    (and
      (instance ?RECEIVER CognitiveAgent)
      (serviceRecipient ?EVENT ?RECEIVER))))

(instance benefits BinaryPredicate)
(instance benefits AsymmetricRelation)
(domain benefits 1 Process)
(domain benefits 2 Agent)
(documentation benefits EnglishLanguage "(&%benefits
?PROCESS ?AGENT) means that ?AGENT somehow derives benefit
as a result of ?PROCESS.  This is a very general relation,
and does not entail that ?AGENT is a participant in
?PROCESS.")

;; If a process benefits some agent, the process must begin
;; before the agent ends.  This is very weak.
(=>
  (and
    (equal ?PROCESS-START (BeginFn (WhenFn ?PROCESS)))
    (equal ?AGENT-END (EndFn (WhenFn ?AGENT)))
    (benefits ?PROCESS ?AGENT))
  (before ?PROCESS-START ?AGENT-END))

(instance areaOfResponsibility TernaryPredicate)
(domain areaOfResponsibility 1 Agent)
(domainSubclass areaOfResponsibility 2 Process)
(domain areaOfResponsibility 3 GeographicArea)
(documentation areaOfResponsibility EnglishLanguage "(&%areaOfResponsibility
?AGENT ?PROCESS-TYPE ?AREA) means that ?AGENT (typically an
instance of &%Organization) is responsible or accountable for
actions or undertakings of type ?PROCESS-TYPE in the
&%GeographicArea denoted by ?AREA.")


;; ------------------------------------------------------
;; Social relationships


;; friend
(instance friend BinaryPredicate)
(instance friend SymmetricRelation)
(instance friend IntentionalRelation)

(documentation friend EnglishLanguage "(&%holdsDuring ?T1 (&%friend ?H1 ?H2)) means that
during time ?T1, ?H1 and ?H2 know each other, share a relationship of
mutual care and concern, and probably also share some common interests.")

(domain friend 1 Human)
(domain friend 2 Human)
(subrelation friend mutualAcquaintance)

;; coworker
(instance coworker BinaryPredicate)
(instance coworker SymmetricRelation)

(documentation coworker EnglishLanguage "(&%holdsDuring ?T1 (&%coworker ?H1 ?H2)) means
that during time ?T1, ?H1 and ?H2 are both employed by the same agent, are
of roughly the same job status, and come into contact at least part of the
time at the same work location.")

(domain coworker 1 Human)
(domain coworker 2 Human)
(subrelation coworker mutualAcquaintance)

(=>
 (holdsDuring ?T1 (coworker ?H1 ?H2))
 (exists (?ORG)
        (and
         (instance ?ORG Organization)
         (holdsDuring ?T1 (and
                           (employs ?ORG ?H1)
                           (employs ?ORG ?H2))))))

;; cohabitant
(instance cohabitant BinaryPredicate)
(instance cohabitant SymmetricRelation)
(instance cohabitant IntentionalRelation)

(documentation cohabitant EnglishLanguage "(&%holdsDuring ?T1 (&%cohabitant ?H1 ?H2))
means that during the time ?T1, ?H1 and ?H2 have the same home.")

(domain cohabitant 1 Human)
(domain cohabitant 2 Human)

(subrelation cohabitant mutualAcquaintance)

(=>
 (holdsDuring ?T1 (cohabitant ?H1 ?H2))
 (exists (?UNIT)
   (and
     (instance ?UNIT SocialUnit)
     (holdsDuring ?T1 (and (member ?UNIT ?H1)
                           (member ?UNIT ?H2))))))

(=>
  (and
    (instance ?UNIT SocialUnit)
    (holdsDuring ?T1 (and (member ?UNIT ?H1)
                          (member ?UNIT ?H2))))
  (holdsDuring ?T1 (cohabitant ?H1 ?H2)))

;; grandparent
(instance grandparent BinaryPredicate)
(instance grandparent AsymmetricRelation)
(domain grandparent 1 Human)
(domain grandparent 2 Human)

(documentation grandparent EnglishLanguage "(&%grandparent ?YOUNGER ?OLDER) means that
?OLDER is a &%parent of ?YOUNGER's &%parent.")

(subrelation grandmother grandparent)
(instance grandmother BinaryPredicate)
(subrelation grandfather grandparent)
(instance grandfather BinaryPredicate)
(subrelation grandparent ancestor)

;; parent -> father
(=>
  (and
    (parent ?CHILD ?PARENT)
    (instance ?PARENT Man))
  (father ?CHILD ?PARENT))

;; parent -> mother
;; this is in more general form in Merge-2.kif 13693-13697 (other mammals are also mothers)
;(=>
;  (and
;   (parent ?CHILD ?PARENT)
;    (instance ?PARENT Woman))
;  (mother ?CHILD ?PARENT))

;; parent -> son
(=>
  (and
    (parent ?CHILD ?PARENT)
    (instance ?CHILD Man))
  (son ?CHILD ?PARENT))

;; parent -> daughter
(=>
  (and
    (parent ?CHILD ?PARENT)
    (instance ?CHILD Woman))
  (daughter ?CHILD ?PARENT))

(documentation aunt EnglishLanguage "(aunt ?AUNT ?PERSON) means that ?AUNT is 
the sister of a parent of ?PERSON.")
(domain aunt 1 Woman)
(domain aunt 2 Human)
(subrelation aunt familyRelation)
(instance aunt BinaryPredicate)

(<=>
  (aunt ?A ?H)
  (exists (?P)
    (and
      (sister ?A ?P)
      (parent ?H ?P)))) 

(documentation cousin EnglishLanguage "(cousin ?PERSON1 ?PERSON2) means that ?PERSON1 
and ?PERSON2 are cousins, i.e. ?PERSON1 and ?PERSON2 have grandparents 
(but not parents) in common.")
(domain cousin 1 Human)
(domain cousin 2 Human)
(subrelation cousin familyRelation)
(instance cousin BinaryPredicate)

(<=>
  (cousin ?P1 ?P2)
  (and
    (exists (?G1 ?G2)
      (and
        (grandmother ?P1 ?G1)
        (grandfather ?P1 ?G2)
        (grandmother ?P2 ?G1)
        (grandfather ?P2 ?G2)))
    (not 
      (exists (?M ?F)
        (and
          (mother ?P1 ?M)
          (father ?P1 ?F)
          (mother ?P2 ?M)
          (father ?P2 ?F))))))

(documentation grandfather EnglishLanguage "(grandfather ?PERSON ?PARENT) means that 
?PARENT is the grandfather of ?PERSON.")
(domain grandfather 1 Human)
(domain grandfather 2 Man)
(subrelation grandfather familyRelation)

(=>
  (grandfather ?H ?P)
  (exists (?C)
    (and
      (father ?C ?P)
      (parent ?H ?C))))

(documentation grandmother EnglishLanguage "(grandmother ?PERSON ?PARENT) means that 
?PARENT is the grandmother of ?PERSON.")
(domain grandmother 1 Human)
(domain grandmother 2 Woman)
(subrelation grandmother familyRelation)

(=>
  (grandmother ?H ?P)
  (exists (?C)
    (and
      (mother ?C ?P)
      (parent ?H ?C))))

(documentation nephew EnglishLanguage "(nephew ?NEPHEW ?PERSON) means that ?NEPHEW is 
the &%son of a &%sibling of ?PERSON.")
(domain nephew 1 Man)
(domain nephew 2 Human)
(subrelation nephew familyRelation)
(instance nephew BinaryPredicate)

(<=>
  (nephew ?N ?H)
  (exists (?S)
    (and
      (sibling ?S ?H)
      (son ?N ?S)))) 

(documentation niece EnglishLanguage "(niece ?NIECE ?PERSON) means that ?NIECE is 
the &%daughter of a &%sibling of ?PERSON.")
(domain niece 1 Woman)
(domain niece 2 Human)
(subrelation niece familyRelation)
(instance niece BinaryPredicate)


(<=>
   (niece ?N ?H)
   (exists (?S)
      (and
         (sibling ?S ?H)
         (daughter ?N ?S)))) 

(documentation uncle EnglishLanguage "(uncle ?UNCLE ?PERSON) means that ?UNCLE is 
the brother of a parent of ?PERSON.")
(domain uncle 1 Man)
(domain uncle 2 Human)
(subrelation uncle familyRelation)
(instance uncle BinaryPredicate)

(<=>
   (uncle ?U ?H)
   (exists (?P)
      (and
         (brother ?U ?P)
         (parent ?H ?P)))) 

(documentation stepfather EnglishLanguage "(stepfather ?PERSON ?FATHER) means that ?FATHER 
is the stepfather of ?PERSON, i.e. ?FATHER is the &%spouse of the &%mother 
of ?PERSON, without also being the &%father of ?PERSON.")
(domain stepfather 1 Human)
(domain stepfather 2 Man)
(subrelation stepfather legalRelation)
(instance stepfather BinaryPredicate)

(<=>
  (stepfather ?P ?F)
  (exists (?M)
    (and
      (mother ?P ?M)
      (spouse ?F ?M)
      (not 
        (father ?P ?F)))))

(documentation stepmother EnglishLanguage "(stepmother ?PERSON ?MOTHER) means that ?MOTHER 
is the &%stepmother of ?PERSON, i.e. ?MOTHER is the spouse of the &%father 
of ?PERSON, without also being the &%mother of ?PERSON.")
(domain stepmother 1 Human)
(domain stepmother 2 Woman)
(subrelation stepmother legalRelation)
(instance stepmother BinaryPredicate)

(<=>
  (stepmother ?P ?M)
  (exists (?F)
    (and
      (father ?P ?F)
      (spouse ?M ?F)
      (not 
        (mother ?P ?M)))))

;; NuclearFamily
(subclass NuclearFamily FamilyGroup)
(subclass NuclearFamily SocialUnit)

(documentation NuclearFamily EnglishLanguage "A &%NuclearFamily is a &%SocialUnit composed
of at least two and not more than three generations of &%familyRelations:
&%parents, their children, and possibly the parents' parents (children's
&%grandparents).")

;; TO DO: Add axiomatic support for defining and
;; concluding to NuclearFamily.

(=>
  (and
    (parent ?CHILD ?PARENT1)
    (parent ?CHILD ?PARENT2)
    (holdsDuring ?T1 
      (and 
        (spouse ?PARENT1 ?PARENT2)
        (cohabitant ?PARENT1 ?PARENT2)
	(cohabitant ?CHILD ?PARENT1))))
  (exists (?FAM)
    (and
      (instance ?FAM NuclearFamily)
      (holdsDuring ?T1
        (and
          (member ?CHILD ?FAM)
          (member ?PARENT1 ?FAM)
          (member ?PARENT2 ?FAM))))))

(instance alias BinaryPredicate)
(instance alias AsymmetricRelation)
(domain alias 1 SymbolicString)
(domain alias 2 Agent)

(documentation alias EnglishLanguage "(&%alias ?STRING ?AGENT) means that ?STRING is an
alternate identifier for ?AGENT, and is likely being used to hide or
obscure ?AGENT's true identity.")

(subrelation alias names)

(instance workAddress BinaryPredicate)
(instance workAddress AsymmetricRelation)
(subrelation workAddress postContactSite)
(documentation workAddress EnglishLanguage 
"(&%holdsDuring ?T1 (&%workAddress ?AGENT ?ADDRESS)) means that
during the time specified by ?T1, ?ADDRESS identifies one of the
locations at which ?AGENT works.")
(domain workAddress 1 PostalPlace)
(domain workAddress 2 CognitiveAgent)

(instance homeAddress BinaryPredicate)
(instance homeAddress AsymmetricRelation)
(domain homeAddress 1 PermanentResidence)
(domain homeAddress 2 Human)
(subrelation homeAddress postContactSite)
(documentation homeAddress EnglishLanguage 
"(&%holdsDuring ?T1 (&%homeAddress ?PLACE ?AGENT)) means that
during the time specified by ?T1, the &%PostalPlace ?PLACE is
?AGENT's &%home.")

(instance playsRoleInEvent TernaryPredicate)
(domain playsRoleInEvent 1 Object)
(domain playsRoleInEvent 2 CaseRole)
(domain playsRoleInEvent 3 Process)

(documentation playsRoleInEvent EnglishLanguage 
"(&%playsRoleInEvent ?OBJ ?ROLE ?EVENT) means that the &%Object
?OBJ is involved in the &%Process ?EVENT in a way specified by
the &%CaseRole predicate ?ROLE.")

(=>
  (playsRoleInEvent ?OBJ ?ROLE ?EVENT)
  (?ROLE ?EVENT ?OBJ))

(=>
  (and
    (playsRoleInEvent ?OBJ ?ROLE ?EVENT)
    (subrelation ?ROLE ?ROLE2))
  (playsRoleInEvent ?OBJ ?ROLE2 ?EVENT))

(=>
 (and
   (?ROLE ?EVENT ?OBJ)
   (instance ?ROLE CaseRole)
   (instance ?EVENT Process)
   (instance ?OBJ Object))
 (playsRoleInEvent ?OBJ ?ROLE ?EVENT))

(=>
 (and
   (playsRoleInEvent ?OBJ ?ROLE ?EVENT)
   (instance ?EVENT ?CLASS)
   (subclass ?CLASS Process)
   (time ?EVENT ?TIME)
   (eventLocated ?EVENT ?PLACE))
 (playsRoleInEventOfType ?OBJ ?ROLE ?CLASS ?TIME ?PLACE))

(instance playsRoleInEventOfType QuintaryPredicate)
(domain playsRoleInEventOfType 1 Object)
(domain playsRoleInEventOfType 2 CaseRole)
(domainSubclass playsRoleInEventOfType 3 Process)
(domain playsRoleInEventOfType 4 TimePosition)
(domain playsRoleInEventOfType 5 Object)

(documentation playsRoleInEventOfType EnglishLanguage "(&%playsRoleInEventOfType ?OBJ
?ROLE ?TYPE ?TIME ?PLACE) means that ?OBJ plays the role specified by
?ROLE in an instance of ?TYPE, which occurs at ?TIME and ?PLACE.")

(=>
 (playsRoleInEventOfType ?OBJ ?ROLE ?TYPE ?TIME ?PLACE)
 (exists (?EVENT)
   (and
     (instance ?EVENT ?TYPE)
     (time ?EVENT ?TIME)
     (eventLocated ?EVENT ?PLACE)
     (playsRoleInEvent ?OBJ ?ROLE ?EVENT))))

(=>
 (and
   (playsRoleInEvent ?OBJ ?ROLE ?EVENT)
   (instance ?EVENT ?TYPE)
   (subclass ?TYPE Process)
   (time ?EVENT ?TIME)
   (eventLocated ?EVENT ?PLACE))
 (playsRoleInEventOfType ?OBJ ?ROLE ?TYPE ?TIME ?PLACE))

(instance locatedAtTime TernaryPredicate)
(domain locatedAtTime 1 Object)
(domain locatedAtTime 2 TimePosition)
(domain locatedAtTime 3 Object)

(documentation locatedAtTime
EnglishLanguage "(&%locatedAtTime ?OBJ ?TIME ?PLACE) means
that during the time specified by ?TIME, ?OBJ was in the
location specified by ?PLACE.")

(<=>
 (locatedAtTime ?OBJ ?TIME ?PLACE)
 (holdsDuring ?TIME (located ?OBJ ?PLACE)))

(=> 
  (and
    (playsRoleInEvent ?OBJ ?ROLE ?EVENT)
    (time ?EVENT ?TIME)
    (eventLocated ?EVENT ?PLACE))
  (locatedAtTime ?OBJ ?TIME ?PLACE))


;; NB: This needs more work.  The topic of ID strings, ID objects
;; (e.g., finger prints, DNA sequences) and their use for both
;; identification and deception merits an entire ontology of its own.
;; deceptiveIdentifier
(instance deceptiveIdentifier BinaryPredicate)
(instance deceptiveIdentifier AsymmetricRelation)
(domain deceptiveIdentifier 1 ContentBearingObject)
(domain deceptiveIdentifier 2 Agent)
(subrelation deceptiveIdentifier refers)
(subrelation alias deceptiveIdentifier)

(documentation deceptiveIdentifier EnglishLanguage "(&%deceptiveIdentifier ?OBJ ?AGENT)
means that ?AGENT presents ?OBJ as a representation of ?AGENT's `true'
identity, when in fact it is not.")

(instance stranger BinaryPredicate)

(documentation stranger EnglishLanguage "(&%stranger ?H1
?H2) means that ?H1 has not met ?H2, or, in other
words, (&%not (&%acquaintance ?H1 ?H2)).  Statements made
with &%stranger should be temporally specified with
&%holdsDuring.  Note that &%stranger is not symmetric,
meaning that ?H2 might know ?H1.  For the symmetric version,
see &%mutualStranger.")

(domain stranger 1 Human)
(domain stranger 2 Human)

(disjointRelation stranger acquaintance)

(instance mutualStranger BinaryPredicate)
(instance mutualStranger SymmetricRelation)

(documentation mutualStranger EnglishLanguage "(&%mutualStranger ?H1 ?H2) means that ?H1
and ?H2 have not met each other and do not know each other.  Statements
made with this predicate should be temporally specified with
&%holdsDuring.  See also the weaker, non-symmetric version of this
predicate, &%stranger.")

(domain mutualStranger 1 Human)
(domain mutualStranger 2 Human)
(subrelation mutualStranger stranger)

(disjointRelation mutualStranger mutualAcquaintance)

(instance domesticPartner BinaryPredicate)
(instance domesticPartner SymmetricRelation)
(instance domesticPartner IntentionalRelation)

(documentation domesticPartner EnglishLanguage "(&%holdsDuring ?T1
(&%domesticPartner ?H1 ?H2)) means that during the time ?T1, ?H1
and ?H2 live together and share a common domestic life but are
not joined in a traditional marriage, a common-law marriage, or a
civil union.")

(domain domesticPartner 1 Human)
(domain domesticPartner 2 Human)

(disjointRelation spouse domesticPartner)
(subrelation domesticPartner cohabitant)

(instance legalGuardian BinaryPredicate)
(instance legalGuardian AntisymmetricRelation)

(documentation legalGuardian EnglishLanguage "(&%holdsDuring ?T1 (&%legalGuardian ?H1
?H2)) means that during the time ?T1, ?H2 has legal authority over
?H1, and is responsible for looking after ?H1's interests.")

(domain legalGuardian 1 Human)
(domain legalGuardian 2 Human)

(=>
  (and
    (locatedAtTime ?OBJ ?TIME ?PLACE)
    (geographicSubregion ?PLACE ?REGION))
  (locatedAtTime ?OBJ ?TIME ?REGION))

(subclass Seating Guiding)
(documentation Seating EnglishLanguage "Guiding someone to a &%Seat, e.g. as when an usher 
shows someone to a &%Seat in an &%Auditorium.")

(=>
  (instance ?S Seating)
  (exists (?P ?H)
    (and
      (experiencer ?S ?H)
      (instance ?H Human)
      (destination ?S ?P)
      (instance ?P Seat))))

(subclass Signalling Guiding)
(documentation Signalling EnglishLanguage "Signalling is the subclass of &%Guiding 
processes in which an agent, animate or inanimate, sends a signal to 
another &%Object.  In many cases, this signal will be an electrical or 
electronic one.  Some signals may directly control the behavior of 
the object signalled, while others may merely cause information to be 
presented.  Instances of electrical Signalling are typically more 
complex than simply than operation of a &%DeviceSwitch, though in some 
cases, Signalling involves remote activation of such a switch by another 
device.")

;; Process Types for arrest and transportation

(subclass AchievingControl Guiding)
(documentation AchievingControl EnglishLanguage "&%AchievingControl is the
class of all events in which an &%Agent gains physical
control over some object.")

(instance controlled CaseRole)
(documentation controlled EnglishLanguage
"(&%controlled ?EVENT ?OBJECT) means that during the
&%AchievingControl denoted by ?EVENT, ?OBJECT comes to be
physically controlled by an &%Agent.")
(subrelation controlled patient)
(domain controlled 1 AchievingControl)
(domain controlled 2 Object)

(instance gainsControl CaseRole)
(documentation gainsControl EnglishLanguage
"(&%gainsControl ?EVENT ?AGENT) means that during ?EVENT, ?AGENT
gains control of the &%patient (object).")
(subrelation gainsControl agent)
(domain gainsControl 1 AchievingControl)
(domain gainsControl 2 Agent)

(subclass ChangeOfControl AchievingControl)
(documentation ChangeOfControl EnglishLanguage
"A &%ChangeOfControl is an event in which an &%agent gains
physical control over some object that was previously controlled
by a different &%agent.")

(instance losesControl CaseRole)
(subrelation losesControl experiencer)
(documentation losesControl EnglishLanguage
"(&%losesControl ?EVENT ?AGENT) means that during ?EVENT, ?AGENT
loses physical control of the &%controlled object.")
(domain losesControl 1 ChangeOfControl)
(domain losesControl 2 Agent)

(subclass Capturing ChangeOfControl)
(documentation Capturing EnglishLanguage
"A &%Capturing is a &%ChangeOfControl event in which an &%Agent
gains physical control over another &%Agent.")

(=>
  (and
    (instance ?CAPTURE Capturing)
    (controlled ?CAPTURE ?OBJ))
  (instance ?OBJ Agent))

(subclass PlacingUnderArrest Capturing)
(subclass PlacingUnderArrest LawEnforcement)
(documentation PlacingUnderArrest EnglishLanguage 
"&%PlacingUnderArrest is the class of events in which a
&%CognitiveAgent, typically a law enforcement professional,
legally takes into custody a human or group of humans.")
(subclass PlacingUnderArrest SocialInteraction)
(subclass PlacingUnderArrest LegalAction)

(instance arrested CaseRole)
(documentation arrested EnglishLanguage 
"(&%arrested ?EVENT ?AGENT) means that during ?EVENT, ?AGENT is
taken into custody, typically by a representative of a law
enforcement organization.")
(domain arrested 1 PlacingUnderArrest)
(domain arrested 2 Agent)
(subrelation arrested controlled)

(=>
  (and
    (instance ?ARREST PlacingUnderArrest)
    (agent ?ARREST ?AGENT))
  (instance ?AGENT CognitiveAgent))

(=>
  (arrested ?ARREST ?OBJ)
  (or
    (instance ?OBJ Human)
    (instance ?OBJ GroupOfPeople)))

(=>
  (and
    (instance ?ARREST PlacingUnderArrest)
    (arrested ?ARREST ?AGENT)
    (instance ?AGENT GroupOfPeople)
    (member ?MEMBER ?AGENT))
  (exists (?ARREST1)
    (and
      (instance ?ARREST1 PlacingUnderArrest)
      (arrested ?ARREST1 ?MEMBER)
      (subProcess ?ARREST1 ?ARREST))))

(=>
  (and
    (instance ?PROC Process)
    (eventLocated ?PROC ?LOC)
    (subProcess ?SUB ?PROC))
  (eventLocated ?SUB ?LOC))

(=>
  (and
    (instance ?IMPRISON Imprisoning)
    (detainee ?IMPRISON ?AGENT)
    (instance ?AGENT Human)
    (time ?IMPRISON ?INTERVAL)
    (instance ?INTERVAL TimeInterval))
  (exists (?ARREST ?TIME)
    (and
      (instance ?TIME TimeInterval)
      (time ?ARREST ?TIME)
      (earlier ?TIME ?INTERVAL)
      (instance ?ARREST PlacingUnderArrest)
      (arrested ?ARREST ?AGENT))))



(instance conveyance CaseRole)
(documentation conveyance EnglishLanguage "(&%conveyance ?EVENT ?OBJ) means that
?OBJ is the &%Vehicle or other transportation device used in
?EVENT.")
(subrelation conveyance instrument)
(domain conveyance 1 Transportation)
(domain conveyance 2 TransportationDevice)

(=>
  (and
    (instance ?TRANSPORT Transportation)
    (instrument ?TRANSPORT ?VEHICLE)
    (instance ?VEHICLE RoadVehicle))
  (instance ?TRANSPORT TransportViaRoadVehicle))

(=>
  (and
    (instance ?TRANSPORT TransportViaRoadVehicle)
    (conveyance ?TRANSPORT ?VEHICLE))
  (instance ?VEHICLE RoadVehicle))

(=>
  (instance ?TRANSPORT TransportViaRoadVehicle)
  (exists (?DRIVING)
    (and
      (instance ?DRIVING Driving)
      (subProcess ?TRANSPORT ?DRIVING))))

(=>
  (and
    (instance ?TRANSPORT Transportation)
    (subProcess ?TRANSPORT ?DRIVE)
    (instance ?DRIVE Driving)
    (instrument ?TRANSPORT ?VEHICLE)
    (instance ?VEHICLE TransportationDevice))
  (patient ?DRIVE ?VEHICLE))

(=>
  (and
    (instance ?DRIVE Driving)
    (patient ?DRIVE ?VEHICLE)
    (instance ?VEHICLE RoadVehicle))
  (exists (?TRANSPORT)
    (and 
      (instance ?TRANSPORT TransportViaRoadVehicle)
      (subProcess ?TRANSPORT ?DRIVE))))

(=>
  (and
    (instance ?DRIVING Driving)
    (subProcess ?TRANSPORT ?DRIVING)
    (instance ?TRANSPORT Transportation)
    (agent ?DRIVING ?DRIVER))
  (transported ?TRANSPORT ?DRIVER))

(=>
  (and
    (instance ?DRIVING Driving)
    (subProcess ?TRANSPORT ?DRIVING)
    (instance ?TRANSPORT Transportation)
    (destination ?DRIVING ?DEST))
  (destination ?TRANSPORT ?DEST))

(=>
  (and
    (instance ?DRIVING Driving)
    (subProcess ?TRANSPORT ?DRIVING)
    (instance ?TRANSPORT Transportation)
    (instance ?VEHICLE Vehicle)
    (patient ?DRIVING ?VEHICLE))
  (conveyance ?TRANSPORT ?VEHICLE))

(subclass GasolineEngine InternalCombustionEngine)
(documentation GasolineEngine EnglishLanguage "&%GasolineEngine is the subclass of 
&%InternalCombustionEngines that use &%Gasoline as their resource.")
(=>
  (instance ?R (OperatingFn GasolineEngine))
  (exists (?F)
    (and
      (instance ?F Gasoline)
      (resource ?R ?F))))


(subclass DieselEngine InternalCombustionEngine)
(documentation DieselEngine EnglishLanguage "&%DieselEngine is the subclass of 
&%InternalCombustionEngines that use &%DieselFuel as their resource.")

(=>
  (instance ?P (OperatingFn DieselEngine))
  (exists (?F)
    (and
      (instance ?F DieselFuel)
      (resource ?P ?F))))

(instance typicalPart BinaryPredicate)
(instance typicalPart SpatialRelation)
(relatedInternalConcept typicalPart part)
(documentation typicalPart EnglishLanguage "An instance of the first argument is typically 
found as part of an instance of the second argument.  This is a 
class-level relation roughly corresponding to &%part.  Note that this does 
not imply that such wholes typically have such parts.") 
(domainSubclass typicalPart 1 Object)
(domainSubclass typicalPart 2 Object)

(=>
  (typicalPart ?PART ?WHOLE)
  (exists (?X ?Y)
    (and      
      (instance ?X ?WHOLE)
      (instance ?Y ?PART)
      (part ?Y ?X)))) 

(=>
  (and
    (typicalPart ?PART ?WHOLE)
    (instance ?X ?PART)
    (equal ?PARTPROB
      (ProbabilityFn
        (exists (?Y)
          (and
            (instance ?Y ?WHOLE)
            (part ?X ?Y)))))
    (equal ?NOTPARTPROB
      (ProbabilityFn
        (not
          (exists (?Z)
            (and
              (instance ?Z ?WHOLE)
              (part ?X ?Z)))))))
  (greaterThan ?PARTPROB ?NOTPARTPROB))

(instance typicallyContainsPart BinaryPredicate)
(instance typicallyContainsPart SpatialRelation)
(relatedInternalConcept typicallyContainsPart part)
(documentation typicallyContainsPart EnglishLanguage "An instance of the second argument typically 
contains an instance of the first argument.  This is a 
class-level relation roughly corresponding to &%part.  Note that this does 
not imply that such parts typically have such wholes.") 
(domainSubclass typicallyContainsPart 1 Object)
(domainSubclass typicallyContainsPart 2 Object)

(=>
  (typicallyContainsPart ?PART ?WHOLE)
  (exists (?X ?Y)
    (and      
      (instance ?X ?WHOLE)
      (instance ?Y ?PART)
      (part ?Y ?X)))) 

(=>
  (and
    (typicallyContainsPart ?PART ?WHOLE)
    (instance ?Y ?WHOLE)
    (equal ?PARTPROB
      (ProbabilityFn
        (exists (?X1)
          (and
            (instance ?X1 ?PART)
            (part ?X1 ?Y)))))
    (equal ?NOTPARTPROB
      (ProbabilityFn
        (not
          (exists (?X2)
            (and
              (instance ?X2 ?PART)
              (part ?X2 ?Y)))))))
  (greaterThan ?PARTPROB ?NOTPARTPROB))

(instance initialPart BinaryPredicate)
(instance initialPart SpatialRelation)
(relatedInternalConcept initialPart part)
(documentation initialPart EnglishLanguage "Every instance of the first argument is initially 
found as part of an instance of the second argument, even though it 
might lose that part later in its lifetime.  While the part must initially 
exist as part of a whole, this does not say that each whole necessarily initially  
contains such a part.  For example, a thumb must at some time have been 
part of a hand, but every hand need not have a thumb, even at birth.  This 
is a class-level relation roughly corresponding to &%part.") 

(domainSubclass initialPart 1 Object)
(domainSubclass initialPart 2 Object)

(=>
  (and
    (initialPart ?C2 ?C1)
    (instance ?PART ?C2))
  (exists (?WHOLE)
    (and      
      (instance ?WHOLE ?C1)
      (holdsDuring 
        (BeginFn (WhenFn ?PART))
        (part ?PART ?WHOLE)))))

(initialPart AnimalAnatomicalStructure Animal)

(instance initiallyContainsPart BinaryPredicate)
(instance initiallyContainsPart SpatialRelation)
(relatedInternalConcept initiallyContainsPart part)
(documentation initiallyContainsPart EnglishLanguage "Every instance of the second argument initially 
contains an instance of the first argument, even though it 
might lose that part later in its lifetime.  Every normal human starts life with an
appendix for example.  While the whole must initially 
contain such a part, this does not say that each part necessarily initially  
exists as part of such a whole.   This is a class-level relation roughly 
corresponding to &%part.") 

(domainSubclass initiallyContainsPart 1 Object)
(domainSubclass initiallyContainsPart 2 Object)

(=>
  (and
    (initiallyContainsPart ?C2 ?C1)
    (instance ?WHOLE ?C1))
  (exists (?PART)
    (and      
      (instance ?PART ?C2)
      (holdsDuring (BeginFn (WhenFn ?WHOLE))
      (part ?PART ?WHOLE)))))

(subclass CausingHappiness Process)
(documentation CausingHappiness EnglishLanguage "Any &%Process whose result is that the 
patient of the process is happy.")
(=>
  (and
    (instance ?C CausingHappiness)
    (patient ?C ?P))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?C)) 
    (not 
      (attribute ?P Happiness)))
    (holdsDuring 
      (EndFn (WhenFn ?C)) 
    (attribute ?P Happiness)))) 

(subclass CausingPain CausingUnhappiness)
(documentation CausingPain EnglishLanguage "Any &%Process whose result is that the 
patient of the process is in &%Pain.")

(subclass CausingUnhappiness Process)
(documentation CausingUnhappiness EnglishLanguage "Any &%Process whose result is that the 
patient of the process is unhappy.")
(=>
  (and
    (instance ?C CausingHappiness)
    (patient ?C ?P))
  (and
    (holdsDuring 
      (BeginFn (WhenFn ?C)) 
    (not 
      (attribute ?P Unhappiness)))
    (holdsDuring 
      (EndFn (WhenFn ?C)) 
    (attribute ?P Unhappiness)))) 

(subclass Lengthening Increasing)
(documentation Lengthening EnglishLanguage "&%Increasing the length of something.")

(=>
  (and
    (instance ?L Lengthening)
    (patient ?L ?O))
  (exists (?L1 ?L2)
    (and
      (holdsDuring 
	(BeginFn (WhenFn ?L)) 
	(length ?O ?L1))
      (holdsDuring 
	(EndFn (WhenFn ?L)) 
	(length ?O ?L2))
      (greaterThan ?L2 ?L1))))

(subclass Saving Increasing)
(documentation Saving EnglishLanguage "Any instance of &%Increasing where the &%PhysicalQuantity 
involved is a &%CurrencyMeasure.  This includes saving in a financial account
as well as stuffing gold bars under the matress, or a squirrel saving nuts
for winter.")

(=>
  (and
    (instance ?S Saving)
    (patient ?S ?O)
    (agent ?S ?A))
  (exists (?Q1 ?Q2)
    (and
      (holdsDuring 
        (BeginFn (WhenFn ?S)) 
	(monetaryValue ?O ?Q1))
      (holdsDuring 
        (EndFn (WhenFn ?S)) 
	(monetaryValue ?O ?Q2))
      (possesses ?A ?O)
      (lessThan ?Q1 ?Q2))))

(documentation financialAsset EnglishLanguage "A predicate that relates an &%Agent to any 
item of economic value owned by the &%Agent.  Examples of financial assets 
are cash, securities, accounts receivable, inventory, office equipment, a 
house, a car, and other property.")
(domain financialAsset 1 Agent)
(domain financialAsset 2 Object)
(subrelation financialAsset possesses)

(=>
  (financialAsset ?P ?A)
  (exists (?V)
    (monetaryValue ?A ?V)))

(subclass Barking RadiatingSound)
(documentation Barking EnglishLanguage "Any instance of &%RadiatingSound which is produced 
by a &%Canine.")
(=>
  (instance ?B Barking)
  (exists (?D)
    (and
      (instance ?D Canine)
      (agent ?B ?D))))

(subclass Menstruation OrganOrTissueProcess)
(documentation Menstruation EnglishLanguage "A periodic discharge of &%Blood and other 
&%BiologicalSubstances by &%Females that is part of a readjustment of 
the uterus.")

(subclass Organification OrganOrTissueProcess)
(documentation Organification EnglishLanguage "Any &%BiologicalProcess that results in 
the formation of an &%Organ.")

(=>
   (instance ?P Organification)
   (exists (?O)
      (and
         (instance ?O Organ)
         (result ?P ?O))))

(subclass BiologicalConception OrganOrTissueProcess)
(relatedInternalConcept BiologicalConception SexualReproduction)
(relatedInternalConcept BiologicalConception Birth)
(relatedInternalConcept BiologicalConception Mating)
(documentation BiologicalConception EnglishLanguage "The production of a zygote from the fusion 
of a male and female gamete.")
(=>
  (instance ?SR SexualReproduction)
  (exists (?C)
    (and
      (instance ?C BiologicalConception)
      (subProcess ?C ?SR))))

(subclass ContraceptiveDevice Device)
(documentation ContraceptiveDevice EnglishLanguage "&%Devices which permit sexual intercourse but 
which reduce the likelihood of conception.")
(=>
  (instance ?C ContraceptiveDevice)
  (hasPurpose ?C
    (exists (?M)
      (and
        (instance ?M Mating)
        (patient ?M ?C)
        (not
          (exists (?SR)
            (and
              (instance ?SR BiologicalConception)
              (result ?M ?SR))))))))

(subclass BirdEgg Egg)
(documentation BirdEgg EnglishLanguage "Any &%Egg that is produced by a &%Bird.")
(=>
  (instance ?E BirdEgg)
  (exists (?SR ?B)
    (and
      (instance ?SR SexualReproduction)
      (agent ?SR ?B)
      (instance ?B Bird)
      (result ?SR ?E))))

(subclass Biopsy DiagnosticProcess)
(subclass Biopsy Removing)
(documentation Biopsy EnglishLanguage "Any &%DiagnosticProcess which involves the examination of 
&%BodySubstances taken from a living &%Organism.")
(=>
  (and
    (instance ?B Biopsy)
    (patient ?B ?BS))
  (instance ?BS BodySubstance))

(subclass Mating OrganismProcess)
(documentation Mating EnglishLanguage "Any process of sexual intercourse between two &%Humans 
or &%Animals.")

(subclass Raping Mating)
(subclass Raping CriminalAction)
(documentation Raping EnglishLanguage "Any instance of &%Mating where one participant does not 
consent.  This is limited to acts between &%Humans.")

(=>
  (instance ?R Raping)
  (exists (?A)
    (and
      (experiencer ?R ?A)
      (not 
        (wants ?A ?R)))))

(subclass LayingEggs OrganismProcess)
(documentation LayingEggs EnglishLanguage "Any &%OrganismProcess where an &%Egg is expelled 
from the body of a &%Animal, e.g. a &%Bird or &%Reptile laying eggs.")

(=>
  (and
    (instance ?L LayingEggs)
    (experiencer ?L ?A))
  (exists (?E)
    (and
      (instance ?E Egg)
      (patient ?L ?E)
      (holdsDuring 
        (BeginFn (WhenFn ?L)) 
	(part ?E ?A))
      (holdsDuring 
        (EndFn (WhenFn ?L)) 
	(not (part ?E ?A)))))) 

(=>
  (and
    (instance ?L LayingEggs)
    (experiencer ?L ?A))
  (and
    (instance ?A Animal)
    (attribute ?A Female)))

(instance affiliatedOrganization BinaryPredicate)
(domain affiliatedOrganization 1 Organization)
(domain affiliatedOrganization 2 Organization)

(documentation ideologicalAffiliationOfOrganization EnglishLanguage "(ideologicalAffiliationOfOrganization 
?ORG ?GOV) means that one of the goals of ?ORG is to realize the &%FormOfGovernment ?GOV.")
(instance ideologicalAffiliationOfOrganization BinaryPredicate)
(domain ideologicalAffiliationOfOrganization 1 Organization)
(domain ideologicalAffiliationOfOrganization 2 FormOfGovernment)

(documentation religiousAffiliationOfOrganization EnglishLanguage "(religiousAffiliationOfOrganization 
?ORG ?BELIEF) means that one of the goals of ?ORG is to advance the religious teachings 
of the &%BeliefGroup ?BELIEF.")
(instance religiousAffiliationOfOrganization BinaryPredicate)
(domain religiousAffiliationOfOrganization 1 Organization)
(domain religiousAffiliationOfOrganization 2 BeliefGroup)

(documentation allegiance EnglishLanguage "(allegiance ?AGENT ?ENTITY) means that the &%CognitiveAgent 
?AGENT owes its allegiance to the political entity ?ENTITY.")
(instance allegiance BinaryPredicate)
(domain allegiance 1 CognitiveAgent)
(domain allegiance 2 CognitiveAgent)

(documentation ancestorOrganization EnglishLanguage "(ancestorOrganization ?ORG1 ?ORG2) means that 
the &%Organization ?ORG1 descended from the &%Organization ?ORG2.")
(instance ancestorOrganization BinaryPredicate)
(instance ancestorOrganization TransitiveRelation)
(instance ancestorOrganization IrreflexiveRelation)
(domain ancestorOrganization 1 Organization)
(domain ancestorOrganization 2 Organization)
(disjointRelation ancestorOrganization subOrganization)

(documentation anniversary EnglishLanguage "(anniversary ?PHYSICAL ?TIME) means that 
?TIME is the class of TimeIntervals which mark the anniversary of 
?PHYSICAL.  For example, (anniversary Christmas (&%DayFn 35 &%December)) 
means that Christmas is celebrated each year on the 25th of &%December.")
(instance anniversary BinaryPredicate)
(instance anniversary TemporalRelation)
(domain anniversary 1 Physical)
(domain anniversary 2 TimeInterval)

(documentation birthday EnglishLanguage "(birthday ?PERSON ?DAY) means that ?DAY is the 
anniversary each year of the birth of ?PERSON.  For example, (birthday 
&%WilliamJeffersonClinton (&%DayFn 19 &%August)) means that Bill Clinton's 
birthday is &%August 19th.")
(instance birthday BinaryPredicate)
(domain birthday 1 Human)
(domain birthday 2 Day)
(subrelation birthday anniversary)

(documentation birthplace EnglishLanguage "(birthplace
?INDIV ?PLACE) means that the &%Animal ?INDIV was born at
the location ?PLACE.  The location may be a geographic area
or a building, such as a hospital.")
(instance birthplace BinaryPredicate)
(domain birthplace 1 Animal)
(domain birthplace 2 Object)

(=>
  (birthplace ?INDIV ?PLACE)
  (exists (?BIRTH)
    (and
      (instance ?BIRTH Birth)
      (experiencer ?BIRTH ?INDIV)
      (eventLocated ?BIRTH ?PLACE))))

(documentation birthdate EnglishLanguage "(birthdate ?PERSON ?DAY) means that ?DAY is the 
&%Day on which the ?PERSON was born.")
(instance birthdate BinaryPredicate)
(domain birthdate 1 Human)
(domain birthdate 2 Day)
(=>
  (birthdate ?P ?D)
  (exists (?B)
    (and
      (instance ?B Birth)
      (experiencer ?B ?P)
      (date ?B ?D))))

(documentation deathdate EnglishLanguage "(birthdate ?PERSON ?DAY) means that ?DAY is the 
&%Day on which the ?PERSON died.")
(domain deathdate 1 Human)
(domain deathdate 2 Day)
(instance deathdate BinaryPredicate)

(=>
  (deathdate ?P ?T)
  (exists (?D)
    (and
      (instance ?D Death)
      (experiencer ?D ?P)
      (date ?D ?T))))

(documentation deathplace EnglishLanguage "(deathplace
?INDIV ?PLACE) means that the &%Animal ?INDIV died at the
location ?PLACE.  The location may be a geographic area or a
building, such as a hospital.")
(instance deathplace BinaryPredicate)
(domain deathplace 1 Animal)
(domain deathplace 2 Object)
(=>
  (deathplace ?P ?L)
  (exists (?D)
    (and
      (instance ?D Death)
      (experiencer ?D ?P)
      (eventLocated ?D ?L))))

(instance equipmentCount TernaryPredicate)
(domain equipmentCount 1 Object)
(domainSubclass equipmentCount 2 Device)
(domain equipmentCount 3 Quantity)

(documentation equipmentCount EnglishLanguage 
"(&%equipmentCount ?OBJECT ?TYPE ?QUANTITY) means that ?OBJECT 
is equipped with devices of the type ?TYPE, in the number ?QUANTITY.  
Equipment associated with an ?OBJECT may be a &%component of ?OBJECT 
(such as the emergency oxygen system built into passenger jets) or it may 
be a device simply located on or with ?OBJECT (such as a first aid kit).")

(documentation equipmentType EnglishLanguage "(equipmentType ?THING ?TYPE) means that 
the &%Artifact ?THING has a component or attachment of &%Device ?TYPE. 
See also &%equipmentTypeCount.")
(instance equipmentType BinaryPredicate)
(domain equipmentType 1 Artifact)
(domain equipmentType 2 Device)

(=>
  (equipmentType ?O ?T)
  (exists (?D)
    (and 
      (instance ?D ?T)
      (or 
        (part ?D ?O)
        (connected ?D ?O)))))

(=>
  (equipmentCount ?O ?T ?C)
  (equipmentType ?O ?T))

(=>
  (equipmentType ?O ?T)
  (exists (?C)
    (and
      (greaterThanOrEqualTo ?C 1)
      (equipmentCount ?O ?T ?C))))

(documentation grammaticalRelation EnglishLanguage "(grammaticalRelation ?PHRASE ?SENTENCE) 
means that the &%Phrase ?PHRASE has a grammatical relation to the Sentence 
?SENTENCE, i.e. it is a subject, object, main verb, etc. of the ?SENTENCE.")
(instance grammaticalRelation BinaryPredicate)
(domain grammaticalRelation 1 Phrase)
(domain grammaticalRelation 2 Sentence)

;; KJN: Moving this to Transportation.kif as TransitSystem is defined there
;;(documentation pathInSystem EnglishLanguage "(pathInSystem ?PATH ?SYSTEM) means that 
;;the &%Physical thing ?PATH consists of one or more connected routes in 
;;the &%PhysicalSystem ?SYSTEM.")
;;(instance pathInSystem BinaryPredicate)
;;(domain pathInSystem 1 Transitway)
;;(domain pathInSystem 2 TransitSystem)
;;(subrelation pathInSystem part)

;;(=>
;;  (pathInSystem ?P ?S)
;;  (or
;;    (routeInSystem ?P ?S)
;;    (exists (?R1 ?R2)
;;      (and
;;        (routeInSystem ?R1 ?S)
;;        (routeInSystem ?R2 ?S)
;;        (part ?R1 ?P)
;;        (part ?R2 ?P)
;;        (connected ?R1 ?R2)))))

(instance distanceOnPath BinaryPredicate)
(documentation distanceOnPath EnglishLanguage
"(distanceOnPath ?DIST ?PATH) means that for a given path (which is a
pathInSystem) that the distance of the route is the measurement ?DIST.")
(domain distanceOnPath 1 ConstantQuantity)
(domain distanceOnPath 2 Transitway)

;; KJN: Moving this to Transportation.kif as TransitSystem is defined there
;;(documentation routeInSystem EnglishLanguage "(routeInSystem ?PART ?SYSTEM) means that 
;;the &%Transitway ?PART is an established route of the 
;;&%TransportationSystem ?SYSTEM.")
;;(instance routeInSystem BinaryPredicate)
;;(domain routeInSystem 1 Transitway)
;;(domain routeInSystem 2 TransitSystem)
;;(subrelation routeInSystem pathInSystem)

;;(=>
;;  (and
;;    (subSystem ?S ?T)
;;  (routeInSystem ?P ?S))
;;  (routeInSystem ?P ?T))


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Start: General relations on SymbolicStrings ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(instance inString BinaryPredicate)
(domain inString 1 Character)
(domain inString 2 SymbolicString)
(documentation inString EnglishLanguage "(&%inString ?&%Character
?&%SymbolicString) means that ?&%Character is &%part of
?&%SymbolicString.  See also &%subString.")
(subrelation inString part)

;; NS: Narrowing part -> inString
(=>
  (and
    (instance ?STRING SymbolicString)
    (part ?CHAR ?STRING)
    (instance ?CHAR Character))
  (inString ?CHAR ?STRING))

;; NS: TO DO: create *NullString, by anaolgy with NullList.  A
;; (or, the) NullString is a SymbolicString comprising no
;; Characters.  The following rule in Merge.kif, which relates
;; SymbolicString to Character, will have to be changed if
;; NullString is to be a subclass of SymbolicString:
;;
;; (=>
;;     (instance ?STRING SymbolicString)
;;     (exists (?PART)
;;         (and
;;             (part ?PART ?STRING)
;;             (instance ?PART Character))))

(instance subString AntisymmetricRelation)
(instance subString ReflexiveRelation)
(instance subString BinaryPredicate)
(domain subString 1 SymbolicString)
(domain subString 2 SymbolicString)
(documentation subString EnglishLanguage "(&%subString
?&%SymbolicString-1 ?&%SymbolicString-2) means that
?&%SymbolicString-1 is &%part of ?&%SymbolicString-2.
?&%SymbolicString-2 includes all the same &%Characters as
?&%SymbolicString-1 and in the same order, but
?&%SymbolicString-2 may include more &%Characters than
?&%SymbolicString-1.  See also &%inString.")
(subrelation subString part)

(=>
  (and
    (subString ?S1 ?S2)
    (equal ?L1 (StringLengthFn ?S1))
    (equal ?L2 (StringLengthFn ?S2)))
  (lessThanOrEqualTo ?L1 ?L2))

(=>
  (and
    (subString ?S1 ?S2)
    (inString ?CH ?S1))
  (inString ?CH ?S2))
;; NS: Note that character and string equality vs. identity might
;; be implementation issues.

(instance SubstringFn TernaryFunction)
(instance SubstringFn PartialValuedRelation)
(instance SubstringFn SingleValuedRelation)
(domain SubstringFn 1 SymbolicString)
(domain SubstringFn 2 NonnegativeInteger)
(domain SubstringFn 3 NonnegativeInteger)
(range SubstringFn SymbolicString)
(documentation SubstringFn EnglishLanguage "(&%SubstringFn
?&%SymbolicString ?&%NonnegativeInteger-1
?&%NonnegativeInteger-2) denotes a string that is a &%subString
of ?&%SymbolicString, begins with the &%Character at the index
?&%NonnegativeInteger-1, and ends with the &%Character at the
index (&%SubtractionFn ?&%NonnegativeInteger-2 1).  The first
&%Character in ?&%SymbolicString is denoted by the index 0.  If
the value of ?&%NonnegativeInteger-1 or ?&%NonnegativeInteger-2
is greater than the value of (&%StringLengthFn
?&%SymbolicString), or if ?&%NonnegativeInteger-1 is greater than
?&%NonnegativeInteger-2, the result of evaluating the
&%SubstringFn expression is undefined.  Example: (&%equal
&quot;Charle&quot; (&%SubstringFn &quot;Charles Darwin&quot; 0 6)).")

(=>
  (and
    (equal ?SUB (SubstringFn ?STRING ?START ?END))
    (equal ?LEN (StringLengthFn ?STRING)))
  (and
    (lessThanOrEqualTo ?START ?END)
    (lessThan ?START ?LEN)
    (lessThanOrEqualTo ?END ?LEN)))

(instance StringLengthFn UnaryFunction)
(instance StringLengthFn TotalValuedRelation)
(instance StringLengthFn SingleValuedRelation)
(domain StringLengthFn 1 SymbolicString)
(range StringLengthFn NonnegativeInteger)
(documentation StringLengthFn EnglishLanguage "This
&%UnaryFunction takes a &%SymbolicString as its sole argument.
The result of evaluating a term formed with &%StringLengthFn is a
&%NonnegativeInteger that denotes the number of &%Characters in
the &%SymbolicString.  Example: (&%equal 14 (&%StringLengthFn
&quot;Charles Darwin&quot;)).")

(instance stringLength BinaryPredicate)
(instance stringLength TotalValuedRelation)
(instance stringLength SingleValuedRelation)
(instance stringLength AsymmetricRelation)
(domain stringLength 1 NonnegativeInteger)
(domain stringLength 2 SymbolicString)
(documentation stringLength EnglishLanguage "(&%stringLength
?&%NonnegativeInteger ?&%SymbolicString) means that the number of
&%Characters in ?&%SymbolicString is ?&%NonnegativeInteger.
Example: (&%stringLength 14 &quot;Charles Darwin&quot;), which is a
&%True &%Sentence.")

(<=>
  (stringLength ?INT ?STRING)
  (equal ?INT (StringLengthFn ?STRING)))

(instance StringConcatenateFn BinaryFunction)
(instance StringConcatenateFn TotalValuedRelation)
(instance StringConcatenateFn SingleValuedRelation)
(domain StringConcatenateFn 1 SymbolicString)
(domain StringConcatenateFn 2 SymbolicString)
(range StringConcatenateFn SymbolicString)
(documentation StringConcatenateFn EnglishLanguage "The result of
applying this &%Function to two &%SymbolicString arguments is a
third &%SymbolicString that is the concatenation of the two
arguments.  Example: (&%equal &quot;Charles
Darwin&quot; (&%StringConcatenateFn &quot;Charles &quot; &quot;Darwin&quot;)).")

(instance stringConcatenation TernaryPredicate)
(instance stringConcatenation TotalValuedRelation)
(instance stringConcatenation SingleValuedRelation)
(domain stringConcatenation 1 SymbolicString)
(domain stringConcatenation 2 SymbolicString)
(domain stringConcatenation 3 SymbolicString)
(documentation stringConcatenation
EnglishLanguage "(&%stringConcatenation ?&%SymbolicString-1
?&%SymbolicString-2 ?&%SymbolicString-3) means that
?&%SymbolicString-3 can be formed by appending
?&%SymbolicString-1 and ?&%SymbolicString-2, in order.
Example: (&%stringConcatenation &quot;Charles &quot; &quot;Darwin&quot; &quot;Charles
Darwin&quot;) is a &%True &%Sentence.")

(<=>
  (stringConcatenation ?S1 ?S1 ?S3)
  (equal ?S3 (StringConcatenateFn ?S1 ?S2)))

(instance precedesInString TernaryPredicate)
(domain precedesInString 1 SymbolicString)
(domain precedesInString 2 SymbolicString)
(domain precedesInString 3 SymbolicString)
(documentation precedesInString
EnglishLanguage "(&%precedesInString ?&%SymbolicString-1
?&%SymbolicString-2 ?&%SymbolicString-3) means that
?&%SymbolicString-1 and ?&%SymbolicString-2 are &%subStrings of
?&%SymbolicString-3, and ?&%SymbolicString-1 occurs sequentially
before ?&%SymbolicString-2 in ?&%SymbolicString-3.
Example: (&%precedesInString &quot;Johann&quot; &quot;Bach&quot; &quot;Johann
Sebastian Bach&quot;).")
(subrelation stringConcatenation precedesInString)

(=>
  (precedesInString ?S1 ?S2 ?S3)
  (and
    (subString ?S1 ?S3)
    (subString ?S2 ?S3)))

(=>
  (and
    (precedesInString ?S1 ?S2 ?S4)
    (precedesInString ?S2 ?S3 ?S4))
  (precedesInString ?S1 ?S3 ?S4))  
  
  
;; --------------------------------------------------------------------------------
;; Address and Telephone details adapted from Media.kif
;; --------------------------------------------------------------------------------
 
 ;;;;;;;;;;;;;;;;;;;;;;;;
;; Start: Identifiers ;;
;;;;;;;;;;;;;;;;;;;;;;;;

;; "IdentifierComposite"
;; "IdentifierSyntaxMismatch"
;; "IdentifierType"

(subclass Descriptor ContentBearingObject)

;; "DescriptorComposite"
;; "DescriptorDesignation"
;; "DescriptorExtension"
;; "DescriptorSyntax"
;; "DescriptorType"

(subclass Name Descriptor)
(documentation Name EnglishLanguage "&%Name denotes the &%Class
of &%ContentBearingObjects that identify an &%Entity, typically
in some linguistic form such as an epithet, given name, street
address, etc.")

(subclass Identifier Name)
(documentation Identifier EnglishLanguage "&%Identifier is the
&%Class of &%ContentBearingObjects that identify some entity,
such as a bank account, a person, or a location (e.g., as
identified by a specific street address or GPS coordinates),
perhaps uniquely under some circumstances.")

(subclass PlaceDescriptor Descriptor)
(subclass DescriptorPart ContentBearingObject)
(subclass NamePart DescriptorPart)
(subclass IdentifierPart NamePart)

(subclass PlaceID PlaceDescriptor)

(subclass LocalizablePlaceID PlaceID)

(subclass PlaceAddress PlaceID)

(subclass ContactSite Object)
(documentation ContactSite EnglishLanguage "A &%ContactSite is an
&%Object, typically a &%Place or a &%Residence or a
&%CommunicationDevice such as a &%Telephone, that has some kind
of address identifier and can serve as a point of contact for a
&%Human or &%Organization.")

(subclass TelephonyDevice ContactSite)
(subclass TelephonyDevice CommunicationDevice)
(subclass TelephonyDevice ElectricDevice)
(documentation TelephonyDevice EnglishLanguage "A
&%TelephonyDevice is a &%CommunicationDevice that, when connected
to a &%TelephoneSystem, functions as an access point allowing end
users (&%Humans or other &%Agents, such as autonomous/scheduled
&%ComputerPrograms) to send or receive signals via the system.
&%Telephones and &%FaxMachines are &%TelephonyDevices.  A given
&%Computer may or may not function as a &%TelephonyDevice,
depending on the &%ComputerPrograms it runs and the
&%ComputerComponents that are part of it.")

(subclass Telephone TelephonyDevice)

;; KJN: Moving to Merge.kif
;;(subclass LocalizablePlace GeographicArea)

;; Address Elements (as collected from http://www.bitboost.com/ref/international-address-formats.html)
;; a.) Street Number (can contain letters) --> postStreetNumber from Media.kif
;; b.) Floor Code (can contain letters) --> floorCode
;; c.) Unit Number (can contain letters) --> unitNumber
;; d.) Street Name --> postStreet
;; e.) Subdivision / Neighborhood / Quarter --> postNeighborhood
;; f.) City --> postCity
;; g.) State / Territory --> postDistrict
;; h.) Country --> postCountry
;; i.) Post Office Box Number --> postPostOfficeBox
;; j.) Building Name --> names
;; k.) Province Code --> codeMapping
;; l.) Postal Code (can contain letters) --> postPostcodeArea

;; changed canonicalPostPlaceName to canonicalPlaceName to denote that this can be 
;; applied to different types of areas (countries, continents, etc) and not only to 
;; LocalizablePlace.  Also, canonicalPostPlaceName has domain LocalizablePlace but 
;; it is applied to geographic areas that aren't subclassed or instantiated from 
;; LocalizablePlace
(instance canonicalPlaceName TernaryPredicate)
(documentation canonicalPlaceName EnglishLanguage "(&%canonicalPlaceName ?PLACE 
?LANG ?STRING) means that in the &%Language ?LANG, the &%SymbolicString ?STRING 
is a canonical name for the &%GeographicArea ?PLACE")
(domain canonicalPlaceName 1 Region)
(domain canonicalPlaceName 2 Language)
(domain canonicalPlaceName 3 SymbolicString)

(=>
  (canonicalPlaceName ?PLACE ?LANG ?STR)
  (names ?STR ?PLACE))

;; KJN: Removing this statement as it is tantamount to saying that all Stationary
;; Artifacts are also GeographicArea, which is false
;;(subclass StationaryArtifact LocalizablePlace)

(subclass PostalPlace StationaryArtifact)
(subclass PostalPlace LocalizablePlace)
(subclass PostalPlace ContactSite)
(documentation PostalPlace EnglishLanguage "A &%PostalPlace is
any &%LocalizablePlace that can have a postal address, and to
which hardcopy mail (letters, packages, etc.) can be delivered.")

(subclass MilitaryInstallation PostalPlace)
(subclass Residence PostalPlace)
(subclass PlaceOfCommerce PostalPlace)

(instance siteForContact AsymmetricRelation)
(instance siteForContact BinaryPredicate)
(domain siteForContact 1 ContactSite)
(domain siteForContact 2 Agent)
(documentation siteForContact EnglishLanguage "(&%siteForContact
?&%ContactSite ?&%Agent) means that the &%Human or &%Organization
?&%Agent can be reached at or via the point of contact
?&%ContactSite.")

(instance postContactSite AsymmetricRelation)
(instance postContactSite BinaryPredicate)
(domain postContactSite 1 PostalPlace)
(domain postContactSite 2 Agent)
(documentation postContactSite
EnglishLanguage "(&%postContactSite ?&%PostalPlace ?&%Agent)
means that the &%Human or &%Organization ?&%Agent can be
contacted by post (mail) at the location ?&%PostalPlace.")
(subrelation postContactSite siteForContact)

(instance unitNumber BinaryPredicate)
(documentation unitNumber EnglishLanguage "(&%unitNumber ?STR ?PLACE) means that 
?STR represents the particular unit or space within the building that a 
&%PostalPlace is located")
(domain unitNumber 1 SymbolicString)
(domain unitNumber 2 PostalPlace)

(instance floorCode BinaryPredicate)
(documentation floorCode EnglishLanguage "(&%floorCode ?STR ?PLACE) means that ?STR 
represents the &%BuildingLevel that a particular &%PostalPlace can be found at")
(domain floorCode 1 SymbolicString)
(domain floorCode 2 PostalPlace)

(=>
  (and
    (unitNumber ?UNITSTR ?PLACE)
    (floorCode ?FLRCODE ?PLACE))
  (exists (?UNIT ?FLOOR)
    (and
      (instance ?FLOOR BuildingLevel)
      (instance ?UNIT Room)
      (located ?UNIT ?FLOOR)
      (part ?FLOOR ?PLACE)
      (names ?UNITSTR ?UNIT)
      (names ?FLRCODE ?FLOOR))))

(=>
  (and
    (unitNumber ?UNITSTR ?PLACE)
    (not 
      (exists (?FLR)
        (floorCode ?FLR ?PLACE))))
  (exists (?UNIT)
    (and
      (instance ?UNIT Room)
      (names ?UNITSTR ?UNIT)
      (located ?UNIT ?BLDG))))

(subclass Neighborhood GeographicArea)
(documentation Neighborhood EnglishLanguage "&%Neighborhood refers to a 
&%GeographicArea that is a subregion of a larger geographic area, such as a 
&%City, normally with a distinctive feature")
(termFormat EnglishLanguage Neighborhood "neighborhood")

(=>
  (instance ?PLACE Neighborhood)
  (exists (?AREA)
    (geographicSubregion ?PLACE ?AREA)))
      
(instance postNeighborhood BinaryPredicate)
(instance postNeighborhood AsymmetricRelation)
(subrelation postNeighborhood located)
(documentation postNeighborhood EnglishLanguage "(&%postNeighborhood ?PLACE 
?NEIGHBORHOOD) means that ?PLACE is located in ?NEIGHBORHOOD")
(domain postNeighborhood 1 PostalPlace)
(domain postNeighborhood 2 Neighborhood)

(<=>
  (and
    (located ?PLACE ?GEO)
    (instance ?PLACE PostalPlace)
    (instance ?GEO Neighborhood))
  (postNeighborhood ?PLACE ?GEO))

(=>
  (and
    (postNeighborhood ?PLACE ?NEIGHBORHOOD)
    (geographicSubregion ?NEIGHBORHOOD ?CITY)
    (instance ?CITY City))
  (postCity ?PLACE ?CITY))
  
(=>
  (and
    (postNeighborhood ?PLACE ?NEIGHBORHOOD)
    (geographicSubregion ?NEIGHBORHOOD ?STATE)
    (instance ?STATE StateOrProvince))
  (postDistrict ?PLACE ?STATE))    

(instance postCountry AsymmetricRelation)
(instance postCountry BinaryPredicate)
(domain postCountry 1 PostalPlace)
(domain postCountry 2 GeopoliticalArea)
(subrelation postCountry located)
(documentation postCountry EnglishLanguage "(&%postCountry
?&%PostalPlace ?&%GeopoliticalArea) means that ?&%PostalPlace is
located in the &%Nation or &%DependencyOrSpecialSovereigntyArea
?&%GeopoliticalArea.")

(=>
  (postCountry ?PLACE ?COUNTRY)
  (or
    (instance ?COUNTRY Nation)
    (instance ?COUNTRY DependencyOrSpecialSovereigntyArea)))

(<=>
  (and
    (located ?PLACE ?GEO)
    (instance ?PLACE PostalPlace)
    (or
      (instance ?GEO Nation)
      (instance ?GEO DependencyOrSpecialSovereigntyArea)))
  (postCountry ?PLACE ?GEO))

(=>
  (and
    (postCity ?PLACE ?CITY)
    (geographicSubregion ?CITY ?AREA)
    (instance ?AREA StateOrProvince))
  (postDistrict ?PLACE ?AREA))

(=>
  (and
    (postCity ?PLACE ?CITY)
    (geographicSubregion ?CITY ?AREA)
    (or
      (instance ?AREA Nation)
      (instance ?AREA DependencyOrSpecialSovereigntyArea)))
  (postCountry ?PLACE ?AREA))
  
(instance postDistrict AsymmetricRelation)
(instance postDistrict BinaryPredicate)
(domain postDistrict 1 PostalPlace)
(domain postDistrict 2 StateOrProvince)
(subrelation postDistrict located)
(documentation postDistrict EnglishLanguage "(&%postDistrict
?&%PostalPlace ?&%StateOrProvince) means that ?&%PostalPlace is
located in ?&%StateOrProvince.")

(<=>
  (and
    (located ?PLACE ?GEO)
    (instance ?PLACE PostalPlace)
    (instance ?GEO StateOrProvince))
  (postDistrict ?PLACE ?GEO))

(instance postCity AsymmetricRelation)
(instance postCity BinaryPredicate)
(domain postCity 1 PostalPlace)
(domain postCity 2 City)
(subrelation postCity located)
(documentation postCity EnglishLanguage "(&%postCity
?&%PostalPlace ?&%City) means that ?&%PostalPlace is located in
?&%City.")

(<=>
  (and
    (located ?PLACE ?GEO)
    (instance ?PLACE PostalPlace)
    (instance ?GEO City))
  (postCity ?PLACE ?GEO))
  
(subclass PostcodeArea LocalizablePlace)
(documentation PostcodeArea EnglishLanguage "An &%instance of
&%PostcodeArea is a &%LocalizablePlace that is identified by a
&%Postcode.")

(=>
  (instance ?AREA PostcodeArea)
  (exists (?GEO)
    (geographicSubregion ?AREA ?GEO)))

(instance postPostcodeArea AsymmetricRelation)
(instance postPostcodeArea BinaryPredicate)
(domain postPostcodeArea 1 PostalPlace)
(domain postPostcodeArea 2 PostcodeArea)
(subrelation postPostcodeArea located)
(documentation postPostcodeArea
EnglishLanguage "(&%postPostcodeArea ?&%PostalPlace
?&%PostcodeArea) means that ?&%PostalPlace is located in
?&%PostcodeArea.")

(<=>
  (and
    (located ?PLACE ?AREA)
    (instance ?PLACE PostalPlace)
    (instance ?AREA PostcodeArea))
  (postPostcodeArea ?PLACE ?AREA))

(=>
  (and
    (postPostcodeArea ?PLACE ?AREA)
    (geographicSubregion ?AREA ?CITY)
    (instance ?CITY City))
  (postCity ?PLACE ?CITY))

(=>
  (and
    (postPostcodeArea ?PLACE ?AREA)
    (geographicSubregion ?AREA ?GEO)
    (instance ?GEO StateOrProvince))
  (postDistrict ?PLACE ?GEO))
  
(instance postStreet AsymmetricRelation)
(instance postStreet BinaryPredicate)
(domain postStreet 1 PostalPlace)
(domain postStreet 2 Roadway)
(documentation postStreet EnglishLanguage "(&%postStreet
?&%PostalPlace ?&%Roadway) means that ?&%PostalPlace is
&%Adjacent to ?&%Roadway.")

(=>
  (postStreet ?POSTPLACE ?ROADWAY)
  (orientation ?POSTPLACE ?ROADWAY Adjacent))

(instance postStreetNumber AsymmetricRelation)
(instance postStreetNumber BinaryPredicate)
(domain postStreetNumber 1 SymbolicString)
(domain postStreetNumber 2 PostalPlace)
(documentation postStreetNumber
EnglishLanguage "(&%postStreetNumber ?&%SymbolicString
?&%PostalPlace) means that ?&%SymbolicString identifies the
sub-city block or building level location of a ?&%PostalPlace.
?&%SymbolicString need not consist exclusively of
&%DigitCharacters.")

(instance postPostOfficeBox AsymmetricRelation)
(instance postPostOfficeBox BinaryPredicate)
(domain postPostOfficeBox 1 SymbolicString)
(domain postPostOfficeBox 2 PostalPlace)
(documentation postPostOfficeBox
EnglishLanguage "(&%postPostOfficeBox ?&%SymbolicString
?&%PostalPlace) means that ?&%SymbolicString identifies the post
office box of a ?&%PostalPlace.  ?&%SymbolicString need not
consist exclusively of &%DigitCharacters.")

(subclass PostalAddressText PlaceAddress)
(subclass PostalAddressText LocalizablePlaceID)
(subclass PostalAddressText SymbolicString)
(subclass PostalAddressText LinguisticExpression)

;; KJN: Commenting this out for now to remove dependencies.  Might be good to have a
;; file that's AddressFormats.kif wherein we could put the different AddressText formats
;; for different Nations.
;;(=>
;;  (and
;;    (postCountry ?PLACE UnitedStates)
;;    (canonicalPlaceName UnitedStates EnglishLanguage ?COUNTRYSTR)
;;    (postPostcodeArea ?PLACE ?POST)
;;    (names ?POST ?POSTSTR)
;;    (postDistrict ?PLACE ?STATE)
;;    (canonicalPlaceName ?STATE EnglishLanguage ?STATESTR)
;;    (postCity ?PLACE ?CITY)
;;    (canonicalPlaceName ?CITY EnglishLanguage ?CITYSTR)
;;    (postStreet ?PLACE ?STREET)
;;    (canonicalPlaceName ?STREET EnglishLanguage ?STREETSTR)
;;    (postStreetNumber ?STREETNUM ?PLACE)
;;    (not (exists (?FC ?UN)
;;      (and
;;        (floorCode ?FC ?PLACE)
;;        (unitNumber ?UN ?PLACE)))))
;;  (and
;;    (postAddressText ?TEXT ?PLACE)
;;    (precedesInString ?STREETNUM ?STREETSTR ?TEXT)
;;    (precedesInString ?STREETSTR ?CITYSTR ?TEXT)
;;    (precedesInString ?CITYSTR ?STATESTR ?TEXT)
;;    (precedesInString ?STATESTR ?POSTSTR ?TEXT)
;;   (precedesInString ?POSTSTR ?COUNTRYSTR ?TEXT)))
    
;;(=>
;;  (and
;;    (postCountry ?PLACE UnitedStates)
;;   (canonicalPlaceName UnitedStates EnglishLanguage ?COUNTRYSTR)
;;    (postPostcodeArea ?PLACE ?POST)
;;    (names ?POST ?POSTSTR)
;;    (postDistrict ?PLACE ?STATE)
;;    (canonicalPlaceName ?STATE EnglishLanguage ?STATESTR)
;;    (postCity ?PLACE ?CITY)
;;    (canonicalPlaceName ?CITY EnglishLanguage ?CITYSTR)
;;    (postStreet ?PLACE ?STREET)
;;    (canonicalPlaceName ?STREET EnglishLanguage ?STREETSTR)
;;    (postStreetNumber ?STREETNUM ?PLACE)
;;   (unitNumber ?UN ?PLACE)
;;    (not (exists (?FC)
;;      (floorCode ?FC ?PLACE))))
;;  (and
;;    (postAddressText ?TEXT ?PLACE)
;;    (precedesInString ?UN ?STREETNUM ?TEXT)
;;    (precedesInString ?STREETNUM ?STREETSTR ?TEXT)
;;    (precedesInString ?STREETSTR ?CITYSTR ?TEXT)
;;    (precedesInString ?CITYSTR ?STATESTR ?TEXT)
;;    (precedesInString ?STATESTR ?POSTSTR ?TEXT)
;;    (precedesInString ?POSTSTR ?COUNTRYSTR ?TEXT)))
    
;;(=>
;;  (and
;;    (postCountry ?PLACE UnitedStates)
;;    (canonicalPlaceName UnitedStates EnglishLanguage ?COUNTRYSTR)
;;    (postPostcodeArea ?PLACE ?POST)
;;    (names ?POST ?POSTSTR)
;;    (postDistrict ?PLACE ?STATE)
;;    (canonicalPlaceName ?STATE EnglishLanguage ?STATESTR)
;;    (postCity ?PLACE ?CITY)
;;    (canonicalPlaceName ?CITY EnglishLanguage ?CITYSTR)
;;    (postStreet ?PLACE ?STREET)
;;    (canonicalPlaceName ?STREET EnglishLanguage ?STREETSTR)
;;    (postStreetNumber ?STREETNUM ?PLACE)
;;    (unitNumber ?UN ?PLACE)
;;   (floorCode ?FC ?PLACE))
;;  (and
;;    (postAddressText ?TEXT ?PLACE)
;;    (precedesInString ?UN ?FC ?TEXT)
;;    (precedesInString ?FC ?STREETNUM ?TEXT)
;;    (precedesInString ?STREETNUM ?STREETSTR ?TEXT)
;;    (precedesInString ?STREETSTR ?CITYSTR ?TEXT)
;;    (precedesInString ?CITYSTR ?STATESTR ?TEXT)
;;    (precedesInString ?STATESTR ?POSTSTR ?TEXT)
;;    (precedesInString ?POSTSTR ?COUNTRYSTR ?TEXT)))

;;(=>
;;  (and
;;    (postCountry ?PLACE UnitedStates)
;;    (canonicalPlaceName UnitedStates EnglishLanguage ?COUNTRYSTR)
;;   (postPostcodeArea ?PLACE ?POST)
;;    (names ?POST ?POSTSTR)
;;    (postPostOfficeBox ?POBOX ?PLACE)
;;    (postPostcodeArea ?PLACE ?POST)
;;    (names ?POST ?POSTSTR)
;;    (postDistrict ?PLACE ?STATE)
;;    (canonicalPlaceName ?STATE EnglishLanguage ?STATESTR)
;;    (postCity ?PLACE ?CITY)
;;    (canonicalPlaceName ?CITY EnglishLanguage ?CITYSTR))
;;  (and
;;    (postAddressText ?TEXT ?PLACE)
;;    (precedesInString ?POBOX ?CITYSTR ?TEXT)
;;    (precedesInString ?CITYSTR ?STATESTR ?TEXT)
;;    (precedesInString ?STATESTR ?POSTSTR ?TEXT)
;;    (precedesInString ?POSTSTR ?COUNTRYSTR ?TEXT)))
    
(instance postAddressText AsymmetricRelation)
(instance postAddressText BinaryPredicate)
(domain postAddressText 1 PostalAddressText)
(domain postAddressText 2 PostalPlace)
(documentation postAddressText
EnglishLanguage "(&%postAddressText ?&%PostalAddressText
?&%PostalPlace) means that the &%ContactSite ?&%PostalPlace is
identified by ?&%PostalAddressText.")

;; --------------------------------------------------------------------------------
;; Telephone number structure adapted from Media.kif
;; --------------------------------------------------------------------------------

(instance telecomContactDevice AsymmetricRelation)
(instance telecomContactDevice BinaryPredicate)
(domain telecomContactDevice 1 TelephonyDevice)
(domain telecomContactDevice 2 Agent)
(documentation telecomContactDevice
EnglishLanguage "(&%telecomContactDevice ?&%TelephonyDevice
?&%Agent) means that ?&%TelephonyDevice is a &%ContactSite for
the &%Human or &%Organization ?&%Agent.")
(subrelation telecomContactDevice siteForContact)

;; NS: Actually, this is more complicated in the case of "cord
;; phones", where multiple &%FixedPhones may share the same line
;; and, so, the same telephone number.  The phone number uniquely
;; identifies the line (termination or connection location), not
;; the phone (hand set).

(subclass VirtualPlaceID PlaceID)

(subclass VirtualAddress PlaceAddress)
(subclass VirtualAddress VirtualPlaceID)

(subclass TelecomNumber VirtualAddress)
(subclass TelecomNumber SymbolicString)
(subclass TelecomNumber ContactSite)

(instance deviceTelecomNumber BinaryPredicate)
(instance deviceTelecomNumber AsymmetricRelation)
(domain deviceTelecomNumber 1 TelecomNumber)
(domain deviceTelecomNumber 2 TelephonyDevice)
(documentation deviceTelecomNumber
EnglishLanguage "(&%deviceTelecomNumber ?&%TelecomNumber
?&%TelephonyDevice) means that ?&%TelephonyDevice is identified,
and can be accessed, by ?&%TelecomNumber.")

;; (subclass TelecomNumberPart IdentifierPart)
;; (subclass TelecomNumberPart VirtualPlaceID)
;; (subclass TelecomNumberPart SymbolicString)

(instance telecomCoreNumber BinaryPredicate)
(instance telecomCoreNumber AsymmetricRelation)
(domain telecomCoreNumber 1 SymbolicString)
(domain telecomCoreNumber 2 TelecomNumber)
(subrelation telecomCoreNumber subString)
(documentation telecomCoreNumber
EnglishLanguage "(&%telecomCoreNumber ?&%SymbolicString
?&%TelecomNumber) means that ?&%SymbolicString is the &%part of a
&%TelecomNumber that identifies an individual subscriber line,
not including the area code and any possible extensions.")

(instance telecomCountryCode BinaryPredicate)
(instance telecomCountryCode AsymmetricRelation)
(domain telecomCountryCode 1 SymbolicString)
(domain telecomCountryCode 2 TelecomNumber)
(documentation telecomCountryCode
EnglishLanguage "(&%telecomCountryCode ?&%SymbolicString
&%TelecomNumber) means that ?&%SymbolicString is the &%part of
?&%TelecomNumber that identifies the &%Nation in which the device
identified by ?&%TelecomNumber is located (or registered).
?&%SymbolicString will be standard code conforming to, and
assigned by, ITU-T Recommendation E.164.")
(subrelation telecomCountryCode subString)

(instance telecomAreaCode BinaryPredicate)
(instance telecomAreaCode AsymmetricRelation)
(domain telecomAreaCode 1 SymbolicString)
(domain telecomAreaCode 2 TelecomNumber)
(documentation telecomAreaCode
EnglishLanguage "(&%telecomAreaCode ?&%SymbolicString
&%TelecomNumber) means that ?&%SymbolicString is the &%part of
?&%TelecomNumber that follows the country code.
?&%SymbolicString may denote a &%GeographicArea in which the
&%TelephonyDevice identified by ?&%TelecomNumber is
located (registered), but it may also denote a call billing plan
or status, as for 800 numbers in the North American Numbering
Plan.")
(subrelation telecomAreaCode subString)

(instance telecomCode2 BinaryPredicate)
(instance telecomCode2 AsymmetricRelation)
(domain telecomCode2 1 SymbolicString)
(domain telecomCode2 2 TelecomNumber)
(documentation telecomCode2 EnglishLanguage "(&%telecomCode2
?&%SymbolicString ?&%TelecomNumber) means that ?&%SymbolicString
is the second code (if there is one, such as a sub-area code)
following the part of ?&%TelecomNumber denoted by
&%telecomCountryCode.")
(subrelation telecomCode2 subString)

(instance telecomExtension BinaryPredicate)
(instance telecomExtension AsymmetricRelation)
(domain telecomExtension 1 SymbolicString)
(domain telecomExtension 2 TelecomNumber)
(documentation telecomExtension
EnglishLanguage "(&%telecomExtension ?&%SymbolicString
?&%TelecomNumber) means that ?&%SymbolicString is a &%part of
?&%TelecomNumber that identifies a &%TelephonyDevice within a
group of such &%Devices, the members of which share a local
subscriber line.")
;; NS: TO DO: create &%SubscriberTelephoneLine, relate it to
;; &%MainTelephoneLine and &%TelephoneSystem, which are defined
;; in Communications.kif.

(=>
  (and
    (telecomCoreNumber ?CN ?WHOLE)
    (telecomAreaCode ?AC ?WHOLE))
  (precedesInString ?AC ?CN ?WHOLE))

(=>
  (and
    (telecomCoreNumber ?CN ?WHOLE)
    (telecomCountryCode ?CC ?WHOLE))
  (precedesInString ?CC ?CN ?WHOLE))

(=>
  (and
    (telecomAreaCode ?AC ?WHOLE)
    (telecomCountryCode ?CC ?WHOLE))
  (precedesInString ?CC ?AC ?WHOLE))

(=>
  (and
    (telecomCoreNumber ?CN ?WHOLE)
    (telecomExtension ?EX ?WHOLE))
  (precedesInString ?CN ?EX ?WHOLE))

(=>
  (and
    (telecomCode2 ?C2 ?WHOLE)
    (telecomAreaCode ?AC ?WHOLE))
  (precedesInString ?AC ?C2 ?WHOLE))

(=>
  (and
    (telecomCode2 ?C2 ?WHOLE)
    (telecomCountryCode ?CC ?WHOLE))
  (precedesInString ?CC ?C2 ?WHOLE))

;; NS: It's not clear from the documentation for "TelecomCode2",
;; nor from an otherwise good explanation of telecom number
;; fields (http://en.wikipedia.org/wiki/Area_code), if the
;; portion of a telecom number denoted by "TelecomCode2" can be
;; part of the "CoreTelecomNumber" (e.g., designating the local
;; exchange, as in the xxx part of a US number conforming to the
;; pattern xxx-yyyy), or is something else, different from both
;; the "CoreTelecomNumber" and the area code.  Therefore, the
;; rules above are agnostic on this point, and less complete than
;; they might otherwise be.

(instance telephoneNumber BinaryPredicate)
(instance telephoneNumber AsymmetricRelation)
(domain telephoneNumber 1 TelecomNumber)
(domain telephoneNumber 2 Agent)
(documentation telephoneNumber EnglishLanguage "(%&telephoneNumber ?NUMBER ?AGENT) 
means that ?&%Agent identifies a &%TelecomeNumber at which ?&%Agent can be contacted")

(=>
  (telephoneNumber ?NUMBER ?AGENT)
  (siteForContact ?NUMBER ?AGENT))


(instance personalPhoneNumber BinaryPredicate)
(instance personalPhoneNumber AsymmetricRelation)
(domain personalPhoneNumber 1 TelecomNumber)
(domain personalPhoneNumber 2 Human)
(subrelation personalPhoneNumber telephoneNumber)
(documentation personalPhoneNumber
EnglishLanguage "(&%personalPhoneNumber ?&%TelecomNumber
?&%Human) means that ?&%TelecomNumber identifies a &%Telephone at
which ?&%Human can be contacted when not a work, or for purposes
other than work.")

(=>
  (and
    (instance ?DEVICE Telephone)
    (holdsDuring ?TIME 
      (and
        (possesses ?AGENT ?DEVICE)
        (deviceTelecomNumber ?NUMBER ?DEVICE))))
  (holdsDuring ?TIME (telephoneNumber ?NUMBER ?AGENT)))

(instance homePhoneNumber BinaryPredicate)
(instance homePhoneNumber AsymmetricRelation)
(domain homePhoneNumber 1 TelecomNumber)
(domain homePhoneNumber 2 Human)
(subrelation homePhoneNumber telephoneNumber)
(documentation homePhoneNumber
EnglishLanguage "(&%homePhoneNumber ?&%TelecomNumber ?&%Human)
means that ?&%TelecomNumber identifies a &%Telephone located at
?&%Human's &%PermanentResidence.")

;; NS: This is too liberal; a person could have multiple "home"
;; addresses.  Use the telecom area code to match the phone's location
;; to the person's address.
;; (=>
;;   (holdsDuring ?TIME
;;     (and
;;       (deviceTelecomNumber ?NUMBER ?DEVICE)
;;       (homePhoneNumber ?NUMBER ?PERSON)
;;       (home ?PERSON ?RESIDENCE)))
;;   (holdsDuring ?TIME (located ?DEVICE ?RESIDENCE)))

(=>
  (holdsDuring ?TIME 
    (and
      (deviceTelecomNumber ?NUMBER ?DEVICE)
      (homePhoneNumber ?NUMBER ?AGENT)
      (located ?DEVICE ?PLACE)
      (instance ?PLACE PermanentResidence)))
  (holdsDuring ?TIME (home ?AGENT ?PLACE)))

;; This is a weaker version of the axiom immediately above.
(=>
  (and
    (instance ?AGENT Human)
    (holdsDuring ?TIME 
      (and
        (deviceTelecomNumber ?NUMBER ?DEVICE)
        (telephoneNumber ?NUMBER ?AGENT)
        (located ?DEVICE ?PLACE)
        (instance ?PLACE Residence))))
  (holdsDuring ?TIME (inhabits ?AGENT ?PLACE)))

(instance workPhoneNumber BinaryPredicate)
(instance workPhoneNumber AsymmetricRelation)
(domain workPhoneNumber 1 TelecomNumber)
(domain workPhoneNumber 2 Agent)
(subrelation workPhoneNumber telephoneNumber)
(documentation workPhoneNumber
EnglishLanguage "(&%workPhoneNumber ?&%TelecomNumber ?&%Agent)
means that ?&%TelecomNumber identifies a &%Telephone at which
?&%Agent can be contacted when at work, or for business
purposes.")

(documentation FixedPhone EnglishLanguage "An &%instance of
&%FixedPhone is a &%Telephone that must be connected to the telephone
network via a cord.")
(subclass FixedPhone Telephone)

(subclass MobileCellPhone ReceiverDevice)
(subclass MobileCellPhone Telephone)
(documentation MobileCellPhone EnglishLanguage "A &%MobileCellPhone
is a &%Telephone that connects to the telephone network by
sending and receiving radio transmissions, rather than via a
cord, and so is portable.")


(instance mobilePhoneNumber BinaryPredicate)
(instance mobilePhoneNumber AsymmetricRelation)
(domain mobilePhoneNumber 1 TelecomNumber)
(domain mobilePhoneNumber 2 Agent)
(subrelation mobilePhoneNumber telephoneNumber)
(documentation mobilePhoneNumber
EnglishLanguage "(&%mobilePhoneNumber ?&%TelecomNumber ?&%Agent)
means that ?&%TelecomNumber identifies a &%MobileCellPhone at
which ?&%Agent can be contacted.")

(=>
  (holdsDuring ?TIME
    (and
      (deviceTelecomNumber ?NUMBER ?DEVICE)
      (mobilePhoneNumber ?NUMBER ?AGENT)))
  (instance ?DEVICE MobileCellPhone))

;; NS: Narrowing telephoneNumber -> mobilePhoneNumber.
(=>
  (and
    (instance ?DEVICE MobileCellPhone)
    (holdsDuring ?TIME
      (and
        (deviceTelecomNumber ?NUMBER ?DEVICE)
        (telephoneNumber ?NUMBER ?AGENT))))
  (holdsDuring ?TIME (mobilePhoneNumber ?NUMBER ?AGENT)))

;; NS: This isn't reliably true for Telephones in general, given
;; the rather strict "ownership" sense of possesses.  But it is
;; generally true for cell phones.
(=>
  (holdsDuring ?TIME
    (and
      (deviceTelecomNumber ?NUMBER ?DEVICE)
      (mobilePhoneNumber ?NUMBER ?AGENT)))
  (holdsDuring ?TIME (possesses ?AGENT ?DEVICE)))

(instance faxNumber BinaryPredicate)
(instance faxNumber AsymmetricRelation)
(domain faxNumber 1 TelecomNumber)
(domain faxNumber 2 Agent)
(documentation faxNumber EnglishLanguage "(&%faxNumber
?&%TelecomNumber ?&%Agent) means that ?&%TelecomNumber identifies
a &%FaxMachine at which ?&%Agent can be contacted.")

(=>
  (and
    (instance ?DEVICE FaxMachine)
    (holdsDuring ?TIME 
      (and
        (deviceTelecomNumber ?NUMBER ?DEVICE)
        (possesses ?AGENT ?DEVICE))))
  (holdsDuring ?TIME (faxNumber ?NUMBER ?AGENT)))

;; NS: temporally qualified this way only because telecom numbers
;; can be reassigned to different types of TelephonyDevices.
(=>
  (holdsDuring ?TIME
    (and
      (deviceTelecomNumber ?NUMBER ?DEVICE)
      (faxNumber ?NUMBER ?AGENT)))
  (instance ?DEVICE FaxMachine))      

(subclass FabricIron Device)
(documentation FabricIron EnglishLanguage "&%FabricIron is a type of &%Device that
has a flat metal base used to smooth cloth")
(termFormat EnglishLanguage FabricIron "iron")

;; KJN: Changing definition in order to remove dependency (arising from MetalProduct).      
;;(=>
;;  (instance ?IRON FabricIron)
;;  (exists (?BASE)
;;    (and
;;      (bottom ?BASE ?IRON)
;;      (instance ?BASE MetalProduct)
;;      (attribute ?BASE Flat))))

(=>
  (instance ?IRON FabricIron)
  (exists (?BASE)
    (and
      (bottom ?BASE ?IRON)
      (material Metal ?BASE)
      (attribute ?BASE Flat))))

(subclass IroningBoard Device)
(documentation IroningBoard EnglishLanguage "&%IroningBoard is a type of &%Device 
consisting of a flat, padded board used as a surface for ironing")
(termFormat EnglishLanguage IroningBoard "ironing board")

(=>
  (instance ?BOARD IroningBoard)
  (hasPurpose ?BOARD
    (exists (?IRON ?FABRIC ?OBJ)
      (and
        (instance ?IRON Ironing)
        (patient ?IRON ?OBJ)
        (part ?FABRIC ?OBJ)
        (instance ?FABRIC Fabric)
        (holdsDuring 
          (WhenFn ?IRON)
          (orientation ?OBJ ?BOARD On))))))
      
(subclass Smoothing SurfaceChange)
(documentation Smoothing EnglishLanguage "&%Smoothing is a type of &%SurfaceChange
to make something &%Smooth")
(termFormat EnglishLanguage Smoothing "smoothing")

(=>
  (and
    (instance ?SMOOTH Smoothing)
    (patient ?SMOOTH ?OBJ))
  (exists (?PART)
    (and
      (superficialPart ?PART ?OBJ)
      (holdsDuring
        (EndFn (WhenFn ?SMOOTH))
        (attribute ?PART Smooth)))))
        
(subclass Ironing Smoothing)
(documentation Ironing EnglishLanguage "&%Ironing refers to a &%Smoothing process where
a heated &%Device is used to smooth something")
(termFormat EnglishLanguage Ironing "ironing")

(=>
  (and
    (instance ?I Ironing)
    (patient ?I ?OBJ))
  (exists (?HEAT ?IRON ?PART)
    (and
      (superficialPart ?PART ?OBJ)
      (instance ?HEAT Heating)
      (patient ?HEAT ?IRON)
      (patient ?I ?PART)
      (instrument ?I ?IRON))))

(=>
  (and
    (instance ?I Ironing)
    (patient ?I ?OBJ)
    (part ?FABRIC ?OBJ)
    (instance ?FABRIC Fabric))
  (exists (?IRON ?HEAT)
    (and
      (instance ?HEAT Heating)
      (patient ?HEAT ?IRON)
      (instance ?IRON FabricIron)
      (instrument ?I ?IRON))))

(subclass WhirlpoolTub FluidContainer)
(documentation WhirlpoolTub EnglishLanguage "&%WhirlpoolTub refers to a &%FluidContainer
used by &%Humans for relaxation with jets used to create water currents to massage the 
body")
(termFormat EnglishLanguage WhirlpoolTub "whirlpool tub")

(=>
  (instance ?TUB WhirlpoolTub)
  (exists (?VALVE)
    (and
      (instance ?VALVE PressureControlValve)
      (part ?VALVE ?TUB)
      (hasPurpose ?VALVE
        (exists (?WATER ?CREATION ?MOTION)
          (and
            (instance ?WATER Water)
            (located ?WATER ?TUB)
            (instance ?CREATION Creation)
            (instrument ?CREATION ?VALVE)
            (result ?CREATION ?MOTION)
            (instance ?MOTION Motion)
            (located ?MOTION ?WATER)))))))

(subclass HotTub WhirlpoolTub)
(documentation HotTub EnglishLanguage "&%HotTub refers to a &%WhirlpoolTub that is
capable of heating the water located in it")
(termFormat EnglishLanguage HotTub "hot tub")

(=>
  (and
    (instance ?X HotTub)
    (located ?WATER ?X)
    (instance ?WATER Water))
  (modalAttribute
    (exists (?HEAT)
      (and
        (instance ?HEAT Heating)
        (instrument ?HEAT ?X)
        (patient ?HEAT ?WATER))) Possibility))
      
(subclass SizeAttribute RelationalAttribute)
(documentation SizeAttribute EnglishLanguage "&%SizeAttribute refers to attributes
that pertain to the &%measure of some &%Object")
(termFormat EnglishLanguage SizeAttribute "size attribute")

(=> 
  (and
    (attribute ?X ?ATTR)
    (instance ?ATTR SizeAttribute))
  (instance ?X Object))
  
(instance DoubleSize SizeAttribute)
(documentation DoubleSize EnglishLanguage "&%DoubleSize refers to how an &%Object can 
fit 2 of its target users at the same time")
(termFormat EnglishLanguage DoubleSize "double size")

(=>
  (and
    (instance ?X WhirlpoolTub)
    (attribute ?X DoubleSize))
  (modalAttribute
    (exists (?T1)
      (holdsDuring ?T1
        (exists (?P1 ?P2)
          (and
            (instance ?P1 Human)
            (instance ?P2 Human)
            (not (equal ?P1 ?P2))
            (located ?P1 ?X)
            (located ?P2 ?X))))) Possibility))
      
(subclass Kennel TrapOrCage)
(documentation Kennel EnglishLanguage "&%Kennel is a &%TrapOrCage where a &%DomesticAnimal
is &%Confining by its owner")
(termFormat EnglishLanguage Kennel "kennel")

(=>
  (instance ?KENNEL Kennel)
  (hasPurpose ?KENNEL
    (exists (?ANIMAL ?CONFINING)
      (and
        (instance ?ANIMAL DomesticAnimal)
        (instance ?CONFINING Confining)
        (patient ?CONFINING ?ANIMAL)
        (eventLocated ?CONFINING ?KENNEL)))))
        
(subclass DryingDevice Device)
(documentation DryingDevice EnglishLanguage "&%DryingDevice refers to any &%Device
used as an instrument in the &%Drying process")
(termFormat EnglishLanguage DryingDevice "drying device")

(=>
  (instance ?D DryingDevice)
  (hasPurpose ?D
    (exists (?DRYING)
      (and
        (instance ?DRYING Drying)
        (instrument ?DRYING ?D)))))

(subclass ClothesDryer DryingDevice)

(subclass ClothesWashingMachine WashingDevice)
        
(subclass HairDryer DryingDevice)
(subclass HairDryer ElectricDevice)
(documentation HairDryer EnglishLanguage "&%HairDryer is a type of &%DryingDevice
used specifically for &%Drying &%Hair")
(termFormat EnglishLanguage HairDryer "hair dryer")

(=>
  (instance ?HD HairDryer)
  (hasPurpose ?HD
    (exists (?HAIR ?DRYING)
      (and
        (instance ?HAIR Hair)
        (instance ?DRYING Drying)
        (patient ?DRYING ?HAIR)
        (instrument ?DRYING ?HD)))))

(subclass SelfServiceLaundry Room)
(documentation SelfServiceLaundry EnglishLanguage "&%SelfServiceLaundry is a &%Room 
where a collection of coin-operatend washing machines and dryers are available for 
customers")
(termFormat EnglishLanguage SelfServiceLaundry "self-service laundry")

(=>
  (instance ?ROOM SelfServiceLaundry)
  (exists (?WASHER ?DRYER)
    (and
      (instance ?WASHER Collection)
      (memberType ?WASHER ClothesWashingMachine)
      (located ?WASHER ?ROOM)
      (instance ?DRYER Collection)
      (memberType ?DRYER ClothesDryer)
      (located ?DRYER ?ROOM))))
      
(=>
  (instance ?ROOM SelfServiceLaundry)
  (attribute ?ROOM CommunalAttribute))
        
(subclass Microwave ElectricDevice)
(documentation Microwave EnglishLanguage "&%Microwave is an &%ElectricDevice that heats
food by passing an electromagnetic wave through it")
(termFormat EnglishLanguage Microwave "microwave")

(=>
  (instance ?M Microwave)
  (hasPurpose ?M
    (exists (?FOOD ?HEATING)
      (and
        (instance ?FOOD PreparedFood)
        (instance ?HEATING Heating)
        (instrument ?HEATING ?M)
        (patient ?HEATING ?FOOD)))))
        
(=>
  (and
    (instance ?M Microwave)
    (attribute ?M DeviceOn))
  (exists (?PROC)
    (and
      (instance ?PROC RadiatingElectromagnetic)
      (instrument ?PROC ?M))))
      
(subclass SmokeDetector Device)
(documentation SmokeDetector EnglishLanguage "&%SmokeDetector is a &%Device that is able
to &%Discovering the presence of &%Smoke")
(termFormat EnglishLanguage SmokeDetector "smoke detector")

(=>
  (instance ?D SmokeDetector)
  (hasPurpose ?D
    (exists (?DISCOVER ?SMOKE)
      (and
        (instance ?DISCOVER Discovering)
        (instrument ?DISCOVER ?D)
        (patient ?DISCOVER ?SMOKE)
        (instance ?SMOKE Smoke)))))

(subclass Sprinkler Device)
(documentation Sprinkler EnglishLanguage "&%Sprinkler is a type of &%Device that loosely
distributes a substance, either solid (e.g. Salt or herbs) or liquid (e.g. water sprinkler)")
(termFormat EnglishLanguage Sprinkler "sprinkler")

(subclass WaterSprinkler Sprinkler)
(documentation WaterSprinkler EnglishLanguage "&%WaterSprinkler is a type of &%Sprinkler 
that releases &%Water")
(termFormat EnglishLanguage WaterSprinkler "water sprinkler")

(=>
  (instance ?W WaterSprinkler)
  (hasPurpose ?W
    (exists (?WM)
      (and
        (instance ?WM WaterMotion)
        (origin ?WM ?W)))))

(subclass FireSprinklerSystem Collection)
(documentation FireSprinklerSystem EnglishLanguage "&%FireSprinklerSystem is a &%Collection
of &%Devices that allow water to be released when a &%Fire is detected")
(termFormat EnglishLanguage FireSprinklerSystem "sprinkler system")

(=>
  (instance ?X FireSprinklerSystem)
  (exists (?DETECT ?SPRINKLER)
    (and
      (instance ?DETECT SmokeDetector)
      (instance ?SPRINKLER WaterSprinkler)
      (member ?DETECT ?X)
      (member ?SPRINKLER ?X))))
      
(=>
  (instance ?X FireSprinklerSystem)
  (exists (?FIRE ?DISCOVER ?WM)
    (and
      (instance ?DISCOVER Discovering)
      (instance ?FIRE Fire)
      (instrument ?DISCOVER ?X)
      (patient ?DISCOVER ?FIRE)
      (instance ?WM WaterMotion)
      (origin ?WM ?X)
      (causes ?DISCOVER ?WM))))

(subclass FireExtinguisher Device)
(documentation FireExtinguisher EnglishLanguage "A &%Device used to &%StopFn small &%Fire which is possible for &%Human to carry")
(=>
  (instance ?FE FireExtinguisher)
  (hasPurpose ?FE
    (exists (?PROC)
      (and
        (instance ?PROC 
          (StopFn Fire))
        (instrument ?PROC ?FE)))))

(=>
  (instance ?FE FireExtinguisher)
  (exists (?PERSON ?CARRY)
    (and
      (instance ?PERSON Human)
      (instance ?CARRY Carrying)
      (patient ?CARRY ?FE)
      (capability ?CARRY instrument ?PERSON))))
      
(subclass IceMachine Machine)
(documentation IceMachine EnglishLanguage "&%IceMachine is a type of &%Machine that
produces &%Ice")
(termFormat EnglishLanguage IceMachine "ice machine")

(=>
  (instance ?IM IceMachine)
  (hasPurpose ?IM
    (exists (?PROC ?ICE)
      (and
        (instrument ?PROC ?IM)
        (result ?PROC ?ICE)
        (instance ?ICE Ice)))))
      
(subclass AlarmClock Clock)
(documentation AlarmClock EnglishLanguage "&%AlarmClock is a type of &%Clock that will
radiate sound when a certain time is set")
(termFormat EnglishLanguage AlarmClock "alarm clock")

(=>
  (instance ?AC AlarmClock)
  (hasPurpose ?AC
    (exists (?TIME ?M ?Q)
      (and
        (instance ?M Measuring)
        (agent ?M ?AC)
        (result ?M ?Q)
        (equal ?Q ?TIME)
        (holdsDuring
          (WhenFn ?M)
          (exists (?S)
            (and
              (instance ?S RadiatingSound)
              (agent ?S ?AC))))))))

(subclass AMFMAlarmClock AlarmClock)
(subclass AMFMAlarmClock RadioReceiver)
(documentation AMFMAlarmClock EnglishLanguage "&%AMFMAlarmClock is a type of &%AlarmClock
that is also a &%RadioReceiver, meaning it can get &%RadioBroadcast from &%RadioStation")
(termFormat EnglishLanguage AMFMAlarmClock "am / fm alarm clock")       
     
(subclass ElectricCoffeeMaker ElectricDevice)
(documentation ElectricCoffeeMaker EnglishLanguage "&%ElectricCoffeeMaker is a 
&%Device that makes &%Coffee")
(termFormat EnglishLanguage ElectricCoffeeMaker "coffee maker")

(=>
  (instance ?C ElectricCoffeeMaker)
  (hasPurpose ?C
    (exists (?COFFEE ?M)
      (and
        (instance ?M Making)
        (instrument ?M ?C)
        (result ?M ?COFFEE)
        (instance ?COFFEE Coffee)))))

(instance Clean SubjectiveAssessmentAttribute)
(documentation Clean EnglishLanguage "&%Clean describes how something is free from 
dirt or impurities")
(termFormat EnglishLanguage Clean "clean")

(instance Dirty SubjectiveAssessmentAttribute)
(documentation Dirty EnglishLanguage "&%Dirty describes how something has been soiled
with dirt, dust or grime")
(termFormat EnglishLanguage Dirty "dirty")

(=>
  (attribute ?X Clean)
  (instance ?X Object))

(=>
  (attribute ?X Dirty)
  (instance ?X Object))
  
(contraryAttribute Dirty Clean)

(subclass DataStorageDevice Device)
(documentation DataStorageDevice EnglishLanguage "An &%instance of
&%DataStorageDevice is a &%Device intended to be used for storing
data (information).")

(subclass Whiteboard DataStorageDevice)
(subclass Whiteboard DisplayArtifact)
(documentation Whiteboard EnglishLanguage "%&Whiteboard refers to flat surface where 
information can be encoded using erasable pens.  This baord is normally colored White")
(termFormat EnglishLanguage Whiteboard "whiteboard")

(=>
  (instance ?OBJ Whiteboard)
  (color ?OBJ White))
  
(=>
  (instance ?OBJ Whiteboard)
  (structure ?OBJ Flat))
  
(=>
  (instance ?OBJ Whiteboard)
  (hasPurpose ?OBJ
    (exists (?WRITE)
      (and
        (instance ?WRITE Writing)
        (destination ?WRITE ?OBJ)))))

(subclass Steam Water)
(documentation Steam EnglishLanguage "&%Steam refers to the &%Gas form of &%Water that
is a result of &%Boiling it and diffusing it into the air")
(termFormat EnglishLanguage Steam "steam")

(=>
  (instance ?STEAM Steam)
  (exists (?BOIL ?WATER)
    (and
      (instance ?BOIL Boiling)
      (instance ?WATER Water)
      (patient ?BOIL ?WATER)
      (result ?BOIL ?STEAM)
      (attribute ?STEAM Gas))))

;; change subclassing of HotWaterHeater from MajorAppliance to HeatingDevice
(subclass WaterHeater HeatingDevice)

(=>
  (instance ?X WaterHeater)
  (hasPurpose ?X
    (exists (?HEAT ?WATER)
      (and
        (instance ?HEAT Heating)
        (instance ?WATER Water)
        (patient ?HEAT ?WATER)
        (instrument ?HEAT ?X)))))

(instance airTemperature BinaryPredicate)
(domain airTemperature 1 Object)
(domain airTemperature 2 TemperatureMeasure)
(subrelation airTemperature measure)
(documentation airTemperature EnglishLanguage 
"(&%airTemperature ?AREA ?TEMP) means that the temperature of the 
air at ?AREA is ?TEMP.  Temperature may be expressed in units of 
&%TemperatureMeasure, including &%CelsiusDegree and &%FahrenheitDegree, 
among others.")
        
        
(subclass TemperatureAttribute SubjectiveAssessmentAttribute)
(documentation TemperatureAttribute EnglishLanguage "&%TemperatureAttribute is an
attribute that describes the temperature of a certain object")
(termFormat EnglishLanguage TemperatureAttribute "temperature attribute")

(=>
  (and
    (attribute ?X ?Y)
    (instance ?Y TemperatureAttribute)
    (instance ?X Object))
  (exists (?TEMP)
    (and
      (measure ?X ?TEMP)
      (instance ?TEMP TemperatureMeasure)
      (attribute ?TEMP ?Y))))
      
(instance ColdTemperature TemperatureAttribute)
(documentation ColdTemperature EnglishLanguage "&%ColdTemperature is a type of 
&%TemperatureAttribute that has a low or inadequate temperature")
(termFormat EnglishLanguage ColdTemperature "cold")
(successorAttributeClosure ColdTemperature HotTemperature)

(instance CoolTemperature TemperatureAttribute)
(documentation CoolTemperature EnglishLanguage "&%CoolTemperature describes how there
is some relief from heat but not very cold, is between cold and warm")
(termFormat EnglishLanguage CoolTemperature "cool")
(successorAttribute ColdTemperature CoolTemperature)

(instance WarmTemperature TemperatureAttribute)
(documentation WarmTemperature EnglishLanguage "&%WarmTemperature describes how there
is a comfortable or agreeable degree of heat")
(termFormat EnglishLanguage WarmTemperature "warm")
(successorAttribute CoolTemperature WarmTemperature)

(instance HotTemperature TemperatureAttribute)
(documentation HotTemperature EnglishLanguage "&%HotTemperature describes how something 
has a high temperature")
(termFormat EnglishLanguage HotTemperature "hot")
(successorAttribute WarmTemperature HotTemperature)

(=>
  (and
    (immediateInstance ?X ?CLASS)
    (immediateInstance ?Y ?CLASS)
    (attribute ?X ColdTemperature)
    (attribute ?Y HotTemperature))
  (exists (?TEMPX ?TEMPY)
    (and
      (measure ?X ?TEMPX)
      (instance ?TEMPX TemperatureMeasure)
      (measure ?Y ?TEMPY)
      (instance ?TEMPY TemperatureMeasure)
      (greaterThan ?TEMPY ?TEMPX))))

(instance Multilingual RelationalAttribute)
(documentation Multilingual EnglishLanguage "&%Multilingual describes a person who is
able to speak more than one language fluently")
(termFormat EnglishLanguage Multilingual "multilingual")

(=>
  (attribute ?X Multilingual)
  (instance ?X Human))

(=>
  (and
    (attribute ?X Multilingual)
    (instance ?SPEAK Speaking)
    (agent ?SPEAK ?X))
  (modalAttribute
    (exists (?LANG1 ?LANG2)
      (and
        (instance ?LANG1 SpokenHumanLanguage)
        (instance ?LANG2 SpokenHumanLanguage)
        (not (equal ?LANG1 ?LANG2))
        (or
          (patient ?SPEAK ?LANG1)
          (patient ?SPEAK ?LANG2)))) Possibility))
  
(subclass RecreationalVehicle Vehicle)
(subclass RecreationalVehicle MobileResidence)
(documentation RecreationalVehicle EnglishLanguage "A &%RecreationalVehicle is a type
of motorized &%Vehicle that is used for camping or can serve as a &%Residence that is
mobile")
(termFormat EnglishLanguage RecreationalVehicle "rv")

(=>
  (instance ?RV RecreationalVehicle)
  (modalAttribute
    (exists (?BED ?DINING ?KITCHEN)
      (and
        (instance ?BED Bed)
        (instance ?DINING DiningArea)
        (instance ?KITCHEN KitchenArea)
        (located ?BED ?RV)
        (located ?DINING ?RV)
        (located ?KITCHEN ?RV))) Likely))
        
(subclass ElectronicLock Lock)
(documentation ElectronicLock EnglishLanguage "&%ElectronicLock is a type of &%Lock
that depends on some &%ElectronicSignalling process to open")
(termFormat EnglishLanguage ElectronicLock "electronic lock")

(=>
  (instance ?LOCK ElectronicLock)
  (hasPurpose ?LOCK
    (exists (?ES ?PROC)
      (and
        (instance ?ES ElectronicSignalling)
        (destination ?ES ?LOCK)
        (instance ?PROC Opening)
        (instrument ?PROC ?LOCK)
        (before 
          (BeginFn (WhenFn ?ES))
          (BeginFn (WhenFn ?PROC)))))))
        
(subclass RunningTrack StationaryArtifact)
(subclass RunningTrack LandTransitway)
(documentation RunningTrack EnglishLanguage "&%RunningTrack is a &%StationaryArtifact
which serves as a path for people running")
(termFormat EnglishLanguage RunningTrack "running track")

(=>
  (instance ?TRACK RunningTrack)
  (hasPurpose ?TRACK
    (exists (?RUN ?HUMAN)
      (and
        (instance ?HUMAN Human)
        (instance ?RUN Running)
        (agent ?RUN ?HUMAN)
        (path ?RUN ?TRACK)))))
        
(subclass KnockLight Device)
(documentation KnockLight EnglishLanguage "&%KnockLight is a type of &%Device that
flashes light when a door knock is made. It is used by the hearing impaired")
(termFormat EnglishLanguage KnockLight "knock light")

(=>
  (and
    (instance ?KL KnockLight)
    (instance ?ROOM Room)
    (located ?KL ?ROOM)
    (instance ?DOOR Door)
    (part ?DOOR ?ROOM))
  (hasPurpose ?KL
    (exists (?SOUND ?LIGHT ?IMPACT)
      (and
        (instance ?IMPACT Impacting)
        (patient ?IMPACT ?DOOR)
        (causes ?IMPACT ?SOUND)
        (instance ?SOUND RadiatingSound)
        (agent ?SOUND ?DOOR)
        (causes ?SOUND ?LIGHT)
        (instance ?LIGHT RadiatingLight)
        (agent ?LIGHT ?KL)))))

;; A knocklight allows a deaf person to know when somebody is knocking
(=>
  (and
    (instance ?KL KnockLight)
    (attribute ?X Deaf)
    (located ?KL ?LOC)
    (located ?X ?LOC)
    (instance ?DOOR Door)
    (part ?DOOR ?LOC))
  (hasPurposeForAgent ?KL
    (knows ?X
      (exists (?KNOCK)
        (and
          (instance ?KNOCK Impacting)
          (patient ?KNOCK ?DOOR)))) ?X))

(subclass PrayerMat Rug)
(documentation PrayerMat EnglishLanguage "&%PrayerMat is a type of &%Rug which is used
in &%Praying")
(termFormat EnglishLanguage PrayerMat "prayer mat")

(=>
  (instance ?MAT PrayerMat)
  (hasPurpose ?MAT
    (exists (?PRAY ?PERSON)
      (and
        (instance ?PRAY Praying)
        (agent ?PRAY ?PERSON)
        (instance ?PERSON Human)
        (holdsDuring (WhenFn ?PRAY)
          (orientation ?PERSON ?MAT On))))))          
          
(subclass VideoGame Game)
(documentation VideoGame EnglishLanguage "&%VideoGame is a &%Game in &%VideoRecording
form")
(termFormat EnglishLanguage VideoGame "video game")

(=>
  (instance ?GAME VideoGame)
  (exists (?VIDEO)
    (and
      (instance ?VIDEO VideoRecording)
      (represents ?VIDEO ?GAME))))
  
(subclass VideoGamePlayer MediaSystem)
(documentation VideoGamePlayer EnglishLanguage "&%VideoGamePlayer is a &%MediaSystem
that enables the playing of a &%VideoGame")
(termFormat EnglishLanguage VideoGamePlayer "video game player")

(=>
  (instance ?X VideoGamePlayer)
  (hasPurpose ?X
    (exists (?GAME ?RL ?MOVE ?CONTROLLER ?PLAYER)
      (and
        (instance ?GAME VideoGame)
        (instrument ?GAME ?X)
        (agent ?GAME ?PLAYER)
        (instance ?MOVE Maneuver)
        (instrument ?MOVE ?CONTROLLER)
        (agent ?MOVE ?PLAYER)
        (subProcess ?MOVE ?GAME)
        (part ?CONTROLLER ?X)
        (instance ?RL RadiatingLight)
        (agent ?RL ?X)
        (patient ?RL ?GAME)))))

;; KJN: Moving this to Communications as RadioSystem is defined there.        
;;(subclass BabyMonitoringSystem RadioSystem)
;;(documentation BabyMonitoringSystem EnglishLanguage "&%BabyMonitoringSystem refers to
;;the radio system that &%Broadcasting at 49Mhz, consisting of a transmitter and receiver,
;;where the transmitter is kept where the baby is kept, and the receiver is kept with
;;the person looking after the baby to be able to hear sounds and monitor the baby")
;;(termFormat EnglishLanguage BabyMonitoringSystem "baby monitor")

;;(=>
;;  (instance ?X BabyMonitoringSystem)
;;  (exists (?TX ?RX)
;;    (and
;;      (instance ?RX RadioReceiver)
;;      (instance ?TX Device)
;;      (engineeringSubcomponent ?RX ?X)
;;      (engineeringSubcomponent ?TX ?X)
;;      (hasPurpose ?X
;;        (exists (?BABY ?CARER ?SOUND ?LOC1 ?LOC2 ?PROC ?RADIO)
;;          (and
;;            (instance ?BABY HumanBaby)
;;            (instance ?CARER Human)
;;            (located ?BABY ?LOC1)
;;            (located ?CARER ?LOC2)
;;            (not (equal ?LOC1 ?LOC2))
;;            (instance ?PROC Maintaining)
;;            (patient ?PROC ?BABY)
;;            (agent ?PROC ?CARER)
;;            (located ?TX ?LOC1)
;;            (located ?RX ?LOC2)
;;            (instance ?SOUND RadiatingSound)
;;            (eventLocated ?SOUND ?LOC1)
;;            (instance ?RADIO RadioEmission)
;;            (patient ?RADIO ?SOUND)
;;            (destination ?RADIO ?RX)
;;            (agent ?RADIO ?TX)))))))

;; KJN: Moving to engineering.kif as Controller is defined there            
;;(subclass RemoteControl Controller)
;;(documentation RemoteControl EnglishLanguage "&%RemoteControl is &%Controller that 
;;does some &%ElectronicSignalling to communicate and control another &%Device")
;;(termFormat EnglishLanguage RemoteControl "remote control")

;;(=>
;;  (instance ?X RemoteControl)
;;  (hasPurpose ?X
;;    (exists (?SIGNAL ?DEVICE)
;;      (and
;;        (instance ?SIGNAL ElectronicSignalling)
;;        (agent ?SIGNAL ?X)
;;        (destination ?SIGNAL ?DEVICE)
;;        (instance ?DEVICE Device)
;;        (not (equal ?X ?DEVICE))))))

;; KJN: Moving to Communications.kif        
;;(subclass TVRemoteControl RemoteControl)
;;(documentation TVRemoteControl EnglishLanguage "&%TVRemoteControl is a type of 
;;&%RemoteControl that signals to a &%TelevisionReceiver")
;;(termFormat EnglishLanguage TVRemoteControl "tv remote")

;;(=>
;;  (instance ?X TVRemoteControl)
;;  (hasPurpose ?X
;;    (exists (?SIGNAL ?DEVICE)
;;      (and
;;        (instance ?SIGNAL ElectronicSignalling)
;;        (agent ?SIGNAL ?X)
;;        (destination ?SIGNAL ?DEVICE)
;;        (instance ?DEVICE TelevisionReceiver)))))

(subclass ElectricalOutlet Device)
(documentation ElectricalOutlet EnglishLanguage "&%ElectricalOutlet refers to a 
&%Device that is used to connect a plug to a power source so that &%Electricity can 
flow from the source to an &%ElectricDevice")
(termFormat EnglishLanguage ElectricalOutlet "electrical outlet")

(=>
  (instance ?X ElectricalOutlet)
  (exists (?HOLE)
    (and
      (instance ?HOLE Collection)
      (memberType ?HOLE Hole)
      (part ?HOLE ?X))))
      
(=>
  (instance ?X ElectricalOutlet)
  (hasPurpose ?X
    (exists (?POWER ?WIRE)
      (and
        (instance ?POWER PowerSource)
        (instance ?WIRE Collection)
        (memberType ?WIRE WireLine)
        (connectsEngineeringComponents ?WIRE ?X ?POWER)))))

(subclass ElectricalPlug Plug)
(documentation ElectricalPlug EnglishLanguage "&%ElectricalPlug is a type of &%Plug 
made of metal that is normally used to conduct electricity from an &%ElectricalOutlet
to an &%ElectricDevice")
(termFormat EnglishLanguage ElectricalPlug "electrical plug")

(=>
  (instance ?X ElectricalPlug)
  (material Metal ?X))
  
(=>
  (instance ?X ElectricalPlug)
  (hasPurpose ?X
    (exists (?OUTLET)
      (and
        (instance ?OUTLET ElectricalOutlet)
        (completelyFills ?X ?OUTLET)))))
        
(=>
  (and
    (instance ?PLUG ElectricalPlug)
    (instance ?DEVICE ElectricDevice)
    (instance ?OUTLET ElectricalOutlet)
    (connectedEngineeringComponents ?DEVICE ?PLUG)
    (completelyFills ?PLUG ?OUTLET)
    (instance ?POWER PowerSource)
    (connectedEngineeringComponents ?POWER ?OUTLET))
  (exists (?RE)
    (and
      (instance ?RE RadiatingElectromagnetic)
      (origin ?RE ?POWER)
      (destination ?RE ?DEVICE))))

(subclass OutletAdapter Device)
(documentation OutletAdapter EnglishLanguage "An &%OutletAdapter is a device that, on
one side has &%Hole and on another side has metal prongs so that an &%ElectricalPlug
can fit into an &%ElectricalOutlet")
(termFormat EnglishLanguage OutletAdapter "outlet adapter")

(=>
  (instance ?ADAPT OutletAdapter)
  (exists (?HOLE)
    (and
      (instance ?HOLE Collection)
      (memberType ?HOLE Hole)
      (part ?HOLD ?ADAPT)
      (material Metal ?ADAPT))))
      
(=>
  (instance ?ADAPT OutletAdapter)
  (hasPurpose ?ADAPT
    (exists (?OUTLET ?PLUG)
      (and
        (instance ?PLUG ElectricalPlug)
        (instance ?OUTLET ElectricalOutlet)
        (completelyFills ?PLUG ?ADAPT)
        (completelyFills ?ADAPT ?OUTLET)
        (connectsEngineeringComponents ?ADAPT ?PLUG ?OUTLET)))))

(subclass AirConditioner ElectricDevice)
(documentation AirConditioner EnglishLanguage "&%AirConditioner is a type of
&%ElectricDevice that is designed to provide comfort during hot or cold weather by
keeping the air in an area a specific temperature")
(termFormat EnglishLanguage AirConditioner "air conditioner")

(=>
  (instance ?X AirConditioner)
  (hasPurpose ?X
    (exists (?PROC ?TEMP ?AREA)
      (and
        (located ?X ?AREA)
        (instance ?PROC Process)
        (instrument ?PROC ?X)
        (result ?PROC (airTemperature ?AREA ?TEMP))))))

(instance Surrounded PositionalAttribute)
(documentation Surrounded EnglishLanguage "&%Surrounded describes how an object or a
collection of objects &%meetsSpatially with all sides of another object")
(termFormat EnglishLanguage Surrounded "surrounded")

(=>
  (orientation ?OBJ1 ?OBJ2 Surrounded)
  (forall (?X)
    (=>
      (side ?X ?OBJ1)
      (meetsSpatially ?X ?OBJ2))))
          
(subclass Courtyard StationaryArtifact)
(documentation Courtyard EnglishLanguage "&%Courtyard is an unroofed area wholly or 
partly surrounded by walls or buildings")
(termFormat EnglishLanguage Courtyard "courtyard")

(=>
  (instance ?X Courtyard)
  (and
    (not
      (exists (?ROOF)
        (and
          (instance ?ROOF Roof)
          (top ?ROOF ?X))))
    (exists (?BLDG)
      (and
        (instance ?BLDG Building)
        (orientation ?X ?BLDG Surrounded)))))
        
(subclass SpeakerDevice ElectricDevice)
(documentation SpeakerDevice EnglishLanguage "&%SpeakerDevice is a type of device that
converts electrical signals into sounds loud enough to be heard at a distance")
(termFormat EnglishLanguage SpeakerDevice "speaker")

(=>
  (instance ?X SpeakerDevice)
  (hasPurpose ?X
    (exists (?RS)
      (and
        (instance ?RS RadiatingSound)
        (instrument ?RS ?X)
        (attribute ?RS Audible)))))

(subclass Earphone Device)
(documentation Earphone EnglishLanguage "&%Earphone is a type of &%Device that that
converts electric signals into sound and is usually held over or inserted in the ear")
(termFormat EnglishLanguage Earphone "earphone")

(=>
  (instance ?X Earphone)
  (hasPurpose ?X
    (exists (?ES ?RS ?SIGNAL ?EAR ?PROC)
      (and
        (instance ?ES ElectricalSignalling)
        (patient ?ES ?SIGNAL)
        (destination ?ES ?X)
        (instance ?PROC Process)
        (instrument ?PROC ?X)
        (patient ?PROC ?SIGNAL)
        (result ?PROC ?RS)
        (instance ?RS RadiatingSound)
        (origin ?RS ?X)
        (before 
          (BeginFn (WhenFn ?ES))
          (BeginFn (WhenFn ?PROC)))
        (before 
          (BeginFn (WhenFn ?PROC))
          (BeginFn (WhenFn ?RS)))
        (instance ?EAR Ear)
        (orientation ?X ?EAR Adjacent)))))

(subclass Public GroupOfPeople)
(documentation Public EnglishLanguage "a body of people sharing some common interest;
example: the reading public.")

;; the members of a Public have common interests

(=>
  (holdsDuring ?T1
    (and
      (member ?AGENT1 Public)
      (member ?AGENT2 Public)
      (not
        (equal ?AGENT1 ?AGENT2))))
  (exists (?INTEREST)
    (holdsDuring ?T1
      (and
        (desires ?AGENT1 ?INTEREST)
        (desires ?AGENT2 ?INTEREST)))))
                
(subclass PublicAddressSystem CommunicationSystem)
(documentation PublicAddressSystem EnglishLanguage "&%PublicAddressSystem refers to an
electronic amplification system used as a communication system in public areas")
(termFormat EnglishLanguage PublicAddressSystem "public address system")

(=>
  (instance ?X PublicAddressSystem)
  (and
    (memberType ?X Microphone)
    (memberType ?X SpeakerDevice)))

(=>
  (instance ?X PublicAddressSystem)
  (hasPurpose ?X
    (exists (?RS ?AREA ?GRP)
      (and
        (instance ?AREA LandArea)
        (located ?X ?AREA)
        (instance ?GRP GroupOfPeople)
        (located ?GRP ?AREA)
        (instance ?RS RadiatingSound)
        (instrument ?RS ?X)
        (forall (?PERSON)
          (=>
            (member ?PERSON ?GRP)
            (exists (?HEAR)
              (and
                (instance ?HEAR Hearing)
                (patient ?HEAR ?RS)
                (agent ?HEAR ?PERSON)))))))))

(subclass Wheelchair TransportationDevice)
(documentation Wheelchair EnglishLanguage "&%Wheelchair is a type of &%LandVehicle 
that is used to individually transport those who cannot walk")
(termFormat EnglishLanguage Wheelchair "wheelchair")

(=>
  (instance ?X Wheelchair)
  (exists (?WHEEL ?SEAT)
    (and
      (instance ?SEAT Seat)
      (instance ?WHEEL Wheel)
      (part ?SEAT ?X)
      (part ?WHEEL ?X))))
      
(=>
  (instance ?X Wheelchair)
  (hasPurpose ?X
    (exists (?TRANSPORT ?HUMAN)
      (and
        (instance ?HUMAN Human)
        (not (capability Walking agent ?HUMAN))
        (instance ?TRANSPORT Transportation)
        (agent ?TRANSPORT ?HUMAN)
        (instrument ?TRANSPORT ?X)))))

(instance WheelchairAccessible ObjectiveNorm)
(documentation WheelchairAccessible EnglishLanguage "&%WheelchairAccessible describes
how a location lets a person using a wheelchair move around without interference and 
with access to all features of that place.")
(termFormat EnglishLanguage WheelchairAccessible "wheelchair accessible")

(=>
  (attribute ?X WheelchairAccessible)
  (attribute ?X HandicappedFriendly))

(=>
  (and
    (attribute ?X WheelchairAccessible)
    (or
      (instance ?X Building)
      (instance ?X Room)))
  (modalAttribute
    (exists (?MOTION ?WHEELCHAIR)
      (and
        (instance ?MOTION Motion)
        (instrument ?MOTION ?WHEELCHAIR)
        (instance ?WHEELCHAIR Wheelchair)
        (eventLocated ?MOTION ?X))) Possibility))

(instance HandicappedFriendly SubjectiveAssessmentAttribute)
(documentation HandicappedFriendly EnglishLanguage "&%HandicappedFriendly describes an 
object that can be easily used by somebody who has some &%Disability")
(termFormat EnglishLanguage HandicappedFriendly "handicapped friendly")

(=>
  (attribute ?X HandicappedFriendly)
  (instance ?X Object))
  
(=>
  (attribute ?X HandicappedFriendly)
  (exists (?ATTR ?PERSON)
    (and
      (instance ?ATTR Disability)
      (instance ?PERSON Human)
      (attribute ?PERSON ?ATTR)
      (inScopeOfInterest ?PERSON ?X))))
        
        
(subclass Recliner Seat)
(documentation Recliner EnglishLanguage "&%Recliner is a type of &%Seat whose back can
be lowered and the foot can be rasied to allow the sitter to recline in it.")
(termFormat EnglishLanguage Recliner "recliner")

(=>
  (instance ?X Recliner)
  (modalAttribute
    (exists (?INCLINE)
      (and
        (instance ?INCLINE Inclining)
        (patient ?INCLINE ?X))) Possibility))

(subclass VisualContentBearingPhysical ContentBearingPhysical)
(documentation VisualContentBearingPhysical EnglishLanguage
"Instances of &%VisualContentBearingPhysical are
&%ContentBearingPhysicals that are intended to convey
meaning as the result of being seen.")

(subclass VisualContentBearingObject ContentBearingObject)
(subclass VisualContentBearingObject VisualContentBearingPhysical)
(documentation VisualContentBearingObject
EnglishLanguage "Instances of &%VisualContentBearingObject are
&%ContentBearingObjects that are intended to convey meaning as
the result of being seen.")

(subclass Image VisualContentBearingObject)
(documentation Image EnglishLanguage "Instances of &%Image are
&%VisualContentBearingObjects that convey their meaning primarily
in non-textual form.")
                
(subclass MultimediaProjector MediaSystem)
(documentation MultimediaProjector EnglishLanguage "&%MultimediaProjector is a type
of &%MediaSystem that projects images on a screen")
(termFormat EnglishLanguage MultimediaProjector "multimedia projector")

(=>
  (instance ?X MultimediaProjector)
  (hasPurpose ?X
    (exists (?RS ?SCREEN ?VIDEO)
      (and
        (instance ?RS RadiatingLight)
        (instrument ?RS ?X)
        (patient ?RS ?VIDEO)
        (or
          (instance ?VIDEO VideoRecording)
          (instance ?VIDEO Image))
        (destination ?RS ?SCREEN)
        (instance ?SCREEN Artifact)
        (attribute ?SCREEN Flat)
        (not (connected ?X ?SCREEN))))))

(subclass AudioRecorder Device)
(documentation AudioRecorder EnglishLanguage "&%AudioRecorder is a type of &%Device
that creates an &%AudioRecording by capturing sound and storing it in a &%DataStorageDevice")
(termFormat EnglishLanguage AudioRecorder "audio recorder")

(=>
  (instance ?X AudioRecorder)
  (hasPurpose ?X
    (exists (?RS ?RECORD ?PROC)
      (and
        (instance ?RS RadiatingSound)
        (instance ?PROC IntentionalProcess)
        (instrument ?PROC ?X)
        (patient ?PROC ?RS)
        (result ?PROC ?RECORD)
        (instance ?RECORD AudioRecording)))))

;; KJN: Moving to Media.kif as RecordingTape is defined there.        
;;(subclass TapeRecorder AudioRecorder)
;;(documentation TapeRecorder EnglishLanguage "&%TapeRecorder is a type of &%AudioRecorder
;;that stores the recorded &%AudioRecording on a &%RecordingTape")
;;(termFormat EnglishLanguage TapeRecorder "tape recorder")

;;(=>
;;  (instance ?X TapeRecorder)
;;  (hasPurpose ?X
;;    (exists (?AUDIO ?TAPE ?PROC)
;;      (and
;;        (instance ?PROC IntentionalProcess)
;;        (instrument ?PROC ?X)
;;        (result ?PROC ?AUDIO)
;;        (instance ?AUDIO AudioRecording)
;;        (instance ?TAPE RecordingTape)
;;        (holdsDuring ?PROC
;;          (connected ?TAPE ?X))
;;        (before 
;;          (BeginFn (WhenFn ?PROC))
;;          (BeginFn (WhenFn (part ?AUDIO ?TAPE))))))))
;;       

(subclass VideoDisplay ElectricDevice)
(documentation VideoDisplay EnglishLanguage "&%VideoDisplay is a type of &%ElectricDevice
that can &%RadiatingLight to show &%VideoRecording")
(termFormat EnglishLanguage VideoDisplay "video display")

(=>
  (instance ?X VideoDisplay)
  (hasPurpose ?X
    (exists (?RL ?VIDEO)
      (and
        (instance ?RL RadiatingLight)
        (instance ?VIDEO VideoRecording)
        (patient ?RL ?VIDEO)
        (instrument ?RL ?X)))))

;; KJN: Moving this to Communications.kif as it seems to make more sense there, along
;; with CableTelevisionSystem and BroadcastTelevisionSystem        
;;(subclass SatelliteTelevisionSystem CommunicationSystem)
;;(documentation SatelliteTelevisionSystem EnglishLanguage "&%SatelliteTelevisionSystem       
;;is a &%CommunicationSystem where &%ArtificialSatellite is used to transfer TV signals")
;;(termFormat EnglishLanguage SatelliteTelevisionSystem "satellite tv")

;;(=>
;;  (instance ?TV SatelliteTelevisionSystem)
;;  (exists (?SAT ?RECEIVE)
;;    (and
;;      (instance ?SAT ArtificialSatellite)
;;      (member ?SAT ?TV)
;;     (instance ?RECEIVE TelevisionReceiver)
;;      (member ?RECEIVE ?TV))))

;;(subclass TelevisionSet ElectricDevice)
;;(documentation TelevisionSet EnglishLanguage "&%TelevisionSet is an &%ElectricDevice
;;comprised of a &%TelevisionReceiver and some form of &%VideoDisplay and is part of
;;a &%TelevisionSystem")
;;(termFormat EnglishLanguage TelevisionSet "television set")

;;(=>
;;  (instance ?TV TelevisionSet)
;;  (exists (?RECEIVER ?DISPLAY)
;;    (and
;;      (instance ?RECEIVER TelevisionReceiver)
;;      (instance ?DISPLAY VideoDisplay)
;;      (part ?RECEIVER ?TV)
;;      (part ?DISPLAY ?TV))))
      
;; KJN: Moving to engineering.kif as Controller is defined there      
;;(subclass TemperatureControl Controller)
;;(documentation TemperatureControl EnglishLanguage "&%TemperatureControl is a type
;;of &%Controller that is used to set the ideal &%airTemperature in the room. It is normally
;;a part of an &%ElectricDevice that conditions the room to reach that temperature")
;;(termFormat EnglishLanguage TemperatureControl "temperature control")

;;(=>
;;  (instance ?CTRL TemperatureControl)
;;  (exists (?DEVICE ?TEMP)
;;    (and
;;      (instance ?DEVICE ElectricDevice)
;;      (part ?CTRL ?DEVICE)
;;      (hasPurpose ?DEVICE
;;        (exists (?PROC ?AREA)
;;          (and
;;            (instance ?AREA Region)
;;            (instance ?PROC Process)
;;            (instrument ?PROC ?X)
;;            (result ?PROC (airTemperature ?AREA ?TEMP))))))))
            
(subclass TDDPhone Telephone)
(documentation TDDPhone EnglishLanguage "&%TDDPhone, which stands for Telecommunications
Device for the Deaf, describes a &%Telephone that is designed so that &%Deaf people can 
use it")

(=>
  (instance ?TDD TDDPhone)
  (hasPurpose ?TDD
    (exists (?AGENT ?PHONING)
      (and
        (instance ?PHONING Telephoning)
        (instrument ?PHONING ?TDD)
        (agent ?PHONING ?AGENT)
        (attribute ?AGENT Deaf)))))
        
(subclass Photocopier ElectricDevice)
(documentation Photocopier EnglishLanguage "An &%ElectricDevice designed for &%Making a two dimensional representation of an &%Object or a copy of a &%TwoDimensionalObject. Note that it is not necessarily used for &%Copying because it doesn't preserve all the &%Attributes of the original.")
(=>
  (instance ?X Photocopier)
  (hasPurpose ?X
    (=>
      (and
        (instance ?OBJ1 TwoDimensionalObject)
        (instance ?OBJ1 VisualContentBearingObject)
        (containsInformation ?OBJ1 ?INFO)
        (instance ?COPY Photocopying)
        (instrument ?COPY ?X)
        (patient ?COPY ?OBJ1))
      (exists (?OBJ2 ?SHEET)
        (and
          (result ?COPY ?OBJ2)
          (instance ?OBJ2 TwoDimensionalObject)
          (instance ?OBJ2 VisualContentBearingObject)
          (instance ?SHEET PrintedSheet)
          (located ?OBJ2 ?SHEET)
          (containsInformation ?OBJ2 ?INFO))))))
          
(=>
  (instance ?X Photocopier)
  (hasPurpose ?X
    (exists (?COPY)
      (and
        (instance ?COPY Photocopying)
        (instrument ?COPY ?X)))))
        
(subclass Photocopying Making)
(documentation Photocopying EnglishLanguage "The &%Process of &%Making a two dimensional representation of an &%Object. Note the difference between &%Photocopying and &%Copying, the result of &%Copying is na exact copy.")
(=>
  (instance ?COPY Photocopying)
  (exists (?OBJ1 ?OBJ2)
      (and
        (instance ?OBJ1 Object)
        (instance ?OBJ2 VisualContentBearingObject)
        (patient ?COPY ?OBJ1)
        (result ?COPY ?OBJ2)
        (represents ?OBJ2 ?OBJ1))))
        

(subclass Sail Artifact)
(documentation Sail EnglishLanguage "&%Sail refers to an &%Artifact made of some type
of &%Fabric which by means of which wind is used to propel a sailing vessel")
(termFormat EnglishLanguage Sail "sail")

(=>
  (instance ?SAIL Sail)
  (exists (?MAST)
    (and
      (material Fabric ?SAIL)
      (instance ?MAST Mast)
      (connected ?SAIL ?MAST))))

(subclass ACPowerSource PowerSource)
(documentation ACPowerSource EnglishLanguage "&%ACPowerSource refers to an alternating
current &%PowerSource")
(termFormat EnglishLanguage ACPowerSource "ac power source")

(subclass SinglePhasePowerSource ACPowerSource)
(subclass ThreePhasePowerSource ACPowerSource)

(instance voltageMeasure BinaryPredicate)
(documentation voltageMeasure EnglishLanguage "(&%voltageMeasure ?OBJ ?MEAS) describes
how much electricity ?OBJ, a power source, generates")
(termFormat EnglishLanguage voltageMeasure "voltage measure")

(domain voltageMeasure 1 PowerSource)
(domain voltageMeasure 2 PhysicalQuantity)

(=>
  (voltageMeasure ?OBJ ?MEAS)
  (equal ?MEAS (MeasureFn ?QUANT Volt)))
  
(=>
  (voltageMeasure ?OBJ ?MEAS)
  (exists (?ELEC ?PROC)
    (and
      (instance ?ELEC Electricity)
      (instance ?PROC Process)
      (instrument ?PROC ?OBJ)
      (result ?PROC ?ELEC)
      (measure ?ELEC ?MEAS))))

(subclass Document ContentBearingObject)
(subclass Document Artifact)
(documentation Document EnglishLanguage "Instances of &%Document are
&%ContentBearingObjects that are intended to convey propositional
content via &%Text (&%LinguisticExpressions, seen or heard), &%Images,
or some combination of these (e.g., an audio clip included in an
electronic document consisting mostly of &%VisualText and some
&%Images).  Formally, a &%Document constitutes any
&%ContentBearingObject that is an &%Artifact conventionally
typically intended to be transmitted and assimilated as a meaningful
whole.  An &%Article or a &%Book would be a &%Document, but a &%Word
or &%Paragraph typically would not.")

;; AP - state that a document hasPurpose of being the instrument of communication
(=>
  (instance ?DOC Document)
  (hasPurpose ?DOC
    (exists (?COMM)
      (and
        (instance ?COMM Communication)
        (instrument ?COMM ?DOC)))))

(subclass Book Document)
(documentation Book EnglishLanguage "A &%Document that has pages and is bound.")
      
(subclass GuideBook Book)
(documentation GuideBook EnglishLanguage "&%GuideBook is a type of &%Book that offers
basic information about a place, normally designed for the use of visitors or tourists.")
(termFormat EnglishLanguage GuideBook "guide book")

(=>
  (instance ?X GuideBook)
  (exists (?LOC)
    (and
      (instance ?LOC GeographicArea)
      (refers ?X ?LOC))))
      
(subclass DiningGuide GuideBook)
(documentation DiningGuide EnglishLanguage "&%DiningGuide is a type of &%GuideBook that
offers information about dining places around a specific location")
(termFormat EnglishLanguage DiningGuide "dining guide")

(=>
  (instance ?X DiningGuide)
  (exists (?LOC ?REST)
    (and
      (instance ?LOC GeographicArea)
      (refers ?X ?LOC)
      (instance ?REST Restaurant)
      (located ?REST ?LOC)
      (refers ?X ?REST))))

(subclass TelephoneHandset Device)
(documentation TelephoneHandset EnglishLanguage "&%TelephoneHandset is the part of the
&%Telephone that has a &%Earphone and a &%Microphone for the transmission and reception
of sound")
(termFormat EnglishLanguage TelephoneHandset "telephone handset")

(=>
  (instance ?X TelephoneHandset)
  (exists (?EARPHONE ?MIC)
    (and
      (instance ?EARPHONE Earphone)
      (instance ?MIC Microphone)
      (part ?EARPHONE ?X)
      (part ?MIC ?X))))

;; KJN: Moving this to Communications.kif as some of the terms used here is defined there.      
;;(subclass TelephoneCradle Device)
;;(documentation TelephoneCradle EnglishLanguage "&%TelephoneCradle is the part of the
;;&%Telephone that is connected to the &%TelephoneSystem through some wire.")
;;(termFormat EnglishLanguage TelephoneCradle "telephone cradle")

;;(=>
;;  (instance ?X TelephoneCradle)
;;  (hasPurpose ?X
;;    (exists (?SYS ?WIRE)
;;      (and
;;        (instance ?SYS TelephoneSystem)
;;        (instance ?WIRE WireLine)
;;        (connectsEngineeringComponents ?WIRE ?X ?SYS)))))

;;(subclass CordedTelephone FixedPhone)
;;(documentation CordedTelephone EnglishLanguage "&%CordedTelephone is a type of &%FixedPhone 
;;whose &%TelephoneHandset is connected to its &%TelephoneCradle by a &%WireLine")
;;(termFormat EnglishLanguage CordedTelephone "corded telephone")

;;(=>
;;  (instance ?X CordedTelephone)
;;  (exists (?HANDSET ?CRADLE ?WIRE)
;;    (and
;;      (instance ?HANDSET TelephoneHandset)
;;      (instance ?CRADLE TelephoneCradle)
;;      (part ?HANDSET ?X)
;;      (part ?CRADLE ?X)
;;      (instance ?WIRE WireLine)
;;      (connectsEngineeringComponents ?WIRE ?HANDSET ?CRADLE))))
        
;;(subclass CordlessTelephone FixedPhone)
;;(documentation CordlessTelephone EnglishLanguage "&%CordlessTelephone is a type of 
;;&%FixedPhone whose &%TelephoneHandset is not connected to its &%TelephoneCradle by a 
;;&%WireLine")
;;(termFormat EnglishLanguage CordlessTelephone "cordless telephone")

;;(=>
;;  (instance ?X CordlessTelephone)
;;  (exists (?HANDSET ?CRADLE)
;;    (and
;;      (instance ?HANDSET TelephoneHandset)
;;      (instance ?CRADLE TelephoneCradle)
;;      (part ?HANDSET ?X)
;;     (part ?CRADLE ?X)
;;      (not 
;;        (exists (?WIRE)
;;          (and
;;            (instance ?WIRE WireLine)
;;            (connectsEngineeringComponents ?WIRE ?HANDSET ?CRADLE)))))))

(subclass FireAlarm Device)
(documentation FireAlarm EnglishLanguage "&%FireAlarm is a &%Device that releases
a distinctive noise to inform people that there is a &%Fire")
(termFormat EnglishLanguage FireAlarm "fire alarm")
            
(=>
  (and
    (instance ?X FireAlarm)
    (attribute ?X DeviceOn)
    (located ?X ?LOC))
  (exists (?RS)
    (and
      (instance ?RS RadiatingSound)
      (instrument ?RS ?X)
      (hasPurpose ?RS
        (exists (?GRP)
          (and
            (instance ?GRP GroupOfPeople)
            (located ?GRP ?LOC)
            (knows ?GRP 
              (exists (?FIRE)
                (and
                  (instance ?FIRE Fire)
                  (eventLocated ?FIRE ?LOC))))))))))

(subclass GrabBar Artifact)
(documentation GrabBar EnglishLanguage "&%GrabBar is a bar attached to a &%Wall to
provide a handgrip for steadying yourself")
(termFormat EnglishLanguage GrabBar "grab bar")

(=>
  (instance ?X GrabBar)
  (and
    (exists (?WALL)
      (and
        (instance ?WALL Wall)
        (connected ?X ?WALL)))
    (hasPurpose ?X
      (exists (?GRAB)
        (and
          (instance ?GRAB Grabbing)
          (instrument ?GRAB ?X))))))
          
(=>
  (instance ?X GrabBar)
  (modalAttribute
    (exists (?HUMAN)
      (and
        (attribute ?HUMAN PhysicalDisability)
        (inScopeOfInterest ?HUMAN ?X))) Likely))

(subclass HighRise Building)
(documentation HighRise EnglishLanguage "&%HighRise refers to a type of &%Building
that has greater than 10 &%BuildingLevel")
(termFormat EnglishLanguage HighRise "high rise")

(=>
  (instance ?X HighRise)
  (exists (?LEVELS ?NUM)
    (and
      (instance ?LEVELS Collection)
      (forall (?FLR)
        (=>
          (and
            (instance ?FLR BuildingLevel)
            (part ?FLR ?X))
          (member ?FLR ?LEVELS)))
      (memberCount ?LEVELS ?NUM)
      (greaterThanOrEqualTo ?NUM 10))))

(subclass Soaking Wetting)
(documentation Soaking EnglishLanguage "&%Soaking refers to the process of &%Wetting
wherein an &%Object is &%Surrounded by &%Water")
(termFormat EnglishLanguage Soaking "soaking")

(=>
  (instance ?SOAK Soaking)
  (exists (?WATER ?OBJ)
    (and
      (instance ?OBJ Object)
      (patient ?SOAK ?OBJ)
      (instance ?WATER Water)
      (resource ?SOAK ?WATER)
      (holdsDuring ?SOAK
        (orientation ?OBJ ?WATER Surrounded)))))

(subclass GrecianTub BathTub)
(documentation GrecianTub EnglishLanguage "&%GrecianTub is a combination of soaking tubs
and standard tubs, meaning it has inreased depth for soaking, but can fit into tight
spaces by not being as long as standard tubs")
(termFormat EnglishLanguage GrecianTub "grecian tub")

(=>
  (instance ?X GrecianTub)
  (hasPurpose ?X
    (exists (?HUMAN ?SOAK)
      (and
        (instance ?SOAK Soaking)
        (instance ?HUMAN Human)
        (agent ?SOAK ?HUMAN)
        (patient ?SOAK ?HUMAN)
        (eventLocated ?SOAK ?X)))))
       
(subclass HemisphereFigure ThreeDimensionalFigure)
(documentation HemisphereFigure EnglishLanguage "&%HemisphereFigure describes a figure
that is half of a &%Sphere")
(termFormat EnglishLanguage HemisphereFigure "hemisphere")

(=>
  (and
    (attribute ?X ?HEMI)
    (instance ?HEMI HemisphereFigure))
  (exists (?Y)
    (and
      (instance ?Y Sphere)
      (half ?HEMI ?Y))))
      
(subclass Dome Ceiling)
(documentation Dome EnglishLanguage "&%Dome is a type of &%Ceiling with a &%HemisphereFigure
shape")
(termFormat EnglishLanguage Dome "dome")

(=>
  (instance ?X Dome)
  (exists (?HEMI)
    (and
      (attribute ?X ?HEMI)
      (instance ?HEMI HemisphereFigure))))

(instance Historical RelationalAttribute)
(documentation Historical EnglishLanguage "&%Historical describes something that was
important in &%History")
(termFormat EnglishLanguage Historical "historical")

(=>
  (attribute ?X Historical)
  (instance ?X Physical))
  
(=>
  (attribute ?X Historical)
  (refers History ?X))

(=>
  (and
    (attribute ?X Historical)
    (instance ?X City))
  (exists (?EV)
    (and
      (instance ?EV Physical)
      (attribute ?EV Historical)
      (eventLocated ?EV ?X))))

(instance Rural RelationalAttribute)
(documentation Rural EnglishLanguage "&%Rural describes that is characteristic of
country life as opposed to the city life")
(termFormat EnglishLanguage Rural "rural")

(instance Suburban RelationalAttribute)
(documentation Suburban EnglishLanguage "&%Suburban describes something that is 
characteristic of a residential district on the outskirts of a city")
(termFormat EnglishLanguage Suburban "suburban")

(instance Urban RelationalAttribute)
(documentation Urban EnglishLanguage "&%Urban describes something that is characteristic
of a city or city life")
(termFormat EnglishLanguage Urban "urban")

(subclass Patio Region)
(documentation Patio EnglishLanguage "&%Patio refers to an &%Region adjoining a building,
usually &%Paved, that is used for outdoor activities")
(termFormat EnglishLanguage Patio "patio")

(=>
  (instance ?X Patio)
  (and
    (modalAttribute
      (attribute ?X Paved) Likely)
    (exists (?BLDG)
      (and
        (instance ?BLDG Building)
        (orientation ?X ?BLDG Adjacent)
        (located ?X Outdoors)))))
        
(subclass Lanai Patio)
(subclass Lanai StationaryArtifact)
(documentation Lanai EnglishLanguage "&%Lanai refers to a roofed outdoor area %&Adjacent
to a &%Building often furnished and used as a living room")

(=>
  (instance ?X Lanai)
  (exists (?ROOF)
    (and
      (instance ?ROOF Roof)
      (part ?ROOF ?X)
      (modalAttribute
        (exists (?AREA)
          (and
            (instance ?AREA SittingArea)
            (located ?AREA ?X))) Likely))))

;; KJN: Moving to naics.kif as AmusementAndThemeParks is defined there            
;;(subAttribute WaterThemePark AmusementAndThemeParks)
;;(documentation WaterThemePark EnglishLanguage "&%WaterThemePark is an &%AmusementAndThemeParks
;;that features waterplay areas, such as water slides, splash pads, spraygrounds, and 
;;swimming pools")
;;(termFormat EnglishLanguage WaterThemePark "water theme park")

;;(=>
;;  (attribute ?X WaterThemePark)
;;  (exists (?POOL)
;;    (and
;;      (instance ?POOL SwimmingPool)
;;      (element ?POOL (PropertyFn ?X)))))
      
;;(subclass WaterParkTicket Ticket)
;;(documentation WaterParkTicket EnglishLanguage "&%WaterParkTicket is a type of 
;;&%Ticket that gains a person entry to a &%WaterThemePark")
;;(termFormat EnglishLanguage WaterParkTicket "water park ticket")

;;(=>
;;  (instance ?T WaterParkTicket)
;;  (exists (?ORG)
;;    (and
;;      (attribute ?ORG WaterThemePark)
;;      (issuedBy ?T ?ORG))))
      
;;(=>
;;  (and
;;    (instance ?T Ticket)
;;    (possesses ?T ?CUST)
;;    (issuedBy ?T ?ORG)
;;    (attribute ?ORG AmusementGamblingAndRecreationIndustries)
;;    (located ?ORG ?LOC))
;;  (confersNorm ?ORG
;;    (exists (?REC)
;;      (and
;;        (instance ?REC RecreationOrExercise)
;;        (experiencer ?REC ?CUST)
;;        (eventLocated ?REC ?LOC))) Permission))

(instance hasUniform BinaryPredicate) 
(documentation hasUniform EnglishLanguage "(&%hasUniform ?GRP ?UNIFORM) means that
?GRP is associated or identified by ?UNIFORM and members of ?GRP are expected to wear
?UNIFORM")
(termFormat EnglishLanguage hasUniform "has uniform")
(domain hasUniform 1 Group)
(domainSubclass hasUniform 2 UniformClothing)

(=>
  (hasUniform ?GRP ?UNIFORM)
  (modalAttribute
    (exists (?PERS ?CLOTHING ?TIME)
      (and
        (member ?PERS ?GRP)
        (instance ?CLOTHING ?UNIFORM)
        (holdsDuring ?TIME
          (wears ?PERS ?CLOTHING)))) Likely))
                   
(subclass UniformClothing Clothing)
(documentation UniformClothing EnglishLanguage "&%UniformClothing is a type of clothing with a 
distinctive design worn by members of a particular group as a means of identification")
(termFormat EnglishLanguage UniformClothing "uniform")

(=>
  (subclass ?X UniformClothing)
  (exists (?GRP)
    (hasUniform ?GRP ?X)))
    
(=>
  (instance ?X UniformClothing)
  (exists (?PROC ?DESIGN)
    (and
      (instance ?PROC IntentionalProcess)
      (result ?PROC ?DESIGN)
      (represents ?X ?DESIGN))))

(subclass Tripod Device)
(documentation Tripod EnglishLanguage "&%Tripod refers to a &%Device with 3 legs to
support some other &%Object")
(termFormat EnglishLanguage Tripod "tripod")

(=>
  (instance ?X Tripod)
  (exists (?LEG1 ?LEG2 ?LEG3)
    (and
      (part ?LEG1 ?X)
      (part ?LEG2 ?X)
      (part ?LEG3 ?X)
      (meetsSpatially ?LEG1 ?LEG2)
      (meetsSpatially ?LEG2 ?LEG3)
      (meetsSpatially ?LEG1 ?LEG3))))
   
(=>
  (instance ?X Tripod)
  (hasPurpose ?X
    (exists (?OBJ ?PUT ?PROC)
      (and
        (instance ?OBJ Artifact)
        (instance ?PUT Putting)
        (patient ?PUT ?OBJ)
        (destination ?PUT ?X)
        (instance ?PROC Process)
        (instrument ?PROC ?OBJ)
        (before
          (EndFn (WhenFn ?PUT))
          (BeginFn (WhenFn ?PROC)))))))
          
(subclass Easel Tripod)
(documentation Easel EnglishLanguage "&%Easel is a type of &%Tripod that supports
a flat object such as a canvas or a flipboard")
(termFormat EnglishLanguage Easel "easel")

(=>
  (instance ?X Easel)
  (hasPurpose ?X
    (exists (?OBJ ?PUT)
      (and
        (instance ?OBJ Artifact)
        (attribute ?OBJ Flat)
        (instance ?PUT Putting)
        (patient ?PUT ?OBJ)
        (destination ?PUT ?X)))))

(subclass Solarium Room)
(documentation Solarium EnglishLanguage "&%Solarium is a type of &%Room part of which
is made with &%Transparent material like glass to afford exposure to the sun.")
(termFormat EnglishLanguage Solarium "solarium")

(=>
  (instance ?X Solarium)
  (exists (?WALL)
    (and
      (instance ?WALL Wall)
      (part ?WALL ?X)
      (attribute ?WALL Transparent))))

(subclass ExerciseCenter SportsFacility)
(documentation ExerciseCenter EnglishLanguage "&%ExerciseCenter refers to a type of
&%SportsFacility that has equipment and services for physical training
and keeping fit")
(termFormat EnglishLanguage ExerciseCenter "exercise center")

(=>
  (instance ?X ExerciseCenter)
  (hasPurpose ?X
    (exists (?DEVICE)
      (and
        (or
          (instance ?DEVICE AerobicExerciseDevice)
          (instance ?DEVICE AnaerobicExerciseDevice))
        (located ?DEVICE ?X)))))

(subclass GameRoom Room)
(documentation GameRoom EnglishLanguage "&%GameRoom refers to a type of &%Room
that have facilities for &%Game that can be played")        
(termFormat EnglishLanguage GameRoom "game room")

(=>
  (instance ?X GameRoom)
  (hasPurpose ?X 
    (exists (?GAME)
      (and
        (instance ?GAME Game)
        (eventLocated ?GAME ?X)))))

(subclass Nursery Room)
(documentation Nursery EnglishLanguage "&%Nursery refers to a &%Room for babies")
(termFormat EnglishLanguage Nursery "nursery")

(=>
  (instance ?X Nursery)
  (exists (?CRIB)
    (and
      (instance ?CRIB Crib)
      (located ?CRIB ?X))))

;; KJN: Moving this to Hotel.kif as it more specifically talks about a Nursery in a Hotel.      
;;(=>
;;  (and
;;    (instance ?X Nursery)
;;    (element ?X (PropertyFn ?HOTEL))
;;    (attribute ?HOTEL TravelerAccommodation))
;;  (and
;;    (attribute ?X CommunalAttribute)
;;    (employs ?HOTEL ?NANNY)
;;    (hasPurpose ?NANNY
;;      (exists (?CARE)
;;        (and
;;          (instance ?CARE ChildCareService)
;;          (serviceProvider ?CARE ?NANNY))))))
          
(subclass SteamBath Room)
(documentation SteamBath EnglishLanguage "&%SteamBath refers to a room that is filled
with &%Steam in order to make people sweat")
(termFormat EnglishLanguage SteamBath "steam bath")

(=>
  (instance ?X SteamBath)
  (exists (?STEAM)
    (and
      (instance ?STEAM Steam)
      (located ?STEAM ?X))))

(=>
  (instance ?X SteamBath)
  (hasPurpose ?X
    (exists (?BATH)
      (and
        (instance ?BATH Bathing)
        (eventLocated ?BATH ?X)))))

             
(subclass HeatedPool SwimmingPool)
(documentation HeatedPool EnglishLanguage "&%HeatedPool is a type of &%SwimmingPool that
has &%HotWaterHeater so that the &%Water in the pool is constantly kept at a certain 
warm temperature")
(termFormat EnglishLanguage HeatedPool "heated pool")

(=>
  (and
    (instance ?X HeatedPool)
    (contains ?X ?WATER)
    (instance ?WATER Water)
    (part ?X ?HEATER)
    (instance ?HEATER WaterHeater)
    (attribute ?HEATER DeviceOn))
  (attribute ?WATER WarmTemperature))

(subclass RoomHeater HeatingDevice)
(documentation RoomHeater EnglishLanguage "&%RoomHeater is a type of &%HeatingDevice
that heats the air in a confined space")
(termFormat EnglishLanguage RoomHeater "room heater")

(=>
  (instance ?X RoomHeater)
  (hasPurpose ?X
    (exists (?AIR ?HEATING ?ROOM)
      (and
        (instance ?AIR Air)
        (instance ?ROOM Room)
        (located ?AIR ?ROOM)
        (instance ?HEATING Heating)
        (patient ?HEATING ?AIR)
        (instrument ?HEATING ?X)))))

;; KJN: Moving to Sports.kif        
;;(subclass RacquetballCourt SportsFacility)
;;(documentation RacquetballCourt EnglishLanguage "&%RacquetballCourt is a type of
;;&%SportsFacility where &%Racquetball is played")
;;(termFormat EnglishLanguage RacquetballCourt "racquetball court")

;;(=>
;;  (instance ?X RacquetballCourt)
;;  (hasPurpose ?X
;;    (exists (?PLAY)
;;      (and
;;        (instance ?PLAY Racquetball)
;;        (eventLocated ?PLAY ?X)))))        

(subclass DanceHall StationaryArtifact)
(documentation DanceHall EnglishLanguage "&%DanceHall is a &%StationaryArtifact equipped
with floors amenable to &%Dancing and devices that blare out &%MakingMusic")
(termFormat EnglishLanguage DanceHall "dance hall")

(=>
  (instance ?DISCO DanceHall)
  (hasPurpose ?DISCO
    (exists (?DANCE ?MUSIC)
      (and
        (instance ?MUSIC MakingMusic)
        (instance ?DANCE Dancing)
        (cooccur ?MUSIC ?DANCE)
        (eventLocated ?MUSIC ?DISCO)
        (eventLocated ?DANCE ?DISCO)))))
        
(subclass NightClub DanceHall)
(documentation NightClub EnglishLanguage "&%NightClub is a type of &%DanceHall that
typically opens at &%NightTime and has a &%Tavern located in it")
(termFormat EnglishLanguage NightClub "night club")

;; splitting this rule into 2: one that just says a bar is located inside the nightclub,
;; and the other one saying that the standard retail hours is at night time.  the
;; hours will be moved to Dining.kif, however, as standardRetailHours is defined there.
;;(=>
;;  (instance ?X NightClub)
;;  (exists (?TIME ?BAR)
;;    (and
;;      (instance ?BAR Tavern)
;;      (located ?BAR ?X)
;;      (standardRetailHours ?X ?TIME)
;;      (during (BeginFn ?TIME) NightTime))))
  
(=>
  (instance ?X NightClub)
  (exists (?BAR)
    (and
      (instance ?BAR Tavern)
      (located ?BAR ?X))))
  
(subclass ScubaDiving Swimming)
(documentation ScubaDiving EnglishLanguage "&%ScubaDiving is &%Swimming &%Below a
&%WaterArea with the aid of some &%Device to help in &%Breathing")
(termFormat EnglishLanguage ScubaDiving "scuba diving")

(=>
  (instance ?SCUBA ScubaDiving)
  (exists (?WATER ?DEVICE ?BREATH)
    (and
      (instance ?WATER WaterArea)
      (orientation ?SCUBA ?WATER Below)
      (instance ?DEVICE Device)
      (instance ?BREATH Breathing)
      (instrument ?BREATH ?DEVICE)
      (subProcess ?BREATH ?SCUBA))))

(instance AmericansWithDisabilitiesAct Proposition)
(documentation AmericansWithDisabilitiesAct EnglishLanguage "The 
&%AmericansWithDisabilitiesAct is a &%Proposition promulgated by the US Employment
Opportunity Commission to give civil right protections to individuals with &%Disability
similar to those provided to individuals on the basis of race, color, sex, national
origin, age and religion.  It guarantees equal opportunities for individuals with
&%Disability in public accommodation, employment, transportation, State and local
government services and telecommunications")
(termFormat EnglishLanguage AmericansWithDisabilitiesAct "ADA")

(subrelation conforms represents)
(documentation conforms EnglishLanguage "(&%conforms ?OBJ ?PROP) describes
how ?OBJ follows the ideas outlined by ?PROP")
(termFormat EnglishLanguage conforms "conforms")

(domain conforms 1 Object)
(domain conforms 2 Proposition)

(=>
  (conforms ?OBJ AmericansWithDisabilitiesAct)
  (attribute ?OBJ HandicappedFriendly))

(instance USFEMA GovernmentOrganization)
(documentation USFEMA EnglishLanguage 
"&%USFEMA, which stands for Federal Emergency Management Agency, is a 
&%GovernmentOrganization in charge of disaster mitigation, preparedness, response, 
recovery, education and references")
(termFormat EnglishLanguage USFEMA "fema")

(subrelation approves inScopeOfInterest)
(instance approves BinaryPredicate)
(documentation approves EnglishLanguage "(&%approves ?AGENT1 ?AGENT2) means that
?AGENT1 is satisfied that ?AGENT2 has met some requirement or proposition, and publicly
declares such")
(termFormat EnglishLanguage approves "approves")

(domain approves 1 CognitiveAgent)
(domain approves 2 CognitiveAgent)

(=>
  (approves ?AGENT1 ?AGENT2)
  (exists (?PROP)
    (believes ?AGENT1
      (conforms ?AGENT2 ?PROP))))

(subclass WetBar Artifact)
(documentation WetBar EnglishLanguage "&%WetBar is a place for preparing food and 
beverage that has a sink with running water")
(termFormat EnglishLanguage WetBar "wet bar")

(=>
  (instance ?X WetBar)
  (exists (?SINK ?OBJ)
    (and
      (instance ?SINK WashBasin)
      (part ?SINK ?X)
      (instance ?OBJ Object)
      (attribute ?OBJ Flat)
      (hasPurpose ?OBJ
        (exists (?PREP ?FOOD)
          (and
            (instance ?PREP Making)
            (result ?PREP ?FOOD)
            (or
              (instance ?FOOD PreparedFood)
              (instance ?FOOD Beverage))
            (eventLocated ?PREP ?OBJ))))
      (part ?OBJ ?X))))

(subclass SurveillanceSystem Collection)
(documentation SurveillanceSystem EnglishLanguage "&%SurveillanceSystem is a &%Collection
of devices that work together to provide security by recording sound or video in a
certain location and showing it instantly to people, presumably a &%SecurityUnit")
(termFormat EnglishLanguage SurveillanceSystem "surveillance system")

(=>
  (instance ?X SurveillanceSystem)
  (and
    (memberType ?X Camera)
    (memberType ?X VideoDisplay)))

(=>
  (and
    (instance ?X SurveillanceSystem)
    (member ?X ?VIDEO)
    (member ?X ?DISPLAY)
    (located ?VIDEO ?LOC1)
    (instance ?VIDEO Camera)
    (located ?DISPLAY ?LOC2)
    (not (equal ?LOC1 ?LOC2))
    (instance ?DISPLAY VideoDisplay))
  (hasPurpose ?X
    (exists (?PROC ?VID ?RL ?CAPTURE)
      (and
        (instance ?PROC Process)
        (eventLocated ?PROC ?LOC1)
        (represents ?VID ?PROC)
        (instrument ?CAPTURE Camera)
        (result ?CAPTURE ?VID)
        (instance ?RL RadiatingLight)
        (instrument ?RL ?DISPLAY)
        (patient ?RL ?VID)
        (before
          (BeginFn ?PROC)
          (BeginFn ?CAPTURE))
        (before
          (BeginFn ?CAPTURE)
          (BeginFn ?RL))))))

(=>
  (instance ?X SecurityUnit)
  (modalAttribute
    (exists (?S)
      (and
        (instance ?S SurveillanceSystem)
        (inScopeOfInterest ?X ?S))) Likely))

;; KJN: Moving this to Communications.kif as most of the terms used here are defined there.   
;;(subclass Telex CommunicationDevice)
;;(documentation Telex EnglishLanguage "&%Telex is a &%Telegraph-like &%CommunicationDevice 
;;that is used to send messages over a &%TelephoneSystem.")
;;(termFormat EnglishLanguage Telex "telex")

;;(=>
;;  (instance ?TELEX Telex)
;;  (exists (?PRINTER)
;;    (and
;;      (instance ?PRINTER Printer)
;;      (part ?PRINTER ?TELEX))))
      
;;(=>
;;  (instance ?TELEX Telex)
;;  (hasPurpose ?TELEX
;;    (exists (?SYS ?TELEX2 ?MSG)
;;      (and
;;        (instance ?SYS TelephoneSystem)
;;        (instance ?TELEX2 Telex)
;;        (instance ?MSG Messaging)
;;        (or
;;          (and
;;            (origin ?MSG ?TELEX)
;;            (destination ?MSG ?TELEX2))
;;          (and
;;            (origin ?MSG ?TELEX2)
;;            (destination ?MSG ?TELEX)))
;;        (path ?MSG ?SYS)))))

;;(=>
;;  (and
;;    (destination ?MSG ?TELEX)
;;    (instance ?MSG Messaging)
;;    (patient ?MSG ?M)
;;    (instance ?TELEX Telex))
;;  (exists (?PROC ?TEXT)
;;    (and
;;      (instrument ?PROC ?TELEX)
;;      (result ?PROC ?TEXT)
;;      (represents ?TEXT ?M)
;;      (instance ?TEXT Text)
;;    (before (BeginFn (WhenFn ?MSG)) (BeginFn (WhenFn ?PROC))))))

(subclass ArtifactMediatedCommunication Communication)
(documentation ArtifactMediatedCommunication EnglishLanguage "&%ArtifactMediatedCommunication
refers to &%Communication that uses some &%Artifact as an &%instrument or &%path for
the &%Transfer of messages or information")
(termFormat EnglishLanguage ArtifactMediatedCommunication "artifact mediated communication")

(=>
  (instance ?X ArtifactMediatedCommunication)
  (exists (?OBJ)
    (and
      (instance ?OBJ Artifact)
      (instrument ?X ?OBJ))))
      
(subclass TelephoneCommunication ArtifactMediatedCommunication)
(documentation TelephoneCommunication EnglishLanguage "&%TelephoneCommunication refers
to a &%Communication that is done through the use of the &%TelephoneSystem")
(termFormat EnglishLanguage TelephoneCommunication "telephone communication")

(=>
  (instance ?X TelephoneCommunication)
  (exists (?TEL1 ?TEL2 ?ORIGIN ?DEST)
    (and
      (origin ?X ?ORIGIN)
      (destination ?X ?DEST)
      (siteForContact ?ORIGIN ?TEL1)
      (siteForContact ?DEST ?TEL2)
      (instance ?TEL1 Telephone)
      (instance ?TEL2 Telephone)
      (instrument ?X ?TEL1)
      (instrument ?X ?TEL2))))

(subclass OperatorAssistedTelephoneCommunication TelephoneCommunication)
(documentation OperatorAssistedTelephoneCommunication EnglishLanguage
"&%OperatorAssistedTelephoneCommunication refers to &%TelephoneCommunication where
an intermediary person connects origin and destination")
(termFormat EnglishLanguage OperatorAssistedTelephoneCommunication "operator assisted
telephone communication")

(=>
  (instance ?X OperatorAssistedTelephoneCommunication)
  (exists (?ORIGIN ?DEST ?OPERATOR)
    (and
      (origin ?X ?ORIGIN)
      (destination ?X ?DEST)
      (instance ?OPERATOR Human)
      (hasPurpose ?OPERATOR
        (exists (?PROC)
          (and
            (instance ?PROC IntentionalProcess)
            (agent ?PROC ?OPERATOR)
            (subProcess ?PROC ?X)
            (result ?PROC ?RESULT)
            (equal ?RESULT
              (modalAttribute
                (exists (?COMM)
                  (and
                    (instance ?COMM Communication)
                    (origin ?COMM ?ORIGIN)
                    (destination ?COMM ?DEST))) Possibility))))))))

(subclass DirectDialTelephoneCommunication TelephoneCommunication)
(documentation DirectDialTelephoneCommunication EnglishLanguage 
"&%DirectDialTelephoneCommunication refers to &%TelephoneCommunication where there 
is no operator that connects origin and destination")
(termFormat EnglishLanguage DirectDialTelephoneCommunication "direct dial telephone
communication")

(=>
  (instance ?X DirectDialTelephoneCommunication)
  (not
    (exists (?OPERATOR)
      (and
        (instance ?OPERATOR Human)
        (hasPurpose ?OPERATOR
          (exists (?PROC)
            (and
              (instance ?PROC IntentionalProcess)
              (agent ?PROC ?OPERATOR)
              (subProcess ?PROC ?X)
              (result ?PROC ?RESULT)
              (equal ?RESULT
                (modalAttribute
                  (exists (?COMM)
                    (and
                      (instance ?COMM Communication)
                      (origin ?COMM ?ORIGIN)
                      (destination ?COMM ?DEST))) Possibility)))))))))
                      
(subclass VoiceMail AudioRecording)
(documentation VoiceMail EnglishLanguage "&%VoiceMail refers to an &%AudioRecording
that is done through the &%TelephoneSystem")                      

(=>
  (instance ?X VoiceMail)
  (exists (?TEL)
    (and
      (instance ?TEL TelephoneCommunication)
      (patient ?TEL ?X))))

;; RELATED ATTRIBUTES (although can be applied to other contexts)
(instance Local RelationalAttribute)
(documentation Local EnglishLanguage "&%Local refers to something within the same
region or area")
(termFormat EnglishLanguage Local "local")

(=>
  (and
    (instance ?X TelephoneCommunication)
    (attribute ?X Local))
  (exists (?TEL1 ?TEL2 ?ORIGIN ?DEST ?CODE)
    (and
      (origin ?X ?ORIGIN)
      (destination ?X ?DEST)
      (telephoneNumber ?TEL1 ?ORIGIN)
      (telephoneNumber ?TEL2 ?DEST)
      (telecomAreaCode ?CODE ?TEL1)
      (telecomAreaCode ?CODE ?TEL2))))

(instance Domestic RelationalAttribute)
(documentation Domestic EnglishLanguage "&%Domestic refers to something within the same
&%Nation")
(termFormat EnglishLanguage Domestic "domestic")
      
(=>
  (and
    (instance ?X TelephoneCommunication)
    (attribute ?X Domestic))
  (exists (?ORIGIN ?DEST ?COUNTRY)
    (and
      (origin ?X ?ORIGIN)
      (destination ?X ?DEST)
      (located ?ORIGIN ?COUNTRY)
      (located ?DEST ?COUNTRY)
      (instance ?COUNTRY Nation))))

(instance International RelationalAttribute)
(documentation International EnglishLanguage "&%International refers to something outside
of the country")
(termFormat EnglishLanguage International "international")
      
(=>
  (and
    (instance ?X TelephoneCommunication)
    (attribute ?X International))
  (exists (?ORIGIN ?DEST ?CTRY1 ?CTRY2)
    (and
      (origin ?X ?ORIGIN)
      (destination ?X ?DEST)
      (located ?ORIGIN ?CTRY1)
      (located ?DEST ?CTRY2)
      (instance ?CTRY1 Nation)
      (instance ?CTRY2 Nation)
      (not (equal ?CTRY1 ?CTRY2)))))

;; KJN: Moved from Dining.kif      
(instance CommunalAttribute RelationalAttribute)
(documentation CommunalAttribute EnglishLanguage "&%CommunalAttribute 
describes how an &%Object is shared by many")
(termFormat EnglishLanguage CommunalAttribute "communal")

(instance PrivateAttribute RelationalAttribute)
(documentation PrivateAttribute EnglishLanguage "&%PrivateAttribute describes how an 
object is not available to other people without the consent of the 
current owner")

(=>
  (attribute ?X CommunalAttribute)
  (instance ?X Object))

(=>
  (attribute ?X PrivateAttribute)
  (modalAttribute
    (not (attribute ?X CommunalAttribute)) Likely))

(=>
  (attribute ?X CommunalAttribute)
  (modalAttribute
    (not (attribute ?X PrivateAttribute)) Likely))

;; KJN: End Import      

(documentation Policy EnglishLanguage "&%Policy is (the contents of) a type of &%Declaring created and enforced by an &%Organization such as a government or a business, which contains guiding
principles or a plan or course of action adopted by that organization.")
(termFormat EnglishLanguage Policy "policy")

(subclass Policy Proposition)
;(subclass Policy Declaring)
;(subclass Policy ContentBearingProcess)

;; Policies bind the organization (and some individuals) in  some informal agreement
  
(=>
  (instance ?POLICY Policy)
  (exists (?ORG)
    (policyOwner ?ORG ?POLICY))) 
  
(instance policyOwner BinaryPredicate)
(documentation policyOwner EnglishLanguage "(&%policyOwner ?&%Organization ?&%Policy) describes how ?&%Policy is adopted and enforced by ?&%Organization")
(termFormat EnglishLanguage policyOwner "policy owner")

(domain policyOwner 1 Organization)
(domain policyOwner 2 Policy)

;; The policy owner creates the Policy

(=>
  (policyOwner ?AGENT ?POLICY)
  (exists (?CREATE)
    (and
      (instance ?CREATE Creation)
      (agent ?CREATE ?AGENT)
      (result ?CREATE ?POLICY))))      

;; -----------------------------------------------------------------------------
;; Import from elements.kif
;; -----------------------------------------------------------------------------

; This dictionary database was created by Jay F. Kominek
; <jkominek@miranda.org> (Feel free to send any comments, additions,
; corrections, money to that address) It was compiled from a variety of
; sources, and is in my opinion, a work of my own. (The only stuff that
; was really copied verbatim was the atomic numbers and weights, please,
; I'd like to see someone try and exert a copyright on the values of
; atoms.)  So, I place this in the public domain, if it somehow breaks,
; you get to keep both pieces. It'd be nice if you kept the fact that I
; compiled the information in here, but is not needed.
; Up to date copies can probably be found on the web at:
; http://www.miranda.org/~jkominek/elements/

; This information has been converted to KIF by Adam Pease adampease@earthlink.net.
; This file (unlike many of our other ontology files, which are released
; under GNU license) is being released in the public domain, in keeping
; with the view of the original compiler of the material.

; This file depends on SUMO and the Government ontology (although only
; for conventionalShortName).

; The original information has since been augmented with data for melting
; and boiling points.

;; We ask that people using or referencing this work 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.  See also www.ontologyportal.org
                          
(subclass Hydrogen ElementalSubstance)
(names Hydrogen "Hydrogen")
(conventionalShortName "H" Hydrogen)
(atomicNumber Hydrogen 1)
(=>
  (and
    (instance ?ATOM Hydrogen)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 1.0079 Amu)))

(documentation Hydrogen EnglishLanguage "Colourless, odourless gaseous chemical element.  
Lightest and most abundant element in the universe.  Present in water and 
in all organic compounds.  Chemically reacts with most elements.  
Discovered by Henry Cavendish in 1776.") 

(subclass Helium ElementalSubstance)
(names Helium "Helium")
(conventionalShortName "He" Helium)
(atomicNumber Helium 2)
(=>
  (and
    (instance ?ATOM Helium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 4.0026 Amu)))

(documentation Helium EnglishLanguage "Colourless, odourless gaseous nonmetallic element.  
Belongs to group 18 of the periodic table.  Lowest boiling point of all 
elements and can only be solidified under pressure.  Chemically inert, no 
known compounds.  Discovered in the solar spectrum in 1868 by Lockyer.") 

(subclass Lithium ElementalSubstance)
(names Lithium "Lithium")
(conventionalShortName "Li" Lithium)
(atomicNumber Lithium 3)
(=>
  (and
    (instance ?ATOM Lithium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 6.939 Amu)))

(documentation Lithium EnglishLanguage "Socket silvery metal.  First member of group 1 of 
the periodic table.  Lithium salts are used in psychomedicine.") 

(subclass Beryllium ElementalSubstance)
(names Beryllium "Beryllium")
(conventionalShortName "Be" Beryllium)
(atomicNumber Beryllium 4)
(=>
  (and
    (instance ?ATOM Beryllium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 9.0122 Amu)))

(documentation Beryllium EnglishLanguage "Grey metallic element of group 2 of the periodic 
table.  Is toxic and can cause severe lung diseases and dermatitis.  Shows 
high covalent character.  It was isolated independently by F.  Wohler and 
A.A.  Bussy in 1828.") 

(subclass Boron ElementalSubstance)
(names Boron "Boron")
(conventionalShortName "B" Boron)
(atomicNumber Boron 5)
(=>
  (and
    (instance ?ATOM Boron)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 10.811 Amu)))

(documentation Boron EnglishLanguage "An element of group 13 of the periodic table.  There 
are two allotropes, amorphous boron is a brown power, but metallic boron 
is black.  The metallic form is hard (9.3 on Mohs' scale) and a bad 
conductor in room temperatures.  It is never found free in nature.  
Boron-10 is used in nuclear reactor control rods and shields.  It was 
discovered in 1808 by Sir Humphry Davy and by J.L.  Gay-Lussac and L.J.  
Thenard.") 

(subclass Carbon ElementalSubstance)
(names Carbon "Carbon")
(conventionalShortName "C" Carbon)
(atomicNumber Carbon 6)
(=>
  (and
    (instance ?ATOM Carbon)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 12.01115 Amu)))

(documentation Carbon EnglishLanguage "Carbon is a member of group 14 of the periodic 
table.  It has three allotropic forms of it, diamonds, graphite and 
fullerite.  Carbon-14 is commonly used in radioactive dating.  Carbon 
occurs in all organic life and is the basis of organic chemistry.  Carbon 
has the interesting chemical property of being able to bond with itself, 
and a wide variety of other elements.") 

(subclass Nitrogen ElementalSubstance)
(names Nitrogen "Nitrogen")
(conventionalShortName "N" Nitrogen)
(atomicNumber Nitrogen 7)
(=>
  (and
    (instance ?ATOM Nitrogen)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 14.0067 Amu)))

(documentation Nitrogen EnglishLanguage "Colourless, gaseous element which belongs to 
group 15 of the periodic table.  Constitutes ~78 percent of the atmosphere 
and is an essential part of the ecosystem.  Nitrogen for industrial 
purposes is acquired by the fractional distillation of liquid air.  
Chemically inactive, reactive generally only at high temperatures or in 
electrical discharges.  It was discovered in 1772 by D.  Rutherford.") 

(subclass Oxygen ElementalSubstance)
(names Oxygen "Oxygen")
(conventionalShortName "O" Oxygen)
(atomicNumber Oxygen 8)
(=>
  (and
    (instance ?ATOM Oxygen)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 15.9994 Amu)))

(documentation Oxygen EnglishLanguage "A colourless, odourless gaseous element belonging 
to group 16 of the periodic table.  It is the most abundant element 
present in the earth's crust.  It also makes up 20.8 percent of the 
Earth's atmosphere.  For industrial purposes, it is separated from liquid 
air by fractional distillation.  It is used in high temperature welding, 
and in breathing.  It commonly comes in the form of Oxygen, but is found 
as Ozone in the upper atmosphere.  It was discovered by Priestley in 
1774.") 

(subclass Fluorine ElementalSubstance)
(names Fluorine "Fluorine")
(conventionalShortName "F" Fluorine)
(atomicNumber Fluorine 9)
(=>
  (and
    (instance ?ATOM Fluorine)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 18.9984 Amu)))

(documentation Fluorine EnglishLanguage "A poisonous pale yellow gaseous element belonging 
to group 17 of the periodic table (The halogens).  It is the most 
chemically reactive and electronegative element.  It is highly dangerous, 
causing severe chemical burns on contact with flesh.  Fluorine was 
identified by Scheele in 1771 and first isolated by Moissan in 1886.") 

(subclass Neon ElementalSubstance)
(names Neon "Neon")
(conventionalShortName "Ne" Neon)
(atomicNumber Neon 10)
(=>
  (and
    (instance ?ATOM Neon)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 20.183 Amu)))

(documentation Neon EnglishLanguage "Colourless gaseous element of group 18 on the 
periodic table (noble gases).  Neon occurs in the atmosphere, and 
comprises 0.0018 percent of the volume of the atmosphere.  It has a 
distinct reddish glow when used in discharge tubes and neon based lamps.  
It forms almost no chemical compounds.  Neon was discovered in 1898 by Sir 
William Ramsey and M.W.  Travers.  ") 

(subclass Sodium ElementalSubstance)
(names Sodium "Sodium")
(conventionalShortName "Na" Sodium)
(atomicNumber Sodium 11)
(=>
  (and
    (instance ?ATOM Sodium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 22.9898 Amu)))

(documentation Sodium EnglishLanguage "Soft silvery reactive element belonging to group 1 
of the periodic table (alkali metals).  It is highly reactive, oxidizing 
in air and reacting violently with water, forcing it to be kept under oil.  
It was first isolated by Humphrey Davy in 1807.") 

(subclass Magnesium ElementalSubstance)
(names Magnesium "Magnesium")
(conventionalShortName "Mg" Magnesium)
(atomicNumber Magnesium 12)
(=>
  (and
    (instance ?ATOM Magnesium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 24.312 Amu)))

(documentation Magnesium EnglishLanguage "Silvery metallic element belonging to group 2 of 
the periodic table (alkaline-earth metals).  It is essential for living 
organisms, and is used in a number of light alloys.  Chemically very 
reactive, it forms a protective oxide coating when exposed to air and 
burns with an intense white flame.  It also reacts with sulphur, nitrogen 
and the halogens.  First isolated by Bussy in 1828.") 

(subclass Aluminum ElementalSubstance)
(names Aluminum "Aluminum")
(conventionalShortName "Al" Aluminum)
(atomicNumber Aluminum 13)
(=>
  (and
    (instance ?ATOM Aluminum)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 26.9815 Amu)))

(documentation Aluminum EnglishLanguage "Silvery-white lustrous metallic element of group 
3 of the periodic table.  Highly reactive but protected by a thin 
transparent layer of the oxide which quickly forms in air.  There are many 
alloys of aluminum, as well as a good number of industrial uses.  Makes up 
8.1 percent of the Earth's crust, by weight.  Isolated in 1825 by H.C.  
Oersted.") 

(subclass Silicon ElementalSubstance)
(names Silicon "Silicon")
(conventionalShortName "Si" Silicon)
(atomicNumber Silicon 14)
(=>
  (and
    (instance ?ATOM Silicon)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 28.086 Amu)))

(documentation Silicon EnglishLanguage "Metalloid element belonging to group 14 of the 
periodic table.  It is the second most abundant element in the Earth's 
crust, making up 25.7 percent of it by weight.  Chemically less reactive 
than carbon.  First identified by Lavoisier in 1787 and first isolated in 
1823 by Berzelius.") 

(subclass Phosphorus ElementalSubstance)
(names Phosphorus "Phosphorus")
(conventionalShortName "P" Phosphorus)
(atomicNumber Phosphorus 15)
(=>
  (and
    (instance ?ATOM Phosphorus)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 30.9738 Amu)))

(documentation Phosphorus EnglishLanguage "Non-metallic element belonging to group 15 of 
the periodic table.  Has a multiple allotropic forms.  Essential element 
for living organisms.  It was discovered by Brandt in 1669.") 

(subclass Sulphur ElementalSubstance)
(names Sulphur "Sulphur")
(conventionalShortName "S" Sulphur)
(atomicNumber Sulphur 16)
(=>
  (and
    (instance ?ATOM Sulphur)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 32.064 Amu)))

(documentation Sulphur EnglishLanguage "Yellow, nonmetallic element belonging to group 16 
of the periodic table.  It is an essential element in living organisms, 
needed in the amino acids cysteine and methionine, and hence in many 
proteins.  Absorbed by plants from the soil as sulphate ion.") 

(subclass Chlorine ElementalSubstance)
(names Chlorine "Chlorine")
(conventionalShortName "Cl" Chlorine)
(atomicNumber Chlorine 17)
(=>
  (and
    (instance ?ATOM Chlorine)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 35.453 Amu)))

(documentation Chlorine EnglishLanguage "Halogen element.  Poisonous greenish-yellow gas.  
Occurs widely in nature as sodium chloride in seawater.  Reacts directly 
with many elements and compounds, strong oxidizing agent.  Discovered by 
Karl Scheele in 1774.  Humphrey David confirmed it as an element in 
1810.") 

(subclass Argon ElementalSubstance)
(names Argon "Argon")
(conventionalShortName "Ar" Argon)
(atomicNumber Argon 18)
(=>
  (and
    (instance ?ATOM Argon)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 39.948 Amu)))

(documentation Argon EnglishLanguage "Monatomic noble gas.  Makes up 0.93 percent of the 
air.  Colourless, odorless.  Is inert and has no true compounds.  Lord 
Rayleigh and Sir william Ramsey identified argon in 1894.") 

(subclass Potassium ElementalSubstance)
(names Potassium "Potassium")
(conventionalShortName "K" Potassium)
(atomicNumber Potassium 19)
(=>
  (and
    (instance ?ATOM Potassium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 39.0983 Amu)))

(documentation Potassium EnglishLanguage "Soft silvery metallic element belonging to group 
1 of the periodic table (alkali metals).  Occurs naturally in seawater and 
a many minerals.  Highly reactive, chemically, it resembles sodium in its 
behavior and compounds.  Discovered by Sir Humphry Davy in 1807.") 

(subclass Calcium ElementalSubstance)
(names Calcium "Calcium")
(conventionalShortName "Ca" Calcium)
(atomicNumber Calcium 20)
(=>
  (and
    (instance ?ATOM Calcium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 40.08 Amu)))

(documentation Calcium EnglishLanguage "Soft grey metallic element belonging to group 2 of 
the periodic table.  Used a reducing agent in the extraction of thorium, 
zirconium and uranium.  Essential element for living organisms.") 

(subclass Scandium ElementalSubstance)
(names Scandium "Scandium")
(conventionalShortName "Sc" Scandium)
(atomicNumber Scandium 21)
(=>
  (and
    (instance ?ATOM Scandium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 44.956 Amu)))

(documentation Scandium EnglishLanguage "Rare soft silvery metallic element belonging to 
group 3 of the periodic table.  There are ten isotopes, nine of which are 
radioactive and have short half-lives.  Predicted in 1869 by Mendeleev, 
isolated by Nilson in 1879.") 

(subclass Titanium ElementalSubstance)
(names Titanium "Titanium")
(conventionalShortName "Ti" Titanium)
(atomicNumber Titanium 22)
(=>
  (and
    (instance ?ATOM Titanium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 47.90 Amu)))

(documentation Titanium EnglishLanguage "White metallic transition element.  Occurs in 
numerous minerals.  Used in strong, light corrosion-resistant alloys.  
Forms a passive oxide coating when exposed to air.  First discovered by 
Gregor in 1789.") 

(subclass Vanadium ElementalSubstance)
(names Vanadium "Vanadium")
(conventionalShortName "V" Vanadium)
(atomicNumber Vanadium 23)
(=>
  (and
    (instance ?ATOM Vanadium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 50.9415 Amu)))

(documentation Vanadium EnglishLanguage "Soft and ductile, bright white metal.  Good 
resistance to corrosion by alkalis, sulphuric and hydrochloric acid.  It 
oxidizes readily about 933K.  There are two naturally occurring isotopes 
of vanadium, and 5 radioisotopes, V-49 having the longest half-life at 337 
days.  Vanadium has nuclear applications, the foil is used in cladding 
titanium to steel, and vanadium-gallium tape is used to produce a 
superconductive magnet.  Originally discovered by Andres Manuel del Rio of 
Mexico City in 1801.  His discovery went unheeded, however, and in 1820, 
Nils Gabriel Sefstron of Sweden rediscovered it.  Metallic vanadium was 
isolated by Henry Enfield Roscoe in 1867.  The name vanadium comes from 
{Vanadis}, a goddess of Scandinavian mythology.  Silvery-white metallic 
transition element.  Vanadium is essential to {ascidian}s.  Rats and 
chickens are also known to require it.  Metal powder is a fire hazard, and 
vanadium compounds should be considered highly toxic.  May cause lung 
cancer if inhaled.") 

(subclass Chromium ElementalSubstance)
(names Chromium "Chromium")
(conventionalShortName "Cr" Chromium)
(atomicNumber Chromium 24)
(=>
  (and
    (instance ?ATOM Chromium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 51.996 Amu)))

(documentation Chromium EnglishLanguage "Hard silvery transition element.  Used in 
decorative electroplating.  Discovered in 1797 by Vauquelin.") 

(subclass Manganese ElementalSubstance)
(names Manganese "Manganese")
(conventionalShortName "Mn" Manganese)
(atomicNumber Manganese 25)
(=>
  (and
    (instance ?ATOM Manganese)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 54.938 Amu)))

(documentation Manganese EnglishLanguage "Grey brittle metallic transition element.  
Rather electropositive, combines with some non-metals when heated.  
Discovered in 1774 by Scheele.") 

(subclass Iron ElementalSubstance)
(names Iron "Iron")
(conventionalShortName "Fe" Iron)
(atomicNumber Iron 26)
(=>
  (and
    (instance ?ATOM Iron)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 55.847 Amu)))

(documentation Iron EnglishLanguage "Silvery malleable and ductile metallic transition 
element.  Has nine isotopes and is the fourth most abundant element in the 
earth's crust.  Required by living organisms as a trace element (used in 
hemoglobin in humans.) Quite reactive, oxidizes in moist air, displaces 
hydrogen from dilute acids and combines with nonmetallic elements.") 

(subclass Cobalt ElementalSubstance)
(names Cobalt "Cobalt")
(conventionalShortName "Co" Cobalt)
(atomicNumber Cobalt 27)
(=>
  (and
    (instance ?ATOM Cobalt)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 58.993 Amu)))

(documentation Cobalt EnglishLanguage "Light grey transition element.  Some meteorites 
contain small amounts of metallic cobalt.  Generally alloyed for use.  
Mammals require small amounts of cobalt salts.  Cobalt-60, an artificially 
produced radioactive isotope of Cobalt is an important radioactive tracer 
and cancer-treatment agent.  Discovered by G.  Brandt in 1737.") 

(subclass Nickel ElementalSubstance)
(names Nickel "Nickel")
(conventionalShortName "Ni" Nickel)
(atomicNumber Nickel 28)
(=>
  (and
    (instance ?ATOM Nickel)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 58.71 Amu)))

(documentation Nickel EnglishLanguage "Malleable ductile silvery metallic transition 
element.  Discovered by A.F.  Cronstedt in 1751.") 

(subclass Copper ElementalSubstance)
(names Copper "Copper")
(conventionalShortName "Cu" Copper)
(atomicNumber Copper 29)
(=>
  (and
    (instance ?ATOM Copper)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 63.54 Amu)))

(documentation Copper EnglishLanguage "Red-brown transition element.  Known by the Romans 
as 'cuprum.' Extracted and used for thousands of years.  Malleable, 
ductile and an excellent conductor of heat and electricity.  When in moist 
conditions, a greenish layer forms on the outside.") 

(subclass Zinc ElementalSubstance)
(names Zinc "Zinc")
(conventionalShortName "Zn" Zinc)
(atomicNumber Zinc 30)
(=>
  (and
    (instance ?ATOM Zinc)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 65.38 Amu)))

(documentation Zinc EnglishLanguage "Blue-white metallic element.  Occurs in multiple 
compounds naturally.  Five stable isotopes are six radioactive isotopes 
have been found.  Chemically a reactive metal, combines with oxygen and 
other non-metals, reacts with dilute acids to release hydrogen.") 

(subclass Gallium ElementalSubstance)
(names Gallium "Gallium")
(conventionalShortName "Ga" Gallium)
(atomicNumber Gallium 31)
(=>
  (and
    (instance ?ATOM Gallium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 69.72 Amu)))

(documentation Gallium EnglishLanguage "Soft silvery metallic element, belongs to group 13 
of the periodic table.  The two stable isotopes are Ga-69 and Ga-71.  
Eight radioactive isotopes are known, all having short half-lives.  
Gallium Arsenide is used as a semiconductor.  Corrodes most other metals 
by diffusing into their lattice.  First identified by Francois Lecoq de 
Boisbaudran in 1875.") 

(subclass Germanium ElementalSubstance)
(names Germanium "Germanium")
(conventionalShortName "Ge" Germanium)
(atomicNumber Germanium 32)
(=>
  (and
    (instance ?ATOM Germanium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 72.59 Amu)))

(documentation Germanium EnglishLanguage "Lustrous hard metalloid element, belongs to 
group 14 of the periodic table.  Forms a large number of organometallic 
compounds.  Predicted by Mendeleev in 1871, it was actually found in 1886 
by Winkler.") 

(subclass Arsenic ElementalSubstance)
(names Arsenic "Arsenic")
(conventionalShortName "As" Arsenic)
(atomicNumber Arsenic 33)
(=>
  (and
    (instance ?ATOM Arsenic)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 74.922 Amu)))

(documentation Arsenic EnglishLanguage "Metalloid element of group 15.  There are three 
allotropes, yellow, black, and grey.  Reacts with halogens, concentrated 
oxidizing acids and hot alkalis.  Albertus Magnus is believed to have been 
the first to isolate the element in 1250.") 

(subclass Selenium ElementalSubstance)
(names Selenium "Selenium")
(conventionalShortName "Se" Selenium)
(atomicNumber Selenium 34)
(=>
  (and
    (instance ?ATOM Selenium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 78.96 Amu)))

(documentation Selenium EnglishLanguage "Metalloid element, belongs to group 16 of the 
periodic table.  Multiple allotropic forms exist.  Chemically resembles 
sulphur.  Discovered in 1817 by Jons J.  Berzelius.") 

(subclass Bromine ElementalSubstance)
(names Bromine "Bromine")
(conventionalShortName "Br" Bromine)
(atomicNumber Bromine 35)
(=>
  (and
    (instance ?ATOM Bromine)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 79.909 Amu)))

(documentation Bromine EnglishLanguage "Halogen element.  Red volatile liquid at room 
temperature.  Its reactivity is somewhere between chlorine and iodine.  
Harmful to human tissue in a liquid state, the vapour irritates eyes and 
throat.  Discovered in 1826 by Antoine Balard.") 

(subclass Krypton ElementalSubstance)
(names Krypton "Krypton")
(conventionalShortName "Kr" Krypton)
(atomicNumber Krypton 36)
(=>
  (and
    (instance ?ATOM Krypton)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 83.80 Amu)))

(documentation Krypton EnglishLanguage "Colorless gaseous element, belongs to the noble 
gases.  Occurs in the air, 0.0001 percent by volume.  It can be extracted 
from liquid air by fractional distillation.  Generally not isolated, but 
used with other inert gases in fluorescent lamps.  Five natural isotopes, 
and five radioactive isotopes.  Kr-85, the most stable radioactive 
isotope, has a half-life of 10.76 years and is produced in fission 
reactors.  Practically inert, though known to form compounds with 
{fluorine}.") 

(subclass Rubidium ElementalSubstance)
(names Rubidium "Rubidium")
(conventionalShortName "Rb" Rubidium)
(atomicNumber Rubidium 37)
(=>
  (and
    (instance ?ATOM Rubidium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 85.47 Amu)))

(documentation Rubidium EnglishLanguage "Soft silvery metallic element, belongs to group 1 
of the periodic table.  Rb-97, the naturally occurring isotope, is 
radioactive.  It is highly reactive, with properties similar to other 
elements in group 1, like igniting spontaneously in air.  Discovered 
spectroscopically in 1861 by W.  Bunsen and G.R.  Kirchoff.") 

(subclass Strontium ElementalSubstance)
(names Strontium "Strontium")
(conventionalShortName "Sr" Strontium)
(atomicNumber Strontium 38)
(=>
  (and
    (instance ?ATOM Strontium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 87.62 Amu)))

(documentation Strontium EnglishLanguage "Soft yellowish metallic element, belongs to 
group 2 of the periodic table.  Highly reactive chemically.  Sr-90 is 
present in radioactive fallout and has a half-life of 28 years.  
Discovered in 1798 by Klaproth and Hope, isolated in 1808 by Humphry 
Davy.") 

(subclass Yttrium ElementalSubstance)
(names Yttrium "Yttrium")
(conventionalShortName "Y" Yttrium)
(atomicNumber Yttrium 39)
(=>
  (and
    (instance ?ATOM Yttrium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 88.905 Amu)))

(documentation Yttrium EnglishLanguage "Silvery-grey metallic element of group 3 on the 
periodic table.  Found in uranium ores.  The only natural isotope is Y-89, 
there are 14 other artificial isotopes.  Chemically resembles the 
lanthanoids.  Stable in the air below 400 degrees, celsius.  Discovered in 
1828 by Friedrich Wohler.") 

(subclass Zirconium ElementalSubstance)
(names Zirconium "Zirconium")
(conventionalShortName "Zr" Zirconium)
(atomicNumber Zirconium 40)
(=>
  (and
    (instance ?ATOM Zirconium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 91.22 Amu)))

(documentation Zirconium EnglishLanguage "Grey-white metallic transition element.  Five 
natural isotopes and six radioactive isotopes are known.  Used in nuclear 
reactors for a {neutron} absorber.  Discovered in 1789 by Martin Klaproth, 
isolated in 1824 by Berzelius.") 

(subclass Niobium ElementalSubstance)
(names Niobium "Niobium")
(conventionalShortName "Nb" Niobium)
(atomicNumber Niobium 41)
(=>
  (and
    (instance ?ATOM Niobium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 92.906 Amu)))

(documentation Niobium EnglishLanguage "Soft, ductile grey-blue metallic transition 
element.  Used in special steels and in welded joints to increase 
strength.  Combines with halogens and oxidizes in air at 200 degrees 
celsius.  Discovered by Charles Hatchett in 1801 and isolated by 
Blomstrand in 1864.  Called {columbium} originally.") 

(subclass Molybdenum ElementalSubstance)
(names Molybdenum "Molybdenum")
(conventionalShortName "Mo" Molybdenum)
(atomicNumber Molybdenum 42)
(=>
  (and
    (instance ?ATOM Molybdenum)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 95.94 Amu)))

(documentation Molybdenum EnglishLanguage "Silvery-white, hard metallic transition 
element.  It is chemically unreactive and is not affected by most acids.  
It oxidizes at high temperatures.  There are seven natural isotopes, and 
four radioisotopes, Mo-93 being the most stable with a half-life of 3500 
years.  Molybdenum is used in almost all high-strength steels, it has 
nuclear applications, and is a catalyst in petroleum refining.  Discovered 
in 1778 by Carl Welhelm Scheele of Sweden.  Impure metal was prepared in 
1782 by Peter Jacob Hjelm.  The name comes from the Greek word molybdos 
which means lead.  Trace amounts of molybdenum are required for all known 
forms of life.  All molybdenum compounds should be considered highly 
toxic, and will also cause severe birth defects.") 

(subclass Technetium ElementalSubstance)
(names Technetium "Technetium")
(conventionalShortName "Tc" Technetium)
(atomicNumber Technetium 43)
(=>
  (and
    (instance ?ATOM Technetium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 98 Amu)))

(documentation Technetium EnglishLanguage "Radioactive metallic transition element.  Can 
be detected in some stars and the fission products of uranium.  First made 
by Perrier and Segre by bombarding molybdenum with deutrons, giving them 
Tc-97.  Tc-99 is the most stable isotope with a half-life of 2.6*10^6 
years.  Sixteen isotopes are known.  Organic technetium compounds are used 
in bone imaging.  Chemical properties are intermediate between rhenium and 
manganese.") 

(subclass Ruthenium ElementalSubstance)
(names Ruthenium "Ruthenium")
(conventionalShortName "Ru" Ruthenium)
(atomicNumber Ruthenium 44)
(=>
  (and
    (instance ?ATOM Ruthenium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 101.07 Amu)))

(documentation Ruthenium EnglishLanguage "Hard white metallic transition element.  Found 
with platinum, used as a catalyst in some platinum alloys.  Dissolves in 
fused alkalis, and is not attacked by acids.  Reacts with halogens and 
oxygen at high temperatures.  Isolated in 1844 by K.K.  Klaus.") 

(subclass Rhodium ElementalSubstance)
(names Rhodium "Rhodium")
(conventionalShortName "Rh" Rhodium)
(atomicNumber Rhodium 45)
(=>
  (and
    (instance ?ATOM Rhodium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 102.905 Amu)))

(documentation Rhodium EnglishLanguage "Silvery white metallic transition element.  Found 
with platinum and used in some platinum alloys.  Not attacked by acids, 
dissolves only in aqua regia.  Discovered in 1803 by W.H.  Wollaston.") 

(subclass Palladium ElementalSubstance)
(names Palladium "Palladium")
(conventionalShortName "Pd" Palladium)
(atomicNumber Palladium 46)
(=>
  (and
    (instance ?ATOM Palladium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 106.4 Amu)))

(documentation Palladium EnglishLanguage "Soft white ductile transition element.  Found 
with some copper and nickel ores.  Does not react with oxygen at normal 
temperatures.  Dissolves slowly in hydrochloric acid.  Discovered in 1803 
by W.H.  Wollaston.") 

(subclass Silver ElementalSubstance)
(names Silver "Silver")
(conventionalShortName "Ag" Silver)
(atomicNumber Silver 47)
(=>
  (and
    (instance ?ATOM Silver)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 107.870 Amu)))

(documentation Silver EnglishLanguage "White lustrous soft metallic transition element.  
Found in both its elemental form and in minerals.  Used in jewellery, 
tableware and so on.  Less reactive than silver, chemically.") 

(subclass Cadmium ElementalSubstance)
(names Cadmium "Cadmium")
(conventionalShortName "Cd" Cadmium)
(atomicNumber Cadmium 48)
(=>
  (and
    (instance ?ATOM Cadmium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 112.40 Amu)))

(documentation Cadmium EnglishLanguage "Soft bluish metal belonging to group 12 of the 
periodic table.  Extremely toxic even in low concentrations.  Chemically 
similar to zinc, but lends itself to more complex compounds.  Discovered 
in 1817 by F.  Stromeyer.") 

(subclass Indium ElementalSubstance)
(names Indium "Indium")
(conventionalShortName "In" Indium)
(atomicNumber Indium 49)
(=>
  (and
    (instance ?ATOM Indium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 114.82 Amu)))

(documentation Indium EnglishLanguage "Soft silvery element belonging to group 13 of the 
periodic table.  The most common natural isotope is In-115, which has a 
half-life of 6*10^4 years.  Five other radioisotopes exist.  Discovered in 
1863 by Reich and Richter.") 

(subclass Tin ElementalSubstance)
(names Tin "Tin")
(conventionalShortName "Sn" Tin)
(atomicNumber Tin 50)
(=>
  (and
    (instance ?ATOM Tin)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 118.69 Amu)))

(documentation Tin EnglishLanguage "Silvery malleable metallic element belonging to group 
14 of the periodic table.  Twenty-six isotopes are known, five of which 
are radioactive.  Chemically reactive.  Combines directly with chlorine 
and oxygen and displaces hydrogen from dilute acids.  ") 

(subclass Antimony ElementalSubstance)
(names Antimony "Antimony")
(conventionalShortName "Sb" Antimony)
(atomicNumber Antimony 51)
(=>
  (and
    (instance ?ATOM Antimony)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 121.75 Amu)))

(documentation Antimony EnglishLanguage "Element of group 15.  Multiple allotropic forms.  
The stable form of antimony is a blue-white metal.  Yellow and black 
antimony are unstable non-metals.  Used in flame-proofing, paints, 
ceramics, enamels, and rubber.  Attacked by oxidizing acids and halogens.  
First reported by Tholden in 1450.") 

(subclass Tellurium ElementalSubstance)
(names Tellurium "Tellurium")
(conventionalShortName "Te" Tellurium)
(atomicNumber Tellurium 52)
(=>
  (and
    (instance ?ATOM Tellurium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 127.60 Amu)))

(documentation Tellurium EnglishLanguage "Silvery metalloid element of group 16.  Eight 
natural isotopes, nine radioactive isotopes.  Used in semiconductors and 
to a degree in some steels.  Chemistry is similar to {sulphur}.  
Discovered in 1782 by Franz Miller.") 

(subclass Iodine ElementalSubstance)
(names Iodine "Iodine")
(conventionalShortName "I" Iodine)
(atomicNumber Iodine 53)
(=>
  (and
    (instance ?ATOM Iodine)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 126.904 Amu)))

(documentation Iodine EnglishLanguage "Dark violet nonmetallic element, belongs to group 
17 of the periodic table.  Insoluble in water.  Required as a trace 
element for living organisms.  One stable isotope, I-127 exists, in 
addition to fourteen radioactive isotopes.  Chemically the least reactive 
of the halogens, and the most electropositive metallic halogen.  
Discovered in 1812 by Courtois.  ") 

(subclass Xenon ElementalSubstance)
(names Xenon "Xenon")
(conventionalShortName "Xe" Xenon)
(atomicNumber Xenon 54)
(=>
  (and
    (instance ?ATOM Xenon)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 131.30 Amu)))

(documentation Xenon EnglishLanguage "Colourless, odourless gas belonging to group 18 on 
the periodic table (the noble gases.) Nine natural isotopes and seven 
radioactive isotopes are known.  Xenon was part of the first noble-gas 
compound synthesized.  Several others involving Xenon have been found 
since then.  Xenon was discovered by Ramsey and Travers in 1898.") 

(subclass Caesium ElementalSubstance)
(names Caesium "Caesium")
(conventionalShortName "Cs" Caesium)
(atomicNumber Caesium 55)
(=>
  (and
    (instance ?ATOM Caesium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 132.90545 Amu)))

(documentation Caesium EnglishLanguage "Soft silvery-white metallic element belonging to 
group 1 of the periodic table.  One of the three metals which are liquid 
at room temperature.  Cs-133 is the natural, and only stable, isotope.  
Fifteen other radioisotopes exist.  Caesium reacts explosively with cold 
water, and ice at temperatures above 157K.  Caesium hydroxide is the 
strongest base known.  Caesium is the most electropositive, most alkaline 
and has the least ionization potential of all the elements.  Known uses 
include the basis of atomic clocks, catalyst for the hydrogenation of some 
organic compounds, and in photoelectric cells.  Caesium was discovered by 
Gustav Kirchoff and Robert Bunsen in Germany in 1860 spectroscopically.  
Its identification was based upon the bright blue lines in its spectrum.  
The name comes from the latin word caesius, which means sky blue.  Caesium 
should be considered highly toxic.  Some of the radioisotopes are even 
more toxic.") 

(subclass Barium ElementalSubstance)
(names Barium "Barium")
(conventionalShortName "Ba" Barium)
(atomicNumber Barium 56)
(=>
  (and
    (instance ?ATOM Barium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 137.34 Amu)))

(documentation Barium EnglishLanguage "Silvery-white reactive element, belonging to group 
2 of the periodic table.  Soluble barium compounds are extremely 
poisonous.  Identified in 1774 by Karl Scheele and extracted in 1808 by 
Humphry Davy.") 

(subclass Lanthanum ElementalSubstance)
(names Lanthanum "Lanthanum")
(conventionalShortName "La" Lanthanum)
(atomicNumber Lanthanum 57)
(=>
  (and
    (instance ?ATOM Lanthanum)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 138.9055 Amu)))

(documentation Lanthanum EnglishLanguage "(From the Greek word lanthanein, to line hidden) 
Silvery metallic element belonging to group 3 of the periodic table and 
oft considered to be one of the lanthanoids.  Found in some rare-earth 
minerals.  Twenty-five natural isotopes exist.  La-139 which is stable, 
and La-138 which has a half-life of 10^10 to 10^15 years.  The other 
twenty-three isotopes are radioactive.  It resembles the lanthanoids 
chemically.  Lanthanum has a low to moderate level of toxicity, and should 
be handled with care.  Discovered in 1839 by C.G.  Mosander.") 

(subclass Cerium ElementalSubstance)
(names Cerium "Cerium")
(conventionalShortName "Ce" Cerium)
(atomicNumber Cerium 58)
(=>
  (and
    (instance ?ATOM Cerium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 140.12 Amu)))

(documentation Cerium EnglishLanguage "Silvery metallic element, belongs to the 
lanthanoids.  Four natural isotopes exist, and fifteen radioactive 
isotopes have been identified.  Used in some rare-earth alloys.  The 
oxidized form is used in the glass industry.  Discovered by Martin .H.  
Klaproth in 1803.") 

(subclass Praseodymium ElementalSubstance)
(names Praseodymium "Praseodymium")
(conventionalShortName "Pr" Praseodymium)
(atomicNumber Praseodymium 59)
(=>
  (and
    (instance ?ATOM Praseodymium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 140.907 Amu)))

(documentation Praseodymium EnglishLanguage "Soft silvery metallic element, belongs to the 
lanthanoids.  Only natural isotope is Pr-141 which is not radioactive.  
Fourteen radioactive isotopes have been artificially produced.  Used in 
rare-earth alloys.  Discovered in 1885 by C.A. von Welsbach.") 

(subclass Neodymium ElementalSubstance)
(names Neodymium "Neodymium")
(conventionalShortName "Nd" Neodymium)
(atomicNumber Neodymium 60)
(=>
  (and
    (instance ?ATOM Neodymium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 144.24 Amu)))

(documentation Neodymium EnglishLanguage "Soft bright silvery metallic element, belongs to 
the lanthanoids.  Seven natural isotopes, Nd-144 being the only 
radioactive one with a half-life of 10^10 to 10^15 years.  Six artificial 
radioisotopes have been produced.  The metal is used in glass works to 
color class a shade of violet-purple and make it dichroic.  One of the 
more reactive rare-earth metals, quickly reacts with air.  Used in some 
rare-earth alloys.  Neodymium is used to color the glass used in welder's 
glasses.  Neodymium is also used in very powerful, permanent magnets 
(Nd2Fe14B).  Discovered by Carl F.  Auer von Welsbach in Austria in 1885 
by separating didymium into its elemental components {praseodymium} and 
neodymium.  The name comes from the Greek words 'neos didymos' which means 
'new twin'.  Neodymium should be considered highly toxic, however evidence 
would seem to show that it acts as little more than a skin and eye 
irritant.  The dust however, presents a fire and explosion hazard.") 

(subclass Promethium ElementalSubstance)
(names Promethium "Promethium")
(conventionalShortName "Pm" Promethium)
(atomicNumber Promethium 61)
(=>
  (and
    (instance ?ATOM Promethium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 147 Amu)))

(documentation Promethium EnglishLanguage "Soft silvery metallic element, belongs to the 
lanthanoids.  Pm-147, the only natural isotope, is radioactive and has a 
half-life of 252 years.  Eighteen radioisotopes have been produced, but 
all have very short half-lives.  Found only in nuclear decay waste.  
Pm-147 is of interest as a beta-decay source, however Pm-146 and Pm-148 
have to be removed from it first, as they generate gamma radiation.  
Discovered by J.A.  Marinsky, L.E.  Glendenin and C.D.  Coryell in 
1947.") 

(subclass Samarium ElementalSubstance)
(names Samarium "Samarium")
(conventionalShortName "Sm" Samarium)
(atomicNumber Samarium 62)
(=>
  (and
    (instance ?ATOM Samarium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 150.35 Amu)))

(documentation Samarium EnglishLanguage "Soft silvery metallic element, belongs to the 
lanthanoids.  Seven natural isotopes, Sm-147 is the only radioisotope, and 
has a half-life of 2.5*10^11 years.  Used for making special alloys needed 
in the production of nuclear reactors.  Also used as a neutron absorber.  
Small quantities of samarium oxide is used in special optical glasses.  
The largest use of the element is its ferromagnetic alloy which produces 
permanent magnets that are five times stronger than magnets produced by 
any other material.  Discovered by Francois Lecoq de Boisbaudran in 
1879.") 

(subclass Europium ElementalSubstance)
(names Europium "Europium")
(conventionalShortName "Eu" Europium)
(atomicNumber Europium 63)
(=>
  (and
    (instance ?ATOM Europium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 151.25 Amu)))

(documentation Europium EnglishLanguage "Soft silvery metallic element belonging to the 
lanthanoids.  Eu-151 and Eu-153 are the only two stable isotopes, both of 
which are {neutron} absorbers.  Discovered in 1889 by Sir William 
Crookes.") 

(subclass Gadolinium ElementalSubstance)
(names Gadolinium "Gadolinium")
(conventionalShortName "Gd" Gadolinium)
(atomicNumber Gadolinium 64)
(=>
  (and
    (instance ?ATOM Gadolinium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 157.25 Amu)))

(documentation Gadolinium EnglishLanguage "Soft silvery metallic element belonging to the 
lanthanoids.  Seven natural, stable isotopes are known in addition to 
eleven artificial isotopes.  Gd-155 and Gd-157 and the best neutron 
absorbers of all elements.  Gadolinium compounds are used in electronics.  
Discovered by J.C.G Marignac in 1880.") 

(subclass Terbium ElementalSubstance)
(names Terbium "Terbium")
(conventionalShortName "Tb" Terbium)
(atomicNumber Terbium 65)
(=>
  (and
    (instance ?ATOM Terbium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 158.924 Amu)))

(documentation Terbium EnglishLanguage "Silvery metallic element belonging to the 
lanthanoids.  Tb-159 is the only stable isotope, there are seventeen 
artificial isotopes.  Discovered by G.G.  Mosander in 1843.") 

(subclass Dysprosium ElementalSubstance)
(names Dysprosium "Dysprosium")
(conventionalShortName "Dy" Dysprosium)
(atomicNumber Dysprosium 66)
(=>
  (and
    (instance ?ATOM Dysprosium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 162.50 Amu)))

(documentation Dysprosium EnglishLanguage "Metallic with a bright silvery-white lustre.  
Dysprosium belongs to the lanthanoids.  It is relatively stable in air at 
room temperatures, it will however dissolve in mineral acids, evolving 
hydrogen.  It is found in from rare-earth minerals.  There are seven 
natural isotopes of dysprosium, and eight radioisotopes, Dy-154 being the 
most stable with a half-life of 3*10^6 years.  Dysprosium is used as a 
neutron absorber in nuclear fission reactions, and in compact disks.  It 
was discovered by Paul Emile Lecoq de Boisbaudran in 1886 in France.  Its 
name comes from the Greek word dysprositos, which means hard to obtain.") 

(subclass Holmium ElementalSubstance)
(names Holmium "Holmium")
(conventionalShortName "Ho" Holmium)
(atomicNumber Holmium 67)
(=>
  (and
    (instance ?ATOM Holmium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 167.26 Amu)))

(documentation Holmium EnglishLanguage "Relatively soft and malleable silvery-white 
metallic element, which is stable in dry air at room temperature.  It 
oxidizes in moist air and at high temperatures.  It belongs to the 
lanthanoids.  A rare-earth metal, it is found in the minerals monazite and 
gadolinite.  It possesses unusual magnetic properties.  One natural 
isotope, Ho-165 exists, six radioisotopes exist, the most stable being 
Ho-163 with a half-life of 4570 years.  Holmium is used in some metal 
alloys, it is also said to stimulate the metabolism.  Discovered by Per 
Theodor Cleve and J.L.  Soret in Switzerland in 1879.  The name homium 
comes from the Greek word Holmia which means Sweden.  While all holmium 
compounds should be considered highly toxic, initial evidence seems to 
indicate that they do not pose much danger.  The metal's dust however, is 
a fire hazard.") 

(subclass Erbium ElementalSubstance)
(names Erbium "Erbium")
(conventionalShortName "Er" Erbium)
(atomicNumber Erbium 68)
(=>
  (and
    (instance ?ATOM Erbium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 167.26 Amu)))

(documentation Erbium EnglishLanguage "Soft silvery metallic element which belongs to the 
lanthanoids.  Six natural isotopes that are stable.  Twelve artificial 
isotopes are known.  Used in nuclear technology as a neutron absorber.  It 
is being investigated for other possible uses.  Discovered by Carl G.  
Mosander in 1843.") 

(subclass Thulium ElementalSubstance)
(names Thulium "Thulium")
(conventionalShortName "Tm" Thulium)
(atomicNumber Thulium 69)
(=>
  (and
    (instance ?ATOM Thulium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 168.934 Amu)))

(documentation Thulium EnglishLanguage "Soft grey metallic element that belongs to the 
lanthanoids.  One natural isotope exists, Tm-169, and seventeen artificial 
isotopes have been produced.  No known uses for the element.  Discovered 
in 1879 by Per Theodor Cleve.") 

(subclass Ytterbium ElementalSubstance)
(names Ytterbium "Ytterbium")
(conventionalShortName "Yb" Ytterbium)
(atomicNumber Ytterbium 70)
(=>
  (and
    (instance ?ATOM Ytterbium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 173.04 Amu)))

(documentation Ytterbium EnglishLanguage "Silvery metallic element of the lanthanoids.  
Seven natural isotopes and ten artificial isotopes are known.  Used in 
certain steels.  Discovered by J.D.G.  Marignac in 1878.") 

(subclass Lutetium ElementalSubstance)
(names Lutetium "Lutetium")
(conventionalShortName "Lu" Lutetium)
(atomicNumber Lutetium 71)
(=>
  (and
    (instance ?ATOM Lutetium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 194.967 Amu)))

(documentation Lutetium EnglishLanguage "Silvery-white rare-earth metal which is 
relatively stable in air.  It happens to be the most expensive rare-earth 
metal.  Its found with almost all rare-earth metals, but is very difficult 
to separate from other elements.  Least abundant of all natural elements.  
Used in metal alloys, and as a catalyst in various processes.  There are 
two natural, stable isotopes, and seven radioisotopes, the most stable 
being Lu-174 with a half-life of 3.3 years.  The separation of lutetium 
from {ytterbium} was described by Georges Urbain in 1907.  It was 
discovered at approximately the same time by Carl Auer von Welsbach.  The 
name comes from the Greek word lutetia which means Paris.") 

(subclass Hafnium ElementalSubstance)
(names Hafnium "Hafnium")
(conventionalShortName "Hf" Hafnium)
(atomicNumber Hafnium 72)
(=>
  (and
    (instance ?ATOM Hafnium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 178.49 Amu)))

(documentation Hafnium EnglishLanguage "Silvery lustrous metallic transition element.  
Used in tungsten alloys in filaments and electrodes, also acts as a 
neutron absorber.  First reported by Urbain in 1911, existence was finally 
established in 1923 by D.  Coster, G.C.  de Hevesy in 1923.") 

(subclass Tantalum ElementalSubstance)
(names Tantalum "Tantalum")
(conventionalShortName "Ta" Tantalum)
(atomicNumber Tantalum 73)
(=>
  (and
    (instance ?ATOM Tantalum)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 180.948 Amu)))

(documentation Tantalum EnglishLanguage "Heavy blue-grey metallic transition element.  
Ta-181 is a stable isotope, and Ta-180 is a radioactive isotope, with a 
half-life in excess of 10^7 years.  Used in surgery as it is unreactive.  
Forms a passive oxide layer in air.  Identified in 1802 by Ekeberg and 
isolated in 1820 by Jons J.  Berzelius.") 

(subclass Tungsten ElementalSubstance)
(names Tungsten "Tungsten")
(conventionalShortName "W" Tungsten)
(atomicNumber Tungsten 74)
(=>
  (and
    (instance ?ATOM Tungsten)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 183.85 Amu)))

(documentation Tungsten EnglishLanguage "White or grey metallic transition element, 
formerly called {wolfram}.  Forms a protective oxide in air and can be 
oxidized at high temperature.  First isolated by Jose and Fausto de 
Elhuyer in 1783.") 

(subclass Rhenium ElementalSubstance)
(names Rhenium "Rhenium")
(conventionalShortName "Re" Rhenium)
(atomicNumber Rhenium 75)
(=>
  (and
    (instance ?ATOM Rhenium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 186.2 Amu)))

(documentation Rhenium EnglishLanguage "Silvery-white metallic transition element.  
Obtained as a by-product of molybdenum refinement.  Rhenium-molybdenum 
alloys are superconducting.") 

(subclass Osmium ElementalSubstance)
(names Osmium "Osmium")
(conventionalShortName "Os" Osmium)
(atomicNumber Osmium 76)
(=>
  (and
    (instance ?ATOM Osmium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 190.2 Amu)))

(documentation Osmium EnglishLanguage "Hard blue-white metallic transition element.  Found 
with platinum and used in some alloys with platinum and iridium.") 

(subclass Iridium ElementalSubstance)
(names Iridium "Iridium")
(conventionalShortName "Ir" Iridium)
(atomicNumber Iridium 77)
(=>
  (and
    (instance ?ATOM Iridium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 192.217 Amu)))

(documentation Iridium EnglishLanguage "Very hard and brittle, silvery metallic transition 
element.  It has a yellowish cast to it.  Salts of iridium are highly 
colored.  It is the most corrosion resistant metal known, not attacked by 
any acid, but is attacked by molten salts.  There are two natural isotopes 
of iridium, and 4 radioisotopes, the most stable being Ir-192 with a 
half-life of 73.83 days.  Ir-192 decays into {platinum}, while the other 
radioisotopes decay into {osmium}.  Iridium is used in high temperature 
apparatus, electrical contacts, and as a hardening agent for platinum.  
Discovered in 1803 by Smithson Tennant in England.  The name comes from 
the Greek word iris, which means rainbow.  Iridium metal is generally 
non-toxic due to its relative unreactivity, but iridium compounds should 
be considered highly toxic.") 

(subclass Platinum ElementalSubstance)
(names Platinum "Platinum")
(conventionalShortName "Pt" Platinum)
(atomicNumber Platinum 78)
(=>
  (and
    (instance ?ATOM Platinum)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 195.078 Amu)))

(documentation Platinum EnglishLanguage "Attractive greyish-white metal.  When pure, it is 
malleable and ductile.  Does not oxidize in air, insoluble in hydrochloric 
and nitric acid.  Corroded by halogens, cyandies, sulphur and alkalis.  
{Hydrogen} and {oxygen} react explosively in the presence of platinum.  
There are six stable isotopes and three radioisotopes, the most stable 
being Pt-193 with a half-life of 60 years.  Platinum is used in jewelry, 
laboratory equipment, electrical contacts, dentistry, and anti-pollution 
devices in cars.  PtCl2(NH3)2 is used to treat some forms of cancer.  
Platinum-{cobalt} alloys have magnetic properties.  It is also used in the 
definition of the Standard Hydrogen Electrode.  Discovered by Antonio de 
Ulloa in South America in 1735.  The name comes from the Spanish word 
platina which means silver.  Platinum metal is generally not a health 
concern due to its unreactivity, however platinum compounds should be 
considered highly toxic.") 

(subclass Gold ElementalSubstance)
(names Gold "Gold")
(conventionalShortName "Au" Gold)
(atomicNumber Gold 79)
(=>
  (and
    (instance ?ATOM Gold)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 196.96655 Amu)))

(documentation Gold EnglishLanguage "Gold is gold colored.  It is the most malleable and 
ductile metal known.  There is only one stable isotope of gold, and five 
radioisotopes of gold, Au-195 being the most stable with a half-life of 
186 days.  Gold is used as a monetary standard, in jewelry, dentistry, 
electronics.  Au-198 is used in treating cancer and some other medical 
conditions.  Gold has been known to exist as far back as 2600 BC.  Gold 
comes from the Anglo-Saxon word gold.  Its symbol, Au, comes from the 
Latin word aurum, which means gold.  Gold is not particularly toxic, 
however it is known to cause damage to the liver and kidneys in some.") 

(subclass Mercury ElementalSubstance)
(names Mercury "Mercury")
(conventionalShortName "Hg" Mercury)
(atomicNumber Mercury 80)
(=>
  (and
    (instance ?ATOM Mercury)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 200.59 Amu)))

(documentation Mercury EnglishLanguage "Heavy silvery liquid metallic element, belongs to 
the zinc group.  Used in thermometers, barometers and other scientific 
apparatus.  Less reactive than zinc and cadmium, does not displace 
hydrogen from acids.  Forms a number of complexes and organomercury 
compounds.") 

(subclass Thallium ElementalSubstance)
(names Thallium "Thallium")
(conventionalShortName "Tl" Thallium)
(atomicNumber Thallium 81)
(=>
  (and
    (instance ?ATOM Thallium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 204.3833 Amu)))

(documentation Thallium EnglishLanguage "Pure, unreacted thallium appears silvery-white 
and exhibits a metallic lustre.  Upon reacting with air, it begins to turn 
bluish-grey and looks like lead.  It is very malleable, and can be cut 
with a knife.  There are two stable isotopes, and four radioisotopes, 
Tl-204 being the most stable with a half-life of 3.78 years.  Thallium 
sulphate was used as a rodenticide.  Thallium sulphine's conductivity 
changes with exposure to infrared light, this gives it a use in infrared 
detectors.  Discovered by Sir William Crookes via spectroscopy.  Its name 
comes from the Greek word thallos, which means green twig.  Thallium and 
its compounds are toxic and can cause cancer.") 

(subclass Lead ElementalSubstance)
(names Lead "Lead")
(conventionalShortName "Pb" Lead)
(atomicNumber Lead 82)
(=>
  (and
    (instance ?ATOM Lead)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 207.19 Amu)))

(documentation Lead EnglishLanguage "Heavy dull grey ductile metallic element, belongs to 
group 14.  Used in building construction, lead-place accumulators, bullets 
and shot, and is part of solder, pewter, bearing metals, type metals and 
fusible alloys.") 

(subclass Bismuth ElementalSubstance)
(names Bismuth "Bismuth")
(conventionalShortName "Bi" Bismuth)
(atomicNumber Bismuth 83)
(=>
  (and
    (instance ?ATOM Bismuth)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 208.980 Amu)))

(documentation Bismuth EnglishLanguage "White crystalline metal with a pink tinge, belongs 
to group 15.  Most diamagnetic of all metals and has the lowest thermal 
conductivity of all the elements except mercury.  Lead-free bismuth 
compounds are used in cosmetics and medical procedures.  Burns in the air 
and produces a blue flame.  In 1753, C.G. Junine first demonstrated that 
it was different from lead.") 

(subclass Polonium ElementalSubstance)
(names Polonium "Polonium")
(conventionalShortName "Po" Polonium)
(atomicNumber Polonium 84)
(=>
  (and
    (instance ?ATOM Polonium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 210 Amu)))

(documentation Polonium EnglishLanguage "Rare radioactive metallic element, belongs to 
group 16 of the periodic table.  Over 30 known isotopes exist, the most of 
all elements.  Po-209 has a half-life of 103 years.  Possible uses in 
heating spacecraft.  Discovered by Marie Curie in 1898 in a sample of 
pitchblende.") 

(subclass Astatine ElementalSubstance)
(names Astatine "Astatine")
(conventionalShortName "At" Astatine)
(atomicNumber Astatine 85)
(=>
  (and
    (instance ?ATOM Astatine)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 210 Amu)))

(documentation Astatine EnglishLanguage "Radioactive halogen element.  Occurs naturally 
from uranium and thorium decay.  At least 20 known isotopes.  At-210, the 
most stable, has a half-life of 8.3 hours.  Synthesized by nuclear 
bombardment in 1940 by D.R.  Corson, K.R.  MacKenzie and E.  Segre at the 
University of California.") 

(subclass Radon ElementalSubstance)
(names Radon "Radon")
(conventionalShortName "Rn" Radon)
(atomicNumber Radon 86)
(=>
  (and
    (instance ?ATOM Radon)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 222 Amu)))

(documentation Radon EnglishLanguage "Colorless radioactive gaseous element, belongs to 
the noble gases.  Of the twenty known isotopes, the most stable is Rn-222 
with a half-life of 3.8 days.  Formed by the radioactive decay of 
{Radium}-226.  Radon itself decays into {polonium}.  Used in radiotherapy.  
As a noble gas, it is effectively inert, though radon fluoride has been 
synthesized.  First isolated in 1908 by Ramsey and Gray.") 

(subclass Francium ElementalSubstance)
(names Francium "Francium")
(conventionalShortName "Fr" Francium)
(atomicNumber Francium 87)
(=>
  (and
    (instance ?ATOM Francium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 223 Amu)))

(documentation Francium EnglishLanguage "Radioactive element, belongs to group 1 of the 
periodic table.  Found in uranium and thorium ores.  The 22 known isotopes 
are all radioactive, with the most stable being Fr-223.  Its existence was 
confirmed in 1939 by Marguerite Perey.") 

(subclass Radium ElementalSubstance)
(names Radium "Radium")
(conventionalShortName "Ra" Radium)
(atomicNumber Radium 88)
(=>
  (and
    (instance ?ATOM Radium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 226 Amu)))

(documentation Radium EnglishLanguage "Radioactive metallic transuranic element, belongs 
to group 2 of the periodic table.  Most stable isotope, Ra-226 has a 
half-life of 1602 years, which decays into radon.  Isolated from 
pitchblende in 1898 Marie and Pierre Curie.") 

(subclass Actinium ElementalSubstance)
(names Actinium "Actinium")
(conventionalShortName "Ac" Actinium)
(atomicNumber Actinium 89)
(=>
  (and
    (instance ?ATOM Actinium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 227 Amu)))

(documentation Actinium EnglishLanguage "Silvery radioactive metallic element, belongs to 
group 3 of the periodic table.  The most stable isotope, Ac-227, has a 
half-life of 217 years.  Ac-228 (half-life of 6.13 hours) also occurs in 
nature.  There are 22 other artificial isotopes, all radioactive and 
having very short half-lives.  Chemistry similar to lanthanum.  Used as a 
source of alpha particles.  Discovered by A.  Debierne in 1899.") 

(subclass Thorium ElementalSubstance)
(names Thorium "Thorium")
(conventionalShortName "Th" Thorium)
(atomicNumber Thorium 90)
(=>
  (and
    (instance ?ATOM Thorium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 232.038 Amu)))

(documentation Thorium EnglishLanguage "Grey radioactive metallic element.  Belongs to 
actinoids.  Found in monazite sand in Brazil, India and the US.  
Thorium-232 has a half-life of 1.39x10^10 years.  Can be used as a nuclear 
fuel for breeder reactors.  Thorium-232 captures slow {neutron}s and 
breeds uranium-233.  Discovered by Jons J.  Berzelius in 1829.") 

(subclass Protactinium ElementalSubstance)
(names Protactinium "Protactinium")
(conventionalShortName "Pa" Protactinium)
(atomicNumber Protactinium 91)
(=>
  (and
    (instance ?ATOM Protactinium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 231 Amu)))

(documentation Protactinium EnglishLanguage "Radioactive metallic element, belongs to the 
actinoids.  The most stable isotope, Pa-231 has a half-life of 2.43*10^4 
years.  At least 10 other radioactive isotopes are known.  No practical 
applications are known.  Discovered in 1917 by Lise Meitner and Otto 
Hahn.") 

(subclass Uranium ElementalSubstance)
(names Uranium "Uranium")
(conventionalShortName "U" Uranium)
(atomicNumber Uranium 92)
(=>
  (and
    (instance ?ATOM Uranium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 231 Amu)))

(documentation Uranium EnglishLanguage "White radioactive metallic element belonging to 
the actinoids.  Three natural isotopes, U-238, U-235 and U-234.  
Uranium-235 is used as the fuel for nuclear reactors and weapons.  
Discovered by Martin H.  Klaproth in 1789.") 

(subclass Neptunium ElementalSubstance)
(names Neptunium "Neptunium")
(conventionalShortName "Np" Neptunium)
(atomicNumber Neptunium 93)
(=>
  (and
    (instance ?ATOM Neptunium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 237 Amu)))

(documentation Neptunium EnglishLanguage "Radioactive metallic transuranic element, 
belongs to the actinoids.  Np-237, the most stable isotope, has a 
half-life of 2.2*10^6 years and is a by product of nuclear reactors.  The 
other known isotopes have mass numbers 229 through 236, and 238 through 
241.  Np-236 has a half-life of 5*10^3 years.  First produced by Edwin M.  
McMillan and P.H.  Abelson in 1940.") 

(subclass Plutonium ElementalSubstance)
(names Plutonium "Plutonium")
(conventionalShortName "Pu" Plutonium)
(atomicNumber Plutonium 94)
(=>
  (and
    (instance ?ATOM Plutonium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 242 Amu)))

(documentation Plutonium EnglishLanguage "Dense silvery radioactive metallic transuranic 
element, belongs to the actinoids.  Pu-244 is the most stable isotope with 
a half-life of 7.6*10^7 years.  Thirteen isotopes are known.  Pu-239 is 
the most important, it undergoes nuclear fission with slow neutrons and is 
hence important to nuclear weapons and reactors.  Plutonium production is 
monitored down to the gram to prevent military misuse.  First produced by 
Gleen T.  Seaborg, Edwin M.  McMillan, J.W.  Kennedy and A.C.  Wahl in 
1940.") 

(subclass Americium ElementalSubstance)
(names Americium "Americium")
(conventionalShortName "Am" Americium)
(atomicNumber Americium 95)
(=>
  (and
    (instance ?ATOM Americium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 243 Amu)))

(documentation Americium EnglishLanguage "Radioactive metallic transuranic element, 
belongs to the actinoids.  Ten known isotopes.  Am-243 is the most stable 
isotope, with a half-life of 7.95*10^3 years.  Discovered by Glenn T.  
Seaborg and associates in 1945, it was obtained by bombarding 
{uranium}-238 with alpha particles.") 

(subclass Curium ElementalSubstance)
(names Curium "Curium")
(conventionalShortName "Cm" Curium)
(atomicNumber Curium 96)
(=>
  (and
    (instance ?ATOM Curium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 247 Amu)))

(documentation Curium EnglishLanguage "Radioactive metallic transuranic element.  Belongs 
to actinoid series.  Nine known isotopes, Cm-247 has a half-life of 
1.64*10^7 years.  First identified by Glenn T.  Seaborg and associates in 
1944, first produced by L.B.  Werner and I.  Perlman in 1947 by bombarding 
americium-241 with {neutron}s.  Named for Marie Curie.") 

(subclass Berkelium ElementalSubstance)
(names Berkelium "Berkelium")
(conventionalShortName "Bk" Berkelium)
(atomicNumber Berkelium 97)
(=>
  (and
    (instance ?ATOM Berkelium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 247 Amu)))

(documentation Berkelium EnglishLanguage "Radioactive metallic transuranic element.  
Belongs to actinoid series.  Eight known isotopes, the most common Bk-247, 
has a half-life of 1.4*10^3 years.  First produced by Glenn T.  Seaborg 
and associates in 1949 by bombarding americium-241 with alpha 
particles.") 

(subclass Californium ElementalSubstance)
(names Californium "Californium")
(conventionalShortName "Cf" Californium)
(atomicNumber Californium 98)
(=>
  (and
    (instance ?ATOM Californium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 249 Amu)))

(documentation Californium EnglishLanguage "Radioactive metallic transuranic element.  
Belongs to actinoid series.  Cf-251 has a half life of about 700 years.  
Nine isotopes are known.  Cf-252 is an intense {neutron} source, which 
makes it an intense {neutron} source and gives it a use in {neutron} 
activation analysis and a possible use as a radiation source in medicine.  
First produced by Glenn T.  Seaborg and associates in 1950.") 

(subclass Einsteinium ElementalSubstance)
(names Einsteinium "Einsteinium")
(conventionalShortName "Es" Einsteinium)
(atomicNumber Einsteinium 99)
(=>
  (and
    (instance ?ATOM Einsteinium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 254 Amu)))

(documentation Einsteinium EnglishLanguage "Appearance is unknown, however it is most 
probably metallic and silver or gray in color.  Radioactive metallic 
transuranic element belonging to the actinoids.  Es-254 has the longest 
half-life of the eleven known isotopes at 270 days.  First identified by 
Albert Ghiorso and associates in the debris of the 1952 hydrogen bomb 
explosion.  In 1961 the first microgram quantities of Es-232 were 
separated.  While einsteinium never exists naturally, if a sufficient 
amount was assembled, it would pose a radiation hazard.") 

(subclass Fermium ElementalSubstance)
(names Fermium "Fermium")
(conventionalShortName "Fm" Fermium)
(atomicNumber Fermium 100)
(=>
  (and
    (instance ?ATOM Fermium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 253 Amu)))

(documentation Fermium EnglishLanguage "Radioactive metallic transuranic element, belongs 
to the actinoids.  Ten known isotopes, most stable is Fm-257 with a 
half-life of 10 days.  First identified by Albert Ghiorso and associates 
in the debris of the first hydrogen-bomb explosion in 1952.") 

(subclass Mendelevium ElementalSubstance)
(names Mendelevium "Mendelevium")
(conventionalShortName "Md" Mendelevium)
(atomicNumber Mendelevium 101)
(=>
  (and
    (instance ?ATOM Mendelevium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 256 Amu)))

(documentation Mendelevium EnglishLanguage "Radioactive metallic transuranic element.  
Belongs to the actinoid series.  Only known isotope, Md-256 has a 
half-life of 1.3 hours.  First identified by Glenn T.  Seaborg, Albert 
Ghiorso and associates in 1955.  Alternative name {unnilunium} has been 
proposed.  Named after the 'inventor' of the periodic table, Dmitri 
Mendeleev.") 

(subclass Nobelium ElementalSubstance)
(names Nobelium "Nobelium")
(conventionalShortName "No" Nobelium)
(atomicNumber Nobelium 102)
(=>
  (and
    (instance ?ATOM Nobelium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 254 Amu)))

(documentation Nobelium EnglishLanguage "Radioactive metallic transuranic element, belongs 
to the actinoids.  Seven known isotopes exist, the most stable being 
No-254 with a half-life of 255 seconds.  First identified with certainty 
by Albert Ghiorso and Glenn T.  Seaborg in 1966.  {Unnilbium} has been 
proposed as an alternative name.") 

(subclass Lawrencium ElementalSubstance)
(names Lawrencium "Lawrencium")
(conventionalShortName "Lr" Lawrencium)
(atomicNumber Lawrencium 103)
(=>
  (and
    (instance ?ATOM Lawrencium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 262 Amu)))

(documentation Lawrencium EnglishLanguage "Appearance unknown, however it is most likely 
silvery-white or grey and metallic.  Lawrencium is a synthetic rare-earth 
metal.  There are eight known radioisotopes, the most stable being Lr-262 
with a half-life of 3.6 hours.  Due to the short half-life of lawrencium, 
and its radioactivity, there are no known uses for it.  Identified by 
Albert Ghiorso in 1961 at Berkeley.  It was produced by bombarding 
californium with boron ions.  The name is temporary {IUPAC} nomenclature, 
the origin of the name comes from Ernest O.  Lawrence, the inventor of the 
cyclotron.  If sufficient amounts of lawrencium were produced, it would 
pose a radiation hazard.") 

(subclass Unnilquadium ElementalSubstance)
(names Unnilquadium "Unnilquadium")
(conventionalShortName "Unq" Unnilquadium)
(atomicNumber Unnilquadium 104)
(=>
  (and
    (instance ?ATOM Unnilquadium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 261 Amu)))

(documentation Unnilquadium EnglishLanguage "Radioactive transactinide element.  Expected 
to have similar chemical properties to those displayed by hafnium.  Rf-260 
was discovered by the Joint Nuclear Research Institute at Dubna (U.S.S.R.) 
in 1964.  Researchers at Berkeley discovered Unq-257 and Unq-258 in 
1964.") 

(subclass Unnilpentium ElementalSubstance)
(names Unnilpentium "Unnilpentium")
(conventionalShortName "Unp" Unnilpentium)
(atomicNumber Unnilpentium 105)
(=>
  (and
    (instance ?ATOM Unnilpentium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 262 Amu)))

(documentation Unnilpentium EnglishLanguage "Radioactive transactinide element.  Half-life 
of 1.6s.  Discovered in 1970 by Berkeley researchers.  So far, seven 
isotopes have been discovered.") 

(subclass Unnilhexium ElementalSubstance)
(names Unnilhexium "Unnilhexium")
(atomicNumber Unnilhexium 106)
(=>
  (and
    (instance ?ATOM Unnilhexium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 263 Amu)))

(documentation Unnilhexium EnglishLanguage "Half-life of 0.9 +/- 0.2 s.  Discovered by the 
Joint Institute for Nuclear Research at Dubna (U.S.S.R.) in June of 1974.  
Its existence was confirmed by the Lawrence Berkeley Laboratory and 
Livermore National Laboratory in September of 1974.") 

(subclass Unnilseptium ElementalSubstance)
(names Unnilseptium "Unnilseptium")
(atomicNumber Unnilseptium 107)
(=>
  (and
    (instance ?ATOM Unnilseptium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 262 Amu)))

(documentation Unnilseptium EnglishLanguage "Radioactive transition metal.  Half-life of 
approximately 1/500 s.  Discovered by the Joint Institute for Nuclear 
Research at Dubna (U.S.S.R.) in 1976.  Confirmed by West German physicists 
at the Heavy Ion Research Laboratory at Darmstadt.") 

(subclass Unniloctium ElementalSubstance)
(names Unniloctium "Unniloctium")
(conventionalShortName "Uno" Unniloctium)
(atomicNumber Unniloctium 108)
(=>
  (and
    (instance ?ATOM Unniloctium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 265 Amu)))

(documentation Unniloctium EnglishLanguage "Radioactive transition metal.")

(subclass Meitnerium ElementalSubstance)
(names Meitnerium "Meitnerium")
(conventionalShortName "Mt" Meitnerium)
(atomicNumber Meitnerium 109)
(=>
  (and
    (instance ?ATOM Meitnerium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 266 Amu)))

(documentation Meitnerium EnglishLanguage "Half-life of approximately 5ms.  The creation 
of this element demonstrated that fusion techniques could indeed be used 
to make new, heavy nuclei.  Made and identified by physicists of the Heavy 
Ion Research Laboratory, Darmstadt, West Germany in 1982.  Named in honor 
of Lise Meitner the Austrian physicist.") 

(subclass Unnildecium ElementalSubstance)
(names Unnildecium "Unnildecium")
(conventionalShortName "Unn" Unnildecium)
(atomicNumber Unnildecium 110)
(=>
  (and
    (instance ?ATOM Unnildecium)
    (instance ?ATOM Atom))
  (measure ?ATOM (MeasureFn 272 Amu)))

(documentation Unnildecium EnglishLanguage "Half-life of approximately 10ms.  Reported in 
1994 by German researchers at Darmstadt, Germany.") 

(meltingPoint Hydrogen (MeasureFn 14.01 KelvinDegree))
(boilingPoint Hydrogen (MeasureFn 20.28 KelvinDegree))
(meltingPoint Helium (MeasureFn 0.95 KelvinDegree))
(boilingPoint Helium (MeasureFn 4.216 KelvinDegree))
(meltingPoint Lithium (MeasureFn 453.69 KelvinDegree))
(boilingPoint Lithium (MeasureFn 1590 KelvinDegree))
(meltingPoint Beryllium (MeasureFn 1551 KelvinDegree))
(boilingPoint Beryllium (MeasureFn 3243 KelvinDegree))
(meltingPoint Boron (MeasureFn 2573 KelvinDegree))
(boilingPoint Boron (MeasureFn 2823 KelvinDegree))
(meltingPoint Carbon (MeasureFn 3823 KelvinDegree))
(boilingPoint Carbon (MeasureFn 5100 KelvinDegree))
(meltingPoint Nitrogen (MeasureFn 63.29 KelvinDegree))
(boilingPoint Nitrogen (MeasureFn 77.4 KelvinDegree))
(meltingPoint Oxygen (MeasureFn 54.75 KelvinDegree))
(boilingPoint Oxygen (MeasureFn 90.188 KelvinDegree))
(meltingPoint Fluorine (MeasureFn 53.53 KelvinDegree))
(boilingPoint Fluorine (MeasureFn 85.01 KelvinDegree))
(meltingPoint Neon (MeasureFn 24.48 KelvinDegree))
(boilingPoint Neon (MeasureFn 27.1 KelvinDegree))
(meltingPoint Sodium (MeasureFn 370.95 KelvinDegree))
(boilingPoint Sodium (MeasureFn 1165 KelvinDegree))
(meltingPoint Magnesium (MeasureFn 921.95 KelvinDegree))
(boilingPoint Magnesium (MeasureFn 1380 KelvinDegree))
(meltingPoint Aluminum (MeasureFn 933.52 KelvinDegree))
(boilingPoint Aluminum (MeasureFn 2740 KelvinDegree))
(meltingPoint Silicon (MeasureFn 1683 KelvinDegree))
(boilingPoint Silicon (MeasureFn 2628 KelvinDegree))
(meltingPoint Phosphorus (MeasureFn 317.3 KelvinDegree))
(boilingPoint Phosphorus (MeasureFn 553 KelvinDegree))
(meltingPoint Sulphur (MeasureFn 386 KelvinDegree))
(boilingPoint Sulphur (MeasureFn 717.824 KelvinDegree))
(meltingPoint Chlorine (MeasureFn 172.17 KelvinDegree))
(boilingPoint Chlorine (MeasureFn 238.55 KelvinDegree))
(meltingPoint Argon (MeasureFn 83.78 KelvinDegree))
(boilingPoint Argon (MeasureFn 87.29 KelvinDegree))
(meltingPoint Potassium (MeasureFn 336.8 KelvinDegree))
(boilingPoint Potassium (MeasureFn 1047 KelvinDegree))
(meltingPoint Calcium (MeasureFn 1112 KelvinDegree))
(boilingPoint Calcium (MeasureFn 1760 KelvinDegree))
(meltingPoint Scandium (MeasureFn 1812 KelvinDegree))
(boilingPoint Scandium (MeasureFn 3105 KelvinDegree))
(meltingPoint Titanium (MeasureFn 1933 KelvinDegree))
(boilingPoint Titanium (MeasureFn 3533 KelvinDegree))
(meltingPoint Vanadium (MeasureFn 2163 KelvinDegree))
(boilingPoint Vanadium (MeasureFn 3653 KelvinDegree))
(meltingPoint Chromium (MeasureFn 2130 KelvinDegree))
(boilingPoint Chromium (MeasureFn 2755 KelvinDegree))
(meltingPoint Manganese (MeasureFn 1517 KelvinDegree))
(boilingPoint Manganese (MeasureFn 2370 KelvinDegree))
(meltingPoint Iron (MeasureFn 1808 KelvinDegree))
(boilingPoint Iron (MeasureFn 3023 KelvinDegree))
(meltingPoint Cobalt (MeasureFn 1768 KelvinDegree))
(boilingPoint Cobalt (MeasureFn 3143 KelvinDegree))
(meltingPoint Nickel (MeasureFn 1726 KelvinDegree))
(boilingPoint Nickel (MeasureFn 3005 KelvinDegree))
(meltingPoint Copper (MeasureFn 1356.6 KelvinDegree))
(boilingPoint Copper (MeasureFn 2868 KelvinDegree))
(meltingPoint Zinc (MeasureFn 692.73 KelvinDegree))
(boilingPoint Zinc (MeasureFn 1180 KelvinDegree))
(meltingPoint Gallium (MeasureFn 302.93 KelvinDegree))
(boilingPoint Gallium (MeasureFn 2676 KelvinDegree))
(meltingPoint Germanium (MeasureFn 1210.55 KelvinDegree))
(boilingPoint Germanium (MeasureFn 3103 KelvinDegree))
(meltingPoint Arsenic (MeasureFn 886 KelvinDegree))
(boilingPoint Arsenic (MeasureFn 886 KelvinDegree))
(meltingPoint Selenium (MeasureFn 490 KelvinDegree))
(boilingPoint Selenium (MeasureFn 958.1 KelvinDegree))
(meltingPoint Bromine (MeasureFn 265.9 KelvinDegree))
(boilingPoint Bromine (MeasureFn 331.93 KelvinDegree))
(meltingPoint Krypton (MeasureFn 116.55 KelvinDegree))
(boilingPoint Krypton (MeasureFn 120.85 KelvinDegree))
(meltingPoint Rubidium (MeasureFn 312.2 KelvinDegree))
(boilingPoint Rubidium (MeasureFn 961 KelvinDegree))
(meltingPoint Strontium (MeasureFn 1042 KelvinDegree))
(boilingPoint Strontium (MeasureFn 1657 KelvinDegree))
(meltingPoint Yttrium (MeasureFn 1796 KelvinDegree))
(boilingPoint Yttrium (MeasureFn 3610 KelvinDegree))
(meltingPoint Zirconium (MeasureFn 2125 KelvinDegree))
(boilingPoint Zirconium (MeasureFn 4650 KelvinDegree))
(meltingPoint Niobium (MeasureFn 2741 KelvinDegree))
(boilingPoint Niobium (MeasureFn 5200 KelvinDegree))
(meltingPoint Molybdenum (MeasureFn 2890 KelvinDegree))
(boilingPoint Molybdenum (MeasureFn 5833 KelvinDegree))
(meltingPoint Technetium (MeasureFn 2445 KelvinDegree))
(boilingPoint Technetium (MeasureFn 5303 KelvinDegree))
(meltingPoint Ruthenium (MeasureFn 2583 KelvinDegree))
(boilingPoint Ruthenium (MeasureFn 4173 KelvinDegree))
(meltingPoint Rhodium (MeasureFn 2239 KelvinDegree))
(boilingPoint Rhodium (MeasureFn 4000 KelvinDegree))
(meltingPoint Palladium (MeasureFn 1825 KelvinDegree))
(boilingPoint Palladium (MeasureFn 3413 KelvinDegree))
(meltingPoint Silver (MeasureFn 1235.08 KelvinDegree))
(boilingPoint Silver (MeasureFn 2485 KelvinDegree))
(meltingPoint Cadmium (MeasureFn 594.1 KelvinDegree))
(boilingPoint Cadmium (MeasureFn 1038 KelvinDegree))
(meltingPoint Indium (MeasureFn 429.32 KelvinDegree))
(boilingPoint Indium (MeasureFn 2353 KelvinDegree))
(meltingPoint Tin (MeasureFn 505.118 KelvinDegree))
(boilingPoint Tin (MeasureFn 2543 KelvinDegree))
(meltingPoint Antimony (MeasureFn 903.89 KelvinDegree))
(boilingPoint Antimony (MeasureFn 2023 KelvinDegree))
(meltingPoint Tellurium (MeasureFn 722.7 KelvinDegree))
(boilingPoint Tellurium (MeasureFn 1263 KelvinDegree))
(meltingPoint Iodine (MeasureFn 386.65 KelvinDegree))
(boilingPoint Iodine (MeasureFn 457.55 KelvinDegree))
(meltingPoint Xenon (MeasureFn 161.3 KelvinDegree))
(boilingPoint Xenon (MeasureFn 166.1 KelvinDegree))
(meltingPoint Caesium (MeasureFn 301.55 KelvinDegree))
(boilingPoint Caesium (MeasureFn 963 KelvinDegree))
(meltingPoint Barium (MeasureFn 998 KelvinDegree))
(boilingPoint Barium (MeasureFn 1913 KelvinDegree))
(meltingPoint Lanthanum (MeasureFn 1193 KelvinDegree))
(boilingPoint Lanthanum (MeasureFn 3727 KelvinDegree))
(meltingPoint Cerium (MeasureFn 1071 KelvinDegree))
(boilingPoint Cerium (MeasureFn 3530 KelvinDegree))
(meltingPoint Praseodymium (MeasureFn 1204 KelvinDegree))
(boilingPoint Praseodymium (MeasureFn 3485 KelvinDegree))
(meltingPoint Neodymium (MeasureFn 1283 KelvinDegree))
(boilingPoint Neodymium (MeasureFn 3400 KelvinDegree))
(meltingPoint Promethium (MeasureFn 1353 KelvinDegree))
(boilingPoint Promethium (MeasureFn 3000 KelvinDegree))
(meltingPoint Samarium (MeasureFn 1345 KelvinDegree))
(boilingPoint Samarium (MeasureFn 2051 KelvinDegree))
(meltingPoint Europium (MeasureFn 1095 KelvinDegree))
(boilingPoint Europium (MeasureFn 1870 KelvinDegree))
(meltingPoint Gadolinium (MeasureFn 1584 KelvinDegree))
(boilingPoint Gadolinium (MeasureFn 3506 KelvinDegree))
(meltingPoint Terbium (MeasureFn 1633 KelvinDegree))
(boilingPoint Terbium (MeasureFn 3314 KelvinDegree))
(meltingPoint Dysprosium (MeasureFn 1682 KelvinDegree))
(boilingPoint Dysprosium (MeasureFn 2608 KelvinDegree))
(meltingPoint Holmium (MeasureFn 1743 KelvinDegree))
(boilingPoint Holmium (MeasureFn 2993 KelvinDegree))
(meltingPoint Erbium (MeasureFn 1795 KelvinDegree))
(boilingPoint Erbium (MeasureFn 2783 KelvinDegree))
(meltingPoint Thulium (MeasureFn 1818 KelvinDegree))
(boilingPoint Thulium (MeasureFn 2000 KelvinDegree))
(meltingPoint Ytterbium (MeasureFn 1097 KelvinDegree))
(boilingPoint Ytterbium (MeasureFn 1466 KelvinDegree))
(meltingPoint Lutetium (MeasureFn 1929 KelvinDegree))
(boilingPoint Lutetium (MeasureFn 3588 KelvinDegree))
(meltingPoint Hafnium (MeasureFn 2423 KelvinDegree))
(boilingPoint Hafnium (MeasureFn 5673 KelvinDegree))
(meltingPoint Tantalum (MeasureFn 3269 KelvinDegree))
(boilingPoint Tantalum (MeasureFn 5698 KelvinDegree))
(meltingPoint Tungsten (MeasureFn 3680 KelvinDegree))
(boilingPoint Tungsten (MeasureFn 6200 KelvinDegree))
(meltingPoint Rhenium (MeasureFn 3453 KelvinDegree))
(boilingPoint Rhenium (MeasureFn 5900 KelvinDegree))
(meltingPoint Osmium (MeasureFn 3318 KelvinDegree))
(boilingPoint Osmium (MeasureFn 5300 KelvinDegree))
(meltingPoint Iridium (MeasureFn 2683 KelvinDegree))
(boilingPoint Iridium (MeasureFn 4403 KelvinDegree))
(meltingPoint Platinum (MeasureFn 2045 KelvinDegree))
(boilingPoint Platinum (MeasureFn 4100 KelvinDegree))
(meltingPoint Gold (MeasureFn 1337.58 KelvinDegree))
(boilingPoint Gold (MeasureFn 3213 KelvinDegree))
(meltingPoint Mercury (MeasureFn 234.28 KelvinDegree))
(boilingPoint Mercury (MeasureFn 629.73 KelvinDegree))
(meltingPoint Thallium (MeasureFn 576.7 KelvinDegree))
(boilingPoint Thallium (MeasureFn 1730 KelvinDegree))
(meltingPoint Lead (MeasureFn 600.65 KelvinDegree))
(boilingPoint Lead (MeasureFn 2013 KelvinDegree))
(meltingPoint Bismuth (MeasureFn 544.5 KelvinDegree))
(boilingPoint Bismuth (MeasureFn 1833 KelvinDegree))
(meltingPoint Polonium (MeasureFn 527 KelvinDegree))
(boilingPoint Polonium (MeasureFn 1235 KelvinDegree))
(meltingPoint Astatine (MeasureFn 575 KelvinDegree))
(boilingPoint Astatine (MeasureFn 610 KelvinDegree))
(meltingPoint Radon (MeasureFn 202 KelvinDegree))
(boilingPoint Radon (MeasureFn 211.4 KelvinDegree))
(meltingPoint Francium (MeasureFn 300 KelvinDegree))
(boilingPoint Francium (MeasureFn 950 KelvinDegree))
(meltingPoint Radium (MeasureFn 973 KelvinDegree))
(boilingPoint Radium (MeasureFn 1413 KelvinDegree))
(meltingPoint Actinium (MeasureFn 1320 KelvinDegree))
(boilingPoint Actinium (MeasureFn 3470 KelvinDegree))
(meltingPoint Thorium (MeasureFn 2023 KelvinDegree))
(boilingPoint Thorium (MeasureFn 5060 KelvinDegree))
(meltingPoint Protactinium (MeasureFn 1827 KelvinDegree))
(boilingPoint Protactinium (MeasureFn 4300 KelvinDegree))
(meltingPoint Uranium (MeasureFn 1405.5 KelvinDegree))
(boilingPoint Uranium (MeasureFn 4091 KelvinDegree))
(meltingPoint Neptunium (MeasureFn 913 KelvinDegree))
(boilingPoint Neptunium (MeasureFn 4175 KelvinDegree))
(meltingPoint Plutonium (MeasureFn 914 KelvinDegree))
(boilingPoint Plutonium (MeasureFn 3600 KelvinDegree))
(meltingPoint Americium (MeasureFn 1267 KelvinDegree))
(boilingPoint Americium (MeasureFn 2880 KelvinDegree))

(meltingPoint Curium (MeasureFn 1613 KelvinDegree))
(meltingPoint Berkelium (MeasureFn 1259 KelvinDegree))
(meltingPoint Californium (MeasureFn 1173 KelvinDegree))
(meltingPoint Einsteinium (MeasureFn 1133 KelvinDegree))

(subclass VehicleDoor Device)
(documentation VehicleDoor EnglishLanguage "An equivalent to a &%Door but in
a &%Vehicle, rather than a &%StationaryObject.")
(relatedInternalConcept Door VehicleDoor)
(=>
  (instance ?VD VehicleDoor)
  (hasPurpose ?VD
    (exists (?O)
      (and
        (instance ?O Opening)
        (patient ?O ?VD)))))

(=>
  (instance ?VD VehicleDoor)
  (hasPurpose ?VD
    (exists (?C)
      (and
        (instance ?C Closing)
        (patient ?C ?VD)))))

(=>
  (and
    (instance ?VD VehicleDoor)
    (attribute ?VD DeviceNormal))
  (and
    (capability patient Opening ?VD)
    (capability patient Closing ?VD)))

(typicalPart VehicleDoor Automobile)

(instance DeviceNormal InternalAttribute)
(documentation DeviceNormal EnglishLanguage "An &%Attribute stating that
the &%Device has not be subject to &%Damaging, at least not without a 
&%Repairing, and can function as to its intended &%hasPurpose.")

(=>
  (attribute ?D DeviceNormal)
  (not
    (exists (?DAM)
      (and
        (instance ?DAM Damaging)
        (patient ?DAM ?D)
        (not
          (exists (?R)
            (and 
              (instance ?R Repairing)
              (patient ?R ?D)
              (earlier ?D ?R))))))))

(=>
  (and
    (attribute ?D DeviceNormal)
    (hasPurpose ?D ?F))
  (modalAttribute ?F Possibility))

(instance DeviceDamaged InternalAttribute)
(contraryAttribute DeviceDamaged DeviceNormal)
(documentation DeviceDamaged EnglishLanguage "An &%Attribute stating that
the &%Device has been subjected to a &%Damaging, and has not had a subsequent 
succesful &%Repairing, and cannot function as to its intended &%hasPurpose.
Note that this does not include cosmetic damage that does not change the
function of the &%Object.")

(=>
  (attribute ?D DeviceDamaged)
  (exists (?DAM)
    (and
      (instance ?DAM Damaging)
      (patient ?DAM ?D)
      (not
        (exists (?R)
          (and 
            (instance ?R Repairing)
            (patient ?R ?D)
            (earlier ?D ?R)))))))

(=>
  (and
    (attribute ?D DeviceDamaged)
    (hasPurpose ?D ?F))
  (not
    (modalAttribute ?F Possibility)))

(subclass Vending FinancialTransaction)
(documentation Vending EnglishLanguage "A &%FinancialTransaction in which
the seller is a &%Machine")

(=>
  (instance ?V Vending)
  (exists (?VM)
    (and
      (instance ?VM VendingMachine)
      (origin ?V ?VM))))
      
(subclass VendingMachine Machine)
(documentation VendingMachine EnglishLanguage "A &%Machine that is the
instrument of a &%FinancialTransaction that accepts payment and
releases some object, often food or drink, to the customer.")

(=>
  (instance ?VM VendingMachine)
  (hasPurpose ?VM 
    (exists (?H ?O)
      (and
        (instance ?V Vending)
        (instance ?H Human)
        (instance ?O Object)
        (objectTransferred ?V ?O)
        (instrument ?V ?VM)
        (origin ?V ?VM)
        (not 
          (instance ?O Currency))
        (destination ?V ?H)))))
  
(=>
  (and
    (instance ?V Vending)
    (objectTransferred ?V ?O)
    (not 
      (instance ?O Currency)))
  (modalAttribute
    (or
      (instance ?O (FoodForFn Human))
      (instance ?O Beverage)) Likely))

(instance CoinOperated RelationalAttribute)
(documentation CoinOperated EnglishLanguage "An &%Attribute stating
that a &%Machine is operated by its intended &%customer only by
receive one or more &%CurrencyCoins.")

(=>
  (attribute ?M CoinOperated)
  (instance ?M Machine))

(=>
  (attribute ?M CoinOperated)
  (hasPurpose ?M
    (exists (?C ?FT ?A ?ACT)
      (and
        (instance ?C CurrencyCoin)
        (instance ?FT FinancialTransaction)
        (destination ?FT ?M)
        (patient ?FT ?C)
        (origin ?FT ?A)
        (causes ?FT ?ACT)
        (wants ?A ?ACT)))))

(subclass FishTank FluidContainer)
(documentation FishTank EnglishLanguage "A &%Container designed to
hold &%Water and &%Fish.  Note that many such tanks can be repurposed
to hold reptiles or insects.")

(=>
  (instance ?FT FishTank)
  (hasPurpose ?FT
    (exists (?W ?F)
      (and
        (instance ?W Water)
        (instance ?F Fish)
        (contains ?FT ?W)
        (contains ?FT ?F)))))

(instance Collectible RelationalAttribute)
(documentation Collectible EnglishLanguage "Something that an
agent wants that is not primarily based on its utility.  Note
that this includes &%ArtWorks.")

(=>
  (and
    (attribute ?C Collectible)
    (hasPurpose ?C ?P))
  (exists (?H) 
    (and
      (instance ?H Human)
      (wants ?H ?C)
      (desires ?H ?P2)
      (entails ?P2 
        (possesses ?H ?C))
      (not
        (equal ?P ?P2)))))
    
(subclass TradingCard Icon)
(documentation TradingCard EnglishLanguage "A &%Collectible that
depicts some &%Human (such as a professional sports star) or 
imaginary &%Agent (in the case of fantasy trading cards like Pokemon).")

(=>
  (instance ?TC TradingCard)
  (attribute ?TC Collectible))

(subclass PortableComputer Computer)
(documentation PortableComputer EnglishLanguage "A &%Computer that is
designed to be tranferred easily by a &%Human from one location to another.")

(=>
  (instance ?PC PortableComputer)
  (hasPurpose ?PC
    (exists (?T ?H)
      (and
        (instance ?T Carrying)
        (patient ?T ?PC)
        (agent ?C ?H)))))

(subclass Laptop PortableComputer)
(documentation Laptop EnglishLanguage "A &%PortableComputer that includes
a standard sized &%ComputerKeyboard.")

(initiallyContainsPart ComputerKeyboard Laptop)
(initiallyContainsPart ComputerScreen Laptop)

(subclass TabletComputer PortableComputer)
(documentation TabletComputer EnglishLanguage "A &%PortableComputer lacking
a physical &%ComputerKeyboard, but having a touch-sensitive screen.")

(=>
  (instance ?T TabletComputer)
  (not
    (exists (?K)
      (and
        (instance ?K ComputerKeyboard)
        (part ?K ?T)))))

(=>
  (instance ?T TabletComputer)
  (exists (?K)
    (and
      (instance ?K ComputerTouchscreen)
      (part ?K ?T))))

(subclass SmartPhone MobileCellPhone)
(subclass SmartPhone PortableComputer)
(documentation SmartPhone EnglishLanguage "A &%MobileCellPhone with
a user-accessible computing capabality.  A phone that simply has
a computer in it, but where the user is not able to program it
or install new programs, does not constitute a smart phone.")

(instance suffers CaseRole)
(instance suffers BinaryRelation)
(domain suffers 1 Process)
(domain suffers 2 Agent)
(documentation suffers EnglishLanguage "The opposite of &%benefits.  The &%Agent
does not want the action to occur.")

(=>
  (suffers ?A ?B)
  (not 
    (benefits ?A ?B)))
 
(=>
  (benefits ?A ?B)
  (not
    (suffers ?A ?B)))

(=>
    (and
        (equal ?PROCESS-START
            (BeginFn
                (WhenFn ?PROCESS)))
        (equal ?AGENT-END
            (EndFn
                (WhenFn ?AGENT)))
        (suffers ?PROCESS ?AGENT))
    (before ?PROCESS-START ?AGENT-END))

(=>
  (benefits ?A ?B)
  (wants ?B ?A))

(=>
  (suffers ?A ?B)
  (not
    (wants ?B ?A)))

;; We already have Answering in SUMO

(subclass Apologizing Stating)
(documentation Apologizing EnglishLanguage "The speaker states that some action
he or she took previously was wrong in some way, that it caused harm to the
hearer.")

(=>
  (and
    (instance ?A Apologizing)
    (agent ?A ?AG)
    (destination ?A ?P))
  (exists (?ACT)
    (and
      (suffers ?ACT ?P)
      (agent ?ACT ?AG)
      (holdsDuring 
        (WhenFn ?A)
          (not
            (wants ?AG ?ACT))))))

(subclass Confirming Stating)
(documentation Confirming EnglishLanguage "An utterance in which the speaker is
part of a &%ReachingAgreement and in which the &%Proposition under consideration
has already been &%Stated.")

(=>
  (and
    (instance ?C Confirming)
    (agent ?C ?A)
    (containsInformation ?C ?P))
  (exists (?S ?RA ?A2)
    (and
      (instance ?S Stating)
      (earlier ?S ?C)
      (instance ?RA ReachingAgreement)
      (agent ?S ?A2)
      (containsInformation ?RA ?P)
      (containsInformation ?S ?P)
      (partyToAgreement ?RA ?A)
      (partyToAgreement ?RA ?A2))))

(subclass Elaborating LinguisticCommunication)
(documentation Elaborating EnglishLanguage "A &%LinguisticCommunication in
which the &%agent adds additional content beyond the original utterance.")

(=>
  (instance ?E Elaborating)
  (exists (?L ?EP ?LP)
    (and
      (instance ?L LinguisticCommunication)
      (earlier ?L ?E)
      (containsInformation ?E ?EP)
      (containsInformation ?L ?LP)
      (subsumesContentInstance ?EP ?LP))))
      
(subclass Restating LinguisticCommunication)
(documentation Restating EnglishLanguage "A &%Communication act in
which the speaker reiterates the same &%Proposition as a previous
speech act.  Note that this is not a &%Stating, since the speaker
may simply be saying what someone else said, and not actually
committing to the truth of what that person said.")

(=>
  (instance ?R Restating)
  (exists (?L)
    (and
      (instance ?L LinguisticCommunication)
      (earlier ?L ?R)
      (containsInformation ?E ?RP)
      (containsInformation ?L ?LP)
      (equivalentContentInstance ?RP ?LP))))

(subclass Correcting Stating)
(documentation Correcting EnglishLanguage "A &%Correcting is a part
of a &%Disagreeing in which the speaker explicitly &%refers to a prior
statement.")

(=>
  (instance ?C Correcting)
  (exists (?D ?S ?SP ?CP)
    (and
      (instance ?D Disagreeing)
      (subProcess ?C ?D)
      (instance ?S Stating)
      (subProcess ?S ?D)
      (containsInformation ?S ?SP)
      (containsInformation ?C ?CP)
      (refers ?CP ?SP)
      (not
        (consistent ?CS ?SP)))))

;; reject seems the same as SUMO's existing Disagreeing

;; Objecting appears the same as the existing ExpressingDisapproval

;; We already have Questioning in SUMO

(subclass Prompting Requesting)
(documentation Prompting EnglishLanguage "A &%Prompting is an
implied sort of &%Requesting, in which the speaker begins an
utterance, asking the hearer to complete it.")

(=>
  (instance ?P Prompting)
  (exists (?H ?A)
    (and
      (destination ?P ?H)
      (agent ?P ?A)
      (desires ?A
         (exists (?LC)
           (and
             (instance ?LC LinguisticCommunication)
             (agent ?LC ?H)
             (earlier ?P ?LC)
             (subsumesContentInstance ?LC ?P)))))))

(instance CoveringFn UnaryFunction)
(domainSubclass CoveringFn 1 BodyPart)
(rangeSubclass CoveringFn WearableItem)
(documentation CoveringFn EnglishLanguage "A &%Function that produces the class of
all things intended to be used in &%Covering a particular &%BodyPart.")

(=>
  (subclass ?C (CoveringFn ?B))
  (hasPurpose ?C
    (exists (?P ?BI ?CI)
      (and
        (instance ?P Covering)
        (instance ?BI ?B)
        (instance ?CI ?C)
        (destination ?P ?BI)
        (patient ?P ?CI)))))

(instance covers BinaryPredicate)
(instance covers TransitiveRelation)
(instance covers SpatialRelation)
(domain covers 1 Object)
(domain covers 2 Object)
(format EnglishLanguage covers "%1 covers %2")
(documentation covers EnglishLanguage "A relationship of partial or complete
physical covering, which may be the result of a &%Covering.  To cover an 
object, the first object must at least roughly conform to the surface of the
second object. ")

(=>
  (and
    (covers ?A ?B)
    (superficialPart ?S ?B))
  (meetsSpatially ?A ?S))

(=>
  (and
    (instance ?C Covering)
    (patient ?C ?P)
    (instrument ?C ?I))
  (holdsDuring 
    (ImmediateFutureFn (WhenFn ?C))
    (covers ?I ?P)))
    
(documentation beforeOnPath EnglishLanguage "(beforeOnPath ?OBJ1 ?OBJ2 ?PATH ?PROC) means that ?OBJ1 is spatially before ?OBJ2 on the path ?PATH with respect to a particular &%Transfer &%Process.") 	 	
(domain beforeOnPath 1 Object)
(domain beforeOnPath 2 Object)
(domain beforeOnPath 3 Object)
(domain beforeOnPath 4 Transfer) 
(instance beforeOnPath QuaternaryPredicate) 
(instance beforeOnPath SpatialRelation) 
;;(instance beforeOnPath TransitiveRelation)
(format EnglishLanguage beforeOnPath "%1 %n before %2 on path %3 during %4") 
(termFormat EnglishLanguage betweenOnPath "before on path") 

(=>
  (and
    (betweenOnPath ?O1 ?O2 ?O3 ?PATH)
    (instance ?T Transfer)
    (path ?T ?PATH)
    (origin ?T ?O1)
    (destination ?T ?O3))
  (and
    (beforeOnPath ?O1 ?O2 ?PATH ?T)
    (beforeOnPath ?O2 ?O3 ?PATH ?T)))

(=>
  (orientation ?O1 ?O2 Upstream)
  (exists (?T ?L ?P)
    (and
      (instance ?T Transfer)
      (attribute ?L Liquid)
      (path ?T ?P)
      (origin ?T ?O1)
      (beforeOnPath ?O1 ?O2 ?P ?T)
      (destination ?T ?O2))))

(=>
  (orientation ?O1 ?O2 Downstream)
  (exists (?T ?L ?P)
    (and
      (instance ?T Transfer)
      (attribute ?L Liquid)
      (path ?T ?P)
      (origin ?T ?O2)
      (beforeOnPath ?O2 ?O1 ?P ?T)
      (destination ?T ?O1))))

(=>
  (orientation ?O1 ?O2 Upwind)
  (exists (?T ?L ?P)
    (and
      (instance ?T Transfer)
      (attribute ?L Liquid)
      (path ?T ?P)
      (origin ?T ?O1)
      (beforeOnPath ?O1 ?O2 ?P ?T)
      (destination ?T ?O2))))

(=>
  (orientation ?O1 ?O2 Downwind)
  (exists (?T ?L ?P)
    (and
      (instance ?T Transfer)
      (attribute ?L Liquid)
      (path ?T ?P)
      (origin ?T ?O2)
      (beforeOnPath ?O2 ?O1 ?P ?T)
      (destination ?T ?O1))))

(instance approximateValue BinaryPredicate)
(domain approximateValue 1 RealNumber)
(domain approximateValue 2 RealNumber)
(format EnglishLanguage approximateValue "the approximate value of %1 is %n %2")
(documentation approximateValue EnglishLanguage "A relation that specifies two 
numbers are equal or nearly so.")

(=>
  (approximateValue ?N1 ?N2)
  (modalAttribute
    (equal ?N1 ?N2)
    Likely))

(=>
  (approximateValue ?N1 ?N2)
  (modalAttribute
    (greaterThan
      0.9 
      (DivisionFn ?N1 ?N2))
    Unlikely))

(=>
  (approximateValue ?N1 ?N2)
  (modalAttribute
    (greaterThan
      0.9 
      (DivisionFn ?N2 ?N1))
    Unlikely))


      
(subclass Invoice FinancialText)
(documentation Invoice EnglishLanguage "A &%FinancialText which refers to the &%Selling of physical goods and &%confersRight to a &%Buyer to purchase goods according to agreed upon terms. An &%Invoice can occur before or after &%Buyer's receipt of goods, but only before before a &%Seller's receipt of payment.")


(=>
  (instance ?INVOICE Invoice)
  (exists (?NUMBER ?BUYER ?SELLER)
    (and
      (uniqueIdentifier ?NUMBER ?INVOICE)
      (instance ?BUYER Buyer)
      (instance ?SELLER Seller)
      (confersRight
        (exists (?SELLING)
          (and
            (before
              (BeginFn
                (WhenFn ?INVOICE)
              )
              (BeginFn
                (WhenFn ?SELLING)
              )
            )
            (instance ?SELLING Selling)
            (instance ?PRODUCT Product)
            (objectTransferred ?SELLING ?PRODUCT)
            (refers ?INVOICE ?PRODUCT)
            (agent ?SELLING ?SELLER)
            (patient ?SELLING ?BUYER)))
      ?SELLER ?BUYER))))


(subclass PurchaseOrder FinancialText)
(documentation PurchaseOrder EnglishLanguage "A &%FinancialText which refers to the &%Selling of physical goods and &%confersObligation to a &%Buyer to purchase goods according to agreed upon terms. A &%PurchaseOrder always occurs before &%Buying.")

(=>
  (instance ?PO PurchaseOrder)
  (exists (?NUMBER ?BUYER ?SELLER)
    (and
      (uniqueIdentifier ?NUMBER ?PO)
      (instance ?BUYER Buyer)
      (instance ?SELLER Seller)
      (confersObligation
        (exists (?BUYING)
          (and
            (before
              (BeginFn
                (WhenFn ?PO))
              (BeginFn
                (WhenFn ?BUYING)))
            (instance ?BUYING Buying)
            (instance ?PRODUCT Product)
            (objectTransferred ?BUYING ?PRODUCT)
            (refers ?PO ?PRODUCT)
            (agent ?BUYING ?BUYER)
            (patient ?BUYING ?SELLER)))
      ?BUYER ?SELLER))))


(instance uniqueIdWithRespectTo TernaryPredicate)
(domain uniqueIdWithRespectTo 1 Physical) 
(domain uniqueIdWithRespectTo 2 Physical)
(domain uniqueIdWithRespectTo 3 SymbolicString)
(documentation uniqueIdWithRespectTo EnglishLanguage "Any ID which is unique within some context, though not globally unique. This relation may be used in situations such as a user account, in which a &%SymbolicString is unique to a relationship between one particular &%Human and one particular &%Corporation, or a unique home address with respect to a given &%Street.")


(documentation AccountNumber EnglishLanguage "A unique &%SymbolicString for a relationship between a &%Corporation and &%Agent.")
(subclass AccountNumber SymbolicString)

(=> 
  (instance ?AN AccountNumber)
  (exists (?CORPORATION ?AGENT ?NUMBER)
    (and
      (instance ?CORPORATION Corporation)
      (instance ?AGENT Agent)
      (instance ?NUMBER SymbolicString)
      (uniqueIdWithRespectTo ?CORPORATION ?HUMAN ?NUMBER))))


(documentation InvoiceNumber EnglishLanguage "A &%SymbolicString for an &%Invoice which is unique to &%Seller.")
(subclass InvoiceNumber SymbolicString)

(=> 
  (instance ?AN InvoiceNumber)
  (exists (?INVOICE ?SELLER ?NUMBER)
    (and
      (instance ?INVOICE Invoice)
      (instance ?SELLER Seller)
      (instance ?NUMBER SymbolicString)
      (uniqueIdWithRespectTo ?INVOICE ?SELLER ?NUMBER))))


(documentation PurchaseOrderNumber EnglishLanguage "A &%SymbolicString for a &%Purchase which is unique to a &%Buyer.")
(subclass PurchaseOrderNumber SymbolicString)

(=> 
  (instance ?AN PurchaseOrderNumber)
  (exists (?PO ?BUYER ?NUMBER)
    (and
      (instance ?PO PurchaseOrder)
      (instance ?BUYER Buyer)
      (instance ?NUMBER SymbolicString)
      (uniqueIdWithRespectTo ?PO ?BUYER ?NUMBER))))
      


(documentation BreakingRecord EnglishLanguage "A &%Process where the &%Agent takes a specific &%CaseRole in a &%Process of a specific &%Class which no other &%Agent of the same &%Class had undertaken in the same &%CaseRole in a specific &%TimeInterval preceeding the moment when the record was broken and in a specific &%Region. &%BreakingRecord &%refers to a &%Quantity which &%refers to the &%Process &%Class.")
(subclass BreakingRecord Process)

(=>
  (and
    (instance ?X BreakingRecord)
    (agent ?X ?A1))
  (exists (?AC ?PC ?P1 ?TP ?ROLE ?L ?Q)
    (and
      (instance ?AC Set)
      (instance ?A1 ?AC)
      (subclass ?PC Process)
      (subclass ?L Region)
      (instance ?TP TimePoint)
      (instance ?Q Quantity)
      (refers ?X ?Q)
      (refers ?Q ?PC)
      (playsRoleInEvent ?A1 ?ROLE ?P1)
      (eventLocated ?P1 ?L)
      (not
        (exists (?A2 ?P2)
          (and
            (instance ?A2 ?AC)
            (not
              (equal ?A2 ?A1))
            (instance ?P2 ?PC)
            (holdsDuring
              (TimeIntervalFn ?TP
                (EndFn
                  (WhenFn ?X)))
              (and
                (playsRoleInEvent ?A2 ?ROLE ?P2)
                (eventLocated ?P2 ?L)))))))))






(subclass Freighter WaterVehicle)

(documentation Freighter EnglishLanguage "&%Freighter is a &%WaterVehicle which transports &%Artifacts.")

(=>
  (instance ?F Freighter)
  (exists (?T ?OBJ)
    (and
      (instance ?T Transportation)
      (instance ?OBJ OBJECT)
      (hasPurpose ?F 
        (and
          (agent ?T ?F)
          (patient ?T ?OBJ))))))


(=>
    (and
        (instance ?DAM Damaging)
        (instance ?OBJ Device)
        (patient ?DAM ?OBJ))
    (holdsDuring
        (ImmediateFutureFn 
            (WhenFn ?DAM))
        (attribute ?OBJ DeviceDamaged)))


(documentation DamagedVehicle EnglishLanguage "&%DamagedVehicle is the class of &%Vehicle, that can't be used for their original purpose because of &%Damaging")

(subclass DamagedVehicle Vehicle)

(<=>
    (instance ?DV DamagedVehicle)
    (and
        (instance ?DV Vehicle)
        (attribute ?DV DeviceDamaged)))



(instance Uninhabited RelationalAttribute)
(documentation Uninhabited EnglishLanguage "&%Attribute of a &%Region in which
no &%Humans exist.")

(=>
  (and
    (attribute ?U Uninhabited)
    (instance ?U Region))
  (not
    (exists (?H)
      (and
        (instance ?H Human)
        (inhabits ?H ?U)))))


