;;;         Ontology of Geography          ;;;

;; Access to and use of these products is governed by the GNU General Public 
;; License <http://www.gnu.org/copyleft/gpl.html>. 
;; By using these products, you agree to be bound by the terms 
;; of the GPL.

;; Contact Adam Pease (apease [at] articulatesoftware.com).
;; 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 


;; Authors:  Deborah Nichols 
;;     Part I incorporates some material by Doug Wulf.
;;     Part II incorporates some material from earlier Terrain.kif
;;      by Olga Babko-Malaya.
  
;;-----------------------------------------------------------------------

;; Ontology dependencies for Geography.kif: Merge.txt, elements.kif

;;-----------------------------------------------------------------------

;; Outline
;; I. Geography Terms for the CIA World Fact Book
;;    A. Location
;;   B. Geographic coordinates
;;   C. Map references
;;   D. Area
;;   E. Area - comparative
;;   F. Land boundaries
;;   G. Coastline
;;   H. Maritime claims
;;   I. Climate
;;   J. Terrain
;;   K. Elevation extremes
;;   L. Natural resources
;;   M. Land use
;;   N. Irrigated land
;;   O. Natural hazards
;;   P. Environment - current issues
;;   Q. Environment - international agreements
;;   R. Geography - note
;; 
;; II. General Geography Terms and Background
;;   A. Planet Geography & Astronomical Bodies
;;  B. Directions and Distances
;;  C. Land Forms
;;   D. Water Areas
;;     1. Oceans & Seas
;;     2. Tides & Currents
;;     3. Water Subregions
;;     4. Fresh Water Areas
;;   E. Coastal and Shoreline Areas
;;   F. Air and Atmosphere
;;   G. Weather & Climate
;;   H. Vegetation and Biomes
;;  I. Natural Disasters
;;  J. Environmental Areas of Concern

;;-----------------------------------------------------------------------

;; GEOGRAPHY ONTOLOGY 

;;-----------------------------------------------------------------------

;; I. Geography Terms for the CIA World Fact Book

;; A. Location
;;  Identifies regional location of a country, neighbors & adjacent waters.

; Regions used by 2002 CIA WFB to describe country locations:

(instance CentralAfrica GeographicArea)
(instance EasternAfrica GeographicArea)
(instance NorthernAfrica GeographicArea)
(instance SouthernAfrica GeographicArea)
(instance WesternAfrica GeographicArea)
(instance MiddleEastRegion GeographicArea)
(instance CentralEurope GeographicArea)
(instance EasternEurope GeographicArea)
(instance NorthernEurope GeographicArea)
(instance SouthernEurope GeographicArea)
(instance WesternEurope GeographicArea)
(instance SoutheasternEurope GeographicArea)
(instance SouthwesternEurope GeographicArea)
(instance NorthAmerica GeographicArea)
(instance NorthernNorthAmerica GeographicArea)
(instance CaribbeanRegion GeographicArea)
(instance MiddleAmerica GeographicArea)
(instance CentralSouthAmerica GeographicArea)
(instance EasternSouthAmerica GeographicArea)
(instance NorthernSouthAmerica GeographicArea)
(instance SouthernSouthAmerica GeographicArea)
(instance WesternSouthAmerica GeographicArea)
(instance CentralAsia GeographicArea)
(instance EasternAsia GeographicArea)
(instance NorthernAsia GeographicArea)
(instance SouthernAsia GeographicArea)
(instance SoutheasternAsia GeographicArea)
(instance SouthwesternAsia GeographicArea)
(instance Oceania GeographicArea)

(names "Central Africa" CentralAfrica)
(names "Eastern Africa" EasternAfrica)
(names "Northern Africa" NorthernAfrica)
(names "Southern Africa" SouthernAfrica)
(names "Western Africa" WesternAfrica)
(names "Middle East" MiddleEastRegion)
(names "Central Europe" CentralEurope)
(names "Eastern Europe" EasternEurope)
(names "Northern Europe" NorthernEurope)
(names "Southern Europe" SouthernEurope)
(names "Western Europe" WesternEurope)
(names "Southeastern Europe" SoutheasternEurope)
(names "Southwestern Europe" SouthwesternEurope)
(names "North America" NorthAmerica)
(names "Northern North America" NorthernNorthAmerica)
(names "Caribbean Region" CaribbeanRegion)
(names "Caribbean" CaribbeanRegion)
(names "Middle America" MiddleAmerica)
(names "Central South America" CentralSouthAmerica)
(names "Eastern South America" EasternSouthAmerica)
(names "Northern South America" NorthernSouthAmerica)
(names "Southern South America" SouthernSouthAmerica)
(names "Western South America" WesternSouthAmerica)
(names "Central Asia" CentralAsia)
(names "Eastern Asia" EasternAsia)
(names "Northern Asia" NorthernAsia)
(names "Southern Asia" SouthernAsia)
(names "Southeastern Asia" SoutheasternAsia)
(names "Southwestern Asia" SouthwesternAsia)
(names "Oceania" Oceania)

(geographicSubregion CentralAfrica Africa)
(geographicSubregion EasternAfrica Africa)
(geographicSubregion NorthernAfrica Africa)
(geographicSubregion SouthernAfrica Africa)
(geographicSubregion WesternAfrica Africa)

(instance MiddleEastRegion GeopoliticalArea)
(overlapsSpatially MiddleEastRegion Asia)

(documentation MiddleEastRegion EnglishLanguage "&%MiddleEastRegion is a 
&%GeopoliticalArea that comprises countries of Southwestern &%Asia 
and (in some definitions) Northwestern &%Africa.  Here this term is 
defined as in the CIA World Fact Book, in which the Middle East 
includes: Bahrain, Cyprus, the Gaza Strip, Iran, Iraq, Israel, 
Jordan, Kuwait, Lebanon, Oman, Qatar, Saudi Arabia, Syria, the United 
Arab Emirates, the West Bank, and Yemen.")

(geographicSubregion CentralEurope Europe)
(geographicSubregion EasternEurope Europe)
(geographicSubregion NorthernEurope Europe)
(geographicSubregion SouthernEurope Europe)
(geographicSubregion WesternEurope Europe)
(geographicSubregion SoutheasternEurope Europe)
(geographicSubregion SouthwesternEurope Europe)

(geographicSubregion NorthernNorthAmerica NorthAmerica)

(overlapsSpatially CaribbeanRegion SouthAmerica)
(overlapsSpatially CaribbeanRegion NorthAmerica)
(overlapsSpatially MiddleAmerica NorthAmerica)
(overlapsSpatially MiddleAmerica SouthAmerica)

(geographicSubregion CentralSouthAmerica SouthAmerica)
(geographicSubregion EasternSouthAmerica SouthAmerica)
(geographicSubregion NorthernSouthAmerica SouthAmerica)
(geographicSubregion SouthernSouthAmerica SouthAmerica)
(geographicSubregion WesternSouthAmerica SouthAmerica)

(geographicSubregion CentralAsia Asia)
(geographicSubregion EasternAsia Asia)
(geographicSubregion NorthernAsia Asia)
(geographicSubregion NorthernAsia NorthernHemisphere)

(geographicSubregion SouthernAsia Asia)
(geographicSubregion SoutheasternAsia Asia)
(geographicSubregion SouthwesternAsia Asia)

(geographicSubregion CentralAfrica EasternHemisphere)
(overlapsSpatially CentralAfrica NorthernHemisphere)
(overlapsSpatially CentralAfrica SouthernHemisphere)

(geographicSubregion EasternAfrica EasternHemisphere)
(overlapsSpatially EasternAfrica NorthernHemisphere)
(overlapsSpatially EasternAfrica SouthernHemisphere)

(overlapsSpatially NorthernAfrica EasternHemisphere)
(overlapsSpatially NorthernAfrica WesternHemisphere)
(geographicSubregion NorthernAfrica NorthernHemisphere)

(geographicSubregion SouthernAfrica EasternHemisphere)
(geographicSubregion SouthernAfrica SouthernHemisphere)

(overlapsSpatially WesternAfrica EasternHemisphere)
(overlapsSpatially WesternAfrica WesternHemisphere)
(overlapsSpatially WesternAfrica NorthernHemisphere)
(overlapsSpatially WesternAfrica SouthernHemisphere)

(geographicSubregion MiddleEastRegion EasternHemisphere)
(geographicSubregion MiddleEastRegion WesternHemisphere)

(geographicSubregion EasternEurope EasternHemisphere)
(geographicSubregion EasternEurope NorthernHemisphere)

(geographicSubregion CentralEurope EasternHemisphere)
(geographicSubregion CentralEurope NorthernHemisphere)

(geographicSubregion NorthernEurope EasternHemisphere)
(geographicSubregion NorthernEurope NorthernHemisphere)

(geographicSubregion SouthernEurope EasternHemisphere)
(geographicSubregion SouthernEurope NorthernHemisphere)

(overlapsSpatially WesternEurope EasternHemisphere)
(overlapsSpatially WesternEurope WesternHemisphere)
(geographicSubregion WesternEurope NorthernHemisphere)

(geographicSubregion SoutheasternEurope EasternHemisphere)
(geographicSubregion SoutheasternEurope NorthernHemisphere)

(overlapsSpatially SouthwesternEurope EasternHemisphere)
(overlapsSpatially SouthwesternEurope WesternHemisphere)
(geographicSubregion SouthwesternEurope NorthernHemisphere)

(geographicSubregion CaribbeanRegion NorthernHemisphere)
(geographicSubregion CaribbeanRegion WesternHemisphere)

(geographicSubregion MiddleAmerica NorthernHemisphere)
(geographicSubregion MiddleAmerica WesternHemisphere)

(geographicSubregion CentralSouthAmerica WesternHemisphere)
(geographicSubregion CentralSouthAmerica SouthernHemisphere)

(geographicSubregion EasternSouthAmerica WesternHemisphere)
(overlapsSpatially EasternSouthAmerica NorthernHemisphere)
(overlapsSpatially EasternSouthAmerica SouthernHemisphere)

(geographicSubregion NorthernSouthAmerica WesternHemisphere)
(overlapsSpatially NorthernSouthAmerica NorthernHemisphere)
(overlapsSpatially NorthernSouthAmerica SouthernHemisphere)

(geographicSubregion SouthernSouthAmerica WesternHemisphere)
(geographicSubregion SouthernSouthAmerica SouthernHemisphere)

(geographicSubregion WesternSouthAmerica WesternHemisphere)
(overlapsSpatially WesternSouthAmerica NorthernHemisphere)
(overlapsSpatially WesternSouthAmerica SouthernHemisphere)

(geographicSubregion CentralAsia EasternHemisphere)
(geographicSubregion CentralAsia NorthernHemisphere)

(geographicSubregion EasternAsia EasternHemisphere)
(geographicSubregion EasternAsia NorthernHemisphere)

(geographicSubregion NorthernAsia EasternHemisphere)

(geographicSubregion SouthernAsia EasternHemisphere)
(overlapsSpatially SouthernAsia NorthernHemisphere)
(overlapsSpatially SouthernAsia SouthernHemisphere)

(geographicSubregion SoutheasternAsia EasternHemisphere)
(overlapsSpatially SoutheasternAsia NorthernHemisphere)
(overlapsSpatially SoutheasternAsia SouthernHemisphere)

(geographicSubregion SouthwesternAsia EasternHemisphere)
(geographicSubregion SouthwesternAsia NorthernHemisphere)

(orientation Europe Africa North)
(orientation Europe Asia West)
(orientation Europe NorthAmerica East)
(orientation NorthAmerica SouthAmerica North)
(orientation NorthAmerica Asia East)
(orientation Africa SouthAmerica Northeast)
(orientation Asia Oceania Northwest)
(orientation Africa NorthAmerica Southeast)
(orientation Europe SouthAmerica Northeast)
(orientation Oceania NorthAmerica Southwest)
(orientation MiddleEastRegion Asia Southwest)
(orientation MiddleEastRegion Africa Northeast)
(orientation MiddleAmerica SouthAmerica North)
(orientation MiddleAmerica NorthAmerica South)
(orientation CaribbeanRegion SouthAmerica North)
(orientation CaribbeanRegion NorthAmerica South)

(=>
  (and
    (instance ?LAND Continent)
    (not (equal ?LAND Antarctica)))
  (orientation Antarctica ?LAND South))

;;-----------------------------------------------------------------------

;; B. Geographic coordinates

(subclass Latitude Region)
(names "latitude" Latitude)
(names "parallel" Latitude)
(termFormat EnglishLanguage Latitude "latitude")

(documentation Latitude EnglishLanguage "&%Latitude is the class of &%Regions, 
associated with areas on the Earth's surface, which are parallels 
measured in &%PlaneAngleDegrees from the &%Equator.")

(subclass Longitude Region)
(names "longitude" Longitude)
(names "meridian" Longitude)
(termFormat EnglishLanguage Longitude "longitude")

(documentation Longitude EnglishLanguage "&%Longitude is the class of &%Regions, 
associated with areas on the Earth's surface, which are meridians 
measured in &%PlaneAngleDegrees from the &%PrimeMeridian through 
&%GreenwichEnglandUK.")

(instance GreenwichEnglandUK City)

(instance objectGeographicCoordinates TernaryPredicate)
(domain objectGeographicCoordinates 1 Object)
(domain objectGeographicCoordinates 2 Latitude)
(domain objectGeographicCoordinates 3 Longitude)

(documentation objectGeographicCoordinates EnglishLanguage 
"(&%objectGeographicCoordinates ?OBJECT ?LAT ?LONG) means that 
the &%Object ?OBJECT is found at the geographic coordinates 
?LAT and ?LONG.")

(instance GeographicCenterFn UnaryFunction)
(names "geographic center" GeographicCenterFn)
(domain GeographicCenterFn 1 GeographicArea)
(range GeographicCenterFn GeographicArea)

(documentation GeographicCenterFn EnglishLanguage 
"(&%GeographicCenterFn ?REGION) denotes the geographical center 
of the &%GeographicArea ?REGION.")

(=>
  (and
    (instance ?REGION GeographicArea)
    (instance (GeographicCenterFn ?REGION) GeographicArea))
  (geographicSubregion (GeographicCenterFn ?REGION) ?REGION))

(=>
  (and
    (instance ?REGION GeographicArea)
    (objectGeographicCoordinates 
      (GeographicCenterFn ?REGION) ?LAT ?LONG))
  (objectGeographicCoordinates ?REGION ?LAT ?LONG))

;; See Merge.kif for definitions of &%PlaneAngleMeasure and &%AngularDegree

;; Additional assertions for &%AngularDegree:
(=> 
  (measure ?ANGLE (MeasureFn ?NUMBER AngularDegree)) 
  (greaterThanOrEqualTo ?NUMBER 0))

(=> 
  (measure ?ANGLE (MeasureFn ?NUMBER AngularDegree)) 
  (lessThanOrEqualTo ?NUMBER 360))

(instance ArcMinute UnitOfAngularMeasure)
(documentation ArcMinute EnglishLanguage "&%ArcMinute represents a &%UnitOfMeasure 
equivalent to 1/60th of an &%AngularDegree.")

(=> 
  (measure ?ANGLE (MeasureFn ?NUMBER ArcMinute)) 
  (greaterThanOrEqualTo ?NUMBER 0))

(=> 
  (measure ?ANGLE (MeasureFn ?NUMBER ArcMinute)) 
  (lessThanOrEqualTo ?NUMBER 60))

(<=>
  (measure ?OBJ (MeasureFn ?DEG AngularDegree))
  (measure ?OBJ (MeasureFn (MultiplicationFn 60 ?DEG) ArcMinute)))

(equal (MeasureFn 1 AngularDegree) (MeasureFn 60 ArcMinute))
(equal (MeasureFn ?NUM AngularDegree) (MeasureFn (MultiplicationFn 60 ?NUM) ArcMinute))

(instance ArcSecond UnitOfAngularMeasure)
(documentation ArcSecond EnglishLanguage "&%ArcSecond represents a &%UnitOfMeasure 
equivalent to 1/60th of an &%ArcMinute.")

(=> 
  (measure ?ANGLE (MeasureFn ?NUMBER ArcSecond)) 
  (greaterThanOrEqualTo ?NUMBER 0))

(=> 
  (measure ?ANGLE (MeasureFn ?NUMBER ArcSecond)) 
  (lessThanOrEqualTo ?NUMBER 60))

(<=>
  (measure ?OBJ (MeasureFn ?DEG ArcMinute))
  (measure ?OBJ (MeasureFn (MultiplicationFn 60 ?DEG) ArcSecond)))

(equal (MeasureFn 1 ArcMinute) (MeasureFn 60 ArcSecond))
(equal (MeasureFn ?DEG ArcMinute) (MeasureFn (MultiplicationFn 60 ?DEG) ArcSecond))

(instance LatitudeFn VariableArityRelation)
(instance LatitudeFn Function)
(domain LatitudeFn 1 DirectionalAttribute)
(domain LatitudeFn 2 AngleMeasure)
(domain LatitudeFn 3 AngleMeasure)
(domain LatitudeFn 4 AngleMeasure)
(range LatitudeFn Region)
(termFormat EnglishLanguage LatitudeFn "Latitude")

(documentation LatitudeFn EnglishLanguage "&%LatitudeFn is a &%VariableArityRelation 
used to denote a parallel of latitude.  Examples: 
(&%LatitudeFn &%North (&%MeasureFn 38 &%AngularDegree)), (&%LatitudeFn 
&%South (&%MeasureFn 23 &%AngularDegree) (&%MeasureFn 30 &%ArcMinute)), 
(&%LatitudeFn &%South (&%MeasureFn 60 &%AngularDegree) (&%MeasureFn 0 &%ArcMinute) 
(&%MeasureFn 0 &%ArcSecond)), (&%LatitudeFn &%North 
(&%MeasureFn 42 &%AngularDegree) (&%MeasureFn 7.89 &%ArcMinute)).")

(=>
  (instance (LatitudeFn ?DIRECTION @ROW) Region)
  (or
    (equal ?DIRECTION North)
    (equal ?DIRECTION South)))

(=>
  (and
    (instance (LatitudeFn ?DIRECTION @ROW) Region)
    (equal (ListOrderFn (ListFn @ROW) 1) (MeasureFn ?NUM AngularDegree)))
  (lessThanOrEqualTo ?NUM 90))

(=>
  (or
    (equal ?DIRECTION North)
    (equal ?DIRECTION South))
  (length 
     (LatitudeFn ?DIRECTION
    (MeasureFn 0 AngularDegree) (MeasureFn 1 ArcMinute) (MeasureFn 0 ArcSecond)) 
     (MeasureFn 1 NauticalMile)))

(instance LongitudeFn Function)
(instance LongitudeFn VariableArityRelation)
(domain LongitudeFn 1 DirectionalAttribute)
(domain LongitudeFn 2 AngleMeasure)
(domain LongitudeFn 3 AngleMeasure)
(domain LongitudeFn 4 AngleMeasure)
(range LongitudeFn GeographicArea)
(termFormat EnglishLanguage LongitudeFn "Longitude")

(documentation LongitudeFn EnglishLanguage "(&%LongitudeFn ?DIRECTION @ROW) 
denotes a meridian of longitude.  Note that &%LongitudeFn is 
a &%VariableArityRelation.  Examples: 
(&%LongitudeFn &%East (&%MeasureFn 180 &%AngularDegree)), (&%LongitudeFn 
&%West (&%MeasureFn 122 &%AngularDegree) (&%MeasureFn 24 &%ArcMinute)), 
(&%LongitudeFn &%East (&%MeasureFn 121 &%AngularDegree) 
(&%MeasureFn 0 &%ArcMinute) (&%MeasureFn 15 &%ArcSecond)), 
(&%LongitudeFn &%West (&%MeasureFn 80 &%AngularDegree) 
(&%MeasureFn 6.78 &%ArcMinute)).")

(=>
  (instance (LongitudeFn ?DIRECTION @ROW) Region)
  (or
    (equal ?DIRECTION East)
    (equal ?DIRECTION West)))

(=>
  (and
    (instance (LongitudeFn ?DIRECTION @ROW) Region)
    (equal (ListOrderFn (ListFn @ROW) 1)(MeasureFn ?NUM AngularDegree)))
  (lessThanOrEqualTo ?NUM 180))

(instance DirectionalSubregionFn BinaryFunction)
(domain DirectionalSubregionFn 1 DirectionalAttribute)
(domain DirectionalSubregionFn 2 GeographicArea)
(range DirectionalSubregionFn GeographicArea)

(documentation DirectionalSubregionFn EnglishLanguage 
"(&%DirectionalSubregionFn ?DIRECTION ?AREA) denotes the part 
of &%GeographicArea ?AREA that lies in ?DIRECTION from the 
geographic center of ?AREA. For example, 
(&%DirectionalSubregionFn &%Iraq &%North) denotes the Northern 
part of &%Iraq.  Such subregions are defined purely by geographical 
points of reference, not by sociological ones.  For example, 
(&%DirectionalSubregionFn &%UnitedStatesOfAmerica &%South) denotes 
the Southern half of the United States, it does not denote the 
American South as distinguished for historical, literary, or 
cultural purposes.")

(=>
  (and
    (instance ?DIRECTION DirectionalAttribute)
    (instance ?AREA GeographicArea)
    (instance (DirectionalSubregionFn ?DIRECTION ?AREA) GeographicArea))
  (geographicSubregion (DirectionalSubregionFn ?DIRECTION ?AREA) ?AREA))

(=>
  (and
    (instance ?DIRECTION DirectionalAttribute)
    (instance ?AREA GeographicArea)
    (instance (DirectionalSubregionFn ?DIRECTION ?AREA) GeographicArea))
  (orientation (DirectionalSubregionFn ?DIRECTION ?AREA) (GeographicCenterFn ?AREA) ?DIRECTION))

(=>
  (and
    (partlyLocated ?PLACE ?SUBAREA)
    (instance ?SUBAREA GeographicArea)
    (geographicSubregion ?SUBAREA ?AREA))
  (partlyLocated ?PLACE ?AREA))

(=>
  (and
    (connected ?X ?Y)
    (part ?Y ?Z))
  (connected ?X ?Z))

;;-----------------------------------------------------------------------

;; C. Map references
;; This section simply indicates on which specific maps the country
;; may be found. 

(instance mapOfArea BinaryPredicate)
(domain mapOfArea 1 Region)
(domain mapOfArea 2 SymbolicString)

(documentation mapOfArea EnglishLanguage "(&%mapOfArea ?AREA ?POINTER) means that a map 
of the &%Region ?AREA can be found at the location ?POINTER.")

;;-----------------------------------------------------------------------

;; D. Area

(instance totalArea BinaryPredicate)
(domain totalArea 1 Region)
(domain totalArea 2 AreaMeasure)

(documentation totalArea EnglishLanguage "(&%totalArea ?REGION ?AMOUNT) means that 
the total area of ?REGION is the &%AreaMeasure ?AMOUNT.")

(instance landAreaOnly BinaryPredicate)
(domain landAreaOnly 1 GeographicArea)
(domain landAreaOnly 2 AreaMeasure)

(documentation landAreaOnly EnglishLanguage "(&%landAreaOnly ?REGION ?MEASURE) means 
that the total area(s) of solid ground within the &%GeographicArea 
?REGION has the &%AreaMeasure ?AMOUNT. The pieces of solid ground need 
not be continuous within the region.") 

(instance waterAreaOnly BinaryPredicate)
(domain waterAreaOnly 1 GeographicArea)
(domain waterAreaOnly 2 AreaMeasure)

(documentation waterAreaOnly EnglishLanguage "(&%waterAreaOnly ?REGION ?MEASURE) means 
that the total area(s) of surface water within the &%GeographicArea 
?REGION has the &%AreaMeasure ?AMOUNT. The pieces of water need not be 
continuous within the region.") 

(=>
  (and
    (instance ?UNIT UnitOfArea)
    (landAreaOnly ?AREA (MeasureFn ?LAND ?UNIT))
    (waterAreaOnly ?AREA (MeasureFn ?WATER ?UNIT)))
  (totalArea ?AREA (MeasureFn (AdditionFn ?LAND ?WATER) ?UNIT)))

(subclass SurfaceGroundArea GeographicArea)

(documentation SurfaceGroundArea EnglishLanguage "&%SurfaceGroundArea is a subclass of 
&%GeographicArea that is restricted to regions whose surface is solid 
ground.  A &%SurfaceGroundArea may be a discontinuous region overlapping 
a larger, continuous &%GeographicArea but excluding any &%WaterAreas 
enclosed therein. Rivers, lakes, reservoirs and other surface water areas 
are not part of any &%SurfaceGroundArea.")

(=>
  (instance ?EXCLUSIVELANDAREA SurfaceGroundArea)
  (not
    (exists (?WATERAREA)
      (and
        (instance ?WATERAREA WaterArea)
      (part ?WATERAREA ?EXCLUSIVELANDAREA)))))

(=>
  (landAreaOnly ?AREA ?MEASURE)
  (exists (?LAND)
    (and
      (instance ?LAND SurfaceGroundArea)
      (part ?LAND ?AREA)
      (totalArea ?LAND ?MEASURE))))

(subclass WaterOnlyArea GeographicArea)

(documentation WaterOnlyArea EnglishLanguage "&%WaterOnlyArea is a subclass of 
&%GeographicArea that is restricted to regions whose surface is water.  
A &%WaterOnlyArea may be a discontinuous region overlapping a larger, 
continuous &%GeographicArea but excluding any &%LandAreas enclosed therein. 
Dry land areas, including islands, are not part of any &%WaterOnlyArea.")

(=>
  (instance ?EXCLUSIVEWATERAREA WaterOnlyArea)
  (not
    (exists (?LANDAREA)
      (and
        (instance ?LANDAREA LandArea)
        (part ?LANDAREA ?EXCLUSIVEWATERAREA)))))

(=>
  (waterAreaOnly ?AREA ?MEASURE)
  (exists (?WATER)
    (and
      (instance ?WATER WaterOnlyArea)
      (part ?WATER ?AREA)
      (totalArea ?WATER ?MEASURE))))

;; TERM

(instance SquareKilometer UnitOfArea)
(documentation SquareKilometer EnglishLanguage "&%SquareKilometer represents a 
&%UnitOfMeasure equal to one square kilometer.")

(equal (MeasureFn 1 SquareKilometer) 
   (MultiplicationFn (MeasureFn 1 (KiloFn Meter))(MeasureFn 1 (KiloFn Meter))))

(=>
  (equal ?NUM (MultiplicationFn 1 ?NUM))
  (equal (MeasureFn ?NUM SquareKilometer)
     (MeasureFn (MultiplicationFn ?NUM 1000000) SquareMeter)))

;;-----------------------------------------------------------------------

;; E. Area - comparative
;; This section compares the area of a country to some state or other
;; part of the United States.

;; This is a bit of a hack, but the easiest solution since IntersectionFn
;; is only used here in a domain statement

(subclass BinaryRelationExtendedToQuantities RelationExtendedToQuantities)
(subclass BinaryRelationExtendedToQuantities BinaryPredicate)

(instance comparativeArea QuaternaryPredicate)
(domain comparativeArea 1 GeographicArea)
; (domain comparativeArea 2 (IntersectionFn RelationExtendedToQuantities BinaryPredicate))
(domain comparativeArea 2 BinaryRelationExtendedToQuantities)
(domain comparativeArea 3 PositiveRealNumber)
(domain comparativeArea 4 GeographicArea) 

(documentation comparativeArea EnglishLanguage 
"(&%comparativeArea ?REGION1 ?RELATION ?FACTOR ?REGION2) means that 
the total area of &%GeographicArea ?REGION1 has the relation ?RELATION 
to the total area of &%GeographicArea ?REGION2 times ?FACTOR.  For 
example, that France is (slightly) less than twice the size of Colorado 
is represented by (&%comparativeArea &%France &%lessThan 2 &%Colorado).")

(=>
  (and
    (comparativeArea ?REGION1 ?RELATION ?FACTOR ?REGION2)
    (instance ?UNIT UnitOfArea)
    (measure ?REGION1 (MeasureFn ?NUM1 ?UNIT))
    (measure ?REGION2 (MeasureFn ?NUM2 ?UNIT)))
  (?RELATION (MeasureFn ?NUM1 ?UNIT) (MeasureFn (MultiplicationFn ?FACTOR ?NUM2) ?UNIT)))


;;-----------------------------------------------------------------------

;; F. Land boundaries

(instance totalLandBoundary BinaryPredicate)
(domain totalLandBoundary 1 GeographicArea)
(domain totalLandBoundary 2 LengthMeasure)

(documentation totalLandBoundary EnglishLanguage "(&%totalLandBoundary ?REGION ?LENGTH) 
means that the &%GeographicArea ?REGION has a total &%LengthMeasure 
?LENGTH of land boundaries between it and other countries.  Note that 
the boundaries included in the total length may be discontinuous, as when 
interrupted by stretches of &%Seacoast.")

(instance BorderFn BinaryFunction)
(names "border" BorderFn)
(domain BorderFn 1 GeographicArea)
(domain BorderFn 2 GeographicArea)
(range BorderFn GeographicArea)

(documentation BorderFn EnglishLanguage "(&%BorderFn ?AREA1 ?AREA2) denotes the 
border area where the &%GeographicAreas ?AREA1 and ?AREA2 meet.")

(=>
  (instance (BorderFn ?AREA1 ?AREA2) GeographicArea)
  (meetsSpatially ?AREA1 ?AREA2))

(=>
  (and
    (instance ?OBJ1 GeographicArea)
    (instance ?OBJ2 GeographicArea))
  (equal (BorderFn ?OBJ1 ?OBJ2) (BorderFn ?OBJ2 ?OBJ1)))

(=>
  (and
    (instance (BorderFn ?COUNTRY1 ?COUNTRY2) GeographicArea)
    (instance ?COUNTRY1 Nation)
    (instance ?COUNTRY2 Nation))
  (instance (BorderFn ?COUNTRY1 ?COUNTRY2) InternationalBorder))

(=>
  (instance (BorderFn ?AREA1 ?AREA2) GeographicArea)
  (orientation ?AREA1 ?AREA2 Adjacent))

(=>
  (orientation ?ONE ?TWO Adjacent)
  (orientation ?TWO ?ONE Adjacent))  

(=>
  (orientation ?ONE ?TWO Near)
  (orientation ?TWO ?ONE Near))

(=>
  (meetsSpatially ?AREA1 ?AREA2)
  (not (overlapsSpatially ?AREA1 ?AREA2)))

(subclass InternationalBorder GeographicArea)

(documentation InternationalBorder EnglishLanguage "&%InternationalBorder is the 
subclass of &%GeographicAreas where the areas of two &%Nations meet.")

(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)))) 

(documentation sharedBorderLength EnglishLanguage "The &%length of the boundary 
between two &%GeographicRegions.")
(instance sharedBorderLength TernaryPredicate)
(domain sharedBorderLength 1 GeographicArea)
(domain sharedBorderLength 2 GeographicArea)
(domain sharedBorderLength 3 LengthMeasure)
(=>
  (sharedBorderLength ?N1 ?N2 ?M)
  (length (BorderFn ?N1 ?N2) ?M))

(subclass PerimeterArea Region)  
(documentation PerimeterArea EnglishLanguage "A &%PerimeterArea is a region that 
extends outward from a boundary with another region, surrounding or 
partially surrounding it, but which is not part of that other region.  
See &%BorderFn and &%PerimeterAreaFn.")

(instance PerimeterAreaFn UnaryFunction)
(domain PerimeterAreaFn 1 Region)
(rangeSubclass PerimeterAreaFn PerimeterArea)

(documentation PerimeterAreaFn EnglishLanguage "(&%PerimeterAreaFn ?REGION) denotes a 
class including any peripheral zones extending outward from the &%Region 
?REGION.")

(=>
  (instance ?zone (PerimeterAreaFn ?region))
  (meetsSpatially ?zone ?region))

(instance MaritimeClaimsTerritorialSeaFn UnaryFunction)
(domain MaritimeClaimsTerritorialSeaFn 1 Region)
(range MaritimeClaimsTerritorialSeaFn PerimeterArea)
(documentation MaritimeClaimsTerritorialSeaFn EnglishLanguage "(&%MaritimeClaimsTerritorialSeaFn ?REGION) denotes a 
peripheral zones of maritime control extending outward from the &%Region 
?REGION.")

(=>
  (instance ?region GeopoliticalArea)
  (instance (MaritimeClaimsTerritorialSeaFn ?region) (PerimeterAreaFn ?region)))

(=>
  (instance ?region GeopoliticalArea)
  (instance (MaritimeClaimsTerritorialSeaFn ?region) UniformPerimeterArea))

(instance InnerBoundaryFn UnaryFunction)
(domain InnerBoundaryFn 1 Region)  ;; a PerimeterArea or general class of oriented areas?
(range InnerBoundaryFn Region)

(documentation InnerBoundaryFn EnglishLanguage "(&%InnerBoundaryFn ?REGION) denotes the 
inner boundary of the &%Region ?REGION, where ?REGION has an inner and 
outer &%orientation with respect to another object.")

(=>
  (instance ?REGION Region)
  (superficialPart (InnerBoundaryFn ?REGION) ?REGION))  

(instance OuterBoundaryFn UnaryFunction)
(domain OuterBoundaryFn 1 Region)  ;; a PerimeterArea or general class of oriented areas
(range OuterBoundaryFn Region)

(documentation OuterBoundaryFn EnglishLanguage "(&%OuterBoundaryFn ?REGION) denotes the 
outer boundary of the &%Region ?REGION, where ?REGION has an inner and 
outer &%orientation with respect to another object.")

(=>
  (instance ?REGION Region)
  (superficialPart (OuterBoundaryFn ?REGION) ?REGION))


(subclass UniformPerimeterArea PerimeterArea)

(documentation UniformPerimeterArea EnglishLanguage "A &%UniformPerimeterArea is one 
that has a defined uniform &%width.")

(=>
  (instance ?AREA UniformPerimeterArea)
  (exists (?WIDTH)
    (distance (InnerBoundaryFn ?AREA) (OuterBoundaryFn ?AREA) ?WIDTH)))

(=>
  (instance ?ZONE UniformPerimeterArea)
  (exists (?WIDTH)
    (and 
      (instance ?WIDTH LengthMeasure)
      (width ?ZONE ?WIDTH))))

(=>
  (and
    (instance ?ZONE UniformPerimeterArea)
    (part ?INNER (InnerBoundaryFn ?ZONE)))
  (exists (?OUTER)
    (and
      (part ?OUTER (OuterBoundaryFn ?ZONE))
      (distance ?INNER ?OUTER ?WIDTH))))

(=>
  (and
    (orientation ?OBJ ?REGION Outside)
    (instance ?ZONE (PerimeterAreaFn ?REGION))
    (instance ?ZONE UniformPerimeterArea)
    (width ?ZONE (MeasureFn ?LIMIT ?UNIT))
    (distance ?OBJ ?REGION (MeasureFn ?FAR ?UNIT))
    (instance ?UNIT UnitOfMeasure)
    (lessThanOrEqualTo (SubtractionFn ?FAR ?LIMIT) 0))
  (located ?OBJ ?ZONE))

(=>
  (and
    (orientation ?OBJ ?REGION Outside)
    (instance ?ZONE (PerimeterAreaFn ?REGION))
    (instance ?ZONE UniformPerimeterArea)
    (width ?ZONE (MeasureFn ?LIMIT ?UNIT))
    (distance ?OBJ ?REGION (MeasureFn ?FAR ?UNIT))
    (instance ?UNIT UnitOfMeasure)
    (greaterThan (SubtractionFn ?FAR ?LIMIT) 0))
  (not (located ?OBJ ?ZONE)))

(=> 
  (and 
    (instance ?AREA (MaritimeClaimsTerritorialSeaFn ?PLACE))
    (width ?AREA (MeasureFn ?WIDTH ?UNIT))
    (distance ?OBJ ?PLACE (MeasureFn ?DISTANCE ?UNIT))
    (lessThanOrEqualTo ?DISTANCE ?WIDTH))
  (located ?OBJ ?AREA))

;;-----------------------------------------------------------------------

;; G. Coastline

(instance totalCoastline BinaryPredicate)
(domain totalCoastline 1 GeographicArea)
(domain totalCoastline 2 LengthMeasure)

(documentation totalCoastline EnglishLanguage "(&%totalCoastline ?AREA ?COASTLENGTH) 
means that the total length of all boundaries between the &%GeographicArea 
?AREA and the ocean is the &%LengthMeasure ?COASTLENGTH.  The coastline 
counted may be discontinuous and may even be along different oceans (as 
in &%Columbia).  A &%totalCoastline of zero indicates a &%LandlockedArea.  
Note that only &%Ocean coastlines are counted, not any shores with inland 
waters.")

(subclass LandlockedArea LandArea)

(documentation LandlockedArea EnglishLanguage "&%LandlockedArea is the class of 
&%LandAreas that lack access to an &%Ocean or to a &%Waterway 
providing a link to the ocean.")

(=>
  (instance ?AREA LandlockedArea)
  (not
    (exists (?COAST)
      (and
        (instance ?COAST Seacoast)
        (part ?COAST ?AREA)))))

(=>
  (and
    (instance ?AREA LandlockedArea)
    (instance ?UNIT UnitOfLength))
  (totalCoastline ?AREA (MeasureFn 0 ?UNIT)))

(=>
  (and
    (instance ?UNIT UnitOfLength)
    (totalCoastline ?AREA (MeasureFn 0 ?UNIT)))
  (instance ?AREA LandlockedArea))

(=>
  (and
    (instance ?AREA LandlockedArea)
    (instance ?AREA GeopoliticalArea))
  (not
    (exists (?CLAIM)
      (and
        (instance ?CLAIM MaritimeClaimArea)
        (claimedTerritory ?CLAIM ?AREA)))))

(=>
  (instance ?AREA LandlockedArea)
  (not
    (exists (?WATER)
      (and
        (instance ?WATER Ocean)
        (meetsSpatially ?AREA ?WATER)))))

(=>
  (instance ?AREA LandlockedArea)
  (not
    (exists (?WATER)
      (and
        (instance ?WATER SaltWaterArea)
        (part ?WATER ?SEA)
        (instance ?SEA Ocean)
        (meetsSpatially ?AREA ?WATER)))))

(=>
  (instance ?AREA LandlockedArea)
  (exists (?LAND)
    (and
      (instance ?LAND LandArea)
      (meetsSpatially ?AREA ?LAND))))

;;-----------------------------------------------------------------------

;; H. Maritime claims

(instance claimedTerritory BinaryPredicate)
(domain claimedTerritory 1 GeographicArea)
(domain claimedTerritory 2 Agent)
(subrelation dependentGeopoliticalArea claimedTerritory)

(documentation claimedTerritory EnglishLanguage "(&%claimedTerritory ?AREA ?POLITY) 
means that some right over the &%GeographicArea ?AREA is claimed by 
the &%Agent or &%GeopoliticalArea ?POLITY.  If two politically independent 
states or agents claim the same area, that area is a 'disputed 
territory'.")

(instance maritimeClaimType BinaryPredicate)
(instance maritimeClaimType AsymmetricRelation)
(domain maritimeClaimType 1 GeopoliticalArea)
(domainSubclass maritimeClaimType 2 MaritimeClaimArea)

(documentation maritimeClaimType EnglishLanguage "(&%maritimeClaimType ?POLITY ?TYPE) 
means that the &%GeopoliticalArea ?POLITY claims rights over a 
&%MaritimeClaimArea of ?TYPE.")

(=>
  (and
    (instance ?AREA LandlockedArea)
    (subclass ?CLAIM MaritimeClaimArea))
  (not (maritimeClaimType ?AREA ?CLAIM)))

(=>
  (and
    (maritimeClaimType ?AREA ?TYPE)
    (subclass ?TYPE MaritimeClaimArea))
  (exists (?CLAIM)
    (and
      (instance ?CLAIM ?TYPE)
      (claimedTerritory ?CLAIM ?AREA))))

(=>
  (and
    (instance ?AREA ?TYPE)
    (subclass ?TYPE MaritimeClaimArea)
    (claimedTerritory ?AREA ?POLITY))
  (maritimeClaimType ?POLITY ?TYPE))

;; KJN: Moving this to MILO.  
;;(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)
;;      (surface ?TOP ?AREA)
;;      (bottom ?BOTTOM ?AREA))))

(subclass MaritimeClaimArea GeographicArea) 

(documentation MaritimeClaimArea EnglishLanguage "A &%MaritimeClaimArea is a &%GeographicArea 
delimited by a geopolitical state's claim, under the &%LawOfTheSea, of rights 
to certain resources, activities, or jurisdiction in the claimed area.  
&%MaritimeClaimAreas can pertain to &%WaterAreas, &%SubmergedLandAreas, and &%Airspace.")

;; Types of MaritimeClaimArea:
;; (i) contiguous zone
(subclass MaritimeContiguousZone MaritimeClaimArea)
(subclass MaritimeContiguousZone SaltWaterArea)

(documentation MaritimeContiguousZone EnglishLanguage "&%MaritimeContiguousZone 
is the subclass of &%MaritimeClaimArea that includes areas over 
which a geopolitical state may exercise some control of activities 
beyond the 12-mile zone of its &%TerritorialSea.  In general, 
the authorized control is for preventing or punishing activities 
that would violate laws applying within the 12-mile zone (that is, 
authorization to chase and intercept).  According to the &%LawOfTheSea, 
a &%MaritimeContiguousZone may extend up to 24 nautical miles from the coast.")

(instance MaritimeContiguousZoneFn UnaryFunction)
(domain MaritimeContiguousZoneFn 1 GeopoliticalArea)
(range MaritimeContiguousZoneFn MaritimeContiguousZone)

(documentation MaritimeContiguousZoneFn EnglishLanguage 
"(&%MaritimeContiguousZoneFn ?POLITY) denotes the &%MaritimeContiguousZone 
that is claimed by the &%GeopoliticalArea ?POLITY.")

(=>
  (and
    (instance ?AREA GeopoliticalArea)
    (instance (MaritimeContiguousZoneFn ?AREA) MaritimeContiguousZone))
  (claimedTerritory  (MaritimeContiguousZoneFn ?AREA) ?AREA))

;; (ii) continental shelf
(subclass MaritimeShelfArea MaritimeClaimArea)
(subclass MaritimeShelfArea SubmergedLandArea)

(documentation MaritimeShelfArea EnglishLanguage "&%MaritimeShelfArea 
is a subclass of &%MaritimeClaimArea that covers &%SubmergedLandAreas 
claimed by an adjacent geopolitical area.  The &%LawOfTheSea defines 
the continental shelf as extending up to 200 miles (NM) offshore and 
including the resources found therein.  The defined claim area does not 
correspond exactly to a geological &%ContinentalShelf, but if there is one, 
the two areas will overlap spatially.")


(=>
  (and
    (instance ?ZONE MaritimeShelfArea)
    (linearExtent ?ZONE ?WIDTH))
  (lessThanOrEqualTo ?WIDTH (MeasureFn 200 NauticalMile)))

(=>
  (and
    (instance ?zone MaritimeShelfArea)
    (instance ?shelf ContinentalShelf)
    (instance ?country Nation)
    (meetsSpatially ?shelf ?country)
    (claimedTerritory ?zone ?nation))
  (overlapsSpatially ?zone ?shelf))

(instance MaritimeShelfAreaFn UnaryFunction)
(domain MaritimeShelfAreaFn 1 GeopoliticalArea)
(range MaritimeShelfAreaFn MaritimeShelfArea)

(documentation MaritimeShelfAreaFn EnglishLanguage 
"(&%MaritimeShelfAreaFn ?POLITY) denotes the &%MaritimeShelfArea 
that is claimed by the &%GeopoliticalArea ?POLITY.")

(=>
  (and
    (instance ?AREA GeopoliticalArea)
    (instance (MaritimeShelfAreaFn ?AREA) MaritimeShelfArea))
  (claimedTerritory  (MaritimeShelfAreaFn ?AREA) ?AREA))

;; (iii) exclusive economic zone
(subclass MaritimeExclusiveEconomicZone MaritimeClaimArea)
(subclass MaritimeExclusiveEconomicZone SaltWaterArea)

(documentation MaritimeExclusiveEconomicZone EnglishLanguage 
"&%MaritimeExclusiveEconomicZone is the subclass of &%MaritimeClaimArea 
that represents the offshore area that coastal nations can claim for 
fishing and other uses of the ocean water and seabed found there.")



(=>
  (and
    (instance ?ZONE MaritimeExclusiveEconomicZone)
    (linearExtent ?ZONE ?WIDTH))
  (lessThanOrEqualTo ?WIDTH (MeasureFn 200 NauticalMile)))

(instance MaritimeExclusiveEconomicZoneFn UnaryFunction)
(domain MaritimeExclusiveEconomicZoneFn 1 GeopoliticalArea)
(range MaritimeExclusiveEconomicZoneFn MaritimeExclusiveEconomicZone)

(documentation MaritimeExclusiveEconomicZoneFn EnglishLanguage 
"(&%MaritimeExclusiveEconomicZoneFn ?POLITY) denotes the 
&%MaritimeExclusiveEconomicZone that is claimed by the 
&%GeopoliticalArea ?POLITY.")

(=>
  (and
    (instance ?AREA GeopoliticalArea)
    (instance (MaritimeExclusiveEconomicZoneFn ?AREA) MaritimeExclusiveEconomicZone))
  (claimedTerritory  (MaritimeExclusiveEconomicZoneFn ?AREA) ?AREA))

;; (iv) exclusive fishing zone
(subclass ExclusiveFishingZone MaritimeClaimArea)
(subclass ExclusiveFishingZone SaltWaterArea)

(documentation ExclusiveFishingZone EnglishLanguage "&%ExclusiveFishingZone is the 
subclass of &%MaritimeClaimArea including offshore areas over which a 
nation claims exclusive jurisdiction only for fishing purposes (cf.  
&%MaritimeExclusiveEconomicZone).  Zone widths vary up to 200 miles 
(NM).") 

(=>
  (and
    (instance ?ZONE ExclusiveFishingZone)
    (linearExtent ?ZONE ?WIDTH))
  (lessThanOrEqualTo ?WIDTH (MeasureFn 200 NauticalMile)))

(instance ExclusiveFishingZoneFn UnaryFunction)
(domain ExclusiveFishingZoneFn 1 GeopoliticalArea)
(range ExclusiveFishingZoneFn ExclusiveFishingZone)

(documentation ExclusiveFishingZoneFn EnglishLanguage 
"(&%ExclusiveFishingZoneFn ?POLITY) denotes the 
&%ExclusiveFishingZone that is claimed by the 
&%GeopoliticalArea ?POLITY.")

(=>
  (and
    (instance ?AREA GeopoliticalArea)
    (instance (ExclusiveFishingZoneFn ?AREA) ExclusiveFishingZone))
  (claimedTerritory  (ExclusiveFishingZoneFn ?AREA) ?AREA))

;; (v) extended fishing zone
(subclass ExtendedFishingZone MaritimeClaimArea)
(subclass ExtendedFishingZone SaltWaterArea)

(documentation ExtendedFishingZone EnglishLanguage 
"&%ExtendedFishingZone is the subclass of &%MaritimeClaimArea 
that includes offshore areas over which a nation claims fishing rights, 
beyond that nation's &%ExclusiveFishingZone.  Zone widths vary, 
from as little as 12 miles (NM) up to a width of 200 miles (NM).")

(=>
  (and
    (instance ?ZONE ExtendedFishingZone)
    (linearExtent ?ZONE ?WIDTH))
  (lessThanOrEqualTo ?WIDTH (MeasureFn 200 NauticalMile)))

(instance ExtendedFishingZoneFn UnaryFunction)
(domain ExtendedFishingZoneFn 1 GeopoliticalArea)
(range ExtendedFishingZoneFn ExtendedFishingZone)

(documentation ExtendedFishingZoneFn EnglishLanguage 
"(&%ExtendedFishingZoneFn ?POLITY) denotes the 
ExtendedFishingZoneFn that is claimed by the 
&%GeopoliticalArea ?POLITY, beyond its &%ExclusiveFishingZone.")

(=>
  (and
    (instance ?AREA GeopoliticalArea)
    (instance (ExtendedFishingZoneFn ?AREA) ExtendedFishingZone))
  (claimedTerritory  (ExtendedFishingZoneFn ?AREA) ?AREA))

;; (vi) territorial sea
(subclass TerritorialSea MaritimeClaimArea)
(subclass TerritorialSea SaltWaterArea)

(documentation TerritorialSea EnglishLanguage "&%TerritorialSea is the class 
of contiguous waters over which a &%GeopoliticalArea claims 
jurisdiction in accordance with the United Nations Convention 
on the &%LawOfTheSea (LOS), Part II.  A territorial sea may be
up to 12 miles (&%NauticalMiles) in breadth.  A subclass of 
&%MaritimeClaimArea.")

(=>
  (and
    (instance ?ZONE MaritimeContiguousZone)
    (claimedTerritory ?ZONE ?AREA)
    (instance ?WATER TerritorialSea)
    (claimedTerritory ?WATER ?AREA))
  (between ?AREA ?WATER ?ZONE))

(=>
  (and
    (instance ?ZONE TerritorialSea)
    (linearExtent ?ZONE ?WIDTH))
  (lessThanOrEqualTo ?WIDTH (MeasureFn 12 NauticalMile)))

(instance TerritorialSeaFn UnaryFunction)
(domain TerritorialSeaFn 1 GeopoliticalArea)
(range TerritorialSeaFn TerritorialSea)

(documentation TerritorialSeaFn EnglishLanguage "(&%TerritorialSeaFn ?POLITY) denotes 
the &%TerritorialSea that is claimed by the &%GeopoliticalArea ?POLITY.")

(=>
  (and
    (instance ?AREA GeopoliticalArea)
    (instance (TerritorialSeaFn ?AREA) TerritorialSea))
  (claimedTerritory  (TerritorialSeaFn ?AREA) ?AREA))

;; (vi) special maritime claims 
;; [create instances of &%MaritimeClaimArea as needed for individual countries]

;;-----------------------------------------------------------------------

;; I. Climate

;; WFB data interpreted using Koeppen Climate Classification system summary at 
;; http://www.fao.org/WAICENT/FAOINFO/sustdev/EIdirect/climate/EIsp0002.htm

(instance climateTypeInArea BinaryPredicate)
(domain climateTypeInArea 1 GeographicArea)
(domainSubclass climateTypeInArea 2 ClimateZone)

(documentation climateTypeInArea EnglishLanguage "(&%climateTypeInArea ?TYPE ?REGION) 
means that all or &%part of the &%GeographicArea ?REGION is of the 
&%ClimateZone ?TYPE.")

(=>
  (climateTypeInArea ?AREA ?TYPE)
  (exists (?REGION)
    (and
      (instance ?REGION GeographicArea)
      (instance ?REGION ?TYPE)
      (part ?REGION ?AREA))))

(=>
  (and
    (instance ?AREA ?TYPE)
    (subclass ?TYPE ClimateZone))
  (climateTypeInArea ?AREA ?TYPE))

(subclass ClimateZone GeographicArea)

(documentation ClimateZone EnglishLanguage 
"&ClimateZone is a subclass of &%GeographicArea in which regions 
are classified according to their long-term weather conditions. 
The subclasses of &%ClimateZone are based on the Koeppen Climate 
Classification system.  In the Koeppen system, climate zones are 
distinguished based on temperatures and rainfall.")

(subclass TropicalClimateZone ClimateZone)

(documentation TropicalClimateZone EnglishLanguage "&%TropicalClimateZone is a  
subclass of &%ClimateZone in which the average temperature of the 
coldest month is greater than 18 degrees Celsius.  This is Class 
'A' in the Koeppen climate classification system.")

(=>
  (and
    (instance ?AREA TropicalClimateZone)
    (subclass ?MO Month)
    (instance ?AREA GeographicArea)
    (averageTemperatureForPeriod ?AREA ?MO ?TEMP))
  (greaterThan ?TEMP (MeasureFn 18 CelsiusDegree)))

(instance averageRainfallForPeriod TernaryPredicate)
(documentation averageRainfallForPeriod EnglishLanguage "(averageRainfallForPeriod ?AREA ?MO ?AMOUNT)
means that ?AREA receives ?AMOUNT of rain in month ?MO in an average
year.  Note that ?AMOUNT is a linear measure indicating the depth of water that
would accumulate over ?AREA if all water were captured.")
(domain averageRainfallForPeriod 1 GeographicArea)
(domain averageRainfallForPeriod 2 Month)
(domain averageRainfallForPeriod 3 LengthMeasure)

(subclass WetTropicalClimateZone TropicalClimateZone)

(documentation WetTropicalClimateZone EnglishLanguage "&%WetTropicalClimateZone is 
the subclass of &%TropicalClimateZone that is characterized by having 
no dry months.  At least 60 mm of rainfall occur in the driest month. 
This is subtype 'Af' in the Koeppen climate system.")

(=>
  (and
    (instance ?AREA TropicalClimateZone)
    (forall (?MO ?AMOUNT)
       (=>
      (averageRainfallForPeriod ?AREA ?MO ?AMOUNT)
      (greaterThanOrEqualTo ?AMOUNT (MeasureFn 60 (MilliFn Meter))))))
  (instance ?AREA WetTropicalClimateZone))    

(=>
  (instance ?AREA WetTropicalClimateZone)
  (forall (?MO ?AMOUNT)
    (=>
      (averageRainfallForPeriod ?AREA ?MO ?AMOUNT)
      (greaterThanOrEqualTo ?AMOUNT (MeasureFn 60 (MilliFn Meter))))))

(subclass MonsoonClimateZone TropicalClimateZone)

(documentation MonsoonClimateZone EnglishLanguage "&%MonsoonClimateZone is the class 
of &%TropicalClimateZones in which there is a short dry season between 
rains heavy enough to keep the ground wet all through the year.  This 
is Koeppen climate system subtype 'Aw'.")

(=>
  (instance ?AREA MonsoonClimateZone)
  (exists (?INTERVAL) (rainySeasonInArea ?AREA ?INTERVAL)))

(subclass AridClimateZone ClimateZone)
(documentation AridClimateZone EnglishLanguage "&%AridClimateZone is the 
class of regions in which the climate is characterized by 
a distinct dry season.  Annual rate of moisture evaporation 
exceeds annual rate of precipitation. This is Class B in the 
Koeppen climate system.") 

(subclass SteppeClimateZone AridClimateZone)
(documentation SteppeClimateZone EnglishLanguage "&%SteppeClimateZone 
is the class of &%AridClimateZones where the dominant 
vegetation type is grasses, with no trees.  Koeppen 
system 'BS'.")

(subclass DesertClimateZone AridClimateZone)
(documentation DesertClimateZone EnglishLanguage "DesertClimateZone 
is the class of &%AridClimateZones characterized by 
sparse, desert vegetation.  Koeppen system 'BW'.")

(subclass SubtropicalDesertClimateZone DesertClimateZone)
(documentation SubtropicalDesertClimateZone EnglishLanguage 
"&%SubtropicalDesertClimateZone is a subclass of &%DesertClimateZone 
that is characterized by an average temperature greater than 18 
degrees Celsius, as well as very low rainfall.  This is Koeppen 
system 'BWh'.")

(=>
    (and
            (instance ?AREA DesertClimateZone)
            (subclass ?MO Month)
            (averageTemperatureForPeriod ?AREA ?MO ?TEMP)
            (greaterThan ?TEMP (MeasureFn 18 CelsiusDegree)))
    (instance ?AREA SubtropicalDesertClimateZone))

(=>
    (and
            (instance ?AREA SubtropicalDesertClimateZone)
            (subclass ?MO Month)
            (averageTemperatureForPeriod ?AREA ?MO ?TEMP))
    (greaterThan ?TEMP (MeasureFn 18 CelsiusDegree)))

(subclass MiddleLatitudeDesertClimateZone DesertClimateZone)

(documentation MiddleLatitudeDesertClimateZone EnglishLanguage 
"&%MiddleLatitudeDesertClimateZone is the subclass of 
&%DesertClimateZone characterized by a cool dry climate 
typical of middle latitude deserts.  This is subtype 'BWk' 
in the Keoppen climate system.")

(subclass SemiaridClimateZone ClimateZone)

(subclass TemperateClimateZone ClimateZone)

(documentation TemperateClimateZone EnglishLanguage "&%TemperateClimateZone is the 
subclass of &%ClimateZone whose warmest month has an average 
temperature greater than 10 degrees Celsius and whose coolest month 
has an average temperature between 18 degrees and -3 degrees Celsius. 
This is Class C in the Koeppen climate system.")

(=>
    (instance ?AREA TemperateClimateZone)
    (exists (?MO ?AMOUNT)
            (and
                    (subclass ?MO Month)
                    (averageTemperatureForPeriod ?AREA ?MO ?AMOUNT)
                    (greaterThan ?AMOUNT (MeasureFn 10 CelsiusDegree)))))

(=>
    (and
            (instance ?AREA TemperateClimateZone)
            (subclass ?MO Month)
            (averageTemperatureForPeriod ?AREA ?MO ?TEMP))
    (greaterThanOrEqualTo ?TEMP (MeasureFn -3 CelsiusDegree)))

(=>
    (instance ?AREA TemperateClimateZone)
    (exists (?MO ?AMOUNT)
            (and
                    (subclass ?MO Month)
                    (averageTemperatureForPeriod ?AREA ?MO ?AMOUNT)
                    (greaterThanOrEqualTo ?AMOUNT (MeasureFn -3 CelsiusDegree))
                    (lessThanOrEqualTo ?AMOUNT (MeasureFn 18 CelsiusDegree)))))

(subclass MediterraneanClimateZone TemperateClimateZone)

(documentation MediterraneanClimateZone EnglishLanguage "&%MediterraneanClimateZone 
is a subclass of &%TemperateClimateZone that is characterized by 
mild, cool, wet winters and warm dry summers.  Mediterranean shores 
are the archetype, but the Mediterranean climate is also found elsewhere.")

(=>
  (instance ?AREA MediterraneanClimateZone)
  (coolSeasonInArea ?AREA WinterSeason))

(=>
  (instance ?AREA MediterraneanClimateZone)
  (warmSeasonInArea ?AREA SummerSeason))

(=>
  (instance ?AREA MediterraneanClimateZone)
  (rainySeasonInArea ?AREA WinterSeason))

(=>
  (instance ?AREA MediterraneanClimateZone)
  (drySeasonInArea ?AREA SummerSeason))

(subclass ContinentalClimateZone TemperateClimateZone)

(documentation ContinentalClimateZone EnglishLanguage 
"&%ContinentalClimateZone is a subclass of &%TemperateClimateZone that is 
characterized by cold winters and hot summers.")

(=>
  (instance ?AREA ContinentalClimateZone)
  (coldSeasonInArea ?AREA WinterSeason))

(=>
  (instance ?AREA ContinentalClimateZone)
  (hotSeasonInArea ?AREA SummerSeason))

(subclass MidlatitudeContinentalClimateZone ClimateZone)

(documentation MidlatitudeContinentalClimateZone EnglishLanguage 
"&%MidlatitudeContinentalClimateZone is a subclass of 
&%TemperateClimateZone that is characterized by cool winters 
and hot summers.")

(=>
  (instance ?AREA MidlatitudeContinentalClimateZone)
  (coolSeasonInArea ?AREA WinterSeason))

(=>
  (instance ?AREA MidlatitudeContinentalClimateZone)
  (hotSeasonInArea ?AREA SummerSeason))

(subclass TemperateWinterDryClimateZone TemperateClimateZone)

(documentation TemperateWinterDryClimateZone EnglishLanguage 
"&%TemperateWinterDryClimateZone is a subclass of &%TemperateClimateZone 
characterized by having at least 10 times as much precipitation in the 
wettest summer month as in the driest winter month. Koeppen climate 
system type 'Cw'.")

(subclass TemperateSummerDryClimateZone TemperateClimateZone)

(documentation TemperateSummerDryClimateZone EnglishLanguage 
"&%TemperateSummerDryClimateZone is the subclass of &%TemperateClimateZone 
that is characterized by dry summers, and in which the wettest winter month 
has at least three times the moisture of the driest summer month.  The 
driest month has less than an average of 30 mm of precipitation.  Koeppen 
climate system type 'Cs'.")

(subclass ColdClimateZone ClimateZone)

(documentation ColdClimateZone EnglishLanguage "&%ColdClimateZone is the subclass 
of &%ClimateZone that is characterized by a warmest month with average 
temperature less than 10 degrees Celsius and a coldest month with 
average temperature less than -3 degrees Celsius.  This is Koeppen climate 
system Type D.")

(=>
  (and
    (instance ?AREA ColdClimateZone)
    (subclass ?MO Month)
    (averageTemperatureForPeriod ?AREA ?MO ?TEMP))
  (greaterThan (MeasureFn 10 CelsiusDegree) ?TEMP))

(=>
  (instance ?AREA ColdClimateZone)
  (exists (?MO ?AMOUNT)
    (and
      (subclass ?MO Month)
      (averageTemperatureForPeriod ?AREA ?MO ?AMOUNT)
      (lessThan ?AMOUNT (MeasureFn -3 CelsiusDegree)))))

(subclass ColdDampClimateZone ColdClimateZone)

(documentation ColdDampClimateZone EnglishLanguage "&%ColdDampClimateZone is the 
subclass of &%ColdClimateZone that is characterized by having more 
than 30 mm of precipitation in the driest month.  This is subtype 
'Df' in the Koeppen climate system.")

(subclass DryWinterColdClimateZone ColdClimateZone)

(documentation DryWinterColdClimateZone EnglishLanguage "&%DryWinterColdClimateZone 
is a subclass of &%ColdClimateZone that is characterized by having 
at least ten times as much precipitation in the wettest summer month 
as in the driest winter month.  This is Koeppen climate system subtype 
'Dw'.")

(subclass PolarClimateZone ClimateZone)

(documentation PolarClimateZone EnglishLanguage "&%PolarClimateZone is a subclass of 
&%ClimateZone characterized by having an average temperature less than 
10 degrees Celsius in the warmest month.  This is Koeppen climate system 
Type E.  No agriculture is supported in polar climates.")

(=>
  (and
    (instance ?AREA PolarClimateZone)
    (subclass ?MO Month)
    (averageTemperatureForPeriod ?AREA ?MO ?TEMP))
  (greaterThan (MeasureFn 10 CelsiusDegree) ?TEMP))

(=>
  (and
    (instance ?AREA GeographicArea)
    (subclass ?MO Month)
    (averageTemperatureForPeriod ?AREA ?MO ?TEMP)
    (greaterThan (MeasureFn 10 CelsiusDegree) ?TEMP))
  (instance ?AREA PolarClimateZone))

(subclass TundraClimateZone PolarClimateZone)

(documentation TundraClimateZone EnglishLanguage "TundraClimateZone is a subclass of 
&%PolarClimateZone characterized by having an average temperature 
above zero degrees Celsius (but below 10 degrees) in the warmest month.  
Koeppen subtype 'ET'.")

(subclass PolarTypeFClimateZone PolarClimateZone)

(documentation PolarTypeFClimateZone EnglishLanguage "&%PolarTypeFClimateZone is a 
subclass of &%PolarClimateZone characterized by having no month in 
which the temperature rises to 10 degrees Celsius or above.")

(=>
  (and
    (instance ?AREA PolarTypeFClimateZone)
    (instance ?TIME TimePosition)
    (holdsDuring ?TIME (airTemperature ?AREA ?TEMP)))
  (holdsDuring ?TIME (greaterThan (MeasureFn 10 CelsiusDegree) ?TEMP)))

(instance rainySeasonInArea BinaryPredicate)
(instance rainySeasonInArea AsymmetricRelation)
(domain rainySeasonInArea 1 GeographicArea)
(domainSubclass rainySeasonInArea 2 TimeInterval)

(documentation rainySeasonInArea EnglishLanguage "(&%rainySeasonInArea ?AREA ?INTERVAL) 
means that in the &%GeographicArea ?AREA, the rainy or wet season occurs 
during the &%TimeInterval ?INTERVAL.  For example, (&%rainySeasonInArea 
&%Angola (&%RecurringTimeIntervalFn &%November &%April)).")

(instance warmSeasonInArea BinaryPredicate)
(instance warmSeasonInArea AsymmetricRelation)
(domain warmSeasonInArea 1 GeographicArea)
(domainSubclass warmSeasonInArea 2 TimeInterval)

(documentation warmSeasonInArea EnglishLanguage "(&%warmSeasonInArea ?AREA ?INTERVAL) 
means that in the &%GeographicArea ?AREA, the warm season occurs 
during the &%TimeInterval ?INTERVAL.")

(instance drySeasonInArea BinaryPredicate)
(instance drySeasonInArea AsymmetricRelation)
(domain drySeasonInArea 1 GeographicArea)
(domainSubclass drySeasonInArea 2 TimeInterval)

(documentation drySeasonInArea EnglishLanguage "(&%drySeasonInArea ?AREA ?INTERVAL) 
means that in the &%GeographicArea ?AREA, the dry season occurs 
during the &%TimeInterval ?INTERVAL.  For example, (&%drySeasonInArea 
&%Angola (&%RecurringTimeIntervalFn &%May &%October)).")

(instance coolSeasonInArea BinaryPredicate)
(instance coolSeasonInArea AsymmetricRelation)

(domain coolSeasonInArea 1 GeographicArea)
(domainSubclass coolSeasonInArea 2 TimeInterval)

(documentation coolSeasonInArea EnglishLanguage "(&%coolSeasonInArea ?AREA ?INTERVAL) 
means that in the &%GeographicArea ?AREA, the cool season occurs 
during the &%TimeInterval ?INTERVAL.  For example, (&%coolSeasonInArea 
&%Angola (&%RecurringTimeIntervalFn &%May &%October")

(instance hotSeasonInArea BinaryPredicate)
(instance hotSeasonInArea AsymmetricRelation)
(domain hotSeasonInArea 1 GeographicArea)
(domainSubclass hotSeasonInArea 2 TimeInterval)

(documentation hotSeasonInArea EnglishLanguage "(&%hotSeasonInArea ?AREA ?INTERVAL) 
means that in the &%GeographicArea ?AREA, the hot season occurs 
during the &%TimeInterval ?INTERVAL.  For example, (&%hotSeasonInArea 
&%Angola (&%RecurringTimeIntervalFn &%November &%April)).")

(instance coldSeasonInArea BinaryPredicate)
(instance coldSeasonInArea AsymmetricRelation)
(domain coldSeasonInArea 1 GeographicArea)
(domainSubclass coldSeasonInArea 2 TimeInterval)

(documentation coldSeasonInArea EnglishLanguage "(&%coldSeasonInArea ?AREA ?INTERVAL) 
means that in the &%GeographicArea ?AREA, the cold season occurs 
during the &%TimeInterval ?INTERVAL.")

(equal SpringSeason (RecurrentTimeIntervalFn March May))
(equal SummerSeason (RecurrentTimeIntervalFn June August))
(equal FallSeason (RecurrentTimeIntervalFn September November))
(equal WinterSeason (RecurrentTimeIntervalFn December February))

;;-----------------------------------------------------------------------

;; J. Terrain

(instance slopeGradient BinaryPredicate)
(domain slopeGradient 1 LandArea)
(domain slopeGradient 2 NonnegativeRealNumber)

(documentation slopeGradient EnglishLanguage "(&%slopeGradient ?AREA ?SLOPE) means that 
in the &%LandArea ?AREA there is an incline of ?slope, where ?SLOPE is 
the percent of vertical rise over horizontal distance. &%slopeGradient 
gives an approximate value for nonzero slope over ?AREA, without regard 
to orientation. For example, (&%slopeGradient ?AREA 0.10) means that 
there is a 10% incline across the area, without specifying the 
orientation in which the land rises or falls.  Also see 
&%slopeGradientTowardsOrientation.")

(instance slopeGradientTowardsOrientation TernaryPredicate)
(domain slopeGradientTowardsOrientation 1 LandArea)
(domain slopeGradientTowardsOrientation 2 DirectionalAttribute)
(domain slopeGradientTowardsOrientation 3 RationalNumber)

(documentation slopeGradientTowardsOrientation EnglishLanguage 
"(&%slopeGradientTowardsOrientation ?AREA ?DIRECTION ?SLOPE) means that 
in the &%LandArea ?AREA, there is an incline of ?SLOPE towards the 
&%DirectionalAttribute ?DIRECTION.  ?SLOPE is a &%RationalNumber 
representing the percent of vertical rise over horizontal distance.") 

(instance Uphill PositionalAttribute)

(documentation Uphill EnglishLanguage "&%Uphill is a &%PositionalAttribute that 
describes the relation between two things, one of which is located 
up a slope from the other.")

(instance Downhill PositionalAttribute)
(contraryAttribute Uphill Downhill)

(documentation Downhill EnglishLanguage "&%Downhill is a &%PositionalAttribute that 
describes the relation between two things, one of which is located 
down a slope from the other.")

(instance terrainInArea BinaryPredicate)
(instance terrainInArea AsymmetricRelation)
(domain terrainInArea 1 GeographicArea)
(domain terrainInArea 2 TerrainAttribute)

(documentation terrainInArea EnglishLanguage "(&%terrainInArea ?AREA ?ATTRIBUTE) 
means that the &%GeographicArea ?AREA is or includes a region with  
the features of &%TerrainArea ?ATTRIBUTE.")

(=>
  (terrainInArea ?AREA ?ATTRIBUTE)
  (exists (?REGION)
    (and
      (instance ?REGION GeographicArea)
      (attribute ?REGION ?ATTRIBUTE)
      (partlyLocated ?REGION ?AREA))))

(=>
  (and
    (instance ?AREA GeographicArea)
    (attribute ?REGION ?ATTRIBUTE)
    (instance ?ATTRIBUTE TerrainAttribute)
    (partlyLocated ?REGION ?AREA))
  (terrainInArea ?AREA ?ATTRIBUTE)) 

;; Terrain attributes:

(subclass TerrainAttribute InternalAttribute)

(documentation TerrainAttribute EnglishLanguage "&%TerrainAttribute is a class of 
&%Attributes that describe terrain.")

(=>
  (and
    (instance ?ATT TerrainAttribute)
    (attribute ?OBJECT ?ATT))
  (instance ?OBJECT LandArea))

(instance FlatTerrain TerrainAttribute)

(documentation FlatTerrain EnglishLanguage "&%FlatTerrain is a &%TerrainAttribute 
describing regions within which there is very little variation in 
&%altitude.")

(=>
  (and
    (attribute ?AREA FlatTerrain)
    (part ?ZONE ?AREA)
    (slopeGradient ?ZONE ?SLOPE))
  (greaterThan 0.005 ?SLOPE))

(instance LowTerrain TerrainAttribute)

(documentation LowTerrain EnglishLanguage "&%LowTerrain is terrain in which the slope 
is less than 3%.")

(=>
  (and
    (attribute ?AREA LowTerrain)
    (part ?ZONE ?AREA)
    (slopeGradient ?ZONE ?SLOPE))
  (greaterThan 0.03 ?SLOPE))

(instance SteepTerrain TerrainAttribute)

(documentation SteepTerrain EnglishLanguage "A &%TerrainAttribute of a region in 
which there is a wide variation in &%elevation and &%slopeGradients 
of more than 10%.")

(=>
  (attribute ?AREA SteepTerrain)
  (exists (?ZONE)
    (and
      (part ?ZONE ?AREA)
      (slopeGradient ?ZONE ?SLOPE)
      (greaterThan ?SLOPE 0.1))))

(instance MountainousTerrain TerrainAttribute)
(subAttribute MountainousTerrain SteepTerrain)

(documentation MountainousTerrain EnglishLanguage "An area of &%MountainousTerrain 
is an area of rugged terrain in which there are many mountains.")

(=>
  (attribute ?AREA MountainousTerrain)
  (instance ?AREA LandArea))

(=>
  (attribute ?AREA MountainousTerrain)
  (instance ?AREA UplandArea))

(=>
  (attribute ?AREA MountainousTerrain)
  (exists (?MTN)
    (and
      (instance ?MTN Mountain)
  (part ?MTN ?AREA))))

(=>
  (attribute ?AREA MountainousTerrain)
  (exists (?MTN)
    (and
      (instance ?MTN Mountain)
      (located ?MTN ?AREA))))

(=>
  (instance ?AREA MountainRange)
  (attribute ?AREA MountainousTerrain))

(instance FertileTerrain TerrainAttribute)
(documentation FertileTerrain EnglishLanguage "&%FertileTerrain describes an area 
that has the type of soil and climate conditions needed to produce 
good quality crops.")

(=>
  (and
    (instance ?area GeographicArea)
    (groundSurfaceType ?area Rock))
  (not (attribute ?area FertileTerrain)))
  

(=>
  (attribute ?AREA FertileTerrain)
  (capability Agriculture eventLocated ?AREA)) ;; located not a CaseRole

(=>
  (and
    (instance ?SOIL Soil)
    (attribute ?SOIL Yellow)
    (instance ?AREA LandArea)
    (component ?SOIL ?AREA))
  (not (attribute ?AREA FertileTerrain)))

(=>
  (and
    (instance ?SOIL Soil)
    (attribute ?SOIL Red)
    (instance ?AREA LandArea)
    (component ?SOIL ?AREA))
  (attribute ?AREA FertileTerrain))

(instance GeologicallyStable TerrainAttribute)

(documentation GeologicallyStable EnglishLanguage "&%GeologicallyStable is a 
&%TerrainAttribute of a &%GeographicArea in which the geological 
substructure is stable, i.e., there are no active &%Volcanoes, 
no major fault lines, no blasting or other destabilizing activity.")

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?CONE Volcano)
    (attribute ?CONE VolcanicallyActive))
  (not (attribute ?AREA GeologicallyStable)))

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?BLOW VolcanicEruption)
    (eventLocated ?BLOW ?AREA))
  (not (attribute ?AREA GeologicallyStable)))

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?SHAKING EarthTremor)
    (eventLocated ?SHAKING ?AREA))
  (not (attribute ?AREA GeologicallyStable)))

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?FAULT GeologicalFault)
    (located ?FAULT ?AREA))
  (not (attribute ?AREA GeologicallyStable)))

;;-----------------------------------------------------------------------

;; K. Elevation extremes

(instance elevation BinaryPredicate)
(domain elevation 1 Object)
(domain elevation 2 LengthMeasure)

(documentation elevation EnglishLanguage "(&%elevation ?OBJECT ?HEIGHT) means that the 
physical &%Object ?OBJECT is located on the surface of &%PlanetEarth 
at the vertical distance ?HEIGHT above (or below, for a negative 
quantity) &%SeaLevel.  ?OBJECT may be a &%superficialPart of Earth's 
surface, such as a &%GeographicArea.  Elevation is measured from 
&%SeaLevel to the vertical top of the object.")

(=>
  (elevation ?OBJECT ?HEIGHT)
  (exists (?PLACE)
    (and
      (instance ?PLACE GeographicArea)
      (located ?OBJECT ?PLACE))))
(=>
  (and
    (elevation ?OBJECT ?HEIGHT)
    (located ?OBJECT ?PLACE)
    (instance ?PLACE GeographicArea))
  (superficialPart ?PLACE PlanetEarth))
    
(=>
  (elevation ?OBJECT ?HEIGHT)
  (exists (?DATUM)
    (and
      (properPart ?DATUM SeaLevel)
      (orientation ?OBJECT ?DATUM Vertical)
      (distance ?OBJECT ?DATUM ?HEIGHT))))

(=>
  (and
    (elevation ?OBJECT (MeasureFn ?NUM ?UNIT))
    (instance ?UNIT UnitOfLength)
    (instance ?OBJECT LandForm))
  (exists (?HIGHPOINT)
    (and
      (top ?HIGHPOINT ?OBJECT)
      (distance ?HIGHPOINT SeaLevel (MeasureFn ?NUM ?UNIT)))))

(instance ElevationLowPointFn UnaryFunction)
(domain ElevationLowPointFn 1 GeographicArea)
(range ElevationLowPointFn GeographicArea)

(documentation ElevationLowPointFn EnglishLanguage "(&%ElevationLowPointFn ?AREA) 
denotes the area within the &%GeographicArea ?AREA that has the 
lowest &%elevation.")

(=>
  (and
    (instance ?AREA GeographicArea)
    (geographicSubregion (ElevationLowPointFn ?AREA) ?AREA)
    (elevation (ElevationLowPointFn ?AREA) ?ELEV1))
  (not 
    (exists (?OTHER ?ELEV2)
      (and
        (geographicSubregion ?OTHER ?AREA)
        (not (equal ?OTHER (ElevationLowPointFn ?AREA)))
        (elevation ?OTHER ?ELEV2)
        (lessThan ?ELEV2 ?ELEV1)))))

(instance ElevationHighPointFn UnaryFunction)
(domain ElevationHighPointFn 1 GeographicArea)
(range ElevationHighPointFn GeographicArea)

(documentation ElevationHighPointFn EnglishLanguage "(&%ElevationHighPointFn ?AREA) 
denotes the area within the &%GeographicArea ?AREA that has the 
highest &%elevation.")

(=>
  (and
    (instance ?AREA GeographicArea)
    (geographicSubregion (ElevationHighPointFn ?AREA) ?AREA)
    (elevation (ElevationHighPointFn ?AREA) ?ELEV1))
  (not 
    (exists (?OTHER ?ELEV2)
      (and
        (geographicSubregion ?OTHER ?AREA)
        (not (equal ?OTHER (ElevationHighPointFn ?AREA)))
        (elevation ?OTHER ?ELEV2)
        (greaterThan ?ELEV2 ?ELEV1)))))

;;-----------------------------------------------------------------------

;; L. Natural resources

(instance naturalResourceTypeInArea BinaryPredicate)
(domain naturalResourceTypeInArea 1 GeographicArea)
(domainSubclass naturalResourceTypeInArea 2 Object)

(documentation naturalResourceTypeInArea EnglishLanguage 
"(&%naturalResourceTypeInArea ?REGION ?TYPE) means that the 
&%GeographicArea ?REGION has resources of the kind ?TYPE.")

(=>
  (naturalResourceTypeInArea ?AREA ?TYPE)
  (exists (?ITEM)
    (and
      (instance ?ITEM ?TYPE)
      (located ?ITEM ?AREA))))

(subclass Barite CompoundSubstance)
(subclass Barite Mineral)
(names "barite" Barite)

(documentation Barite EnglishLanguage 
"&%Barite is Barium Sulfate occurring as a mineral.")

(subclass BrownCoal Coal)
(names "brown coal" BrownCoal)
(names "lignite" BrownCoal)

(documentation BrownCoal EnglishLanguage "&%BrownCoal is a soft &%Coal harder than 
peat and softer than bituminous coal.  Also called lignite, it is 
brownish in color.")

(documentation Chromite EnglishLanguage "A mineral that consists of an oxide of
iron and chromium.")
(subclass Chromite CompoundSubstance)
(subclass Chromite Mineral)
(names "chromite" Chromite)

(subclass Coal Mineral)
(subclass Coal FossilFuel)
(subclass Coal Rock)
(names "coal" Coal)

(documentation Coal EnglishLanguage "&%Coal is a black or brownish black solid combustible 
substance formed by the partial decomposition of vegetable matter without 
free access of air and under the influence of moisture and often increased 
pressure and temperature.  &%Coal is a sedimentary rock containing a high 
proportion of carbon.") 

(subclass HydropowerWaterArea WaterArea)

(documentation HydropowerWaterArea EnglishLanguage "&%HydropowerWaterArea 
is the class of &%WaterAreas with waterflow strength adequate 
for the production of hydropower.")

(subclass NaturalGas CompoundSubstance)
(names "natural gas" NaturalGas)

(documentation NaturalGas EnglishLanguage "&%NaturalGas is a combustible mixture 
of methane and higher hydrocarbons.")

(=>
  (instance ?GAS NaturalGas)
  (attribute ?GAS Gas))

(subclass Phosphate CompoundSubstance)
(names "phosphate" Phosphate)

(documentation Phosphate EnglishLanguage "&%Phospate is a salt or ester of a 
phosphoric acid.")

(subclass Potash CompoundSubstance)
(names "potash" Potash)

(documentation Potash EnglishLanguage "&%Potash is a Potassium carbonate from 
wood ashes or a potassium compound.")

(subclass Talc Mineral)
(names "talc" Talc)
(documentation Talc EnglishLanguage "&%Talc is a very soft &%Mineral that is 
a basic silicate of magnesium.")

;;-----------------------------------------------------------------------

;; M. Land use

(subclass ArableLand LandArea)

(documentation ArableLand EnglishLanguage "&%ArableLand is the subclass of 
&%LandArea that represents land in cultivation with crops that 
are replanted after each harvest, e.g., wheat and rice.")

(instance arableLandArea BinaryPredicate)
(domain arableLandArea 1 GeographicArea)
(domain arableLandArea 2 ConstantQuantity)

(documentation arableLandArea EnglishLanguage "(&%arableLandArea ?REGION ?AMOUNT) 
means that the &%GeographicArea ?REGION has ?AMOUNT of land under 
cultivation with crops that are replanted after each harvest. ?AMOUNT 
may be expressed in physical units or with a percent or fraction.
Cf. &%permanentCropLandArea.")

(=>
  (and
    (arableLandArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION ?TOTAL)
    (instance ?TOTAL AreaMeasure)
    (equal ?AMOUNT (MultiplicationFn ?FRACTION ?TOTAL)))
  (arableLandArea ?REGION ?AMOUNT))

(=>
  (and
    (arableLandArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION (MeasureFn ?TOTAL ?UNIT))
    (instance ?UNIT UnitOfArea)
    (equal ?AMOUNT (MeasureFn (MultiplicationFn ?FRACTION ?TOTAL) ?UNIT)))
  (arableLandArea ?REGION ?AMOUNT))

(=>
  (and
    (arableLandArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION (MeasureFn ?TOTAL ?UNIT))
    (instance ?UNIT UnitOfArea))
  (exists (?ARABLE)
    (and
      (instance ?ARABLE ArableLand)
      (geographicSubregion ?ARABLE ?REGION)
      (measure ?ARABLE (MeasureFn (MultiplicationFn ?FRACTION ?TOTAL) ?UNIT)))))

(subclass PermanentCropLand LandArea)

(documentation PermanentCropLand EnglishLanguage "&%PermanentCropLand is the subclass 
of &%LandArea that represents land cultivated for crops that are produced 
without replanting after every harvest, such as fruit trees, coffee, rubber, 
nuts, and vineyards.  Does not include timberland.  Cf. &%arableLandArea.")

(instance permanentCropLandArea BinaryPredicate)
(domain permanentCropLandArea 1 GeographicArea)
(domain permanentCropLandArea 2 ConstantQuantity)

(documentation permanentCropLandArea EnglishLanguage 
"(&%permanentCropLandArea ?REGION ?AMOUNT) means that the &%GeographicArea 
?REGION has ?AMOUNT of land under cultivation with crops that are not 
replanted after each harvest.  This includes orchards, vineyards, coffee 
and rubber plantations.  Timberland is excluded. ?AMOUNT may be expressed 
in physical units or with a percent or fraction. Cf. &%permanentCropLandArea.")

(=>
  (and
    (permanentCropLandArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION ?TOTAL)
    (instance ?TOTAL AreaMeasure)
    (equal ?AMOUNT (MultiplicationFn ?FRACTION ?TOTAL)))
  (permanentCropLandArea ?REGION ?AMOUNT))

(=>
  (and
    (permanentCropLandArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION (MeasureFn ?TOTAL ?UNIT))
    (instance ?UNIT UnitOfArea)
    (equal ?AMOUNT (MeasureFn (MultiplicationFn ?FRACTION ?TOTAL) ?UNIT)))
  (permanentCropLandArea ?REGION ?AMOUNT))

(=>
  (and
    (permanentCropLandArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION (MeasureFn ?TOTAL ?UNIT))
    (instance ?UNIT UnitOfArea))
  (exists (?PERMCROP)
    (and
      (instance ?PERMCROP PermanentCropLand)
      (geographicSubregion ?PERMCROP ?REGION)
      (measure ?PERMCROP (MeasureFn (MultiplicationFn ?FRACTION ?TOTAL) ?UNIT)))))

(instance otherLandUseArea BinaryPredicate)
(domain otherLandUseArea 1 GeographicArea)
(domain otherLandUseArea 2 ConstantQuantity)

(documentation otherLandUseArea EnglishLanguage 
"This predicate is used to represent information from the CIA 
World Fact Book. (&%otherLandUseArea ?REGION ?AMOUNT) means that 
in the &%GeographicArea ?REGION, the ?AMOUNT of land has some 
use other than planting seasonal or permanent crops.  ?AMOUNT may be 
expressed in physical units or with a percent or fraction. See also 
&%arableLandArea and &%permanentLandArea.")

(=>
  (and
    (otherLandUseArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION ?TOTAL)
    (instance ?TOTAL AreaMeasure)
    (equal ?AMOUNT (MultiplicationFn ?FRACTION ?TOTAL)))
  (otherLandUseArea ?REGION ?AMOUNT))

(=>
  (and
    (otherLandUseArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION (MeasureFn ?TOTAL ?UNIT))
    (instance ?UNIT UnitOfArea)
    (equal ?AMOUNT (MeasureFn (MultiplicationFn ?FRACTION ?TOTAL) ?UNIT)))
  (otherLandUseArea ?REGION ?AMOUNT))

(=>
  (and
    (otherLandUseArea ?REGION ?FRACTION)
    (greaterThanOrEqualTo ?FRACTION 0)
    (totalArea ?REGION (MeasureFn ?TOTAL ?UNIT))
    (instance ?UNIT UnitOfArea))
  (exists (?OTHER)
    (and
      (instance ?OTHER LandArea)
      (not (instance ?OTHER ArableLand))
      (not (instance ?OTHER PermanentCropLand))
      (geographicSubregion ?OTHER ?REGION)
      (measure ?OTHER (MeasureFn (MultiplicationFn ?FRACTION ?TOTAL) ?UNIT)))))

;;-----------------------------------------------------------------------

;; N. Irrigated land

(subclass IrrigatedLand LandArea)

(documentation IrrigatedLand EnglishLanguage "&%IrrigatedLand is the subclass of 
&%LandArea representing land whose water supply is artificially 
supplied or supplemented.")

(instance irrigatedLandArea BinaryPredicate)
(domain irrigatedLandArea 1 GeographicArea)
(domain irrigatedLandArea 2 ConstantQuantity)

(documentation irrigatedLandArea EnglishLanguage "(&%irrigatedLandArea ?REGION ?AMOUNT) 
means that the &%GeographicArea ?REGION has the ?AMOUNT of irrigated land. 
?AMOUNT may be expressed in physical units or with a percent or fraction.")

(=>
  (and
    (irrigatedLandArea ?REGION ?AMOUNT)
    (instance ?AMOUNT AreaMeasure)
    (totalArea ?REGION ?TOTAL)
    (instance ?TOTAL AreaMeasure)
    (equal ?FRACTION (DivisionFn ?AMOUNT ?TOTAL)))
  (irrigatedLandArea ?REGION ?FRACTION))

(=>
  (and
    (irrigatedLandArea ?REGION (MeasureFn ?AMOUNT ?UNIT))
    (totalArea ?REGION (MeasureFn ?TOTAL ?UNIT))
    (instance ?UNIT UnitOfArea)
    (equal ?FRACTION (DivisionFn ?AMOUNT ?TOTAL)))
  (irrigatedLandArea ?REGION ?FRACTION))

(=>
  (and
    (irrigatedLandArea ?REGION (MeasureFn ?AMOUNT ?UNIT))
    (instance ?UNIT UnitOfArea))
  (exists (?IRRLAND)
    (and
      (instance ?IRRLAND IrrigatedLand)
      (geographicSubregion ?IRRLAND ?REGION)
      (measure ?PERMCROP (MeasureFn ?AMOUNT ?UNIT)))))

;;-----------------------------------------------------------------------

;; O. Natural hazards

(instance naturalHazardTypeInArea BinaryPredicate)
(domain naturalHazardTypeInArea 1 GeographicArea)
(domainSubclass naturalHazardTypeInArea 2 Physical)

(documentation naturalHazardTypeInArea EnglishLanguage 
"(&%naturalHazardTypeInArea ?AREA ?TYPE) means that in the 
&%GeographicArea ?AREA, &%Processes of ?TYPE occur with some 
frequency and may cause damage or danger to human lives and property.")

(=>
  (and
    (naturalHazardTypeInArea ?AREA ?TYPE)
    (geographicSubregion ?AREA ?COUNTRY)
    (instance ?COUNTRY Nation))
  (naturalHazardTypeInArea ?NATION ?TYPE))

(=>
  (and
    (naturalHazardTypeInArea ?AREA ?TYPE)
    (subclass ?TYPE Object))
  (exists (?ITEM)
    (and
      (instance ?ITEM ?TYPE)
      (located ?ITEM ?AREA))))

(=>
  (and
    (naturalHazardTypeInArea ?AREA ?TYPE)
    (subclass ?TYPE Process))
  (exists (?ITEM)
    (and
      (instance ?ITEM ?TYPE)
      (located ?ITEM ?AREA)
      (overlapsTemporally (WhenFn ?ITEM) (WhenFn ?AREA)))))

(subclass AvalancheProcess Impelling)

(documentation AvalancheProcess EnglishLanguage "&%AvalancheProcess is a subclass of 
&%Motion that represents events in which a loosened mass of snow, ice, 
rock, or earth rapidly descends a steep slope, with a destructive force.")

(subclass LandslideProcess Impelling)

(documentation LandslideProcess EnglishLanguage "&%LandslideProcess is a subclass 
of &%Motion that represents events in which a loosened mass of mud, 
dirt, or rock slides down a slope, by the force of gravity.")

(subclass Drought WeatherProcess)

(documentation Drought EnglishLanguage "&%Drought is the subclass of &%WeatherProcess 
that represents long periods without precipitation, which is damaging 
to crops, livestock, and human life.")

(=>
  (and
    (instance ?DRYSPELL Drought)
    (eventLocated ?DRYSPELL ?AREA))
  (not
    (exists (?RAIN ?PLACE)
      (and
        (instance ?RAIN Raining)
        (instance ?PLACE Region)
        (eventLocated ?RAIN ?PLACE)
        (overlapsSpatially ?PLACE ?AREA)
        (overlapsTemporally ?RAIN ?DRYSPELL)))))

(subclass Earthquake GeologicalProcess)

(documentation Earthquake EnglishLanguage "&%Earthquake is the class of events in 
which the earth shakes while its layers readjust due to tensional 
stresses in the surface of the earth.  A single earthquake may consist 
of one or more &%EarthTremors.")

(=>
  (instance ?QUAKE Earthquake)
  (exists (?TREMOR)
    (and
      (instance ?TREMOR EarthTremor)
      (subProcess ?TREMOR ?QUAKE))))

(subclass EarthTremor GeologicalProcess)
(subclass EarthTremor Tremor)
(documentation EarthTremor EnglishLanguage "An &%EarthTremor is an individual seismic 
event in which the earth shakes due to release of seismic pressures.")

(subclass Aftershock EarthTremor)

(documentation Aftershock EnglishLanguage "&%Aftershock is the subclass of &%EarthTremors 
that occur after the main tremor(s) of an &%Earthquake.")

(=>
  (and
    (instance ?SHOCK Aftershock)
    (eventLocated ?SHOCK ?PLACE))
  (exists (?TREMOR)
    (and
      (instance ?TREMOR EarthTremor)
      (eventLocated ?TREMOR ?PLACE)
      (before (WhenFn ?TREMOR) (WhenFn ?SHOCK)))))

(names "Richter magnitude" RichterMagnitude)
(names "Richter scale" RichterMagnitude)

(instance RichterMagnitude CompositeUnitOfMeasure)
(documentation RichterMagnitude EnglishLanguage "A &%RichterMagnitude is a measure 
of the severity of an &%EarthTremor.  For example, 
(&%MeasureFn 6.5 RichterMagnitude) denotes the value of 6.5 on the 
Richter scale.")

(=>
  (measure ?QUAKE (MeasureFn ?VALUE RichterMagnitude))
  (instance ?VALUE PositiveRealNumber))

(=>
  (measure ?QUAKE (MeasureFn ?VALUE RichterMagnitude))
  (or
    (instance ?QUAKE EarthTremor)
    (instance ?QUAKE Earthquake)))

(=>
  (and
    (measure ?QUAKE (MeasureFn ?VALUE RichterMagnitude))
    (instance ?QUAKE Earthquake))
  (exists (?TREMOR)
    (and
      (instance ?TREMOR EarthTremor)
      (subProcess ?TREMOR ?QUAKE)
      (measure ?TREMOR (MeasureFn ?VALUE RichterMagnitude)))))

(subclass GeologicalFault GeographicArea)

(documentation GeologicalFault EnglishLanguage "&%GeologicalFault is the subclass of 
&%GeographicAreas in which there is a fracture in the Earth's crust 
and differential movement can occur on the two sides of the fault.  
Such movement results in &%EarthTremors and is the cause of 
&%Earthquakes.")

(=>
  (instance ?QUAKE EarthTremor)
  (exists (?FAULT)
    (and
      (instance ?FAULT GeologicalFault)
      (origin ?QUAKE ?FAULT))))

(=>
  (instance ?QUAKE Earthquake)
  (exists (?FAULT)
    (and
      (instance ?FAULT GeologicalFault)
      (origin ?QUAKE ?FAULT))))

(subclass DipSlipFault GeologicalFault)
(subclass NormalFault DipSlipFault)
(subclass ThrustFault DipSlipFault)
(subclass StrikeSlipFault GeologicalFault)

;; KJN: Moving this to MILO as it is a very general idea
;;(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.")

(subclass ForestFire Combustion)

(=>
  (instance ?FIRE ForestFire)
  (exists (?FOREST)
    (and
      (instance ?FOREST Forest)
      (eventLocated ?FIRE ?FOREST)
      (patient ?FIRE ?FOREST))))

(subclass GrassFire Combustion)

(=>
  (instance ?FIRE GrassFire)
  (exists (?GRASS)
    (and
      (instance ?GRASS Grass)
      (eventLocated ?FIRE ?GRASS)
      (patient ?FIRE ?GRASS))))

;; KJN: Removing this as Flooding, while it could be a WeatherProcess, is not necessarily so.
;; e.g. an area can be deliberately flooded by an agent for some purpose      
;;(subclass Flooding WeatherProcess)

(subclass Hurricane TropicalCyclone)

(instance Permafrost CompoundSubstance)

(subclass Tornado WeatherProcess)

(subclass Tsunami WeatherProcess)

(documentation Tsunami EnglishLanguage "&%Tsunami is the class of highly destructive 
ocean waves caused by offshore seismic processes.")

(subclass VolcanicEruption GeologicalProcess)

(documentation VolcanicEruption EnglishLanguage "&%VolcanicEruption is the subclass of 
&%GeologicalProcesses in which &%Volcanoes erupt.")

(=>
  (instance ?ERUPTING VolcanicEruption)
  (exists (?VOLCANO)
    (and
      (instance ?VOLCANO Volcano)
      (eventLocated ?ERUPTING ?VOLCANO))))

(=>
  (instance ?ERUPTING VolcanicEruption)
  (exists (?HEATING)
    (and
      (instance ?HEATING Heating)
      (subProcess ?HEATING ?ERUPTING))))

;;-----------------------------------------------------------------------

;; P. Environment - current issues

(instance environmentalProblemTypeInArea BinaryPredicate)
(domain environmentalProblemTypeInArea 1 GeographicArea)
(domainSubclass environmentalProblemTypeInArea 2 Physical)

(documentation environmentalProblemTypeInArea EnglishLanguage 
"(&%environmentalProblemTypeInArea ?AREA ?PROBLEM) means that 
objects or processes of type ?PROBLEM is an environmental 
problem in the &%GeographicArea ?AREA.")

(=>
  (environmentalProblemTypeInArea ?AREA ?PROBLEM)
  (exists (?EVENT)
    (and
      (instance ?EVENT ?PROBLEM)
      (eventLocated ?EVENT ?AREA))))

;; Environmental phenomena

(subclass Acidification Combining)

(documentation Acidification EnglishLanguage "&%Acidification is the process of 
lowering soil and water pH due to acid rain or other types of 
acid deposition.  Potential harmful effects include killing 
freshwater fish and plants.")

(subclass AirPollution Pollution)

(documentation AirPollution EnglishLanguage "&%AirPollution is the subclass of 
&%Pollution processes in which air is contaminated.")

(subclass AcidRainfall WeatherProcess)

(documentation AcidRainfall EnglishLanguage "&%AcidRainfall is the subclass of 
&%Raining in which the precipitate contains harmful amounts of 
sulfur dioxide or nitrogen oxide.  The standard for acid rain 
is below 5.6 pH.")

(causesSubclass AirPollution AcidRainfall)
(causesSubclass AcidRainfall Acidification)

(names "pH" PHValue)

(instance PHValue NonCompositeUnitOfMeasure)
(documentation PHValue EnglishLanguage "&%PHValue ('pH') is a &%UnitOfMeasure 
used to measure the acidity or alkalinity of a solution.  The pH 
scale ranges from 0 to 14.  The pH of a  neutral solution is 7.  
Acid solutions have a pH value less than seven.  Alkaline solutions 
have a value greater than seven.")

(<=>
    (measure ?SOLUTION
        (MeasureFn ?PH PHValue))
    (potentialOfHydrogen ?SOLUTION ?PH))

(=>
  (measure ?SOLUTION (MeasureFn ?PH PHValue))
  (lessThanOrEqualTo ?PH 14))

(=>
  (measure ?SOLUTION (MeasureFn ?PH PHValue))
  (greaterThanOrEqualTo ?PH 0))

(=>
  (and
    (instance ?RAINFALL Process)
    (patient ?RAINFALL ?RAIN)
    (instance ?RAIN Water)
    (measure ?RAIN (MeasureFn ?PH PHValue)))
  (lessThan ?PH 5.6))

(subclass CarbonDioxideEmission Separating)

(subclass Afforestation Planting)

(documentation Afforestation EnglishLanguage "&%Afforestation is the process of 
planting trees and plants on spaces that are either empty or in 
agricultural use.")

(subclass Planting Putting)

(documentation Planting EnglishLanguage "&%Planting is the class of processes in 
which botanical &%Plants are planted or transplanted, whether as 
seeds, seedlings, or mature plants.")

(subclass Reforestation Planting)

(documentation Reforestation EnglishLanguage "&%Reforestation is the process of 
replanting trees on land where they were cut or burned.")

(=>
  (instance ?RESTORE Reforestation)
  (exists (?TREE)
    (and 
      (instance ?TREE BotanicalTree)
      (attribute ?TREE NonFullyFormed)
      (patient ?RESTORE ?TREE))))

(subclass Asbestos Mineral)

(documentation Asbestos EnglishLanguage "&%Asbestos is a &%Mineral.")

(subclass BiodiversityAttribute InternalAttribute)

(documentation BiodiversityAttribute EnglishLanguage "&%BiodiversityAttribute is the 
class of &%Attributes that describe the level of biodiversity present 
in a &%GeographicArea or &%Ecosystem.")

(instance LowBiodiversity BiodiversityAttribute)
(instance MediumBiodiversity BiodiversityAttribute)
(instance HighBiodiversity BiodiversityAttribute)

(instance bioindicatorForHabitat BinaryPredicate)
(domain bioindicatorForHabitat 1 GeographicArea)
(domainSubclass bioindicatorForHabitat 2 OrganicObject)

(documentation bioindicatorForHabitat EnglishLanguage 
"(&%bioindicatorForHabitat ?AREA ?SPECIES) means that the health 
of the individuals in ?SPECIES indicates the condition of their 
habitat in the &%GeographicArea ?AREA.")

(instance totalBiomass BinaryPredicate)
(domain totalBiomass 1 GeographicArea)
(domain totalBiomass 2 PhysicalQuantity)

(documentation totalBiomass EnglishLanguage "(&%totalBiomass ?PLACE ?MASS) means that the 
total amount (in weight or volume) of living matter in the &%Region 
?PLACE is ?MASS.") 

(subclass CarbonCycle GeologicalProcess)

(documentation CarbonCycle EnglishLanguage "&%CarbonCycle is the class of 
&%GeologicalProcesses in which carbon in various forms is passed 
between air, water, earth, and the biosphere.")

(subclass WaterCatchment Artifact)

(documentation WaterCatchment EnglishLanguage "&%WaterCatchment is the subclass of 
&%Artifacts used to capture rainwater or runoff as a source 
of &%Freshwater.")

(subclass DDT CompoundSubstance)
(names "dichoro-diphenyl-trichloro-ethane" DDT)
(abbreviation "DDT" DDT)

(documentation DDT EnglishLanguage "&%DDT (dichoro-diphenyl-trichloro-ethane) 
is a highly toxic insecticide also harmful to most other animal 
species.  DDT was banned in the &%UnitedStates in 1972.")

(subclass Defoliant PureSubstance)

(documentation Defoliant EnglishLanguage "&%Defoliant is the class of substances 
that are used to make plants lose their leaves, typically used 
in agriculture or warfare.  Defoliants may have detrimental 
environmental side effects.")

(subclass Deforestation Removing)

(subclass Desertification WeatherProcess)

(documentation Desertification EnglishLanguage "&%Desertification represents the 
&%Process by which desert conditions are spread over an area.")

(subclass Dredging Removing)

(subclass Ecosystem GeographicArea)

(documentation Ecosystem EnglishLanguage "&%Ecosystem is a subclass of &%GeographicAreas 
considered together with their organisms and environment as a functioning 
whole.")

(subclass Effluent Substance)

(documentation Effluent EnglishLanguage "&%Effluent is a &%Substance 
that generically covers any waste matter that is released into 
the environment, including sewage and industrial pollutants.")

(=>
  (instance ?STUFF Effluent)
  (attribute ?STUFF Fluid))

(subclass EndangeredSpecies Organism)

(documentation EndangeredSpecies EnglishLanguage "&%EndangeredSpecies is the 
subclass of &%Organism that includes plants and animals that 
are in danger of extinction from destruction of individuals 
or of habitat.")

(subclass Erosion Removing)
(subclass Erosion GeologicalProcess)

(documentation Erosion EnglishLanguage "&%Erosion is a wearing process on 
&%LandForms by wind, running water, ice, heat, and other processes, 
in which rock and soil material are removed from one area and 
deposited elsewhere.")

(=>
  (instance ?WEARING Erosion)
  (exists (?LAND)
    (and
      (patient ?WEARING ?LAND)
      (instance ?LAND LandForm))))

(=>
  (and
    (instance ?WEARING Erosion)
    (instance ?LAND LandForm)
    (patient ?WEARING ?LAND)
    (measure ?LAND ?SIZE1)
    (instance ?SIZE1 VolumeMeasure))
  (holdsDuring (ImmediateFutureFn (WhenFn ?WEARING))
    (exists (?SIZE2)
      (and
        (measure ?LAND ?SIZE2)
        (instance ?SIZE2 VolumeMeasure)
        (lessThan ?SIZE2 ?SIZE1)))))

(subclass Fishing Hunting)
(documentation Fishing EnglishLanguage "&%Fishing is the class of &%Processes in which 
&%Fish are hunted.")

(=>
  (and
    (instance ?FISHING Fishing)
    (patient ?FISHING ?TARGET)
    (instance ?TARGET Animal))
  (instance ?TARGET Fish))

(subclass ForestDamage Damaging)
(subclass ForestFire ForestDamage)
(subclass Deforestation ForestDamage)

(=>
  (instance ?HARMING ForestDamage)
  (exists (?TREE)
    (and
      (instance ?TREE BotanicalTree)
      (patient ?HARMING ?TREE))))

(subclass DriftnetFishing Fishing)

(subclass FreshwaterOverutilization SocialInteraction)

(subclass Freshwater Water)

(documentation Freshwater EnglishLanguage "&%Freshwater is the subclass of &%Water 
that has low soluble mineral content.  See also &%PotableWater.")

(subclass GreenhouseGas PureSubstance)

(documentation GreenhouseGas EnglishLanguage "&%GreenhouseGas is the subclass of 
substances that, when present in the atmosphere, trap infrared 
radiation and cause global warming.  Greenhouse gases include 
carbon dioxide, hydrofluorocarbons, methane, nitrous oxide, ozone, 
and water vapor.")

(subclass Groundwater Water)

(documentation Groundwater EnglishLanguage "&%Groundwater is the subclass of 
&%Water that is found in deposits in the earth.") 

(subclass IndustrialPollution Pollution)

(documentation IndustrialPollution EnglishLanguage "&%IndustrialPollution is 
the subclass of &%Pollution characterized by pollutants that 
originate in industrial processes.")

(subclass MetallurgicalPlant Organization)

(documentation MetallurgicalPlant EnglishLanguage "&%MetallurgicalPlant is the 
subclass of &%Organization that includes metal refining and 
manufacturing plants.  Such plants typically release extremely 
toxic waste which can pollute air and groundwater if not 
properly treated.")

(subclass NoxiousSubstance Substance)

(documentation NoxiousSubstance EnglishLanguage "&%NoxiousSubstance is 
the class of &%Substances that are harmful to &%Humans.")

(subclass Overgrazing Eating)

(documentation Overgrazing EnglishLanguage "&%Overgrazing is the class of processes 
in which grazing animals consume vegetation faster than it can regrow.")

(instance OzoneShield AtmosphericRegion)
(instance OzoneShield CompoundSubstance)

(documentation earthAltitude EnglishLanguage "The altitude of an object
above the sea level of &%PlanetEarth")
(instance earthAltitude BinaryPredicate)
(domain earthAltitude 1 Object)
(domain earthAltitude 2 PhysicalQuantity)

(<=>
  (earthAltitude ?OBJ ?ALT)
  (and
    (altitude ?OBJ ?SEA ?ALT)
    (surface ?SEA PlanetEarth)))

(documentation OzoneShield EnglishLanguage "The &%OzoneShield is a layer in 
&%EarthsAtmosphere, located about 25 miles above Earth's surface, 
composed of ozone gas that absorbs ultraviolent radiation from 
the Sun that can be damaging to living things.") 

(earthAltitude OzoneShield (MeasureFn 25 Mile))

(subclass PesticidePollution Pollution)

(documentation PesticidePollution EnglishLanguage "&%PesticidePollution is 
the subclass of &%Pollution in which the pollutant is a pesticide.")

(subclass Poaching Killing)

(documentation Poaching EnglishLanguage "&%Poaching is the illegal killing 
of non-human animals.")

(subclass Pollution SocialInteraction)

(documentation Pollution EnglishLanguage "&%Pollution is the contamination of an 
environment by man-made wastes.")

(subclass PotableWater Freshwater)

(documentation PotableWater EnglishLanguage "&%PotableWater is the subclass 
of &%Water that represents safely drinkable water.")

(instance ShortageFn UnaryFunction)
(domainSubclass ShortageFn 1 Object)
(range ShortageFn Entity)

(documentation ShortageFn EnglishLanguage "(&%ShortageFn ?TYPE) means that there 
is a shortage of objects of ?TYPE, which are used as &%resources.")

(subclass Salination Combining)

(documentation Salination EnglishLanguage "&%Salination is the class of processes 
in which either &%Freshwater or &%Topsoil becomes imbued with 
&%SodiumChloride from sea water or from the evaporation of irrigation water.")

(=>
  (instance ?PROCESS Salination)
  (exists (?SALT)
    (and
      (instance ?SALT SodiumChloride)
      (resource ?PROCESS ?SALT))))

(subclass Sanitation Removing)

(documentation Sanitation EnglishLanguage "&%Sanitation is the class of processes 
by which human waste and garbage are disposed of.")

(subclass SewageDisposal Sanitation)
(subclass SolidWasteDisposal Sanitation)

(subclass Siltation Putting)

(documentation Siltation EnglishLanguage "&%Siltation is the class of processes 
in which &%WaterAreas become filled in with silt or mud, due to 
soil &%Erosion.")

(subclass SlashAndBurnAgriculture Agriculture)

(documentation SlashAndBurnAgriculture EnglishLanguage "&%SlashAndBurnAgriculture 
is the subclass of &%Agriculture processes in which land is 
cleared by cutting and burning trees, and crops are farmed until 
the soil is depleted, at which point the plot is abandoned to 
regrowth.  This rotational technique is viable only with low 
populations and infrequent re-use.")

(subclass SoilDegradation SocialInteraction)

(documentation SoilDegradation EnglishLanguage "&%SoilDegradation is a class of 
processes in which the productive capacity of soil is lowered by 
over-fertilization, overuse of pesticides, erosion, or soil 
compaction.")

(subclass SoilErosion Erosion)

(documentation SoilErosion EnglishLanguage "&%SoilErosion is the subclass of 
&%Erosion in which the matter removed by wind or water is topsoil.")

(causesSubclass SoilErosion Siltation)

(subclass SoilSalination Salination)

(=>
  (instance ?PROCESS SoilSalination)
  (exists (?SOIL)
    (and
      (instance ?SOIL Soil)
      (resource ?PROCESS ?SOIL)))) 

(subclass VehicularPollution Pollution)

(documentation VehicularPollution EnglishLanguage "&%VehicularPollution is the 
subclass of &%Pollution in which the pollutants are vehicle emissions.")

(relatedInternalConcept CarbonDioxideEmission VehicularPollution)

(subclass WaterOverutilization SocialInteraction)

(subclass WaterPollution Pollution)

(documentation WaterPollution EnglishLanguage "&%WaterPollution is the subclass 
of &%Pollution processes in which &%Water is the polluted substance.")

;;-----------------------------------------------------------------------

;; Q. Environment - international agreements

;;(subclass Agreement Proposition)

;; KJN: Moving contracts and agreements to Mid-level-ontology.kif
;;(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.")

;;(=>
;;  (instance ?COMPACT Agreement)
;;  (exists (?COMM)
;;    (and
;;      (instance ?COMM Committing)
;;      (represents ?COMM ?COMPACT))))

(subclass InternationalAgreement Agreement)

(documentation InternationalAgreement EnglishLanguage "&%InternationalAgreement is the 
subclass of &%Agreements which are made by and between &%Nations.")

(=>
  (and
    (instance ?AGREEMENT InternationalAgreement)
    (instance ?COMMITTING Committing)
    (represents ?COMMITTING ?AGREEMENT))
  (exists (?AGENT)
    (and 
      (agent ?COMMITTING ?AGENT)
      (instance ?AGENT Nation))))  

(instance DocumentFn UnaryFunction)
(domain DocumentFn 1 Proposition)
(rangeSubclass DocumentFn Text)

(documentation DocumentFn EnglishLanguage "(&%DocumentFn ?PROP) denotes a class 
of &%Text objects that contain the information ?PROP.")

(=>
  (and
    (instance ?PROP Proposition)
    (instance (DocumentFn ?PROP) Text))
  (containsInformation ?DOC ?PROP))

(=>
  (and
    (instance ?PROP Proposition)
    (instance ?CBO ContentBearingObject)
    (containsInformation ?CBO ?PROP)
    (instance ?COMM Communication)
    (patient ?COMM ?CBO))
  (represents ?COMM ?PROP))

(subclass TreatyDocument Text)

(documentation TreatyDocument EnglishLanguage "&%TreatyDocument is the subclass of 
&%Texts that represent written agreements between &%Nations.")

(=>
  (instance ?TREATY TreatyDocument)
  (exists (?COMM ?COUNTRY1 ?COUNTRY2)
     (and
    (instance ?COMM Committing)
    (patient ?COMM ?TREATY)
    (instance ?COUNTRY1 GeopoliticalArea)
    (agent ?COMM ?COUNTRY1)
    (instance ?COUNTRY2 GeopoliticalArea)
    (agent ?COMM ?COUNTRY2)
    (not (equal ?COUNTRY1 ?COUNTRY2)))))

(instance AgreementOrganizationFn UnaryFunction)
(domain AgreementOrganizationFn 1 Agreement)
(range AgreementOrganizationFn Organization)

(documentation AgreementOrganizationFn EnglishLanguage "(&%AgreementOrganizationFn ?AGR) 
denotes the official &%Organization established by the &%Agreement ?AGR 
to administer or enforce the terms of that agreement.")

(=>
  (and
    (instance ?AGR InternationalAgreement)
    (instance (AgreementOrganizationFn ?AGR) Organization))
  (instance (AgreementOrganizationFn ?AGR) OrganizationOfNations))

(instance dateOpenedForSignature BinaryPredicate)
(domain dateOpenedForSignature 1 Proposition)
(domainSubclass dateOpenedForSignature 2 TimePosition)

(documentation dateOpenedForSignature EnglishLanguage 
"(&%dateOpenedForSignature ?PROP ?DATE) means that as of a date 
indicated by ?DATE, document(s) may officially be signed (by the 
appropriate agents) to effect commitments to the &%Agreement ?PROP.") 

;; For "date entered into force" use (from Government.kif):
;; &%agreementEffectiveDate: Proposition x (subclass of) TimePosition 

;; Moved this to Mid-level-ontology.kif
;;(instance partyToAgreement BinaryPredicate)
;;(domain partyToAgreement 1 Agent)
;;(domain partyToAgreement 2 Proposition)

;;(documentation partyToAgreement EnglishLanguage "(&%partyToAgreement ?AGENT ?PROP) 
;;means that the &%Agent ?AGENT has committed to the agreement ?PROP.")

;;(=>
;;  (partyToAgreement ?AGENT ?CONTENT)
;;  (instance ?CONTENT Agreement))

;;(=>
;;  (partyToAgreement ?AGENT ?CONTENT)
;;  (exists (?COMMITTING ?CBO)
;;    (and
;;      (instance ?COMMITTING Committing)
;;      (instance ?CBO ContentBearingObject)
;;      (patient ?COMMITTING ?CBO)
;;      (containsInformation ?CBO ?CONTENT)
;;      (agent ?COMMITTING ?AGENT))))

(instance unratifiedSignatoryToAgreement BinaryPredicate)
(domain unratifiedSignatoryToAgreement 1 Agent)
(domain unratifiedSignatoryToAgreement 2 Agreement)

(documentation unratifiedSignatoryToAgreement EnglishLanguage
"(&%unratifiedSignatoryToAgreement ?AGENT ?PROP) means that 
the &%Agent ?AGENT has signed a document to begin the process of 
committing to the &%Agreement ?PROP, but that a ratification 
process required to complete the commitment has not yet occurred.")

(=>
  (unratifiedSignatoryToAgreement ?AGENT ?PROP)
  (not (partyToAgreement ?AGENT ?PROP)))

(subclass SigningAnAgreement Committing)

(documentation SigningAnAgreement EnglishLanguage "&%SigningAnAgreement is the class of 
actions in which an agent affixes a signature, stamp, or other evidence 
of authorization or attestation to a document.  The document and signature 
may be electronic.  Signings count as &%SocialInteractions even if done in 
private, because their significance derives from a social context.")

(=>
  (instance ?SIGNING SigningAnAgreement)
  (exists (?DOC ?TERMS)
    (and
      (instance ?DOC LinguisticExpression)
      (instance ?TERMS Agreement)
      (containsInformation ?DOC ?TERMS)
      (patient ?SIGNING ?DOC))))

;;-----------------------------------

;; Environmental Agreements covered by the CIA World Fact Book:

(instance AirPollutionConvention Agreement)

(conventionalLongName "Convention on Long-Range Transboundary Air Pollution" AirPollutionConvention)

(conventionalShortName "Air Pollution" AirPollutionConvention)

(instance AirPollution-NitrogenOxidesProtocol Agreement)

(conventionalLongName "Protocol to the 1979 Convention on Long-Range Transboundary 
Air Pollution Concerning the Control of Emissions of Nitrogen Oxides or Their 
Transboundary Fluxes" AirPollution-NitrogenOxidesProtocol)

(instance AirPollution-PeristentOrganicPollutantsProtocol Agreement)

(conventionalLongName "Protocol to the 1979 Convention on Long-Range Transboundary 
Air Pollution on Persistent Organic Pollutants" AirPollution-PeristentOrganicPollutantsProtocol)

(instance AirPollution-Sulphur85Protocol Agreement)

(conventionalLongName "Protocol to the 1979 Convention on Long-Range Transboundary 
Air Pollution on the Reduction of Sulphur Emissions or Their Transboundary Fluxes 
by at least 30%" AirPollution-Sulphur85Protocol)

(instance AirPollution-Sulphur94Protocol Agreement)

(conventionalLongName "Protocol to the 1979 Convention on Long-Range Transboundary 
Air Pollution on Further Reduction of Sulphur Emissions"  AirPollution-Sulphur94Protocol)

(instance AirPollution-VolatileOrganicCompoundsProtocol Agreement)

(conventionalLongName "Protocol to the 1979 Convention on Long-Range Transboundary 
Air Pollution Concerning the Control of Emissions of Volatile Organic Compounds or 
Their Transboundary Fluxes" AirPollution-VolatileOrganicCompoundsProtocol)

(instance Antarctic-EnvironmentalProtocol Agreement)

(conventionalLongName "Protocol on Environmental Protection to the Antarctic Treaty" 
  Antarctic-EnvironmentalProtocol)

(instance Antarctic-MarineLivingResourcesConvention Agreement)

(conventionalLongName "Convention on the Conservation of Antarctic Marine Living Resources" 
  Antarctic-MarineLivingResourcesConvention)

(conventionalShortName "Antarctic-Marine Living Resources" Antarctic-MarineLivingResourcesConvention)

(instance AntarcticSealsConvention Agreement)

(conventionalLongName "Convention for the Conservation of Antarctic Seals" AntarcticSealsConvention)

(conventionalShortName "Antarctic Seals" AntarcticSealsConvention)

(instance AntarcticTreaty Agreement)
(conventionalLongName "Antarctic Treaty" AntarcticTreaty)
(agreementAdoptionDate AntarcticTreaty (DayFn 1 (MonthFn December (YearFn 1959))))
(agreementEffectiveDate AntarcticTreaty (DayFn 23 (MonthFn June (YearFn 1961))))

;; consultative (voting) members: (claimants) Argentina, Australia,
;; Chile, France, NewZealand, Norway, UnitedKingdom; (nonclaimants)
;; Belgium, Brazil, Bulgaria, China, Ecuador, Finland, Germany, India,
;; Italy, Japan, SouthKorea, Netherlands, Peru, Poland, Russia,
;; SouthAfrica, Spain, Sweden, Uruguay, UnitedStates.  includes under
;; the treaty all land and ice shelves south of 60 degrees 00 minutes
;; south and reserves high seas rights.


(instance BiodiversityConvention Agreement)

(conventionalLongName "Convention on Biological Diversity" BiodiversityConvention)

(instance ClimateChangeConvention Agreement)

(conventionalLongName "United Nations Framework Convention on Climate Change" ClimateChangeConvention)

(conventionalShortName "Climate Change" ClimateChangeConvention)

(instance ClimateChange-KyotoProtocol Agreement)

(conventionalLongName "Kyoto Protocol to the United Nations Framework Convention 
on Climate Change" ClimateChange-KyotoProtocol)

(conventionalShortName "Kyoto Protocol" ClimateChange-KyotoProtocol)
(conventionalShortName "Climate Change Kyoto Protocol" ClimateChange-KyotoProtocol)

(instance DesertificationConvention Agreement)

(conventionalLongName "United Nations Convention to Combat Desertification in those 
Countries Experiencing Serious Drought or Desertification, Particularly in Africa" DesertificationConvention)

(conventionalShortName "Desertification" DesertificationConvention)

(instance EndangeredSpeciesConvention Agreement)

(conventionalLongName "Convention on the International Trade in Endangered Species of 
Wild Flora and Fauna" EndangeredSpeciesConvention)

(conventionalShortName "EndangeredSpecies" EndangeredSpeciesConvention)
(abbreviation "CITES" EndangeredSpeciesConvention)

(instance EnvironmentalModificationConvention Agreement)

(conventionalLongName "Convention on the Prohibition of Military or Any Other Hostile 
Use of Environmental Modification Techniques" EnvironmentalModificationConvention)

(conventionalShortName "Environmental Modification" EnvironmentalModificationConvention)

(instance HazardousWastesConvention Agreement)

(conventionalLongName "Basel Convention on the Control of Transboundary Movements of 
Hazardous Wastes and Their Disposal" HazardousWastesConvention )

(conventionalShortName "Basel Convention" HazardousWastesConvention)
(conventionalShortName "Hazardous Wastes" HazardousWastesConvention)

(instance LawOfTheSeaConvention Agreement)

(conventionalLongName "United Nations Convention on the Law of the Sea" LawOfTheSeaConvention)

(conventionalShortName "Law of the Sea" LawOfTheSeaConvention)
(abbreviation "LOS" LawOfTheSeaConvention)

(instance MarineDumpingConvention Agreement)

(conventionalLongName "Convention on the Prevention of Marine Pollution by Dumping 
Wastes and Other Matter" MarineDumpingConvention)

(conventionalShortName "Marine Dumping" MarineDumpingConvention)
(conventionalShortName "London Convention" MarineDumpingConvention)

(instance MarineLifeConservationConvention Agreement)

(conventionalLongName "Convention on Fishing and Conservation of Living Resources of 
the High Seas" MarineLifeConservationConvention)

(conventionalShortName "Marine Life Conservation" MarineLifeConservationConvention)

(instance NuclearTestBanTreaty Agreement)

(conventionalLongName "Treaty Banning Nuclear Weapons Tests in the Atmosphere, in Outer 
Space, and Under Water" NuclearTestBanTreaty)

(conventionalShortName "Nuclear Test Ban" NuclearTestBanTreaty)

(instance OzoneLayerProtectionProtocol Agreement)

(conventionalLongName "Montreal Protocol on Substances That Deplete the Ozone Layer" OzoneLayerProtectionProtocol)

(conventionalShortName "Ozone Layer Protection" OzoneLayerProtectionProtocol)

(conventionalShortName "Montreal Protocol" OzoneLayerProtectionProtocol)

(instance ShipPollutionProtocol Agreement)

(conventionalLongName "Protocol of 1978 Relating to the International Convention for 
the Prevention of Pollution From Ships, 1973" ShipPollutionProtocol)

(conventionalShortName "Ship Pollution" ShipPollutionProtocol)
(conventionalShortName "MARPOL" ShipPollutionProtocol)

(instance TropicalTimber83Agreement Agreement)

(conventionalLongName "International Tropical Timber Agreement, 1983" TropicalTimber83Agreement)

(conventionalShortName "Tropical Timber 83" TropicalTimber83Agreement)

(instance TropicalTimber94Agreement Agreement)

(conventionalLongName "International Tropical Timber Agreement, 1994" TropicalTimber94Agreement)

(conventionalShortName "Tropical Timber 94" TropicalTimber94Agreement)

(instance WetlandsConvention Agreement)

(conventionalLongName "Convention on Wetlands of International Importance Especially 
as Waterfowl Habitat" WetlandsConvention)

(conventionalShortName "Wetlands" WetlandsConvention)
(conventionalShortName "Ramsar Convention" WetlandsConvention)

(instance WhalingConvention Agreement)

(conventionalLongName "International Convention for the Regulation of Whaling" WhalingConvention)

(conventionalShortName "Whaling" WhalingConvention)

;;-----------------------------------------------------------------------

;; R. Geography - note
;; [Specific notes made in KIF Country files as needed.]

;;========================================================================


;; II. General Geography Terms and Background
;;   A. Planet geography & astronomical bodies
;;  B. Directions and distances
;;  C. Land forms
;;   D. Water areas
;;     1. Oceans & Seas
;;     2. Tides & Currents
;;     3. Water subregions
;;     4. Fresh water areas
;;   E. Coastal and shoreline areas
;;   F. Air and atmosphere
;;   G. Weather & Climate
;;   H. Vegetation and biomes
;;  I. Natural disasters

;;-------------------------------------------------------------------------

; A. Planet Geography and Astronomical Bodies

(subclass Star AstronomicalBody)
(documentation Star EnglishLanguage 
"&%Star is the class of hot gaseous astronomical bodies.")

(instance Sol Star)
(documentation Sol EnglishLanguage "&%Sol is the nearest &%Star to &%PlanetEarth and 
the focus of its &%SolarSystem.")

(=>
  (instance ?L Sunlight)
  (origin ?L Sol))

(subclass SolarSystem Collection)
(documentation SolarSystem EnglishLanguage "&%SolarSystem is the class of systems that 
consist of a star or stars and any encircling astronomical bodies.")

(subclass Satellite AstronomicalBody)
(documentation Satellite EnglishLanguage "&%Satellite is the collection of bodies that 
revolve around some  astronomical body, e.g., planets around a star.  
This class includes both artificial and &%NaturalSatellites.")

(instance orbits BinaryPredicate)
(instance orbits AsymmetricRelation)
(domain orbits 1 Object)
(domain orbits 2 AstronomicalBody)

(documentation orbits EnglishLanguage "(&%orbits ?SATELLITE ?FOCUS) means that the &%Object 
?SATELLITE revolves around the &%AstronomicalBody ?FOCUS.")

(=>
  (instance ?SAT Satellite)
  (exists (?BODY)
    (and
      (instance ?BODY AstronomicalBody)
      (orbits ?SAT ?BODY))))

(subclass NaturalSatellite Satellite)
(subclass NaturalSatellite AstronomicalBody)
(disjoint NaturalSatellite Artifact)

(documentation NaturalSatellite EnglishLanguage "&%NaturalSatellite is the class of 
large, naturally occurring astronomical bodies orbiting some other 
&%AstronomicalBody.")

(subclass Moon NaturalSatellite)
(documentation Moon EnglishLanguage "&%Moon is the class of &%NaturalSatellites that 
orbit planets or large asteroids.")

(instance EarthsMoon Moon)
(orbits EarthsMoon PlanetEarth)
(documentation EarthsMoon EnglishLanguage "EarthsMoon is the Moon of PlanetEarth.")

(subclass Planet NaturalSatellite)
(documentation Planet EnglishLanguage "&%Planet is the class of large 
&%NaturalSatellites that revolve around a star.")

(instance PlanetEarth Planet)
(orbits PlanetEarth Sol)
(instance PlanetMercury Planet)
(orbits PlanetMercury Sol)
(instance PlanetVenus Planet)
(orbits PlanetVenus Sol)
(instance PlanetMars Planet)
(orbits PlanetMars Sol)
(instance PlanetJupiter Planet)
(orbits PlanetJupiter Sol)
(instance PlanetSaturn Planet)
(orbits PlanetSaturn Sol)
(instance PlanetNeptune Planet)
(orbits PlanetNeptune Sol)
(instance PlanetUranus Planet)
(orbits PlanetUranus Sol)
(instance PlanetPluto Planet)
(orbits PlanetPluto Sol)

(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))))
      

;;---------------------------------

;; Earth location terms

(subclass Hemisphere GeographicArea)
(documentation Hemisphere EnglishLanguage "&%Hemisphere is the class of &%GeographicAreas 
that are halves of the Earth, as traditionally divided into the Northern 
and Southern Hemispheres along the equator and into the Eastern and Western 
Hemispheres along a north-south line running 20�W and 160�E.")

(=>
  (instance ?AREA Hemisphere)
  (geographicSubregion ?AREA PlanetEarth))

(instance NorthernHemisphere Hemisphere)
(documentation NorthernHemisphere EnglishLanguage "The half of the Earth that lies above the 
equator.")

(instance SouthernHemisphere Hemisphere)
(documentation SouthernHemisphere EnglishLanguage "The half of the Earth that lies below the 
equator.")

(instance EasternHemisphere Hemisphere)
(documentation EasternHemisphere EnglishLanguage "The half of the Earth that includes Europe, 
Asia, Africa, and Australia.")

(instance WesternHemisphere Hemisphere)
(documentation WesternHemisphere EnglishLanguage "The half of the Earth that includes North 
and South America.")

(<=>
   (instance ?HEMISPHERE Hemisphere)
   (or
      (equal ?HEMISPHERE NorthernHemisphere)
      (equal ?HEMISPHERE SouthernHemisphere)
      (equal ?HEMISPHERE EasternHemisphere)
      (equal ?HEMISPHERE WesternHemisphere)))

(=>
  (and
    (overlapsSpatially ?ONE ?TWO)
    (instance ?TWO Region)
    (not (equal ?ONE ?TWO)))
  (partlyLocated ?ONE ?TWO))

;; AXIOMS for &%Continent (defined in Merge.txt):
(<=>
   (instance ?CONTINENT Continent)
   (or
      (equal Africa ?CONTINENT)
      (equal NorthAmerica ?CONTINENT)
      (equal SouthAmerica ?CONTINENT)
      (equal Antarctica ?CONTINENT)
      (equal Europe ?CONTINENT)
      (equal Asia ?CONTINENT)
      (equal Oceania ?CONTINENT)))

(=>
  (instance ?AREA Continent)
  (geographicSubregion ?AREA PlanetEarth))

(disjoint Nation Continent)

(instance Africa Continent)
(names "Africa" Africa)
(overlapsSpatially Africa NorthernHemisphere)
(overlapsSpatially Africa SouthernHemisphere)
(geographicSubregion Africa EasternHemisphere)

(instance NorthAmerica Continent)
(geographicSubregion NorthAmerica NorthernHemisphere)
(geographicSubregion NorthAmerica WesternHemisphere)

(instance SouthAmerica Continent)
(names "South America" SouthAmerica)
(overlapsSpatially SouthAmerica NorthernHemisphere)
(overlapsSpatially SouthAmerica SouthernHemisphere)
(geographicSubregion SouthAmerica WesternHemisphere)

(instance Antarctica Continent)
(names "Antarctica" Antarctica)
(geographicSubregion Antarctica SouthernHemisphere)
(overlapsSpatially Antarctica EasternHemisphere)
(overlapsSpatially Antarctica WesternHemisphere)

(names "Europe" Europe)
(geographicSubregion Europe NorthernHemisphere)
(overlapsSpatially Europe EasternHemisphere)
(overlapsSpatially Europe WesternHemisphere)

(instance Asia Continent)
(names "Asia" Asia)
(overlapsSpatially Asia NorthernHemisphere)
(overlapsSpatially Asia SouthernHemisphere)
(geographicSubregion Asia EasternHemisphere)

(instance Oceania Continent)
; (names "Oceania" Oceania)
(overlapsSpatially Oceania NorthernHemisphere)
(overlapsSpatially Oceania SouthernHemisphere)
(overlapsSpatially Oceania EasternHemisphere)
(overlapsSpatially Oceania WesternHemisphere)

(instance ArcticRegion GeographicArea)
(names "Arctic" ArcticRegion)
(names "the Arctic" ArcticRegion)
(documentation ArcticRegion EnglishLanguage "The area above the Artic Circle, which is
66 degrees 33 minutes and 38 seconds north latitude.  It is dark
for at least 24 hours at some point during the year, with an
increasing period of yearly continuous darkness as one gets closer
to the North Pole.")

(=>
  (and
    (instance ?REGION GeographicArea)
    (located ?REGION ArcticRegion))
  (exists (?DAY)
    (and
      (instance ?DAY Day)
      (holdsDuring ?DAY
        (not 
          (attribute ?REGION Illuminated))))))

(geographicSubregion ArcticRegion NorthernHemisphere)
(overlapsSpatially ArcticRegion EasternHemisphere)
(overlapsSpatially ArcticRegion WesternHemisphere)
(overlapsSpatially ArcticOcean ArcticRegion)
(not (vegetationType ArcticRegion BotanicalTree))

(instance Tropics GeographicArea)
(names "Tropics" Tropics)
(names "the Tropics" Tropics)

(documentation Tropics EnglishLanguage "The &%Tropics is the region of 
&%PlanetEarth that lies between approximately 23 and one half degrees 
&%North latitude and 23 and one half degrees &%South latitude, 
encircling the globe.  'The Tropics'.  See also &%TropicArea.")

(overlapsSpatially Tropics NorthernHemisphere)
(overlapsSpatially Tropics SouthernHemisphere)
(overlapsSpatially Tropics EasternHemisphere)
(overlapsSpatially Tropics WesternHemisphere)

(geographicSubregion Antarctica AntarcticArea)
(instance AntarcticArea GeographicArea)
(instance AntarcticArea LandArea)
(documentation AntarcticArea EnglishLanguage "The area below the AntarcticCircle, which is
66 degrees 33 minutes and 38 seconds south latitude.  It is dark
for at least 24 hours at some point during the year, with an
increasing period of yearly continuous darkness as one gets closer
to the South Pole.")

(=>
  (and
    (instance ?REGION GeographicArea)
    (located ?REGION AntarcticArea))
  (exists (?DAY)
    (and
      (instance ?DAY Day)
      (holdsDuring ?DAY
        (not 
          (attribute ?REGION Illuminated))))))

;;-------------------------------------------------------------------------

;; B. Directions and coordinates

(instance oppositeDirection BinaryPredicate)
(instance oppositeDirection SymmetricRelation)
(instance oppositeDirection IrreflexiveRelation)
(domain oppositeDirection 1 PositionalAttribute)
(domain oppositeDirection 2 PositionalAttribute)

(documentation oppositeDirection EnglishLanguage "(&%oppositeDirection ?DIR1 ?DIR2) 
means that the &%PositionalAttribute ?DIR1 points in the compass 
direction opposite to the &%DirectionalAttribute ?DIR2.")

(oppositeDirection North South)
(oppositeDirection East West)

(=>
  (and
    (orientation ?OBJ1 ?OBJ2 ?DIR)
    (instance ?DIR PositionalAttribute)
    (oppositeDirection ?DIR ?OPPDIR))
  (orientation ?OBJ2 ?OBJ1 ?OPPDIR))  

(=>
  (oppositeDirection ?DIR1 ?DIR2)
  (contraryAttribute ?DIR1 ?DIR2))

;;   Additional Compass Directions:

(instance Northeast DirectionalAttribute)

(documentation Northeast EnglishLanguage 
"&%Northeast represents the compass direction of Northeast.")

(<=>
  (orientation ?OBJ1 ?OBJ2 Northeast)
  (and
    (orientation ?OBJ1 ?OBJ2 North)
    (orientation ?OBJ1 ?OBJ2 East)))

(instance Southeast DirectionalAttribute)

(documentation Southeast EnglishLanguage 
"&%Southeast represents the compass direction of Southeast.")

(<=>
  (orientation ?OBJ1 ?OBJ2 Southeast)
  (and
    (orientation ?OBJ1 ?OBJ2 South)
    (orientation ?OBJ1 ?OBJ2 East)))

(instance Southwest DirectionalAttribute)
(oppositeDirection Northeast Southwest)

(documentation Southwest EnglishLanguage 
"&%Southwest represents the compass direction of Southwest.")

(<=>
  (orientation ?OBJ1 ?OBJ2 Southwest)
  (and
    (orientation ?OBJ1 ?OBJ2 South)
    (orientation ?OBJ1 ?OBJ2 West)))

(instance Northwest DirectionalAttribute)
(oppositeDirection Northwest Southeast)

(documentation Northwest EnglishLanguage 
"&%Northwest represents the compass direction of Northwest.")

(<=>
  (orientation ?OBJ1 ?OBJ2 Northwest)
  (and
    (orientation ?OBJ1 ?OBJ2 North)
    (orientation ?OBJ1 ?OBJ2 West)))

(instance headingWRTTrueNorth BinaryPredicate)
(instance headingWRTTrueNorth AsymmetricRelation)
(domain headingWRTTrueNorth 1 Object)
(domain headingWRTTrueNorth 2 PlaneAngleMeasure)

(documentation headingWRTTrueNorth EnglishLanguage "(&%headingWRTTrueNorth ?OBJ ?DEGREE) 
means that the front-to-back axis of the &%Object ?OBJ points in 
the direction ?DEGREE, with respect to true North.")

(instance headingWRTMagneticNorth BinaryPredicate)
(instance headingWRTMagneticNorth AsymmetricRelation)
(domain headingWRTMagneticNorth 1 Object)
(domain headingWRTMagneticNorth 2 PlaneAngleMeasure)

(documentation headingWRTMagneticNorth EnglishLanguage "(&%headingWRTMagneticNorth ?OBJ ?DEGREE) 
means that the front-to-back axis of the &%Object ?OBJ points in 
the direction ?DEGREE, with respect to magnetic North.")

(instance headingWRTCompassNorth BinaryPredicate)
(instance headingWRTCompassNorth AsymmetricRelation)
(domain headingWRTCompassNorth 1 Object)
(domain headingWRTCompassNorth 2 PlaneAngleMeasure)

(documentation headingWRTCompassNorth EnglishLanguage "(&%headingWRTCompassNorth ?OBJ ?DEGREE) 
means that the front-to-back axis of the &%Object ?OBJ points in 
the direction ?DEGREE, according to the compass carried by ?OBJ.")

(instance courseWRTTrueNorth TernaryPredicate)
(domain courseWRTTrueNorth 1 Physical)
(domain courseWRTTrueNorth 2 Physical)
(domain courseWRTTrueNorth 3 PlaneAngleMeasure)

(documentation courseWRTTrueNorth EnglishLanguage 
"(&%courseWRTTrueNorth ?OBJ1 ?OBJ2 ?HEADING) means that the course 
heading or track from ?OBJ1 to ?OBJ2 is ?HEADING, in &%AngularDegrees, 
with the reference point of 000 degrees being true North.") 

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 0 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 North))

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 90 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 East))

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 180 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 South))

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 270 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 West))

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 360 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 North))

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 45 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 Northeast))

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 135 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 Southeast))

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 225 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 Southwest))

(<=>
  (courseWRTTrueNorth ?OBJ1 ?OBJ2 (MeasureFn 315 AngularDegree))
  (orientation ?OBJ1 ?OBJ2 Northwest))

(instance magneticVariation TernaryPredicate)
(domain magneticVariation 1 GeographicArea)
(domain magneticVariation 2 PlaneAngleMeasure)
(domain magneticVariation 3 DirectionalAttribute)

(documentation magneticVariation EnglishLanguage 
"(&%magneticVariation ?AREA ?DEGREE ?DIRECTION) means that in the 
&%GeographicArea ?AREA, the magnetic variation of a compass from 
000 degrees true is ?DEGREE &%AngularDegrees in ?DIRECTION (&%East  
or &%West).")

(=>
  (magneticVariation ?AREA ?DEGREE ?DIRECTION)
  (or
    (equal ?DIRECTION East)
    (equal ?DIRECTION West)))

(instance courseWRTMagneticNorth TernaryPredicate)
(domain courseWRTMagneticNorth 1 Physical)
(domain courseWRTMagneticNorth 2 Physical)
(domain courseWRTMagneticNorth 3 PlaneAngleMeasure)

(documentation courseWRTMagneticNorth EnglishLanguage 
"(&%courseWRTMagneticNorth ?OBJ1 ?OBJ2 ?HEADING) means that the course 
heading from ?OBJ1 to ?OBJ2 is ?HEADING in &%AngularDegrees, with 
the reference point of 000 degrees being the magnetic North pole.") 

(=>
  (and
    (courseWRTMagneticNorth ?OBJ1 ?OBJ2 ?MAGDEGREE)
    (partlyLocated ?OBJ1 ?AREA)
    (partlyLocated ?OBJ2 ?AREA)
    (magneticVariation ?AREA ?DEGREE ?DIRECTION))
  (exists (?DIFFDEGREE ?TRUEDEGREE)
    (and
      (=>
        (and
          (equal ?DIRECTION East)
          (equal ?DIFFDEGREE (AdditionFn ?MAGDEGREE ?DEGREE)))
        (courseWRTTrueNorth ?OBJ1 ?OBJ2 ?TRUEDEGREE))
      (=>
        (and
          (equal ?DIRECTION West)
          (equal ?DIFFDEGREE (SubtractionFn ?MAGDEGREE ?DEGREE)))
        (courseWRTTrueNorth ?OBJ1 ?OBJ2 ?TRUEDEGREE)))))

(instance courseWRTCompassNorth TernaryPredicate)
(domain courseWRTCompassNorth 1 Physical)
(domain courseWRTCompassNorth 2 Physical)
(domain courseWRTCompassNorth 3 PlaneAngleMeasure)

(documentation courseWRTCompassNorth EnglishLanguage 
"(&%courseWRTCompassNorth ?OBJ1 ?OBJ2 ?HEADING) means that the course 
heading from ?OBJ1 to ?OBJ2 is ?HEADING in &%AngularDegrees, with 
the reference point of 000 degrees North as measured by compass on  
or at ?OBJ1.") 

(instance relativeBearing TernaryPredicate)
(domain relativeBearing 1 Object)
(domain relativeBearing 2 Object)
(domain relativeBearing 3 PlaneAngleMeasure)

(documentation relativeBearing EnglishLanguage "(&%relativeBearing ?OBJ1?OBJ2 ?DEGREES) 
means that ?OBJ1 and ?OBJ2 are separated by the amount ?DEGREES of 
&%PlaneAngleMeasure.")

;; Nautical units of measure

(names "fathom" Fathom)

(instance Fathom UnitOfLength)

(equal (MeasureFn 1 Fathom) (MeasureFn 6 FootLength))

(=>
  (equal ?NUMBER (MultiplicationFn 1 ?NUMBER))
  (equal
    (MeasureFn ?NUMBER Fathom)
    (MeasureFn (MultiplicationFn ?NUMBER 6) FootLength)))

(documentation Fathom EnglishLanguage "&%Fathom is a &%UnitOfMeasure used for measuring 
water depth.  One fathom is equal to six feet.")

(names "nautical mile" NauticalMile)

(instance NauticalMile UnitOfLength)
(documentation NauticalMile EnglishLanguage "&%NauticalMile represents the international 
unit used for measuring distance in sea and air navigation.  The unit is 
based on the length of a minute of arc of a great circle of 
&%PlanetEarth.")

(equal (MeasureFn 1 NauticalMile) (MeasureFn 6076.1 FootLength))
(equal (MeasureFn 1 NauticalMile) (MeasureFn 1852 Meter))

(=>
  (equal ?AMOUNT (MeasureFn ?NUM NauticalMile))
  (equal ?AMOUNT (MeasureFn (MultiplicationFn ?NUM 1.852) (KiloFn Meter))))
    
(=>
  (equal ?AMOUNT (MeasureFn ?NUM NauticalMile))
  (equal ?AMOUNT (MeasureFn (MultiplicationFn ?NUM 1.151) Mile)))

(=>
  (equal ?NUM (MultiplicationFn 1 ?NUM))
  (equal (MeasureFn ?NUM NauticalMile)(MeasureFn (MultiplicationFn ?NUM 1852) Meter)))

(=>
  (equal ?NUM (MultiplicationFn 1 ?NUM))
  (equal (MeasureFn ?NUM NauticalMile)(MeasureFn (MultiplicationFn ?NUM 1.852)(KiloFn Meter))))

(=>
  (equal ?NUM (MultiplicationFn 1 ?NUM))
  (equal (MeasureFn ?NUM NauticalMile)(MeasureFn (MultiplicationFn ?NUM 6076.1) FootLength)))
  
(=>
  (equal ?NUM (MultiplicationFn 1 ?NUM))
  (equal (MeasureFn ?NUM NauticalMile)(MeasureFn (MultiplicationFn ?NUM 1.151) Mile)))

(names "knot" KnotUnitOfSpeed)
(abbreviation "kt" KnotUnitOfSpeed)

(instance KnotUnitOfSpeed CompositeUnitOfMeasure)
(documentation KnotUnitOfSpeed EnglishLanguage "&%KnotUnitOfSpeed is a unit for measuring 
speed.  One &%KnotUnitOfSpeed is equal to one &%NauticalMile per one 
&%HourDuration.")

(=>
  (equal ?SPEED (SpeedFn (MeasureFn ?DISTANCE NauticalMile)(MeasureFn ?TIME HourDuration)))
  (equal ?SPEED (MeasureFn (DivisionFn ?DISTANCE ?TIME) KnotUnitOfSpeed)))

(=>
  (equal ?SPEED (MeasureFn ?NUM KnotUnitOfSpeed))
  (equal ?SPEED (SpeedFn (MeasureFn ?NUM NauticalMile)(MeasureFn 1 HourDuration))))

;;-------------------------------------------------------------------------

;; C. Land Forms

;; Area measures

(instance SquareMeter UnitOfArea)
(documentation SquareMeter EnglishLanguage "&%SquareMeter represents a &%UnitOfMeasure 
equal to one square &%Meter.")

(equal (MeasureFn 1 SquareMeter) 
   (MultiplicationFn (MeasureFn 1 Meter)(MeasureFn 1 Meter)))

(instance SquareUnitFn UnaryFunction)
(domain SquareUnitFn 1 UnitOfMeasure)
(range SquareUnitFn UnitOfMeasure)

(documentation SquareUnitFn EnglishLanguage "(&%SquareUnitFn ?UNIT) denotes the 
&%UnitOfMeasure that is the square of the &%UnitOfMeasure ?UNIT. 
For example, (&%SquareUnitFn (&%KiloFn &%Meter)) denotes the unit 
of a square kilometer.")

(<=>
  (and
    (instance ?UNIT UnitOfMeasure)
    (equal ?AMOUNT (MeasureFn 1 (SquareUnitFn ?UNIT))))
  (equal ?AMOUNT (MultiplicationFn (MeasureFn 1 ?UNIT) (MeasureFn 1 ?UNIT))))

(equal SquareMeter (SquareUnitFn Meter))
(equal SquareKilometer (SquareUnitFn (KiloFn Meter)))

(subclass LandForm GeographicArea)
(documentation LandForm EnglishLanguage "A &%LandForm is the class of geographically and/or geologically 
distinct areas that occur on Earth's surface, including mountains, hills, plains, valleys, 
deltas, and features of submerged land areas such as the ocean floor.")

(subclass UplandArea LandForm)
(documentation UplandArea EnglishLanguage "An &%UplandArea is a &%LandArea elevated above the surrounding 
terrain.")

(subclass LowlandArea LandForm)
(documentation LowlandArea EnglishLanguage "A &%LowlandArea is a land area lower than the surrounding region, 
and usually level land.")

(subclass UndergroundArea GeographicArea)
(documentation UndergroundArea EnglishLanguage "The class of regions &%located &%Below the surface of the earth.")

(=>
  (instance ?place UndergroundArea)
  (exists (?area ?ground)
    (and
      (surface ?ground PlanetEarth)
      (part ?area ?ground)
      (orientation ?place ?area Below))))

(=>
  (and
    (instance ?place UndergroundArea)
    (earthAltitude ?place ?alt1)
    (surface ?ground PlanetEarth)
    (part ?area ?ground)
    (orientation ?place ?area Below)
    (earthAltitude ?area ?alt2))
  (greaterThan ?alt2 ?alt1))

(subclass MountainRange LandForm)
(subclass MountainRange UplandArea)
(documentation MountainRange EnglishLanguage "A &%MountainRange is a row or chain of connected mountains.")

(=>
  (and
    (instance ?Range MountainRange)
    (part ?Mountain1 ?Range))
  (exists (?Mountain2)
    (and
      (component ?Mountain2  ?Range)
      (instance ?Mountain2 Mountain)
      (meetsSpatially ?Mountain1 ?Mountain2))))

(subclass Mountain LandForm)
(subclass Mountain UplandArea)

(documentation Mountain EnglishLanguage "A &%Mountain is a high, rocky &%LandForm, usually 
with steep sides and a pointed or rounded top, and higher than a &%Hill.") 

(=>
  (instance ?Mountain Mountain)
  (exists (?Incline)
    (and
      (instance ?Incline SlopedArea)
      (attribute ?Incline SteepTerrain)
      (part ?Incline ?Mountain))))

(groundSurfaceType Mountain Rock)
(groundSubsurfaceType Mountain Rock)

(subclass Hill LandForm)
(subclass Hill UplandArea)

(documentation Hill EnglishLanguage "A &%Hill is a raised part of the earth's surface with 
sloping sides - an old mountain which because of erosion has become shorter 
and more rounded.") 

(=>
  (instance ?Hill Hill)
  (exists (?Incline)
    (and
      (instance ?Incline SlopedArea)
      (part ?Incline ?Hill))))

(subclass Volcano LandForm)

(documentation Volcano EnglishLanguage "A &%Volcano in the broadest sense, i.e., a region 
containing a vent through which magmous and/or pyroclastic materials are 
passed from the interior of the Earth to its surface (atmospheric or 
underwater).") 

(subclass VolcanoStatus InternalAttribute)
(instance VolcanicallyActive VolcanoStatus)
(instance VolcanicallyDormant VolcanoStatus)
(instance VolcanicallyExtinct VolcanoStatus)
(contraryAttribute VolcanicallyActive VolcanicallyDormant VolcanicallyExtinct)
(exhaustiveAttribute VolcanoStatus VolcanicallyActive VolcanicallyDormant VolcanicallyExtinct)

(=>
  (instance ?event VolcanicEruption)
  (exists (?volcano)
    (and
      (instance ?volcano Volcano)
      (agent ?event ?volcano))))

(subclass VolcanicMountain Mountain)
(subclass VolcanicMountain Volcano) 

(documentation VolcanicMountain EnglishLanguage "A &%VolcanicMountain is a cone-shaped 
mountain formed out of rock or ash thrown up from inside the earth, 
frequently with an opening or depression at the top.") 
  
(subclass VolcanicCone Hill)
(subclass VolcanicCone Volcano)

(documentation VolcanicCone EnglishLanguage "A &%VolcanicCone is a hill of lava or 
pyroclastics surrounding a volcanic vent.  Not as high as a 
&%VolcanicMountain.") 
  
(subclass WatershedDivide LandArea)
(subclass WatershedDivide UplandArea)

(documentation WatershedDivide EnglishLanguage "A &%WatershedDivide is a summit area, or 
narrow tract of higher ground that constitutes the watershed boundary 
between two adjacent drainage basins, it divides the surface waters that 
flow naturally in one direction from those that flow in the opposite 
direction.") 

(subclass SlopedArea LandForm)

(documentation SlopedArea EnglishLanguage "A &%SlopedArea is a land surface which lies at 
an angle to the horizontal so that some points on it are higher than 
others, a slope.") 

(=>
  (instance ?incline SlopedArea)
  (exists (?top ?bottom ?height1 ?height2)
    (and
      (top ?top ?incline)
      (bottom ?bottom ?incline)
      (earthAltitude ?top ?height1)
      (earthAltitude ?bottom ?height2)
      (successorAttributeClosure ?height2 ?height1) ;; needed?
      (greaterThan ?height1 ?height2))))
  
(subclass Cliff SlopedArea)
(documentation Cliff EnglishLanguage "A &%Cliff is any high, very-steep-to-perpendicular 
or overhanging face of rock or earth, a precipice.")

(=>
  (instance ?cliff Cliff)
  (exists (?slope)
    (and
      (instance ?slope RationalNumber)
      (slopeGradient ?cliff ?slope)
      (greaterThan ?slope 0.60)    ;; or more?
      (greaterThan 1.20 ?slope))))  ;; or less?
  
(subclass Plateau LandForm)
(subclass Plateau UplandArea)
(documentation Plateau EnglishLanguage "A &%Plateau is a flat upland area with one steep 
face, elevated plain.")

(=>
  (and
    (instance ?Plateau Plateau)
    (top ?Top ?Plateau))
  (attribute ?Top FlatTerrain))

(=>
  (instance ?plateau Plateau)
  (exists (?slope)
    (and
      (instance ?slope SlopedArea)
      (attribute ?slope SteepTerrain)
      (overlapsSpatially ?slope ?plateau))))
  
(subclass Mesa LandForm)
(subclass Mesa UplandArea)
(documentation Mesa EnglishLanguage "A &%Mesa is a land formation having a relatively flat 
top and steep rock walls.")

(=>
  (and
    (instance ?Mesa Mesa)
    (top ?Top ?Mesa))
  (attribute ?Top FlatTerrain))

(=>
  (and
    (instance ?Mesa Mesa)
    (side ?Side ?Mesa))
  (attribute ?Side SteepTerrain))
  
(subclass Butte UplandArea)
(subclass Butte LandForm)
(documentation Butte EnglishLanguage "A &%Butte is an &%Upland raised sharply from the 
surrounding region.  Smaller in area than a &%Mesa.")

(=>
  (and
    (instance ?butte Butte)
    (side ?side ?butte))
  (attribute ?side SteepTerrain))

(=>
  (and
    (instance ?butte Butte)
    (top ?top ?butte))
  (attribute ?top FlatTerrain))

(=>
  (and
    (instance ?butte Butte)
    (instance ?mesa Mesa)
    (linearExtent ?butte (MeasureFn ?size1 ?unit))
    (linearExtent ?mesa (MeasureFn ?size2 ?unit)))
  (greaterThan ?size2 ?size1))

(subclass Piedmont LandArea)
(documentation Piedmont EnglishLanguage "A &%Piedmont is a &%LandArea at the foot of mountains.")

(=> 
    (instance ?piedmont Piedmont)
    (exists (?mountains)
        (and
            (instance ?mountains MountainousTerrain)
            (orientation ?piedmont ?mountains Adjacent))))
                        
(=>
    (and
        (instance ?piedmont Piedmont)
        (attribute ?mountains MountainousTerrain)
        (orientation ?piedmont ?mountains Adjacent)
        (height ?piedmont ?height1)
        (height ?mountains ?height2)
        (successorAttributeClosure ?height1 ?height2))
    (greaterThan ?height2 ?height1))
    
(subclass Plain LowlandArea)
(documentation Plain EnglishLanguage "A &%Plain is a broad, flat or gently rolling area, 
usually low in elevation.")

(=>
  (instance ?plain Plain)
  (attribute ?plain FlatTerrain))
  
(subclass Valley LandForm)
(subclass Valley LowlandArea)
(documentation Valley EnglishLanguage "A &%Valley is an area of low-lying land flanked by 
higher ground. Valleys typically contain a stream or river flowing along the valley floor.")

(=>
  (and 
    (instance ?valley Valley)
    (instance ?area LandArea)
    (earthAltitude ?valley ?height1)
    (earthAltitude ?area ?height2)
    (orientation ?valley ?area Adjacent))
  (greaterThan ?height2 ?height1))
  
(subclass Basin LandForm)
(documentation Basin EnglishLanguage "A &%Basin is an area of land enclosed or partially 
enclosed by higher land.")

(=>
  (and
    (instance ?basin Basin)
    (instance ?area LandArea)
    (earthAltitude ?basin ?height1)
    (earthAltitude ?area ?height2)
    (orientation ?basin ?area Adjacent))
  (greaterThan ?height2 ?height1))
  
(subclass Canyon LandForm)
(documentation Canyon EnglishLanguage "A &%Canyon is a narrow valley with steep sides, usually 
created by erosion.")

(=>
  (instance ?Canyon Canyon)
  (exists (?Hole)
    (hole ?Hole ?Canyon)))
(=>
  (instance ?Canyon Canyon)
  (exists (?Erosion)
            (and
          (instance ?Erosion Erosion)
          (result ?Erosion ?Canyon))))

;; Ground and soil types:
(instance groundSurfaceType BinaryPredicate)
(documentation groundSurfaceType EnglishLanguage "(%&groundSurfaceType ?area ?substance) means 
that the predominant &%Substance at the ground surface of the &%LandArea ?area is ?substance.")
(domain groundSurfaceType 1 LandArea)
(domainSubclass groundSurfaceType 2 Substance)

(instance groundSubsurfaceType BinaryPredicate)
(documentation groundSubsurfaceType EnglishLanguage "(&%groundSubsurfaceType ?area ?subsoil) 
means that the predominant &%Substance in the subsoil or subsurface layer of 
the &%LandArea ?area is of type ?subsoil.")
(domain groundSubsurfaceType 1 LandArea)
(domainSubclass groundSubsurfaceType 2 Substance)

(=>
  (and
    (instance ?area LandArea)
    (groundSurfaceType ?area ?type1)
    (groundSubsurfaceType ?area ?type2))
  (exists (?above ?below)
    (and 
      (instance ?above ?type1)
      (instance ?below ?type2)
      (orientation ?above ?below Above))))

;; KJN: Moving this to MILO to remove multiple dependencies      
;;(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 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 SoilSolution Solution)
(documentation SoilSolution EnglishLanguage "&%SoilSolution is the liquid component of soils, 
which is largely water containing a number of mineral substances in solution, 
as well as comparatively large amounts of dissolved oxygen and carbon dioxide.")

(=>
  (instance ?Solution SoilSolution)
  (exists (?Soil)
    (and
      (instance ?Soil Soil)
      (part ?Solution ?Soil))))

;; KJN: MOving to MILO to remove dependencies.  
;;(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 Loam Soil)
(documentation Loam EnglishLanguage "Type of soil intermediate in texture between clay and sand, 
consisting of a mixture of clay, sand, gravel, silt, and organic matter.")

(=>
  (instance ?Loam Loam)
  (exists (?Clay ?Sand ?Gravel ?Silt ?Organic)
    (and
      (instance ?Clay Clay)
      (piece ?Clay ?Loam)
      (instance ?Gravel Gravel)
      (piece ?Gravel ?Loam)
      (instance ?Sand Sand)
      (piece ?Sand ?Loam)
      (instance ?Silt Silt)
      (piece ?Silt ?Loam)
      (instance ?Organic BodySubstance)
      (piece ?Organic ?Loam))))

(=>
  (and
    (instance ?area GeographicArea)
    (groundSurfaceType ?area Loam))
  (attribute ?area FertileTerrain))

(subclass Sand Soil)
(documentation Sand EnglishLanguage "&%Sand is loose fragments of minerals or rocks. Smaller than 
gravel and larger than silt and clay, sand particles range from 8/10,000 to 8/100 
inch (0.02 to 2 millimeters) in diameter. &%Sand is formed by the &%Erosion of rocks 
through the action of water, ice, or air.")

(subclass Silt Soil)
(documentation Silt EnglishLanguage "&%Silt is sand or earth which is carried along by flowing 
water and deposited at a bend in a river or at a river's opening.") 

(=>
  (and
    (part ?Particle ?Soil)
    (instance ?Soil Sand)
    (diameter ?Particle (MeasureFn ?Size Centimeter)))
  (and
    (greaterThan ?Size 0.00002)
    (greaterThan 0.005 ?Size)))

(subclass Gravel Rock)
(documentation Gravel EnglishLanguage "&%Gravel is small rounded stones, often mixed with sand.")

(subclass Marble Rock)
(documentation Marble EnglishLanguage "A metamorphic &%Rock that is used in &%Constructing 
and in creating &%Sculptures.")

;; KJN: Moving this to MILO to remove dependencies
;;(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 Stone Rock)
(documentation Stone EnglishLanguage "A &%Stone is any small fragment of rock or mineral matter.")

;(=>
;  (instance ?Stone Stone)
;  (relativeSize ?Stone Small Rock))

(subclass Salt CompoundSubstance)
(documentation Salt EnglishLanguage "A &%Salt is a chemical substance which is a combination 
of a metal or a base with an acid.") 

;;-------------------------------------------------------------------------

;; D. Water Areas
;;     1. Oceans & Seas
;;     2. Tides & Currents
;;     3. Water Subregions
;;     4. Fresh Water Areas

;; Defined in Merge.txt: 
;;  WaterArea, StreamWaterArea, SaltWaterArea, and FreshWaterArea

;;  1. Oceans & Seas

(subclass BodyOfWater WaterArea)
(subclass BodyOfWater SelfConnectedObject)

(documentation BodyOfWater EnglishLanguage "A &%BodyOfWater is a connected body of 
water with established boundaries marked by either geographical features 
or conventional borders.")

(instance WorldOcean SaltWaterArea)
(instance WorldOcean BodyOfWater)
(names "world ocean" WorldOcean)
(names "the ocean" WorldOcean)

(documentation WorldOcean EnglishLanguage "The &%WorldOcean is the collective mass of 
sea water that covers 70% of the surface of &%PlanetEarth, surrounding 
all of its dry land areas.  Earth's individual &%Oceans are parts of 
the &%WorldOcean.")

(=>
  (instance ?AREA Continent)
  (meetsSpatially ?AREA WorldOcean))

(subclass Ocean SaltWaterArea)
(subclass Ocean BodyOfWater)

(documentation Ocean EnglishLanguage "&%Ocean is the class containing the oceans 
that are the major subdivisions of the &%WorldOcean.  According to 
the International Hydrographic Association, there are five oceans: 
the &%AtlanticOcean, &%PacificOcean, &%IndianOcean, &%SouthernOcean, 
and &%ArcticOcean.  Note: The largest oceans, the Atlantic and Pacific, 
are subdivided into Northern and Southern regions, but those regions 
are not separate &%Oceans.")

(=>
  (and
    (instance ?WATER BodyOfWater)
    (not (instance ?WATER Ocean))
    (instance ?OCEAN Ocean))
  (larger ?OCEAN ?WATER)) 

(=>
  (instance ?OCEAN Ocean)
  (properPart ?OCEAN WorldOcean))

(instance AtlanticOcean Ocean)
(names "Atlantic Ocean" AtlanticOcean)
(documentation AtlanticOcean EnglishLanguage "&%AtlanticOcean represents the Atlantic 
Ocean.")

(instance NorthAtlanticOcean SaltWaterArea)
(instance NorthAtlanticOcean BodyOfWater)
(names "North Atlantic Ocean" NorthAtlanticOcean)
(names "North Atlantic" NorthAtlanticOcean)

(geographicSubregion NorthAtlanticOcean AtlanticOcean)
(geographicSubregion NorthAtlanticOcean NorthernHemisphere)
(geographicSubregion NorthAtlanticOcean WesternHemisphere)

(documentation NorthAtlanticOcean EnglishLanguage 
"&%NorthAtlanticOcean denotes the northern &%geographicSubregion 
of the &%AtlanticOcean.")

(instance SouthAtlanticOcean SaltWaterArea)
(instance SouthAtlanticOcean BodyOfWater)
(names "South Atlantic Ocean" SouthAtlanticOcean)
(names "South Atlantic" SouthAtlanticOcean)

(geographicSubregion SouthAtlanticOcean AtlanticOcean)
(geographicSubregion SouthAtlanticOcean SouthernHemisphere)
(partlyLocated SouthAtlanticOcean WesternHemisphere)
(partlyLocated SouthAtlanticOcean EasternHemisphere)

(documentation SouthAtlanticOcean EnglishLanguage 
"&%SouthAtlanticOcean denotes the southern &%geographicSubregion 
of the &%AtlanticOcean.")

(instance PacificOcean Ocean)
(names "Pacific Ocean" PacificOcean)
(documentation PacificOcean EnglishLanguage "&%PacificOcean represents the Pacific  
Ocean.")

(instance NorthPacificOcean SaltWaterArea) 
(instance NorthPacificOcean BodyOfWater)
(names "North Pacific Ocean" NorthPacificOcean)
(names "North Pacific" NorthPacificOcean)

(geographicSubregion NorthPacificOcean PacificOcean)
(geographicSubregion NorthPacificOcean NorthernHemisphere)
(partlyLocated NorthPacificOcean EasternHemisphere)
(partlyLocated NorthPacificOcean WesternHemisphere)

(documentation NorthPacificOcean EnglishLanguage 
"&%NorthPacificOcean denotes the northern &%geographicSubregion 
of the &%PacificOcean.")

(instance SouthPacificOcean SaltWaterArea)
(instance SouthPacificOcean BodyOfWater)
(names "South Pacific Ocean" SouthPacificOcean)
(names "South Pacific" SouthPacificOcean)

(geographicSubregion SouthPacificOcean PacificOcean)
(geographicSubregion SouthPacificOcean SouthernHemisphere)
(partlyLocated SouthPacificOcean EasternHemisphere)
(partlyLocated SouthPacificOcean WesternHemisphere)

(documentation SouthPacificOcean EnglishLanguage 
"&%SouthPacificOcean denotes the southern &%geographicSubregion 
of the &%PacificOcean.")

(instance IndianOcean Ocean)
(names "Indian Ocean" IndianOcean)

(documentation IndianOcean EnglishLanguage "&%IndianOcean represents the Indian Ocean.")

(connected IndianOcean SouthPacificOcean)
(connected IndianOcean PersianGulf)
(connected IndianOcean SouthernOcean)

(instance ArcticOcean Ocean)
(names "Arctic Ocean" ArcticOcean)

(documentation ArcticOcean EnglishLanguage "&%ArcticOcean represents the Arctic Ocean.")

(geographicSubregion ArcticOcean NorthernHemisphere)
(partlyLocated ArcticOcean EasternHemisphere)
(partlyLocated ArcticOcean WesternHemisphere)

(=>
  (and
    (instance ?SEA Ocean)
    (not (equal ?SEA ArcticOcean)))
  (smaller ArcticOcean ?SEA))

(instance SouthernOcean Ocean)
(names "Southern Ocean" SouthernOcean)

(documentation SouthernOcean EnglishLanguage "&%SouthernOcean represents the Southern 
Ocean.")

(geographicSubregion SouthernOcean SouthernHemisphere)
(partlyLocated SouthernOcean EasternHemisphere)
(partlyLocated SouthernOcean WesternHemisphere)

(totalArea SouthernOcean (MeasureFn 20327000 SquareKilometer))
(objectGeographicCoordinates (GeographicCenterFn SouthernOcean)
  (LatitudeFn South (MeasureFn 65 AngularDegree)(MeasureFn 0 ArcMinute))
  (LongitudeFn East (MeasureFn 0 AngularDegree)(MeasureFn 0 ArcMinute)))
(length (ShorelineFn SouthernOcean Antarctica) (MeasureFn 17968 (KiloFn Meter)))
(comparativeArea SouthernOcean greaterThan 2 UnitedStates)
(naturalHazardTypeInArea SouthernOcean CyclonicStorm)
(naturalHazardTypeInArea SouthernOcean Iceberg)
(naturalHazardTypeInArea SouthernOcean SeaIce)
(instance SouthernOcean PolarClimateZone)

(elevation (ElevationHighPointFn SouthernOcean) (MeasureFn 0 Meter))
(elevation (ElevationLowPointFn SouthernOcean) (MeasureFn -7235 Meter))

(instance SouthSandwichTrench Hole)
(geographicSubregion SouthSandwichTrench SouthernOcean)

(instance AntarcticCircumpolarCurrent WaterMotion)
(located AntarcticCircumpolarCurrent SouthernOcean)

(=>
  (and
    (origin AntarcticCircumpolarCurrent ?START) 
    (destination AntarcticCircumpolarCurrent ?FINISH))
  (distance ?START ?FINISH (MeasureFn 21000 (KiloFn Meter))))

(instance OpenSea Attribute)

(documentation OpenSea EnglishLanguage "&%OpenSea is the &%Attribute of a &%WaterArea 
that is open ocean beyond five &%NauticalMiles of land, also known as 
'blue water'.")

(<=>
  (attribute ?WATER OpenSea)
  (forall (?LAND)
    (and
      (instance ?AREA SaltWaterArea)
      (not (instance ?WATER LandlockedWater))
      (distance ?LAND ?WATER ?DIST)
      (greaterThan ?DIST (MeasureFn 5 NauticalMile)))))

(subclass Iceberg Water) 

;(subclass Iceberg (ExtensionFn Solid))

(documentation Iceberg EnglishLanguage "An &%Iceberg is a large chunk of ice that has 
broken off from a glacier and fallen into the sea.  The larger part of 
an &%Iceberg floats underwater.")

(=>
  (instance ?BERG Iceberg)
  (exists (?SHEET)
    (and
      (instance ?SHEET Glacier)
      (holdsDuring (ImmediatePastFn (WhenFn ?BERG)) (material ?BERG ?SHEET)))))

;;----------------------------------

(subclass Sea SaltWaterArea)
(subclass Sea BodyOfWater)

(documentation Sea EnglishLanguage "&%Sea is the class of smaller subdivisions of 
the &%WorldOcean, typically partially surrounded by land.  However, 
for inland salt water bodies that are sometimes called 'Sea', see 
&%SaltLake.")

(=>
  (and
    (instance ?SEA Sea)
    (top ?TOP ?SEA))
  (altitude ?TOP SeaLevel (MeasureFn 0 Meter)))

(=>
  (and
    (instance ?SEA Sea)
    (top ?TOP ?SEA))
  (altitude ?TOP SeaLevel (MeasureFn 0 FootLength)))

(=>
  (instance ?SEA Sea)
  (properPart ?SEA WorldOcean))

(=>
  (instance ?SEA Sea)
  (exists (?OCEAN ?PATH)
    (and
      (instance ?OCEAN Ocean)
      (instance ?PATH WaterArea)
      (connects ?PATH ?OCEAN ?SEA))))

(=>
  (instance ?SEA Sea)
  (exists (?LAND)
    (and
      (instance ?LAND LandArea)
      (meetsSpatially ?LAND ?SEA))))

(instance MediterraneanSea Sea)
(instance CaribbeanSea Sea)
(instance BlackSea Sea)
(instance RedSea Sea)
(meetsSpatially Egypt RedSea)
(meetsSpatially Sudan RedSea)
(meetsSpatially Eritrea RedSea)
(meetsSpatially SaudiArabia RedSea)

(instance BeringSea Sea)
(instance BalticSea Sea)
(instance ArabianSea Sea)
(instance NorthSea Sea)
  
;; Sea Level

(instance SeaLevel GeographicArea)
(documentation SeaLevel EnglishLanguage "&%SeaLevel designates the global Mean Sea Surface 
(MSS).  Note that &%SeaLevel represents a &%GeographicArea that comprises all 
the local Mean Sea Level (MSL) areas used as references for measuring altitude.  
In fact, there are local variations in MSL, due to tides and long- and short-
term weather conditions.")

;; Since there are local variations in MSL, &%SeaLevel exhibits local variations 
;; from an imaginary level reference ellipsoid called the geoid.
;; the level of the surface of the sea relative to the land, halfway between high 
;; and low tide, used as a standard in calculating elevation. The reference is not 
;; precise, as sea level varies by region as well as by tide. assoc. with "sea level"

(elevation SeaLevel (MeasureFn 0 Meter))

(=>
  (and
    (instance ?ocean Ocean)
    (surface ?top ?ocean))
  (elevation ?top (MeasureFn 0 Meter)))
  
(=>
  (and
    (instance ?ocean Ocean)
    (surface ?top ?ocean))
  (elevation ?top (MeasureFn 0 FootLength)))


(instance meanSeaLevel BinaryPredicate)
(documentation meanSeaLevel EnglishLanguage "(&%meanSeaLevel ?place ?measure) means that the Mean Sea 
Level (MSL) at ?place is ?measure.  ?measure is a &%distance representing the sea level 
at ?place measured against a benchmark (and averaged over a long time).  MSL is measured 
by tide gauges for maritime purposes, while geodesists use the difference between the 
local sea surface and an ideal level ocean surface (the geoid).")
(domain meanSeaLevel 1 GeographicArea)
(domain meanSeaLevel 2 LengthMeasure)

; See http://www.pol.ac.uk/psmsl/puscience/index.html#2.

(instance DatumFn UnaryFunction)
(domain DatumFn 1 GeographicArea)
(range DatumFn LengthMeasure)
(documentation DatumFn EnglishLanguage "(&%DatumFn ?place) denotes the point of MLLW (Mean Lower Low 
Water) used as the initial data point for a coastal or &%WaterArea given on a nautical 
chart.  High and low tides are calculated with reference to this point.")

;;----------------------------------

;;  2. Tides & Currents

;; Moving this to MILO to remove dependencies
;;(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))
  
(instance FlowFn UnaryFunction)
(domain FlowFn 1 FlowRegion)
(range FlowFn Motion)

(documentation FlowFn EnglishLanguage "(&%FlowFn ?FLUID) denotes the &%Motion process
associated with the constitutive &%pieces of the &%FlowRegion ?FLUID.")

(=>
  (and
    (measure (FlowFn ?FLUID) (SpeedFn ?LENGTH ?TIME))
    (piece ?PART ?FLUID))
  (piece ?PART (SpeedFn ?LENGTH ?TIME)))

(=>
  (and
    (measure (FlowFn ?FLUID) (MeasureFn ?NUM KnotUnitOfSpeed))
    (piece ?PART ?FLUID))
  (piece ?PART (MeasureFn ?NUM KnotUnitOfSpeed)))

(=> 
  (and
    (measure (FlowFn ?FLUID) (VelocityFn ?LENGTH ?TIME ?REGION ?DIRECTION))
    (piece ?PART ?FLUID))
  (measure ?PART (VelocityFn ?LENGTH ?TIME ?REGION ?DIRECTION)))

;; if a flow at place x is moving downstream at y mph, then in 1 hr, the constitutive 
;; stuff that was at x will be located at a distance y miles downstream from x.  
;; Ditto for things moving in, on, or with the flow. 

;; a thing moving place x upstream against a flow of y mph, with its own speed of z 
;; mph, will be able to travel no more than z-y miles upstream from x in 1 hour

(instance FlowRegionFn UnaryFunction)
(domain FlowRegionFn 1 LiquidMotion)
(range FlowRegionFn Region)

(documentation FlowRegionFn EnglishLanguage "(&%FlowRegionFn ?FLOW) denotes the region 
in which the coherent &%LiquidMotion process ?FLOW is occurring.")

(subclass WaterCurrent FlowRegion)
(subclass WaterCurrent WaterArea)

(documentation WaterCurrent EnglishLanguage "&%WaterCurrent is a subclass of &%FlowRegions 
consisting of moving water, especially those currents found within a 
well-identified area and having an established pattern of movement, such 
as an &%OceanCurrent, a &%RipTide, or a &%River.  &%WaterCurrent is 
&%disjoint with &%StaticWaterArea.  As a consequence, &%Lakes for example 
cannot be &%FlowRegions, however, currents may be present in a lake.")

(disjoint WaterCurrent StaticWaterArea)

(subclass Tide FlowRegion)
(subclass Tide SaltWaterArea)

(documentation Tide EnglishLanguage "A &%Tide is a vertical movement of the water level 
in a &%BodyOfWater due to the gravitational attraction between Earth and 
the moon.  Tides are diurnally recurrent events.  In most regions with 
tides, every day there are two high tides and two low tides.  &%MixedTide 
represents a process in which the tides at either extreme are unequal.")

(subclass TidalProcess InternalChange)

(documentation TidalProcess EnglishLanguage "&%TidalProcess is the class of daily 
recurring events in which the water level in a &%BodyOfWater rises 
and falls with the changing position between Earth and the Moon.")

(=>
  (and
    (instance ?LOW LowTide)
    (instance ?HIGH HighTide)
    (eventLocated ?LOW ?PLACE)
    (eventLocated ?HIGH ?PLACE)
    (instance ?DAY Day)
    (overlapsTemporally ?LOW ?DAY)
    (overlapsTemporally ?HIGH ?DAY))
  (exists (?AMOUNT1 ?AMOUNT2)
    (and
      (holdsDuring ?LOW (waterDepth ?PLACE ?AMOUNT1))
      (holdsDuring ?HIGH (waterDepth ?PLACE ?AMOUNT2))
      (greaterThan ?AMOUNT2 ?AMOUNT1))))

(subclass LowTide TidalProcess)

(documentation LowTide EnglishLanguage "&%LowTide is the class of &%TidalProcesses that 
occur twice a day in marine waters, in which the water level falls below 
the mean sea level.")

(subclass LowerLowTide LowTide)

(documentation LowerLowTide EnglishLanguage "&%LowerLowTide is the subclass of &%LowTide 
processes that occur in marine waters with a &%MixedTideProcess.")

(subclass HighTide TidalProcess)

(documentation HighTide EnglishLanguage "&%HighTide is the class of &%TidalProcesses that 
occur twice a day in marine waters, in which the water level rises above 
the mean sea level.")

(subclass HigherHighTide HighTide)

(documentation HigherHighTide EnglishLanguage "&%HigherHighTide is the subclass of 
&%HighTide processes that occur in marine waters with a 
&%MixedTideProcess.")

(subclass MixedTideProcess TidalProcess)

(documentation MixedTideProcess EnglishLanguage "&%MixedTideProcess is the subclass of 
&%TidalProcesses consisting of daily cycles in which the two low and 
two high tides are of unequal height.  In areas with this kind of 
pattern, the chart (based on average low water) is determined by the 
Mean Lower Low Water.")

(instance highTide TernaryPredicate)
(domain highTide 1 Region)
(domain highTide 2 TimeInterval)
(domain highTide 3 LengthMeasure)
(documentation highTide EnglishLanguage "(&%highTide ?PLACE ?TIME ?AMOUNT) means that 
there is a &%HighTide at the &$Region ?PLACE at the &%TimeInterval ?TIME 
with the relative height ?AMOUNT.  The height is given in relation to 
the datum on a standard chart.")

(instance lowTide TernaryPredicate)
(domain lowTide 1 Region)
(domain lowTide 2 TimeInterval)
(domain lowTide 3 LengthMeasure)
(documentation lowTide EnglishLanguage "(&%lowTide ?PLACE ?TIME ?AMOUNT) means that 
there is a &%LowTide at the &$Region ?PLACE at the &%TimeInterval ?TIME 
with the relative height ?AMOUNT.  The height is given in relation to 
the datum on a standard chart.")

(=>
  (and
    (lowTide ?PLACE ?TIME1 ?AMOUNT1)
    (highTide ?PLACE ?TIME2 ?AMOUNT2)
    (instance ?DAY Day)
    (overlapsTemporally ?TIME1 ?DAY)
    (overlapsTemporally ?TIME2 ?DAY))
  (greaterThan ?AMOUNT1 ?AMOUNT2))

(subclass LittoralCurrent WaterCurrent)

(documentation LittoralCurrent EnglishLanguage "&%LittoralCurrent is the subclass of 
&%WaterCurrents that occur near a &%ShoreArea.  Examples include 
&%TidalEbb, &%TidalFlow, and &%RipCurrents.")

(subclass TidalFlow LittoralCurrent)

(documentation TidalFlow EnglishLanguage "&%TidalFlow is the subclass of &%WaterCurrents 
that are temporary and variable, but regular, currents of ocean water 
flowing landward up to and during the time of high tide.  Alternating 
with &%TidalEbb.")

(subclass TidalEbb LittoralCurrent)

(documentation TidalEbb EnglishLanguage "&%TidalEbb is the subclass of &%WaterCurrents 
that are temporary and variable, but regular, currents of ocean water 
flowing seaward up to and during the time of low tide.  Alternating with 
&%TidalFlow.")

(subclass TidalBore LittoralCurrent)

(documentation TidalBore EnglishLanguage "A &%TidalBore is an unusally high, fast tidal 
inflow from the sea, resulting from a high volume of water rushing from 
a wide-mouthed bay or &%Estuary into narrower landward areas.")

(subclass RipCurrent LittoralCurrent)

(documentation RipCurrent EnglishLanguage "A &%RipCurrent is a fast narrow surface current 
that flows seaward from a &%ShoreArea.") 

; upstream for a RipCurrent is away from the ShoreArea
; found near ShoreArea
; dangerous to people in the water (not in boats) 


;;-----------------------------------
;;     3. Water Subregions

(subclass LandlockedWater BodyOfWater)

(documentation LandlockedWater EnglishLanguage "&%LandlockedWater includes water 
areas that are surrounded by land, including salt lakes, fresh 
water lakes, ponds, reservoirs, and (more or less) wetlands.")

; need a way to say that the body of water is surrounded by land (e.g., perimeter)

(subclass SaltLake SaltWaterArea)
(subclass SaltLake LandlockedWater)
(documentation SaltLake EnglishLanguage "&%SaltLake is the class of landlocked 
bodies of salt water, including those referred to as 'Seas', e.g., 
the &%CaspianSea.  But note that the &%MediterraneanSea is a &%Sea.")

(instance CaspianSea SaltLake)
(names "Caspian Sea" CaspianSea)
(instance AralSea SaltLake)
(names "Aral Sea" AralSea)
(instance GreatSaltLake SaltLake)
(names "Great Salt Lake" GreatSaltLake)
(geographicSubregion GreatSaltLake Utah)
(instance DeadSea SaltLake)
(names "Dead Sea" DeadSea)
(instance SaltonSea SaltLake)
(names "Salton Sea" SaltonSea)
(geographicSubregion SaltonSea California)
(instance LakeEyre SaltLake)
(names "Lake Eyre" LakeEyre)
(geographicSubregion LakeEyre Australia)
(instance KokoNor SaltLake)
(names "Koko Nor" KokoNor)
(names "Qinghai Hu" KokoNor)
(instance LakeBakhtegan SaltLake)
(names "Lake Bakhtegan" LakeBakhtegan)
(instance PoopoLake SaltLake)
(names "Poopo Lake" PoopoLake)
(instance LakeMareotis SaltLake)
(names "Lake Mareotis" LakeMareotis)
(names "Lake Maryut" LakeMareotis)
(instance LakeWalker SaltLake)
(names "Lake Walker" LakeWalker)
(instance LakeTorrens SaltLake)
(names "Lake Torrens" LakeTorrens)

(subclass Gulf BodyOfWater)
(subclass Gulf SaltWaterArea)

(documentation Gulf EnglishLanguage "&%Gulf is the class of extensions of a &%Sea or 
&%Ocean that reach into a land mass or are partially enclosed by a 
&%LandArea.  A &%Gulf is typically larger than a &%Bay.")

(=>
  (instance ?GULF Gulf)
  (exists (?SEA)
    (and
         (or  
      (instance ?SEA Sea)
      (instance ?SEA Ocean))
         (connected ?GULF ?SEA))))

(=>
  (instance ?GULF Gulf)
  (exists (?WATER)
    (and
      (instance ?WATER SaltWaterArea)
      (properPart ?GULF ?WATER))))

(=>
  (and
    (instance ?GULF Gulf)
    (instance ?BAY Bay))
  (larger ?GULF ?BAY))

(instance PersianGulf Gulf)
(instance PersianGulf SaltWaterArea)
(names "Persian Gulf" PersianGulf)
(connected PersianGulf StraitOfHormuz)
(meetsSpatially Iran PersianGulf)

(instance GulfOfOman Gulf)
(instance GulfOfOman SaltWaterArea)
(names "Gulf of Oman" GulfOfOman)
(connected StraitOfHormuz GulfOfOman)
(connected GulfOfOman ArabianSea)
(meetsSpatially Iran GulfOfOman)
(meetsSpatially Oman GulfOfOman)

(instance GulfOfAden Gulf)
(instance GulfOfAden SaltWaterArea)
(names "Gulf of Aden" GulfOfAden)
(connected RedSea GulfOfAden)
(connected GulfOfAden ArabianSea)
(meetsSpatially Yemen GulfOfAden)
(meetsSpatially Somalia GulfOfAden)

(instance GulfOfMexico Gulf)
(instance GulfOfMexico SaltWaterArea)
(names "Gulf of Mexico" GulfOfMexico)
(connected GulfOfMexico NorthAtlanticOcean)
(connected GulfOfMexico CaribbeanSea)

(subclass Estuary BodyOfWater)
(subclass Estuary SaltWaterArea)
(subclass Estuary Inlet)

(documentation Estuary EnglishLanguage "&%Estuary is the subclass of &%BodyOfWater that 
represents &%WaterAreas where a sea or ocean &%Tide meets a &%River 
current.")

(=>
  (instance ?WATER Estuary)
  (exists (?SEA)
    (and
      (instance ?SEA SaltWaterArea)
      (part ?SEA WorldOcean)
      (connected ?SEA ?WATER))))

(=>
  (instance ?WATER Estuary)
  (exists (?RIVER)
    (and
      (instance ?RIVER River)
      (flows ?RIVER ?ESTUARY))))

(=>
  (instance ?WATER Estuary)
  (exists (?MOUTH)
    (and
      (instance ?MOUTH RiverMouth)
      (overlapsSpatially ?MOUTH ?ESTUARY))))

(=>
  (instance ?WATER Estuary)
  (exists (?TIDES)
    (and
      (instance ?TIDES TidalProcess)
      (eventLocated ?TIDES ?WATER))))

;----------------------------------

(subclass Inlet BodyOfWater)

(documentation Inlet EnglishLanguage "&%Inlet is the class of bays or other recesses 
into the shore of a lake, sea, or river, includes &%InletPassages, which 
are passages leading from open water through some barrier to a bay or 
lagoon.")

(=>
  (instance ?INLET Inlet)
  (exists (?LAND)
    (and
      (instance ?LAND LandArea)
      (penetrates ?INLET ?LAND))))

(=>
  (instance ?INLET Inlet)
  (exists (?WATER)
    (and
      (instance ?WATER WaterArea)
      (connected ?INLET ?WATER))))

(=>
  (and
    (instance ?INLET Inlet)
    (meetsSpatially ?INLET ?WATER)
    (instance ?WATER SaltWaterArea))
  (instance ?INLET SaltWaterArea))

(=>
  (and
    (instance ?INLET Inlet)
    (meetsSpatially ?INLET ?WATER)
    (instance ?WATER FreshWaterArea))
  (instance ?INLET FreshWaterArea))

(subclass InletPassage Inlet)

(documentation InletPassage EnglishLanguage "&%InletPassage is the class of water 
passages connecting an area of open water to a bay or lagoon, through 
some land barrier(s) close on either side.")

(subclass Bay Inlet)  ;; note may occur in Oceans or in Lakes

(documentation Bay EnglishLanguage "&%Bay is the class of extensions of a body of water 
(salt or fresh) that reach into the land, usually smaller than a 
&%Gulf.")

(subclass Cove Inlet)

(documentation Cove EnglishLanguage "A &%Cove is a small part of a body of water that 
reaches into a coast.")

(=>
  (and
    (instance ?COVE Cove)
    (instance ?BAY Bay))
  (larger ?BAY ?COVE))

;;----------------------------------

(subclass Sound BodyOfWater)

(documentation Sound EnglishLanguage "A &%Sound is a long, relatively narrow waterway 
lying along the shore of a land mass and protected from open water by 
another land area, an island or group of islands.  Some sounds open at 
both ends into the same body of water (e.g., Long Island Sound), while 
others connect two different bodies of water (e.g., Melville Sound).  
A &%Sound may occur in salt or fresh water bodies.  Generally wider than 
a &%Strait.")

(=>
  (connects ?BETWEEN ?END1 ?END2)
  (not (equal ?END1 ?END2)))

(subclass Strait BodyOfWater)
(documentation Strait EnglishLanguage "Strait is the subclass of &%BodyOfWater that 
consists of narrow water areas connecting two larger bodies of water.  
Straits are naturally occurring bodies of water.")

(=>
  (instance ?strait Strait)
  (exists (?body1 ?body2)
    (and
      (instance ?body1 BodyOfWater)
      (instance ?body2 BodyOfWater)
      (connects ?strait ?body1 ?body2))))

(=>
  (and
    (instance ?body1 BodyOfWater)
    (instance ?body2 BodyOfWater)
    (connects ?strait ?body1 ?body2))
  (larger ?body1 ?strait))

(instance StraitOfHormuz Strait)
(instance StraitOfHormuz SaltWaterArea)
(names "Strait of Hormuz" StraitOfHormuz)

(subclass Channel BodyOfWater)

(documentation Channel EnglishLanguage "A &%Channel is a narrow deep waterway connecting 
two larger bodies of water.  May be natural or dredged, salt or fresh 
water.")

(=>
  (instance ?CHANNEL Channel) 
  (exists (?WATER1 ?WATER2)
    (and
      (instance ?WATER1 WaterArea)
      (instance ?WATER2 WaterArea)
      (connects ?CHANNEL ?WATER1 ?WATER2))))

(=>
  (and
    (instance ?CHANNEL Channel) 
    (instance ?BODY BodyOfWater)
    (connected ?CHANNEL ?BODY))
  (larger ?BODY ?CHANNEL))

;;-----------------------------------

;; 4. Fresh Water Areas

(subclass InlandWaterSystem WaterArea)
(subclass InlandWaterSystem Collection) 

(documentation InlandWaterSystem EnglishLanguage "An instance of &%InlandWaterSystem 
comprises two or more lakes or rivers, canals, or other waterways that  
are interconnected.")

(=>
  (instance ?SYSTEM InlandWaterSystem)
  (exists (?BODY1 ?BODY2)
    (and
      (instance ?BODY1 BodyOfWater)
      (instance ?BODY2 BodyOfWater)
      (not (equal ?BODY1 ?BODY2))
      (geographicSubregion ?BODY1 ?SYSTEM)
      (geographicSubregion ?BODY2 ?SYSTEM))))

;(=>
;  (and
;    (instance ?SYSTEM InlandWaterSystem)
;    (instance ?BODY1 BodyOfWater)
;    (instance ?BODY2 BodyOfWater)
;    (not (equal ?BODY1 ?BODY2))
;    (not (connected ?BODY1 ?BODY2))
;    (part ?BODY1 ?SYSTEM)
;    (part ?BODY2 ?SYSTEM))
;  (exists (?WATER)
;    (and
;      (instance ?WATER WaterArea) 
;      (between ?BODY1 ?WATER ?BODY2))))
  
; really want something more precise (Links correspond to waterways)
;(=>
;  (and
;    (instance ?SYSTEM InlandWaterSystem)
;    (geographicSubregion ?lake1 ?SYSTEM)
;    (geographicSubregion ?lake2 ?SYSTEM))
;  ("generically connected" ?lake1 ?lake2 "by water"))

(=>
  (and
    (instance ?SYSTEM InlandWaterSystem)
    (instance ?WATER1 WaterArea)
    (instance ?WATER2 WaterArea)
    (not (equal ?WATER1 ?WATER2))
    (not (connected ?WATER1 ?WATER2))
    (geographicSubregion ?WATER1 ?SYSTEM)
    (geographicSubregion ?WATER2 ?SYSTEM))
  (exists (?WATER3)
    (and
      (instance ?WATER3 WaterArea)
      (not (equal ?WATER3 ?WATER1))
       (not (equal ?WATER3 ?WATER1))
      (part ?WATER3 ?SYSTEM)
      (connects ?WATER3 ?WATER1 ?WATER2))))

;;------------------------------------

(subclass LakeRegion GeographicArea)

(documentation LakeRegion EnglishLanguage "A &%LakeRegion is a &%GeographicArea 
including land surrounding one or more &%Lakes.")

(=>
  (instance ?REGION LakeRegion)
  (exists (?LAKE)
    (and
      (instance ?LAKE Lake)
      (located ?LAKE ?REGION))))
  
;;-----------------------------------

; StreamWaterArea is defined in Merge.kif (see def.)

(=>
  (instance ?STREAM StreamWaterArea)
  (exists (?WATER)
    (and 
      (instance ?WATER BodyOfWater)
      (not (equal ?WATER ?STREAM))
      (flows ?STREAM ?WATER))))

(instance flows BinaryPredicate)
(instance flows AsymmetricRelation)
(instance flows TransitiveRelation)
(domain flows 1 (ExtensionFn Fluid))  
(domain flows 2 (ExtensionFn Fluid))  
(domain flows 1 Physical)
(domain flows 2 Physical)
(subrelation tributary flows)
(subrelation flows connected)

(documentation flows EnglishLanguage "(&%flows ?FLUID1 ?FLUID2) means that the 
&%Physical ?FLUID1 moves towards the &%Physical ?FLUID2, to which 
it is &%connected.")

(=>
  (flows ?FLUID1 ?FLUID2)
  (connected ?FLUID1 ?FLUID2))

(=>
  (flows ?FLUID1 ?FLUID2)
  (orientation ?FLUID1 ?FLUID2 Upstream))

; (=>
;  (and
;    (flows ?STREAM ?WATER)
;    (origin ?STREAM ?SOURCE) ;; bogus - domain 1 violation
;      (orientation ?WATER ?SOURCE ?DIRECTION))
;  (downstream ?STREAM ?DIRECTION))

(instance Upstream PositionalAttribute)

(instance Downstream PositionalAttribute)
(oppositeDirection Upstream Downstream)

(instance connectedDownstream BinaryPredicate)
(domain connectedDownstream 1 Object)
(domain connectedDownstream 2 Object)

(documentation connectedDownstream EnglishLanguage "(&%connectedDownstream ?OBJ1 ?OBJ2) 
means that ?OBJ1 is connected, remotely or immediately, with ?OBJ2 along 
a directed system such as a &%RiverSystem.")

;;-----------------------------------

(subclass River StreamWaterArea)
(subclass River FreshWaterArea)
(subclass River BodyOfWater)

(documentation River EnglishLanguage "&%River is the class of large streams of fresh 
water flowing through land into a lake, ocean, or other body of water.")

; current, direction, upstream and downstream
; rivers flow from higher elevation to lower elevation areas.

;;----------------------------------

(subclass StreamWaterConfluence WaterArea)

(documentation StreamWaterConfluence EnglishLanguage "A &%StreamWaterConfluence is the 
place where a stream or other tributary joins a river.")

(=>
  (instance ?FORK StreamWaterConfluence)
  (exists (?STREAM1 ?STREAM2)
    (and
      (instance ?STREAM1 StreamWaterArea)
      (instance ?STREAM2 StreamWaterArea)
      (flows ?STREAM1 ?STREAM2))))

(=>
  (instance ?FORK StreamWaterConfluence)
  (exists (?STREAM ?BRANCH)
    (and
      (instance ?STREAM River)
      (instance ?BRANCH StreamWaterArea)
      (flows ?BRANCH ?STREAM)
      (connects ?FORK ?STREAM ?BRANCH))))

;;----------------------------------

(subclass RiverSystem WaterArea)
(subclass RiverSystem Collection)

(documentation RiverSystem EnglishLanguage "A &%RiverSystem comprises all the tributary 
streams and rivers (&%StreamWaterAreas) that drain along converging 
paths into the main river of the system, which discharges into a 
&%StaticWaterArea.")  ;; or a larger river ?

(=>
  (instance ?SYSTEM RiverSystem)
  (exists (?RIVER)
    (and
      (instance ?RIVER River)
      (part ?RIVER ?SYSTEM))))

(=>
  (instance ?SYSTEM RiverSystem)
  (exists (?RIVER ?STATIC)
    (and
      (instance ?RIVER River)
      (part ?RIVER ?SYSTEM)
      (instance ?STATIC StaticWaterArea)
      (connected ?RIVER ?STATIC))))

(=>
  (and
    (instance ?SYSTEM RiverSystem)
    (instance ?STREAM StreamWaterArea)
    (part ?STREAM ?SYSTEM))
  (exists (?RIVER)
    (and  
      (instance ?RIVER River)
      (part ?RIVER ?SYSTEM)
      (flows ?STREAM ?RIVER))))  ;; fix this.

;;-----------------------------------------------------------------------

(subclass Waterfall StreamWaterArea)

(documentation Waterfall EnglishLanguage 
"&%Waterfall is the subclass of &%StreamWaterAreas where running water 
falls steeply downhill.")

(instance flowCurrent BinaryPredicate)
(documentation flowCurrent EnglishLanguage "The relation between &%WaterMotion &%Processes
and the region in which they occur continuously over at least hours, but
typically months or years.  A water balloon bursting and flowing downhill
would not use this relation, because there would be no &%StreamWaterArea
to relate to.")
(domain flowCurrent 1 WaterMotion)
(domain flowCurrent 2 WaterArea)

(=>
  (and
    (instance ?FALL Waterfall)
    (instance ?CURRENT WaterMotion)
    (flowCurrent ?CURRENT ?FALL)
    (origin ?CURRENT ?TOP)
    (destination ?CURRENT ?BOTTOM)
    (instance ?TOP WaterArea)
    (instance ?BOTTOM WaterArea))
  (orientation ?TOP ?BOTTOM Above))

;;-----------------------------------------------------------------------

; water-related artifacts:

(subclass Waterway Transitway)
(subclass Waterway WaterArea)
(documentation Waterway EnglishLanguage "&%Waterway is the class of navigable waters, 
including &%Oceans, &%SeaLanes, &%Rivers, &%Canals, &%Lakes, and inland 
bodies of water.")

(=>
  (instance ?P Waterway)
  (hasPurpose ?P
    (and
      (instance ?T WaterTransportation)
      (path ?T ?P))))
  
;; See definition in Geography.kif.  
;; Note: (instance <river> Waterway) asserted only for navigable rivers.

(subclass Canal Waterway)
(subclass Canal StationaryArtifact)
(documentation Canal EnglishLanguage "&%Canal is the subclass of navigable &%Waterways 
flowing through an artificial course.  Typically, a canal is a 
&%Transitway connecting two bodies of water.")

(=>
  (instance ?CHANNEL Canal) 
  (exists (?WATER1 ?WATER2)
    (and
      (instance ?WATER1 WaterArea)
      (instance ?WATER2 WaterArea)
      (connects ?CHANNEL ?WATER1 ?WATER2))))

(subclass CanalStructure StationaryArtifact)

(documentation CanalStructure EnglishLanguage "A &%CanalStructure is the constructed 
framework, including &%Locks, that contains the waters of a &%Canal.")

(subclass Dam StationaryArtifact)

(documentation Dam EnglishLanguage "&%Dam is the subclass of &%StationaryArtifacts that 
are walls built across a stream or river to hold back water.")

(=>
  (instance ?DAM Dam)
  (exists (?RIVER)
    (and
      (instance ?RIVER WaterArea)
      (traverses ?DAM ?River))))

(subclass Reservoir FreshWaterArea)
(subclass Reservoir Artifact)

(documentation Reservoir EnglishLanguage "A &%Reservoir is an artifically made (or 
artifically enlarged) holding area where water is collected and stored 
for future use.")

(subclass ReservoirLake Lake)
(subclass ReservoirLake Reservoir)
(documentation ReservoirLake EnglishLanguage "A &%ReservoirLake is an artifically made 
(or artifically enlarged) lake used for water collection and storage.")  

;;--------------------------------

(subclass Rapids StreamWaterArea)

(documentation Rapids EnglishLanguage "&%Rapids is the class of &%WaterAreas that are 
parts of a &%StreamWaterArea where the currents move swiftly over 
rocks.")

(=>
  (instance ?RAPIDS Rapids)
  (exists (?RIVER)
    (and
      (instance ?RIVER River)
      (part ?RAPIDS ?RIVER))))

(=>
  (and
    (instance ?RAPIDS Rapids)
    (bottom ?BOTTOM ?Rapids))
  (exists (?ROCK)
    (and
      (instance ?ROCK Rock)
      (part ?ROCK ?BOTTOM))))

(subclass RiverMouth WaterArea)
(subclass RiverMouth StreamWaterArea)

(documentation RiverMouth EnglishLanguage "&%RiverMouth is the subclass of &%WaterAreas 
that are the outfalls of a river or stream into another body of water.")

(=>
  (and
    (instance ?RIVER River)
    (instance ?WATER BodyOfWater)
    (flows ?RIVER ?WATER))
  (exists (?MOUTH)
    (and
      (instance ?MOUTH RiverMouth)
      (streamOutfall ?MOUTH ?RIVER)
      (connected ?MOUTH ?WATER)))) 

(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))
      
      
(subrelation streamOutfall properPart)
(domain streamOutfall 1 WaterArea)
(domain streamOutfall 2 River)

(documentation streamOutfall EnglishLanguage "(&%streamOutfall ?WATER ?RIVER) means that  
the &%WaterArea ?MOUTH is the outfall of the &%River ?RIVER.")

(=>
  (streamOutfall ?MOUTH ?RIVER)
  (exists (?WATER)
    (and
      (instance ?WATER WaterArea)
      (flows ?RIVER ?WATER)
      (connected ?MOUTH ?WATER))))

(subclass IrrigationChannel Artifact)
(documentation IrrigationChannel EnglishLanguage "&%IrrigationChannel is the class of 
artificially created channels used for transporting water to agricultural 
fields for &%Irrigating crops.")

(subclass Irrigating Motion)  ;; Translocation (in Transportation)

(documentation Irrigating EnglishLanguage "&%Irrigating is the process of transporting 
and applying water to crops by artificial means.")

(=>
  (and
    (instance ?IRRIGATION Irrigating)
    (patient ?IRRIGATION ?Area)
    (instance ?AREA LandArea))
  (and
    (holdsDuring (ImmediatePastFn (WhenFn ?IRRIGATION)) (attribute ?AREA Dry)) 
    (holdsDuring (ImmediateFutureFn (WhenFn ?IRRIGATION)) (attribute ?AREA Damp))))

(=>
  (and
    (instance ?IRRIGATION Irrigating)
    (patient ?IRRIGATION ?AREA)
    (instance ?AREA LandArea))
  (hasPurpose ?IRRIGATION (attribute ?AREA FertileTerrain)))

(subclass Lake StaticWaterArea)

(documentation Lake EnglishLanguage "&%Lake is the subclass of &%BodyOfWater whose 
instances are naturally occurring static bodies of water surrounded 
by land.")

(=>
  (and 
    (instance ?LAKE Lake)
    (instance ?OCEAN Ocean))
  (smaller ?LAKE ?OCEAN))

;;-----------------------------------------------------------------------

;;   E. Coastal and Shoreline Areas

(subclass CoastalPlain Plain)

(documentation CoastalPlain EnglishLanguage "&%CoastalPlain is the class of broad plains 
areas adjacent to a &%Sea or &%Ocean.  A coastal plain includes a narrower 
&%ShoreArea adjacent to a body of water.")

(=>
  (instance ?plain CoastalPlain)
  (exists (?shore)
    (and
      (instance ?shore ShoreArea)
      (part ?shore ?plain))))
       
(subclass RiverBank ShoreArea)
(subclass RiverBank LandForm)

(documentation RiverBank EnglishLanguage "A &%RiverBank is the &%ShoreArea adjacent to a river.")

(=>
  (instance ?bank RiverBank)
  (exists (?river)
    (and
      (instance ?river River)
      (meetsSpatially ?river ?bank))))

(subclass LittoralZone GeographicArea)

(documentation LittoralZone EnglishLanguage "A &%LittoralZone is an area along the shore 
of a large body of water, especially an &%Ocean or &%Sea, including the area 
extending from the high tide mark out to a depth of 200 meters.  The littoral 
zone is of interest for its land features, e.g., slope gradient and soil 
composition, including features of its &%SubmergedLandArea.")  

(subclass Delta LandForm)

(documentation Delta EnglishLanguage "A &%Delta is a &%LandForm composed of silt or other 
alluvium,  deposited at or near the mouth of a river or stream as it enters 
a body of relatively static water.  Typically a delta is flat and fan-shaped.")

(=>
  (instance ?Delta Delta)
  (exists (?Mouth)
    (and
      (instance ?Mouth RiverMouth)
      (meetsSpatially ?Mouth ?Delta))))

(=>
  (instance ?Delta Delta)
  (attribute ?Delta FlatTerrain))

(subclass Peninsula LandForm)

(documentation Peninsula EnglishLanguage "A &%Peninsula is a piece of land that extends 
into a body of water and is surrounded on three sides by water.  Typically 
connected by an &%Isthmus or neck of land that is narrower than its main 
portion (contrast with &%Cape).")

(=>
  (instance ?Peninsula Peninsula)
  (exists (?Water)
    (and
      (instance ?Water WaterArea)
      (penetrates ?Peninsula ?Water))))

(subclass Cape LandForm)

(documentation Cape EnglishLanguage "A &%Cape is a piece of land projecting into a body of water.")

(=>
  (instance ?Cape Cape)
  (exists (?WaterRegion)
    (and
      (instance ?WaterRegion WaterArea)
      (penetrates ?Cape ?WaterRegion))))

(subclass Isthmus LandArea)

(documentation Isthmus EnglishLanguage "An &%Isthmus is a narrow strip of land that 
connects two larger land masses and is bordered on two sides by water.")

(=>
  (and
    (instance ?Isthmus Isthmus)
    (side ?Leftside ?Isthmus)
    (side ?Rightside ?Isthmus)
            (not (equal ?Leftside ?Rightside)))
  (exists (?Region1 ?Region2 ?Water1 ?Water2)
    (and
      (instance ?Region1 LandArea)
      (instance ?Region2 LandArea)
      (between  ?Region1 ?Isthmus ?Region2)
      (instance ?Water1 WaterArea)
      (instance ?Water2 WaterArea)
      (meetsSpatially ?Leftside ?Water1)
      (meetsSpatially ?Rightside ?Water2))))

(disjoint Island LandlockedArea) 
         
(subclass Archipelago LandForm)
(subclass Archipelago Collection)
(documentation Archipelago EnglishLanguage "An &%Archipelago is a group of islands.")

(=>
  (and
    (instance ?Archipelago Archipelago)
    (component ?Part ?Archipelago))
  (instance ?Part Island))

(subclass ArchipelagicArea GeographicArea)

(documentation ArchipelagicArea EnglishLanguage "An &%ArchipelagicArea is a &%GeographicArea 
including an &%Archipelago and the surrounding &%WaterArea.")

(=>
  (instance ?area ArchipelagicArea)
  (exists (?islands)
    (and
      (instance ?islands Archipelago)
      (located ?islands ?area))))

(subclass Reef LandForm)

(documentation Reef EnglishLanguage "A &%Reef is a ridge of rock, coral, or sand at or near 
the surface of a &%WaterArea.") 

(=>
  (instance ?Reef Reef)
  (exists (?Water)
    (and
      (instance ?Water WaterArea)
      (orientation ?Reef ?Water Near))))

(=>
  (instance ?Reef Reef)
      (exists (?Stuff)
           (and
                (or
                     (instance ?Stuff Sand)
                     (instance ?Stuff Rock)
         (instance ?Stuff Coral))
                (part ?Stuff ?Reef))))

(subclass Coral Invertebrate)

(documentation Coral EnglishLanguage "Corals are gastrovascular marine cnidarians (phylum 
Cnidaria, class Anthozoa) existing as small anemone-like polyps, typically 
forming colonies of many individuals.  The group includes the important 
reef builders known as hermatypic corals, found in tropical oceans, and 
belonging to the subclass Zoantharia of order Scleractinia (formerly 
Madreporaria).  The hermatypic corals obtain much of their nutrient 
requirement from symbiotic unicellular algae called zooxanthellae, and so 
are dependent upon growing in sunlight.  As a result, these corals are 
usually found not far beneath the surface, although in clear waters corals 
can grow at depths of 60 m (200 ft).  Corals breed by spawning, with all 
corals of the same species in a region releasing gametes simultaneously 
over a period of one to several nights around a full moon. (from Wikipedia)") 

(subclass CoralReef Reef)

(documentation CoralReef EnglishLanguage "&%CoralReef is the subclass of &%Reefs that are 
formed from living organisms that produce the limestone formations of the 
reef.  Coral reefs include fringing reefs, barrier reefs, and &%Atolls.")

(=>
  (instance ?REEF CoralReef)
  (exists (?CORAL)
    (and
      (instance ?CORAL Coral)
      (part ?CORAL ?REEF))))
   

(subclass Atoll CoralReef)

(documentation Atoll EnglishLanguage "&%Atoll is the class of &%CoralReefs which surround 
a lagoon.")

(subclass Glacier LandForm) 

(documentation Glacier EnglishLanguage "A &%Glacier is a large body of slow-moving ice.  
Glaciers displace soil and rock while moving over land surfaces and break 
apart, forming &%Icebergs, when they reach the sea.")

(=>
  (instance ?Glacier Glacier)
  (exists (?Water)
    (and
      (instance ?Water Water)
      (attribute ?Water Solid)
      (part ?Ice ?Glacier))))

(subclass Cave Hole)
(subclass Cave GeographicArea)

(documentation Cave EnglishLanguage "A &%Cave is a naturally formed opening beneath 
the surface of the Earth, generally formed by dissolution of carbonate 
bedrock. Caves may also form by erosion of coastal bedrock, partial 
melting of glaciers, or solidification of lava into hollow tubes.")

(=>
  (instance ?Cave Cave)
  (exists (?Erosion)
       (and
            (instance ?Erosion Erosion)
      (result ?Erosion ?Cave))))

(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))))
            
(subclass CaveMatrix LandForm)

(documentation CaveMatrix EnglishLanguage "A &%CaveMatrix is the framework of earth or 
rock in which a &%Cave is embedded.")

(=>
  (instance ?cave Cave)
  (exists (?land)
    (and
      (instance ?land CaveMatrix)
      (hole ?cave ?land))))
                        
(=>
  (and
    (instance ?land CaveMatrix)
    (instance ?cave Cave)
    (hole ?cave ?land))
  (equal ?land (HoleSkinFn ?cave)))

(subclass SubmergedLandArea GeographicArea)

(documentation SubmergedLandArea EnglishLanguage "&%SubmergedLandArea is the class of land 
regions that are located beneath bodies of water.")

(=>
  (instance ?LAND SubmergedLandArea)
  (exists (?WATER)
    (and
      (instance ?WATER WaterArea)
      (orientation ?LAND ?WATER Below)
      (orientation ?WATER ?LAND On)
      (meetsSpatially ?LAND ?WATER))))

(subclass ContinentalShelf SubmergedLandArea)

(documentation ContinentalShelf EnglishLanguage "A &%ContinentalShelf is a natural 
undersea extension of land around a &%Continent.  The shelf is a 
gently sloped (average less than one percent) plain that is an extension 
of the &%CoastalPlain found off the coast of most continents.")

(subclass ContinentalMargin SubmergedLandArea)

(documentation ContinentalMargin EnglishLanguage "&%ContinentalMargin is class of 
&%SubmergedLandAreas that are the extension of land underwater at 
the edge of a continent, before a drop to the sea floor.  A  
&%ContinentalMargin includes the &%ContinentalShelf and the 
continental break, slope, or rise at the outer edge.")

(=>
  (instance ?SHELF ContinentalShelf)
  (exists (?MARGIN) 
    (and
      (instance ?MARGIN ContinentalMargin) 
      (properPart ?SHELF ?MARGIN)
      (overlapsSpatially ?SHELF ?MARGIN))))

(subclass SeabedArea SubmergedLandArea)

(documentation SeabedArea EnglishLanguage 
"&%SeabedArea is the class of &%SubmergedLandAreas that are part of 
the sea floor.")

(instance SeacoastFn BinaryFunction)
(domain SeacoastFn 1 GeographicArea)
(domain SeacoastFn 2 SaltWaterArea)
(range SeacoastFn Seacoast)

(documentation SeacoastFn EnglishLanguage "(&%SeacoastFn ?LAND ?SEA) denotes the 
&%Seacoast where the &%GeographicArea ?LAND borders the &%SaltWaterArea 
?SEA.")

(subclass Seacoast ShoreArea)
(subclass Seacoast LandForm)

(documentation Seacoast EnglishLanguage "A &%Seacoast is the &%ShoreArea along the 
margin of an ocean, extending inland approximately 1-3 km from the low 
water mark.")

(=>
  (and
    (instance ?COAST Seacoast)
    (instance ?WATER WaterArea)
    (orientation ?WATER ?COAST Adjacent))
  (instance ?WATER SaltWaterArea))

(subclass Shoreline LandArea)

(documentation Shoreline EnglishLanguage "&%Shoreline is the class of &%LandAreas that 
are the edge of a larger land mass abutting a bordering &%WaterArea.")

(=>
  (instance ?LINE Shoreline)
  (exists (?WATER)
    (and
      (instance ?WATER WaterArea)
      (meetsSpatially ?WATER ?LINE))))

(=>
  (instance ?SHORE ShoreArea)
  (exists (?LINE)
    (and
      (instance ?LINE Shoreline)
      (part ?LINE ?SHORE))))

(=>
  (and
    (instance ?SHORE ShoreArea)
    (instance ?WATER WaterArea)
    (orientation ?SHORE ?WATER Adjacent))
  (exists (?LINE)
    (and
      (instance ?LINE Shoreline)
      (part ?LINE ?SHORE)
      (meetsSpatially ?LINE ?WATER))))

(=>
  (meetsSpatially ?X ?Y)
  (orientation ?X ?Y Adjacent))

(instance ShorelineFn BinaryFunction)
(domain ShorelineFn 1 GeographicArea)
(domain ShorelineFn 2 WaterArea)
(range ShorelineFn LandArea)

(documentation ShorelineFn EnglishLanguage "(&%ShorelineFn ?LAND ?WATER) denotes 
the &%Shoreline where the &%GeographicArea ?LAND borders the 
&%WaterArea ?WATER.")

(subrelation ShorelineFn BorderFn)

;;-------------------------------------------------------------------------

;;   F. Air and Atmosphere

;; &%altitude: Object x Object x LengthMeasure is defined in Merge.txt.

;;   F. Air and atmosphere

(subclass Atmosphere Region)
(subclass Atmosphere (ExtensionFn Fluid))

(documentation Atmosphere EnglishLanguage "&%Atmosphere is a mixture of gases 
surrounding any celestial object that has a gravitational field 
strong enough to prevent the gases from escaping.") 

(=>
  (instance ?AIR Atmosphere)
  (exists (?BODY)
    (and
      (instance ?BODY AstronomicalBody)
      (meetsSpatially ?AIR ?BODY))))

(instance EarthsAtmosphere Atmosphere)
(documentation EarthsAtmosphere EnglishLanguage "EarthsAtmosphere is the layer of gases, 
a mixture of mainly oxygen and nitrogen, surrounding PlanetEarth.  See 
also Air.")

(=>
  (instance ?AIRSPACE AtmosphericRegion)
  (part ?AIRSPACE EarthsAtmosphere))

(=>
  (instance ?AIR Air)
  (piece ?AIR EarthsAtmosphere))

(=>
  (instance ?AIRSPACE AtmosphericRegion)
  (exists (?AIR)
    (and
      (instance ?AIR Air)
      (part ?AIR ?AIRSPACE))))

(=>
  (instance ?AIR Air)
  (exists (?PART)
    (and 
         (instance ?PART Oxygen)
         (part ?PART ?AIR))))

(=>
  (instance ?AIR Air)
  (exists (?PART)
    (and 
         (instance ?PART Nitrogen)
         (part ?PART ?AIR))))

(subclass AirStream FlowRegion)  
(subclass AirStream Air)

(documentation AirStream EnglishLanguage 
"&%AirStream is the class of &%FlowRegions that consist of air.")

(subclass JetStream AirStream)

(documentation JetStream EnglishLanguage "&%JetStream is the class of high-velocity 
&%AirStreams that blow constantly in the upper atmosphere with constant 
speed and direction, though their location shifts somewhat.  There are 
four &%JetStreams in &%EarthsAtmosphere.")

(subclass WindFlow AirStream)

(documentation WindFlow EnglishLanguage "&%WindFlow is the class of variable &%AirStreams 
that are in the &%EarthsAtmosphere.")

(=>
  (instance ?BLOW WindFlow)
  (located ?BLOW EarthsAtmosphere))

(=>
  (instance ?R WindFlow)
  (exists (?WIND)
    (and
      (instance ?WIND Wind)
      (eventLocated ?WIND ?R))))

;; Measures of wind characteristics:

(instance surfaceWindVelocity TernaryPredicate)
(domain surfaceWindVelocity 1 Object)
(domain surfaceWindVelocity 2 PhysicalQuantity)
(domain surfaceWindVelocity 3 DirectionalAttribute)

(documentation surfaceWindVelocity EnglishLanguage 
"(&%surfaceWindVelocity ?PLACE ?SPEED ?TOWARD) means that the 
surface &%Wind blowing at ?PLACE has a speed of ?SPEED and is moving 
toward the &%DirectionalAttribute ?TOWARD.  Surface wind is found at the 
surface of the planet, everyday wind.  Technically, &%Winds moving 
through the atmosphere up to an altitude of 500 feet.")

(=>
  (and
    (surfaceWindVelocity ?PLACE (SpeedFn ?DIST ?TIME) ?DIRECTION)
    (instance ?PLACE WindFlow))
  (exists (?BLOW)
    (and
      (instance ?BLOW Wind)
      (eventPartlyLocated ?BLOW ?PLACE)
      (measure ?BLOW (VelocityFn ?DIST ?TIME ?PLACE ?DIRECTION)))))

(=>
  (and
    (instance ?PLACE Object)
    (instance ?BLOW Wind)
    (measure ?BLOW (VelocityFn ?DIST ?TIME ?PLACE ?DIRECTION)))
  (surfaceWindVelocity ?PLACE (SpeedFn ?DIST ?TIME) ?DIRECTION))

(instance surfaceWindSpeed BinaryPredicate)
(domain surfaceWindSpeed 1 Object)
(domain surfaceWindSpeed 2 PhysicalQuantity)  

(documentation surfaceWindSpeed EnglishLanguage "(&%surfaceWindSpeed ?PLACE ?RATE) 
means that the speed of the surface &%Wind at the &%GeographicArea 
?PLACE is ?RATE. Wind speed may be expressed in knots (&%KnotUnitOfSpeed) 
or as any distance per time unit (using (&%SpeedFn ?DISTANCE ?TIME)).  
Surface wind is found at the surface of the planet, everyday wind.  
Technically, &%Winds moving through the atmosphere up to an altitude 
of 500 feet.")

(=>
  (surfaceWindVelocity ?PLACE ?SPEED ?DIRECTION)
  (surfaceWindSpeed ?PLACE ?SPEED))

(=>
  (and
    (instance ?ZEPHYR WindFlow)
    (instance ?PLACE Object)
    (partlyLocated ?ZEPHYR ?PLACE)
    (measure ?ZEPHYR (SpeedFn ?DIST ?TIME)))
  (surfaceWindSpeed ?PLACE (SpeedFn ?DIST ?TIME)))

(=>
  (and
    (instance ?ZEPHYR WindFlow)
    (instance ?PLACE Object)
    (partlyLocated ?ZEPHYR ?PLACE)
    (measure ?ZEPHYR (MeasureFn ?SPEED KnotUnitOfSpeed)))
  (surfaceWindSpeed ?PLACE (MeasureFn ?SPEED KnotUnitOfSpeed)))

(instance surfaceWindDirection BinaryPredicate)
(domain surfaceWindDirection 1 Object)
(domain surfaceWindDirection 2 DirectionalAttribute)

(documentation surfaceWindDirection EnglishLanguage 
"(&%surfaceWindDirection ?PLACE ?DIRECTION) means that at ?PLACE 
the wind is coming from the compass point ?DIRECTION.  For example, 
(&%surfaceWindDirection &%SanFranciscoBay &%Northwest) means that the 
wind in San Francisco Bay is coming from the Northwest.  The wind is 
within 500 feet of Earth's surface.")

(=>
  (surfaceWindDirection ?PLACE ?DIR)
  (exists (?WIND ?FROM)
    (and
      (instance ?WIND Wind)
      (instance ?FROM Region)
      (eventPartlyLocated ?WIND ?PLACE)
      (origin ?WIND ?FROM)
      (orientation ?FROM ?PLACE ?DIR))))

(=>
  (and
    (surfaceWindVelocity ?PLACE ?SPEED ?DIR-TOWARD)
    (oppositeDirection ?DIR-TOWARD ?DIR-FROM))
  (surfaceWindDirection ?PLACE ?DIR-FROM))

(=>
  (and
    (instance ?ZEPHYR WindFlow)
    (measure ?ZEPHYR (VelocityFn ?DIST ?TIME ?PLACE ?DIR-TOWARD))
    (oppositeDirection ?DIR-TOWARD ?DIR-FROM))
  (surfaceWindDirection ?PLACE ?DIR-FROM))

(instance lowAltitudeWindVelocity TernaryPredicate)
(domain lowAltitudeWindVelocity 1 Object)
(domain lowAltitudeWindVelocity 2 PhysicalQuantity)
(domain lowAltitudeWindVelocity 3 DirectionalAttribute)

(documentation lowAltitudeWindVelocity EnglishLanguage 
"(&%lowAltitudeWindVelocity ?PLACE ?SPEED ?DIRECTION) means that the 
low-altitude &%Wind blowing at ?PLACE has a speed of ?SPEED and comes 
from the compass point ?DIRECTION.  Low-altitude wind is wind blowing 
between 500-10,000 feet.")

(instance lowAltitudeWindSpeed BinaryPredicate)
(instance lowAltitudeWindSpeed AsymmetricRelation)
(domain lowAltitudeWindSpeed 1 Object)
(domain lowAltitudeWindSpeed 2 PhysicalQuantity)

(documentation lowAltitudeWindSpeed EnglishLanguage 
"(&%lowAltitudeWindSpeed ?PLACE ?RATE) means that the &%Wind blowing 
between 500-10,000 feet at ?PLACE has a speed of ?RATE. &%Wind speed 
may be expressed in knots (&%KnotUnitOfSpeed) or as any distance per 
time unit (using (&%SpeedFn ?DISTANCE ?TIME)).")

(=>
  (lowAltitudeWindVelocity ?PLACE ?SPEED ?DIRECTION)
  (lowAltitudeWindSpeed ?PLACE ?SPEED))

(instance mediumAltitudeWindVelocity TernaryPredicate)
(domain mediumAltitudeWindVelocity 1 Object)
(domain mediumAltitudeWindVelocity 2 PhysicalQuantity)
(domain mediumAltitudeWindVelocity 3 DirectionalAttribute)

(documentation mediumAltitudeWindVelocity EnglishLanguage 
"(&%mediumAltitudeWindVelocity ?PLACE ?SPEED ?TOWARD) means that the 
&%Wind blowing between 10,000-25,000 feet at ?PLACE has a speed of 
?SPEED and is moving toward the &%DirectionalAttribute ?TOWARD.")

(instance mediumAltitudeWindSpeed BinaryPredicate)
(instance mediumAltitudeWindSpeed AsymmetricRelation)
(domain mediumAltitudeWindSpeed 1 Object)
(domain mediumAltitudeWindSpeed 2 ConstantQuantity)

(documentation mediumAltitudeWindSpeed EnglishLanguage 
"(&%mediumAltitudeWindSpeed ?PLACE ?RATE) means that the &%Wind 
blowing between 10,000-25,000 feet at ?PLACE has a speed of ?RATE.")

(=>
  (mediumAltitudeWindVelocity ?PLACE ?SPEED ?DIRECTION)
  (mediumAltitudeWindSpeed ?PLACE ?SPEED))

(instance highAltitudeWindVelocity TernaryPredicate)
(domain highAltitudeWindVelocity 1 Object)
(domain highAltitudeWindVelocity 2 PhysicalQuantity)
(domain highAltitudeWindVelocity 3 DirectionalAttribute)

(documentation highAltitudeWindVelocity EnglishLanguage 
"(&%highAltitudeWindVelocity ?PLACE ?SPEED ?TOWARD) means that the 
&%Wind blowing above 25,000 feet at ?PLACE has a speed of ?SPEED 
and is moving toward the &%DirectionalAttribute ?TOWARD.")

(instance highAltitudeWindSpeed BinaryPredicate)
(instance highAltitudeWindSpeed AsymmetricRelation)
(domain highAltitudeWindSpeed 1 Object)
(domain highAltitudeWindSpeed 2 ConstantQuantity)

(documentation highAltitudeWindSpeed EnglishLanguage 
"(&%highAltitudeWindSpeed ?PLACE ?RATE) means that the &%Wind 
blowing above 25,000 feet at ?PLACE has a speed of ?RATE.")

(=>
  (highAltitudeWindVelocity ?PLACE ?SPEED ?DIRECTION)
  (highAltitudeWindSpeed ?PLACE ?SPEED))

(instance Upwind PositionalAttribute)
(subAttribute Upwind Upstream)

(documentation Upwind EnglishLanguage 
"&%Upwind is a &%PositionalAttribute that indicates relative position 
upwind (windward) with respect to the direction that the &%Wind is 
blowing.")

(instance Downwind PositionalAttribute)
(subAttribute Downwind Downstream)

(documentation Downwind EnglishLanguage 
"&%Downwind is a &%PositionalAttribute that indicates relative position 
downwind (leeward) with respect to the direction that the &%Wind is 
blowing.")

(instance windRelativePosition BinaryPredicate)
(instance windRelativePosition AsymmetricRelation)
(domain windRelativePosition 1 Object)
(domain windRelativePosition 2 Attribute)

(documentation windRelativePosition EnglishLanguage 
"(&%windRelativePosition ?OBJECT ?POSITION) means that the &%Wind blows 
at ?OBJECT from the relative vector ?POSITION.  E.g., &%Crosswind, 
&%Headwind, &%Tailwind.")

(instance Crosswind Attribute)

(documentation Crosswind EnglishLanguage "&%Crosswind is the relative attribute of a 
&%Wind to an object when the force of the wind is applied to a lateral 
&%side of the object.")

(instance Headwind Attribute)

(documentation Headwind EnglishLanguage "&%Headwind is the relative attribute of a 
&%Wind to an object when the force of the wind is applied to the front 
of the object (&%FrontFn).  A headwind can negatively affect the speed 
capability of a vehicle.")

(instance Tailwind Attribute)

(documentation Tailwind EnglishLanguage "&%Tailwind is the relative attribute of a 
&%Wind to an object when the force of the wind is applied to the back  
of the object (&%BackFn).  A tailwind can positively affect the speed 
capability of a vehicle.")

(subclass BeaufortNumber RelationalAttribute)
(documentation BeaufortNumber EnglishLanguage "&%BeaufortNumber is the
&%Attribute for indicating wind force, according to
classifications based on observable weather conditions and later
related to wind speed ranges.")

(=>
  (and
    (instance ?BN BeaufortNumber)
    (attribute ?OBJECT ?BN))
  (instance ?OBJECT Wind))

(instance BeaufortNumberOne BeaufortNumber)
(instance BeaufortNumberTwo BeaufortNumber)
(successorAttribute BeaufortNumberOne BeaufortNumberTwo)
(instance BeaufortNumberThree BeaufortNumber)
(successorAttribute BeaufortNumberTwo BeaufortNumberThree)
(instance BeaufortNumberFour BeaufortNumber)
(successorAttribute BeaufortNumberThree BeaufortNumberFour)
(instance BeaufortNumberFive BeaufortNumber)
(successorAttribute BeaufortNumberFour BeaufortNumberFive)
(instance BeaufortNumberSix BeaufortNumber)
(successorAttribute BeaufortNumberFive BeaufortNumberSix)
(instance BeaufortNumberSeven BeaufortNumber)
(successorAttribute BeaufortNumberSix BeaufortNumberSeven)
(instance BeaufortNumberEight BeaufortNumber)
(successorAttribute BeaufortNumberSeven BeaufortNumberEight)
(instance BeaufortNumberNine BeaufortNumber)
(successorAttribute BeaufortNumberEight BeaufortNumberNine)
(instance BeaufortNumberTen BeaufortNumber)
(successorAttribute BeaufortNumberNine BeaufortNumberTen)
(instance BeaufortNumberEleven BeaufortNumber)
(successorAttribute BeaufortNumberTen BeaufortNumberEleven)
(instance BeaufortNumberTwelve BeaufortNumber)
(successorAttribute BeaufortNumberEleven BeaufortNumberTwelve)

;;----------------------------------------------------------------------

;;  G. Weather & Climate

(subclass WeatherSeason WeatherProcess)
  
(documentation WeatherSeason EnglishLanguage "&%WeatherSeason is the class of seasonal 
processes that are characterized by various weather patterns.  
&%WeatherSeasons may recur on a regular annual basis, on a different 
pattern, or irregularly.")

(subclass Monsoon WeatherSeason)
(subclass HurricaneSeason WeatherSeason)
(subclass ElNino WeatherSeason)

(subclass WeatherSystem WeatherProcess)

(documentation WeatherSystem EnglishLanguage "&%WeatherSystem is the class of 
large-scale atmospheric processes that influence weather in a region 
for 2-5 days.")

(subclass LowPressureWeatherSystem WeatherSystem)

(documentation LowPressureWeatherSystem EnglishLanguage "&%LowPressureWeatherSystem is 
the class of weather systems characterized by low or unstable 
&%barometricPressures.  Low pressure systems typically introduce 
unsettled weather, frequently including storms.")

(=>
  (and
    (instance ?SYSTEM LowPressureWeatherSystem)
    (eventLocated ?SYSTEM ?AREA))
  (and
    (barometricPressure ?AREA (MeasureFn ?AMOUNT InchMercury))
    (lessThan ?AMOUNT 29.5)))

(subclass CyclonicStorm LowPressureWeatherSystem)
(subclass CyclonicStorm Windstorm)

(documentation CyclonicStorm EnglishLanguage "&%CyclonicStorm is the class of 
&%LowPressureWeatherSystems that involve a low pressure area 
surrounded by rapidly rotating winds, with the whole system 
typically moving forward at 20-30 mph.") 

(subclass TropicalCyclone CyclonicStorm)

(documentation TropicalCyclone EnglishLanguage "&%TropicalCyclone is the class of 
&%CyclonicStorms that occur in the &%Tropics and typically have 
rotational winds of hurricane force (74 mph or higher).")

(=>
  (instance ?STORM TropicalCyclone)
  (exists (?PLACE)
    (and
      (instance ?PLACE GeographicArea)
      (geographicSubregion ?PLACE Tropics)
      (eventLocated ?STORM ?PLACE))))

(subclass Typhoon TropicalCyclone)

(subclass HighPressureWeatherSystem WeatherSystem)

(documentation HighPressureWeatherSystem EnglishLanguage "&%HighPressureWeatherSystem is 
the class of weather systems characterized by high &%barometricPressures.  
High pressure systems typically cause clear weather.")

(=>
  (and
    (instance ?SYSTEM HighPressureWeatherSystem)
    (eventLocated ?SYSTEM ?AREA))
  (and
    (barometricPressure ?AREA (MeasureFn ?AMOUNT InchMercury))
    (greaterThan ?AMOUNT 30.2)))

(subclass StormSystem WeatherSystem)

(subclass WeatherFront WeatherProcess)

(documentation WeatherFront EnglishLanguage "&%WeatherFront is the class of weather 
processes that are involve relationships between two air masses, such 
as a high pressure weather system or a low pressure system.")

(subclass WarmFront WeatherFront)

(documentation WarmFront EnglishLanguage "&%WarmFront is the class of transitional 
weather processes occurring between a warm air mass that is advancing 
upon a cool air mass.")

(subclass ColdFront WeatherFront)

(documentation ColdFront EnglishLanguage "&%ColdFront is the class of transitional 
weather processes occurring between a cold air mass that is advancing 
upon a warm air mass.")

(subclass OccludedFront WeatherFront)

(documentation OccludedFront EnglishLanguage "&%OccludedFront is the class of complex 
weather transition processes in which a cold air mass overtakes a warm 
air mass.")

(subclass StationaryFront WeatherFront)

(documentation StationaryFront EnglishLanguage "&%StationaryFront is the class of 
boundary areas between two air masses that are stationary, with neither 
mass presently replacing the other.")


(subclass Thunderstorm WeatherProcess) 
(subclass Waterspout WeatherProcess)  
(subclass Hurricane WeatherProcess)  


;;---------------------------------

;; Weather- and climate-related data

(instance daylightHoursInterval TernaryPredicate)
(domain daylightHoursInterval 1 Region)
(domainSubclass daylightHoursInterval 2 Day)
(domain daylightHoursInterval 3 TimeInterval)

(documentation daylightHoursInterval EnglishLanguage 
"(&%daylightHoursInterval ?PLACE ?DAY ?INTERVAL) means that in the 
&%Region ?PLACE, on the &%Day indicated by ?DAY, there is daylight 
during the &%TimeInterval ?INTERVAL.")

(instance daylightHoursTotal TernaryPredicate)
(domain daylightHoursTotal 1 Region)
(domainSubclass daylightHoursTotal 2 Day)
(domain daylightHoursTotal 3 TimeDuration)

(documentation daylightHoursTotal EnglishLanguage 
"(&%daylightHoursTotal ?PLACE ?DAY ?TIME) means that in the &%Region 
?PLACE, on the &%Day indicated by ?DAY, there is daylight for a 
total &%TimeDuration ?LENGTH.")

(instance cloudCoverFraction BinaryPredicate)
(domain cloudCoverFraction 1 Region)
(domain cloudCoverFraction 2 NonnegativeRealNumber)

(documentation cloudCoverFraction EnglishLanguage "(&%cloudCoverFraction ?AREA ?AMOUNT) 
means that in the &%Region ?AREA, the fraction ?AMOUNT of the sky is 
covered with clouds.")

(subclass ClearWeather WeatherProcess)

(documentation ClearWeather EnglishLanguage "&%ClearWeather represents a condition 
in which less than 30% of the sky is covered with clouds.")

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?WEATHER ClearWeather)
    (eventLocated ?WEATHER ?AREA))
  (exists (?FRACTION)
    (and
      (cloudCoverFraction ?AREA ?FRACTION)
      (lessThan ?FRACTION 0.3))))

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?WEATHER ClearWeather)
    (eventLocated ?WEATHER ?AREA)
    (cloudCoverFraction ?AREA ?FRACTION))
  (lessThan ?FRACTION 0.3))

(subclass PartlyCloudyWeather WeatherProcess)

(documentation PartlyCloudyWeather EnglishLanguage "&%PartlyCloudyWeather 
represents a condition in which between 30% and 70% of the 
sky is covered with clouds.")

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?WEATHER PartlyCloudyWeather)
    (eventLocated ?WEATHER ?AREA))
  (exists (?FRACTION)
    (and
      (cloudCoverFraction ?AREA ?FRACTION)
      (greaterThanOrEqualTo ?FRACTION 0.3)
      (lessThanOrEqualTo ?FRACTION 0.7))))

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?WEATHER PartlyCloudyWeather)
    (eventLocated ?WEATHER ?AREA)
    (cloudCoverFraction ?AREA ?FRACTION))
  (and
    (greaterThanOrEqualTo ?FRACTION 0.3)
    (lessThanOrEqualTo ?FRACTION 0.7)))

(subclass OvercastWeather WeatherProcess)

(documentation OvercastWeather EnglishLanguage "&%OvercastWeather represents
 a condition in which more than 70% of the sky is covered 
with clouds.")

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?WEATHER OvercastWeather)
    (eventLocated ?WEATHER ?AREA))
  (exists (?FRACTION)
    (and
      (cloudCoverFraction ?AREA ?FRACTION)
      (greaterThan ?FRACTION 0.7))))

(=>
  (and
    (instance ?AREA GeographicArea)
    (instance ?WEATHER OvercastWeather)
    (eventLocated ?WEATHER ?AREA)
    (cloudCoverFraction ?AREA ?FRACTION))
  (greaterThan ?FRACTION 0.7))

(instance overcastDaysInPeriod TernaryPredicate)
(domain overcastDaysInPeriod 1 GeographicArea)
(domain overcastDaysInPeriod 2 TimeDuration)
(domain overcastDaysInPeriod 3 NonnegativeRealNumber)

(documentation overcastDaysInPeriod EnglishLanguage 
"(&%overcastDaysInPeriod ?AREA ?PERIOD ?NUMBER) means that during the 
time ?PERIOD, the &%GeographicArea ?AREA experienced ?NUMBER of 
&%OvercastWeather days.")

;; KJN: Moving this to MILO to remove dependencies
;;(instance airTemperature BinaryPredicate)
;;(instance airTemperature AsymmetricRelation)
;;(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.")

(instance seaSurfaceTemperature BinaryPredicate)
(instance seaSurfaceTemperature AsymmetricRelation)
(domain seaSurfaceTemperature 1 WaterArea)
(domain seaSurfaceTemperature 2 ConstantQuantity)

(documentation seaSurfaceTemperature EnglishLanguage 
"(&%seaSurfaceTemperature ?AREA ?TEMP) means that the 
temperature of the sea surface at ?AREA is ?TEMP.  
Temperature may be expressed in some &%UnitOfTemperature, 
including &%CelsiusDegree and &%FahrenheitDegree, among others.")

(instance averageTemperatureForPeriod TernaryPredicate)
(domain averageTemperatureForPeriod 1 GeographicArea)
(domain averageTemperatureForPeriod 2 TimeDuration)
(domain averageTemperatureForPeriod 3 TemperatureMeasure)

(documentation averageTemperatureForPeriod EnglishLanguage 
"(&%averageTemperatureForPeriod ?PLACE ?PERIOD ?AMOUNT) means that 
at the &%GeographicArea ?PLACE, and during the &%TimeDuration 
?PERIOD, the average daily temperature was ?AMOUNT.  Temperature 
may be expressed in some &%UnitOfTemperature, including 
&%CelsiusDegree and &%FahrenheitDegree, among others.")

(instance highestTemperatureForPeriod TernaryPredicate)
(domain highestTemperatureForPeriod 1 GeographicArea)
(domain highestTemperatureForPeriod 2 TimeDuration)
(domain highestTemperatureForPeriod 3 TemperatureMeasure)

(documentation highestTemperatureForPeriod EnglishLanguage 
"(&%highestTemperatureForPeriod ?PLACE ?PERIOD ?AMOUNT) means that 
at the &%GeographicArea ?PLACE, during the &%TimeDuration ?PERIOD, 
the highest temperature was ?AMOUNT.  Temperature may be expressed 
in some &%UnitOfTemperature, including &%CelsiusDegree and 
&%FahrenheitDegree, among others.")

(instance lowestTemperatureForPeriod TernaryPredicate)
(domain lowestTemperatureForPeriod 1 GeographicArea)
(domain lowestTemperatureForPeriod 2 TimeDuration)
(domain lowestTemperatureForPeriod 3 TemperatureMeasure)

(documentation lowestTemperatureForPeriod EnglishLanguage 
"(&%lowestTemperatureForPeriod ?PLACE ?PERIOD ?AMOUNT) means that 
at the &%GeographicArea ?PLACE, during the &%TimeDuration ?PERIOD, 
the highest temperature was ?AMOUNT.  Temperature may be expressed 
in some &%UnitOfTemperature, including &%CelsiusDegree and 
&%FahrenheitDegree, among others.")

;;---------------------------------

(instance relativeHumidity BinaryPredicate)
(instance relativeHumidity AsymmetricRelation)
(domain relativeHumidity 1 Object)
(domain relativeHumidity 2 NonnegativeRealNumber)

(documentation relativeHumidity EnglishLanguage "(&%relativeHumidity ?AREA ?AMOUNT) 
means that the amount of moisture in the air at ?AREA is ?AMOUNT.  
Relative humidity expresses the amount of moisture as a percentage, 
or ratio, between the actual moisture saturation of the air compared 
to the potential moisture saturation of the air.  At full (potential) 
saturation, precipitation would occur.")

(=>
  (relativeHumidity ?PLACE 1)
  (exists (?FALLING)
    (and
      (instance ?FALLING Precipitation)
      (eventLocated ?FALLING ?PLACE))))

(subclass Raining Precipitation)

(documentation Raining EnglishLanguage "&%Raining is a precipitation process 
in which water falls in a &%Liquid state.")

(=>
  (instance ?PROCESS Raining)
  (precipitationState ?PROCESS Liquid))

(subclass FreezingRain Precipitation)

(=>
  (instance ?PROCESS FreezingRain)
  (precipitationState ?PROCESS Liquid))

(=>
  (and
    (instance ?PROCESS FreezingRain)
    (patient ?PROCESS ?STUFF)
    (instance ?STUFF Water))
  (holdsDuring (ImmediateFutureFn (WhenFn ?PROCESS)) (attribute ?STUFF Solid)))

(documentation Snowing EnglishLanguage "Snowing is a precipitation process 
in which water falls in a &%Solid state.")
(subclass Snowing Precipitation)

(=>
  (instance ?PROCESS Snowing)
  (precipitationState ?PROCESS Solid))

(subclass Sleeting Precipitation)

(=>
  (instance ?PROCESS Sleeting)
  (precipitationState ?PROCESS Solid))

(subclass Hailing Precipitation)
(documentation Hailing EnglishLanguage "Hailing is a precipitation process 
in which &%Water falls in a &%Solid state with round, hard pellets.")

(=>
  (instance ?PROCESS Hailing)
  (precipitationState ?PROCESS Solid))

(instance precipitationState BinaryPredicate)
(instance precipitationState AsymmetricRelation)
(domain precipitationState 1 WeatherProcess)
(domain precipitationState 2 PhysicalState)

(documentation precipitationState EnglishLanguage 
"(&%precipitationState ?EVENT ?STATE) means that in the &%Precipitation 
?EVENT, the stuff falling is in the &%PhysicalState ?STATE (e.g., 
&%Liquid or &%Solid ice).")

(=>
  (precipitationState ?EVENT ?STATE)
  (exists (?STUFF)
    (and
      (instance ?STUFF Water)
      (patient ?EVENT ?STUFF)
      (attribute ?STUFF ?STATE))))

(instance precipitationRate BinaryPredicate)
(instance precipitationRate AsymmetricRelation)
(domain precipitationRate 1 Precipitation)
(domain precipitationRate 2 FunctionQuantity)

(documentation precipitationRate EnglishLanguage 
"(&%precipitationRate ?EVENT ?RATE) means that in the 
&%Precipitation ?EVENT, the precipitation falls at a rate 
of ?RATE.")

(instance precipitationAmount BinaryPredicate)
(instance precipitationAmount AsymmetricRelation)
(domain precipitationAmount 1 Precipitation)
(domain precipitationAmount 2 ConstantQuantity) 

(documentation precipitationAmount EnglishLanguage 
"(&%precipitationAmount ?EVENT ?AMOUNT) means that in the 
&%Precipitation process ?EVENT, the quantity of precipitation 
that fell was ?AMOUNT.")

(instance averagePrecipitationForPeriod TernaryPredicate)
(domain averagePrecipitationForPeriod 1 GeographicArea)
(domain averagePrecipitationForPeriod 2 TimeDuration)
(domain averagePrecipitationForPeriod 3 ConstantQuantity)

(documentation averagePrecipitationForPeriod EnglishLanguage 
"(&%averagePrecipitationForPeriod ?PLACE ?PERIOD ?AMOUNT) means 
that at the &%GeographicArea ?PLACE, and during the &%TimeDuration 
?PERIOD, the average daily precipitation was ?AMOUNT.")

(instance totalPrecipitationForPeriod TernaryPredicate)
(domain totalPrecipitationForPeriod 1 GeographicArea)
(domain totalPrecipitationForPeriod 2 TimeDuration)
(domain totalPrecipitationForPeriod 3 ConstantQuantity)

(documentation totalPrecipitationForPeriod EnglishLanguage 
"(&%totalPrecipitationForPeriod ?PLACE ?PERIOD ?AMOUNT) means that 
at the &%GeographicArea ?PLACE, and during the &%TimeDuration ?PERIOD, 
the total amount of precipitation was ?AMOUNT.")


;---------------------------------------------------------------------------

;;   H. Vegetation and biomes

(instance vegetationType BinaryPredicate)
(instance vegetationType AsymmetricRelation)

(documentation vegetationType EnglishLanguage "(&%vegetationType ?area ?type) associates 
a particular &%GeographicArea with a type of &%Plant that is found there.")

(domain vegetationType 1 GeographicArea)
(domainSubclass vegetationType 2 Plant)

(=>
  (and
    (vegetationType ?REGION ?TYPE)
    (subclass ?TYPE Plant)
    (instance ?REGION GeographicArea))
  (exists (?PLANT)
    (and
      (instance ?PLANT ?TYPE)
      (located ?PLANT ?REGION))))
(=>
  (and
    (not (vegetationType ?REGION ?TYPE))
    (subclass ?TYPE Plant)
    (instance ?REGION GeographicArea))
  (not   (exists (?PLANT)
      (and
        (instance ?PLANT ?TYPE)
        (located ?PLANT ?REGION)))))

(instance vegetationTypePattern TernaryPredicate)

(documentation vegetationTypePattern EnglishLanguage 
"(&%vegetationTypePattern ?AREA ?TYPE ?DENSITY) means that in the 
&%GeographicArea ?AREA the &%Plant ?TYPE is found with ?DENSITY.")

(domain vegetationTypePattern 1 GeographicArea)
(domainSubclass vegetationTypePattern 2 Plant)
(domain vegetationTypePattern 3 Attribute)

(=>
  (vegetationTypePattern ?AREA ?TYPE ?DENSITY)
  (vegetationType ?AREA ?TYPE))

(instance CanopiedVegetation Attribute)

(documentation CanopiedVegetation EnglishLanguage "&%CanopiedVegetation describes the 
density of vegetation in a &%RainForest or &%Jungle.")

(instance DenseVegetation Attribute)

(documentation DenseVegetation EnglishLanguage "&%DenseVegetation describes the 
density of vegetation in a &%Forest.")

(instance GroundCoverVegetation Attribute)

(documentation GroundCoverVegetation EnglishLanguage "&%GroundCoverVegetation 
describes the density of uniform low vegetation in a field or meadow.")

(instance ScatteredVegetation Attribute)

(documentation ScatteredVegetation EnglishLanguage "&%ScatteredVegetation describes 
the pattern of vegetation in which plants appear at intervals.")

(instance SparseVegetation Attribute)

(documentation SparseVegetation EnglishLanguage "&%SparseVegetation describes the 
pattern of vegetation in an area where there is very little vegetation.")

;; KJN: Moving this to MILO as it has too many dependencies there.
;;(subclass BotanicalTree FloweringPlant)

;;(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 Shrub FloweringPlant)

(documentation Shrub EnglishLanguage "&%Shrub is the class of low, perennial, 
typically multi-stemmed woody plants, called shrubs or bushes.")

(=>
  (and
    (instance ?TREE BotanicalTree)
    (instance ?BUSH Shrub)
    (height ?TREE ?TALL)
    (height ?BUSH ?SHORT))
  (greaterThan ?TALL ?SHORT))

(subclass Lichen NonFloweringPlant)

(documentation Lichen EnglishLanguage "&%Lichen is the class of complex thallyphytic 
plants made up of &%Alga and &%Fungus growing symbiotically.")

(=>
  (instance ?LICH Lichen)
  (exists (?ALGA)
    (and 
      (instance ?ALGA Alga)
      (part ?ALGA ?LICH))))

(=>
  (instance ?LICH Lichen)
  (exists (?FUNG)
    (and 
      (instance ?FUNG Fungus)
      (part ?FUNG ?LICH))))

;;--------------------------------

; Biome types:

(subclass Biome Ecosystem)

(documentation Biome EnglishLanguage "&%Biome is the class of &%GeographicAreas 
representing major kinds of ecological communities, that is, areas in 
which certain kinds of plants, animals, weather, and terrain interact 
to produce and support a distinctive ecosystem.")

(subclass Forest LandArea)
(disjoint Forest Field)
(documentation Forest EnglishLanguage "&%Forest is the class of large &%LandAreas that 
are covered by trees and associated undergrowth, either growing wild or 
managed for the purpose of timber production.")  

(=>
  (instance ?FOREST Forest)
  (vegetationTypePattern ?FOREST BotanicalTree DenseVegetation))

(subclass RainForest Biome)
(subclass RainForest Forest)

(documentation RainForest EnglishLanguage "&%RainForest is the subclass of &%LandAreas 
that are densely planted with trees.")

(=>
  (instance ?FOREST RainForest)
  (vegetationTypePattern ?FOREST BotanicalTree CanopiedVegetation))

(subclass TropicalRainForest RainForest)
(subclass TemperateRainForest TemperateHardwoodForest)
(subclass TemperateRainForest RainForest)

(subclass TemperateHardwoodForest Biome)
(subclass TemperateHardwoodForest Forest)

(subclass BorealForest Biome)
(subclass BorealForest Forest)
(subclass PineTree BotanicalTree)

(documentation PineTree EnglishLanguage "Pines are coniferous &%BotanicalTrees of the 
genus Pinus, in the family Pinaceae.  They are evergreens, with needle-
shaped leaves and propagate by dropping pine cones, which contains
seeds.  (from Wikipedia)") 

(=>
  (instance ?FOREST BorealForest)
  (vegetationType ?FOREST PineTree))

(subclass Jungle Biome)
(subclass Jungle LandArea)

(documentation Jungle EnglishLanguage "&%Jungle is a subclass of fertile &%LandAreas 
that are overgrown with tropical vegetation.")

(=>
  (instance ?FOREST Jungle)
  (vegetationTypePattern ?FOREST Plant DenseVegetation))

(subclass Swamp Biome)
(documentation Swamp EnglishLanguage "&%Swamp is a subclass of &%Biome 
that is &%Damp and overgrown with vegetation.")

(=>
  (instance ?SWAMP Swamp)
  (attribute ?SWAMP Damp))

(=>
  (instance ?SWAMP Swamp)
  (vegetationTypePattern ?SWAMP Grass DenseVegetation))


(subclass Desert LandArea)
(documentation Desert EnglishLanguage "&%Desert is a subclass of &%LandAreas that are 
arid regions having sparse or no vegetation.")

(=>
  (instance ?DESERT Desert)
  (attribute ?DESERT Dry))

(=>
  (instance ?DESERT Desert)
  (or
    (groundSurfaceType ?DESERT Rock)
    (groundSurfaceType ?DESERT Sand)))  

(=>
  (instance ?DESERT Desert)
  (not (vegetationType ?DESERT BotanicalTree)))

(subclass Oasis Biome)
(subclass Oasis LandArea)

(documentation Oasis EnglishLanguage "&%Oasis is a subclass of &%LandAreas that are 
fertile places within a desert, which have water and some vegetation.")

(=>
  (instance ?OASIS Oasis)
  (exists (?DESERT)
    (and
      (instance ?DESERT Desert)
      (located ?OASIS ?DESERT))))

(=>
  (instance ?OASIS Oasis)
  (exists (?WATER)
    (and
      (instance ?WATER FreshWaterArea)
      (located ?WATER ?OASIS))))

(=>
  (instance ?OASIS Oasis)
  (attribute ?OASIS FertileTerrain))

(subclass Grassland Biome)
(subclass Grassland LandArea)

(documentation Grassland EnglishLanguage "&%Grassland is the class of &%LandAreas 
where the predominant vegetation is some kind of grass.")

(=>
  (instance ?PLAIN Grassland)
  (vegetationTypePattern ?PLAIN Grass GroundCoverVegetation))

(subclass Prairie Grassland)
(subclass Prairie Plain)

(documentation Prairie EnglishLanguage "&%Prairie is a class of large plains 
&%LandAreas with tall grass vegetation.")

(subclass Pampa Grassland)
(subclass Pampa Plain)

(documentation Pampa EnglishLanguage "&%Pampa is a class of vast, level, typically grassy 
&%Plains of land in South America.")

(=> 
  (instance ?PLAIN Pampa)
  (located ?PLAIN SouthAmerica))

(subclass Savanna Grassland)
(subclass Savanna Plain)

(documentation Savanna EnglishLanguage "&%Savanna is a class of tropical or subtropical 
&%Grasslands, typically treeless.")

(=>
  (instance ?PLAIN Savanna)
  (not (vegetationType ?PLAIN BotanicalTree)))

(subclass Steppe Plain)

(documentation Steppe EnglishLanguage "&%Steppe is a subclass of &%Plain, representing 
vast, level, treeless areas of land in Asia or SE Europe.")

(=>
  (instance ?PLAIN Steppe)
  (not (vegetationType ?PLAIN BotanicalTree)))

(=>
  (instance ?PLAIN Steppe)
  (or
    (located ?PLAIN Europe)
    (located ?PLAIN Asia)))

(subclass Veldt Grassland)
(subclass Veldt Plain)

(documentation Veldt EnglishLanguage "&%Veldt is a subclass of &%Grasslands which have 
scattered shrubs or trees.")

(=>
  (instance ?PLAIN Veldt)
  (located ?PLAIN Africa))

(=>
  (instance ?PLAIN Veldt)
  (vegetationTypePattern ?PLAIN Shrub ScatteredVegetation))
          
(subclass Tundra Biome)
(subclass Tundra Plain)
; (subclass Tundra ArcticRegion)

(documentation Tundra EnglishLanguage "&%Tundra is a subclass of flat, treeless &%Plains 
areas lying within the &%ArcticRegion.  Subsoil in &%Tundra is permanently 
frozen.")

(=>
  (instance ?PLAIN Tundra)
  (vegetationType ?PLAIN Lichen))

(=>
  (instance ?PLAIN Tundra)
  (vegetationType ?PLAIN Moss))

;; KJN: Moving this to Mid-level-ontology.kif to remove dependencies  
;;(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))))

;;------------------------------------------------------------------------

;;  I. Natural Disasters (covered in CIA World Fact Book)

(subclass Landslide GeologicalProcess)
(subclass Mudslide Landslide)
(subclass Mudflow Landslide) 
(subclass Rockslide Landslide)
; TurbidityCurrents are underwater mudslides w/salt water
(subclass WindProcess WeatherProcess)
(subclass Windstorm WindProcess) 
(subclass StrongWind WindProcess)
(subclass Sirocco WindProcess)
(subclass HarmattanWind WindProcess)
(subclass Khamsin Windstorm)
(subclass Mistral WindProcess)
(subclass Ghibli WindProcess)
(subclass ChinookWind WindProcess)
(subclass Pampero Windstorm)
(subclass Squall WeatherProcess)
(subclass SevereThunderstorm WeatherProcess)
(subclass HeavyRaining Raining)
(subclass DustStorm WeatherProcess)
(subclass Sandstorm WeatherProcess)
(subclass Blizzard WeatherProcess)
(subclass Zud WeatherProcess)
(subclass HeavySurf WeatherProcess)
(subclass HeavySurf WaterMotion)
(subclass CoastalFlooding Flooding)
(subclass FlashFlooding Flooding)
(subclass MaritimeHazard LandForm) 
(subclass Reef MaritimeHazard) 
(subclass Shoal MaritimeHazard)
(subclass Iceberg SelfConnectedObject)
(subclass SeaIce Ice) ;; incl glaciers in sea, floes, bergs
(subclass Icing WeatherProcess)
(subclass Icing Freezing)
(subclass Fogging WeatherProcess)
(subclass AtmosphericHazing WeatherProcess)
(subclass VolcanicGasRelease VolcanicEruption)
(subclass LandSubsidence GeologicalProcess)  ;; &%elevation decreases

(=>
  (instance ?SINKING LandSubsidence)
  (exists (?LAND)
    (and
      (instance ?LAND LandArea)
      (eventLocated ?SINKING ?LAND)
      (patient ?SINKING ?LAND))))

(=>
  (and
    (instance ?SINKING LandSubsidence)
    (patient ?SINKING ?LAND)
    (instance ?LAND LandArea)
    (elevation ?LAND ?HEIGHT1))
  (holdsDuring (ImmediateFutureFn (WhenFn ?SINKING))
    (exists (?HEIGHT2)
      (and
        (elevation ?LAND ?HEIGHT2)
        (lessThan ?HEIGHT2 ?HEIGHT1)))))

(subclass Locust Animal)
(subclass Swarming Motion)
(subclass Famine SocialInteraction)

;;------------------------------------------------------------------------

;; J. Environmental Areas of Concern

(subclass AreaOfConcern RelationalAttribute)

(documentation AreaOfConcern EnglishLanguage "&%AreaOfConcern is a subclass of 
&%Attributes that represent and classify the kinds of interests that 
agents have.")

(instance regionalIssue BinaryPredicate)
(domain regionalIssue 1 GeographicArea)
(domain regionalIssue 2 AreaOfConcern)

(documentation regionalIssue EnglishLanguage "(&%regionalIssue ?AREA ?ISSUE) means 
that the &%AreaOfConcern ?ISSUE is relevant to a problem in the 
&%GeographicArea ?AREA.")

; rework this AreaOfConcern hierarchy, and associate the relevant processes:

(subclass EnvironmentalIssue AreaOfConcern)
(documentation EnvironmentalIssue EnglishLanguage "The class of Attributes that
stand for issues of environmental concern.")

(instance AcidificationIssue EnvironmentalIssue)
(instance AcidRainIssue EnvironmentalIssue)
(instance AerosolParticulateIssue EnvironmentalIssue)
(instance DeforestationIssue EnvironmentalIssue)
(subclass SoilQualityIssue EnvironmentalIssue)
(instance SoilErosionIssue SoilQualityIssue)
(instance SoilDegradationIssue SoilQualityIssue)
(instance SoilExhaustionIssue SoilQualityIssue)
(subclass EnvironmentalWaterIssue EnvironmentalIssue)
(instance LimitedFreshWaterIssue EnvironmentalWaterIssue)  ;; WaterResource or FreshwaterResource
(instance InadequatePotableWaterIssue EnvironmentalWaterIssue)
(instance OvergrazingIssue EnvironmentalIssue)
(instance DesertificationIssue EnvironmentalIssue)
(instance AirPollutionIssue PollutionIssue)
(instance SoilPollutionIssue PollutionIssue)
(instance SoilPollutionIssue SoilQualityIssue)

(instance WaterPollutionIssue EnvironmentalWaterIssue)
(subAttribute GroundwaterPollutionIssue WaterPollutionIssue)

(subclass PollutionIssue EnvironmentalIssue)
(instance IndustrialPollutionIssue PollutionIssue)
(instance VehicleEmissionsIssue PollutionIssue)
(instance PowerPlantEmissionsIssue PollutionIssue)
(instance ToxicWasteDisposalIssue PollutionIssue)
(instance RawSewagePollutionIssue PollutionIssue)

(instance WaterInfrastructureIssue EnvironmentalIssue)
(subAttribute WastewaterIssue WaterInfrastructureIssue)
(instance SolidWasteDisposalIssue PollutionIssue)
(instance OverpopulationIssue EnvironmentalIssue)
(subclass BiodiversityIssue EnvironmentalIssue)
(instance SiltationIssue EnvironmentalIssue)
(instance OzoneDepletionIssue EnvironmentalIssue)
(instance UVLevelsIssue EnvironmentalIssue)
(instance ClimateChangeIssue EnvironmentalIssue)
(subAttribute ClimateWarmingIssue ClimateChangeIssue)
(instance WaterManagementIssue EnvironmentalIssue) ;; see WaterInfrastructureIssue 
(instance EndangeredSpeciesIssue BiodiversityIssue)
(subAttribute EndangeredMarineWildlifeIssue EndangeredSpeciesIssue)
(instance FragileEcosystemIssue BiodiversityIssue)
(subAttribute ThinningPolarIcepackIssue ClimateChangeIssue)
(instance ToxicChemicalPollutionIssue PollutionIssue)
(instance NuclearEnvironmentalIssue PollutionIssue)
(instance OilPollutionIssue PollutionIssue)
(instance FishStockDepletionIssue EnvironmentalIssue)
(instance UrbanizationIssue EnvironmentalIssue) ;; urban waste disposal
(subAttribute SoilSalinityIssue SoilDegradationIssue)
(instance FarmingPracticesIssue EnvironmentalIssue)
(instance AgriculturalChemicalsIssue EnvironmentalIssue) ;; nitrogen, phosphorus - agricultural runoff
(instance PesticideIssue EnvironmentalIssue)
(instance LandClearingIssue BiodiversityIssue) ;; ?
(instance ForestDegradation EnvironmentalIssue)
(subAttribute HydrocarbonEmissionsIssue AirPollutionIssue)
(instance CoastalDegradation   EnvironmentalIssue) ;; damage to coastline, coral reefs, and sea vegetation
(instance CoralReefDecayIssue EnvironmentalIssue)
(instance CoastalMarinePollutionIssue EnvironmentalIssue)

(instance PopulationMigrationIssue EnvironmentalIssue)

(subclass DiseaseConditionsIssue EnvironmentalIssue)
(instance WaterBorneDiseaseIssue EnvironmentalIssue)
(instance InadequateSanitationIssue EnvironmentalIssue)

(instance PollutedFishStocksIssue EnvironmentalIssue)
(instance NuclearPollutionIssue EnvironmentalIssue)
(instance WildlifePoachingIssue EnvironmentalIssue)
(instance AsbestosDisposalIssue EnvironmentalIssue)
(instance IllegalWildlifeTradeIssue EnvironmentalIssue)
(instance WetlandDegradationIssue EnvironmentalIssue)
(instance LossOfHabitatIssue EnvironmentalIssue)
(instance AgriculturalExpansionIssue EnvironmentalIssue)
(instance MiningPollutionIssue EnvironmentalIssue)
(instance LandminesIssue EnvironmentalIssue)
(instance DroughtIssue EnvironmentalIssue)
(instance IndigenousPeoplesPreservationIssue EnvironmentalIssue)
(instance InvasiveSpeciesIssue EnvironmentalIssue)
(instance DriftNetFishingIssue EnvironmentalIssue)
(instance UnexplodedOrdinanceIssue EnvironmentalIssue)
(instance FamineIssue EnvironmentalIssue)
(instance OverhuntingIssue EnvironmentalIssue)

; ResourceDepletion - air, water, wildlife, farmland, minerals
; Pollution - air, water, soil: from organics, oil, hydrocar, metallurg
; Sanitation - water, food supply, toxicity

;;--------------------------------

;; Misc

(instance GeographicPartTypeFn BinaryFunction)
(domainSubclass GeographicPartTypeFn 1 GeographicArea)
(domain GeographicPartTypeFn 2 GeographicArea)
(rangeSubclass GeographicPartTypeFn GeographicArea)
(documentation GeographicPartTypeFn
EnglishLanguage "(&%GeographicPartTypeFn ?TYPE ?AREA) evaluates
to the &%Class of all &%instances of ?TYPE that are &%located in
the &%GeographicArea ?AREA.")

(=>
  (equal ?CLASS (GeographicPartTypeFn ?TYPE ?AREA))
  (subclass ?CLASS ?TYPE))

;; NS: Depending on the bindings/substitutions for ?TYPE and ?AREA,
;; the consequent could be much more specific than &%part.
(=>
  (instance ?GEO (GeographicPartTypeFn ?TYPE ?AREA))
  (part ?GEO ?AREA))

(=>
  (and
    (instance ?GEO (GeographicPartTypeFn ?TYPE ?AREA))
    (subclass ?TYPE GeopoliticalArea)
    (instance ?AREA GeopoliticalArea))
  (geopoliticalSubdivision ?GEO ?AREA))

(=>
  (and
    (instance ?GEO (GeographicPartTypeFn StateOrProvince ?AREA))
    (instance ?AREA Nation))
  (primaryGeopoliticalSubdivision ?GEO ?AREA))

;; NS: TO DO: Much more should be said about England and Wales
;; beyond what is represented here.
(instance England GeographicArea)
(documentation England EnglishLanguage "&%England, with &%Wales,
&%Scotland, and &%NorthernIreland, is one of the four constituent
&%Nations of the &%UnitedKingdom.")

(orientation Scotland England North)
(meetsSpatially Scotland England)
(orientation NorthernIreland Scotland Southwest)
(orientation NorthernIreland England Northwest)

(instance Wales GeographicArea)
(documentation Wales EnglishLanguage "&%Wales, with &%England,
&%Scotland, and &%NorthernIreland, is one of the four constituent
&%Nations of the &%UnitedKingdom.")

(orientation Wales England West)
(meetsSpatially Wales England)
(orientation NorthernIreland Wales Northwest)
(orientation Scotland Wales North)
(orientation IsleOfMan NorthernIreland East)
(orientation Ireland Wales West)

(primaryGeopoliticalSubdivision Scotland UnitedKingdom)
(primaryGeopoliticalSubdivision NorthernIreland UnitedKingdom)
(primaryGeopoliticalSubdivision England UnitedKingdom)
(primaryGeopoliticalSubdivision Wales UnitedKingdom)

;; NS: Note that in 2007, Denmark's 13 "counties" were replaced
;; by five administrative "regions".

(equal AmericanState (GeographicPartTypeFn StateOrProvince UnitedStates))
