;; Ontology of cars and car parts

;; 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.

;; Author: Adam Pease, Articulate Software, apease [at] articulatesoftware dot com

;; We ask that people using or referencing this work cite our primary paper and book:

;; 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

;; Pease, A., (2011). Ontology: A Practical Guide. Articulate Software Press, 
;; Angwin, CA. ISBN 978-1-889455-10-5.

(=>
  (instance ?C Combustion)
  (exists (?O)
    (and
      (instance ?O Oxygen)
      (resource ?C ?O))))

(documentation InternalCombustionEngine EnglishLanguage "The internal combustion 
engine is an engine in which the combustion of a fuel (normally a fossil fuel) 
occurs with an oxidizer (usually air) in a combustion chamber. In an internal 
combustion engine, the expansion of the high-temperature and high -pressure 
gases produced by combustion apply direct force to some component of the engine. 
This force is applied typically to pistons, turbine blades, or a nozzle. This 
force moves the component over a distance, transforming chemical energy into 
useful mechanical energy. 
  The term internal combustion engine usually refers to an engine in which 
combustion is intermittent, such as the more familiar four-stroke and two-stroke 
piston engines, along with variants, such as the six-stroke piston engine and 
the Wankel rotary engine. A second class of internal combustion engines use 
continuous combustion: gas turbines, jet engines and most rocket engines, each 
of which are internal combustion engines on the same principle as previously 
described.
  The internal combustion engine (or ICE) is quite different from external 
combustion engines, such as steam or Stirling engines, in which the energy is 
delivered to a working fluid not consisting of, mixed with, or contaminated by 
combustion products. [from Wikipedia]")

(=>
  (instance ?I InternalCombustionEngine)
  (hasPurpose ?I
    (exists (?F ?C)
      (and
        (instance ?F Fuel)
        (instance ?C Combustion)
        (instrument ?C ?I)
        (resource ?C ?F)))))

(=>
  (instance ?I InternalCombustionEngine)
  (hasPurpose ?I
    (exists (?C ?M ?P)
      (and
        (instance ?C Combustion)
        (instance ?M Motion)
        (part ?P ?I)
        (patient ?M ?P)))))

(subclass FuelVapor GasMixture)
(termFormat EnglishLanguage FuelVapor "fuel vapor")
(documentation FuelVapor EnglishLanguage "A mixture of a gas (often &%Air) 
and fuel, typically produced intentionally in &%Engines for the purpose of 
&%Combustion.")

(=>
  (instance ?FV FuelVapor)
  (exists (?F)
    (and 
      (instance ?F Fuel)
      (part ?F ?FV))))

(subclass EngineCycle Motion)
(documentation EngineCycle EnglishLanguage "A complete cycle of &%Engine
phases, including a repeat of the first phase.  In a &%FourStrokeEngine
this means intake, compression, combustion, exhaust and back to intake.")

(subclass ContinuousCombustionEngine InternalCombustionEngine)
(documentation ContinuousCombustionEngine EnglishLanguage "An &%Engine, such as
used in a &%Rocket where &%Combustion is continuous, rather than intermittent,
as in a modern automobile gas engine.")

(subclass Turbine InternalCombustionEngine)
(subclass IntermittentCombustionEngine InternalCombustionEngine)
(documentation IntermittentCombustionEngine EnglishLanguage "An &%Engine, such
as found in a modern &%Automobile, in which &%Combustion is not continuous,
as in a &%Rocket, but rather a rapid series of small &%Explosions.")

(subclass FourStrokeEngine IntermittentCombustionEngine)
(externalImage FourStrokeEngine "http://upload.wikimedia.org/wikipedia/commons/d/dc/4StrokeEngine_Ortho_3D_Small.gif")
(termFormat EnglishLanguage FourStrokeEngine "four stroke engine")
(documentation FourStrokeEngine EnglishLanguage "&%InternalCombustionEngines based on the 
four-stroke (Otto cycle) have one power stroke for every four strokes 
(up-down-up-down) and employ spark plug ignition. &%Combustion occurs 
rapidly, and during combustion the volume varies little (constant 
volume). They are used in cars, larger boats, some motorcycles, and 
many light aircraft. They are generally quieter, more efficient, and 
larger than their &%TwoStrokeEngine counterparts. [from Wikipedia]")

(=>
  (instance ?FSE FourStrokeEngine)
  (exists (?C)
    (and
      (instance ?C EngineCylinder)
      (part ?C ?FSE))))

(=>
  (instance ?FSE FourStrokeEngine)
  (hasPurpose ?FSE
    (exists (?I ?CM ?CB ?E ?I2)
      (and
        (instance ?I FourStrokeIntake)
        (instance ?CM FourStrokeCompression)
        (instance ?CB FourStrokeCombustion)
        (instance ?E FourStrokeExhaust)
        (instance ?I2 FourStrokeIntake)
        (eventLocated ?I ?FSE)
        (eventLocated ?CM ?FSE)
        (eventLocated ?CB ?FSE)
        (eventLocated ?E ?FSE)
        (eventLocated ?I2 ?FSE)
        (meetsTemporally ?I ?CM)
        (meetsTemporally ?CM ?CB)
        (meetsTemporally ?CB ?E)
        (meetsTemporally ?E ?I2)))))

(subclass FourStrokeEngineCycle EngineCycle)
(termFormat EnglishLanguage FourStrokeEngineCycle "four stroke engine cycle")
(documentation FourStrokeEngineCycle EnglishLanguage "The &%Processes that
occur in a &%FourStrokeEngine. Such a cycle necessarily includes each instance
of one of the four strokes, in sequence, followed by another intake stroke.")

(=>
  (instance ?F FourStrokeEngineCycle)
  (exists (?E)
    (and
      (instance ?E FourStrokeEngine)
      (eventLocated ?F ?E))))
    
(=>
  (instance ?FSE FourStrokeEngineCycle)
  (exists (?I ?CM ?CB ?E ?I2)
    (and
      (instance ?I FourStrokeIntake)
      (instance ?CM FourStrokeCompression)
      (instance ?CB FourStrokeCombustion)
      (instance ?E FourStrokeExhaust)
      (instance ?I2 FourStrokeIntake)
      (subProcess ?I ?FSE)
      (subProcess ?CM ?FSE)
      (subProcess ?CB ?FSE)
      (subProcess ?E ?FSE)
      (subProcess ?I2 ?FSE)
      (meetsTemporally ?I ?CM)
      (meetsTemporally ?CM ?CB)
      (meetsTemporally ?CB ?E)
      (meetsTemporally ?E ?I2))))

(subclass FourStrokeIntake Motion)
(termFormat EnglishLanguage FourStrokeIntake "four stroke intake")
(documentation FourStrokeIntake EnglishLanguage "In this cycle of a four
stroke engine, air and vaporized fuel are drawn in.")

(=>
  (and
    (instance ?F FourStrokeIntake)
    (instance ?C EngineCylinder)
    (instance ?I InternalCombustionChamber)
    (equal ?C (HoleHostFn ?I))
    (eventLocated ?F ?C))
  (exists (?FV ?M)
    (and
      (instance ?M GasMotion)
      (instance ?FV FuelVapor)
      (subProcess ?M ?F)
      (destination ?M ?I)
      (patient ?M ?FV))))

(subclass FourStrokeCompression Motion)
(termFormat EnglishLanguage FourStrokeCompression "four stroke compression")
(documentation FourStrokeCompression EnglishLanguage "In this cycle of a four
stroke engine, fuel vapor and air are compressed and ignited.")

(=>
  (and
    (instance ?F FourStrokeCompression)
    (instance ?C EngineCylinder)
    (instance ?I InternalCombustionChamber)
    (equal ?C (HoleHostFn ?I))
    (eventLocated ?F ?C))
  (holdsDuring 
    (EndFn (WhenFn ?F))
    (attribute ?I Pressurized)))

(subclass FourStrokeCombustion Motion)
(termFormat EnglishLanguage FourStrokeCombustion "four stroke combustion")
(documentation FourStrokeCombustion EnglishLanguage "In this cycle of a four
stroke engine, fuel combusts and piston is pushed downwards.")

(=>
  (and
    (instance ?F FourStrokeCombustion)
    (instance ?C EngineCylinder)
    (instance ?I InternalCombustionChamber)
    (equal ?C (HoleHostFn ?I))
    (eventLocated ?F ?C))
  (exists (?CO) 
    (and
      (instance ?CO Combustion)
      (subProcess ?CO ?F))))

(subclass FourStrokeExhaust Motion)
(termFormat EnglishLanguage FourStrokeExhaust "four stroke exhaust")
(documentation FourStrokeExhaust EnglishLanguage "In this cycle of a four
stroke engine, exhaust is driven out. During the 1st, 2nd, and 4th stroke 
the piston is relying on power and the momentum generated by the other pistons.")

(=>
  (and
    (instance ?F FourStrokeExhaust)
    (instance ?C EngineCylinder)
    (instance ?I InternalCombustionChamber)
    (equal ?C (HoleHostFn ?I))
    (eventLocated ?F ?C))
  (exists (?E ?M)
    (and
      (instance ?M GasMotion)
      (instance ?E Exhaust)
      (subProcess ?M ?F)
      (origin ?M ?I)
      (patient ?M ?E))))

(subclass TwoStrokeEngine IntermittentCombustionEngine)
(termFormat EnglishLanguage TwoStrokeEngine "two stroke engine")
(documentation TwoStrokeEngine EnglishLanguage "Engines based on the 
two-stroke cycle use two strokes (one up, one down) for every power 
stroke. Since there are no dedicated intake or exhaust strokes, 
alternative methods must be used to scavenge the cylinders. The most 
common method in spark-ignition two-strokes is to use the downward 
motion of the piston to pressurize fresh charge in the &%Crankcase, 
which is then blown through the &%Cylinder through ports in the 
cylinder walls. [from Wikipedia]")

(subclass TwoStrokeEngineCycle EngineCycle)
(termFormat EnglishLanguage TwoStrokeEngineCycle "two stroke engine cycle")
(documentation TwoStrokeEngineCycle EnglishLanguage "The &%Processes that
occur in a &%TwoStrokeEngine. Such a cycle necessarily includes each instance
of one of the strokes, in sequence, followed by another intake stroke.")

(=>
  (instance ?F TwoStrokeEngineCycle)
  (exists (?E)
    (and
      (instance ?E TwoStrokeEngine)
      (eventLocated ?F ?E))))

(=>
  (instance ?T TwoStrokeEngineCycle)
  (exists (?I ?C ?TT ?I2)
    (and
      (instance ?I TwoStrokeIntake)
      (instance ?C TwoStrokeCompression)
      (instance ?TT TwoStrokeTransfer)
      (instance ?I2 TwoStrokeIntake)
      (subProcess ?I ?T)
      (subProcess ?C ?T)
      (subProcess ?TT ?T)
      (subProcess ?I2 ?T)
      (meetsTemporally ?I ?C)
      (meetsTemporally ?C ?TT)
      (meetsTemporally ?TT ?I2))))

(=>
  (instance ?I IntermittentCombustionEngine)
  (hasPurpose ?I
    (exists (?E ?M)
      (and
        (instance ?E Explosion)
        (instance ?M Motion)
        (eventLocated ?E ?I)
        (eventLocated ?M ?I)
        (causes ?E ?M)))))

(subclass Piston Artifact)
(termFormat EnglishLanguage Piston "piston")
(documentation Piston EnglishLanguage "A piston is a component of 
reciprocating engines, reciprocating pumps, gas compressors and 
pneumatic cylinders, among other similar mechanisms. It is the 
moving component that is contained by a cylinder and is made gas-
tight by piston rings. In an engine, its purpose is to transfer 
force from expanding gas in the cylinder to the crankshaft via a 
piston rod and/or connecting rod. In a pump, the function is 
reversed and force is transferred from the crankshaft to the 
piston for the purpose of compressing or ejecting the fluid in the 
cylinder. In some engines, the piston also acts as a valve by 
covering and uncovering ports in the cylinder wall.")

(externalImage Piston "http://upload.wikimedia.org/wikipedia/commons/thumb/d/d4/Piston.gif/73px-Piston.gif")

(subclass EngineCylinder Artifact)
(documentation EngineCylinder EnglishLanguage "A single cylinder of
an &%Engine block and its associated components.")

(subclass InternalCombustionChamber Hole)
(termFormat EnglishLanguage InternalCombustionChamber "internal combustion chamber")
(documentation InternalCombustionChamber EnglishLanguage "The &%Hole that
is part of a &%Cylinder in which &%Cumbustion occurs, forcing gases to
expand and expelling the piston, to generate power.")

(=>
  (instance ?E EngineCylinder)
  (exists (?H)
    (and
      (instance ?H InternalCombustionChamber)
      (equal ?E (HoleHostFn ?H)))))

(subclass Crankcase Hole)
(documentation Crankcase EnglishLanguage "A &%Hole in an &%InternalCombustionEngine
where the &%Piston rods join with the &%Crankshaft.")

(=>
  (instance ?E Engine)
  (exists (?C)
    (and
      (instance ?C Crankcase)
      (equal ?E (HoleHostFn ?C)))))
   
(subclass Crankshaft Shaft)
(documentation Crankshaft EnglishLanguage "The output of the effort of a &%Engine. It is a 
rotating rod that transfers power to other &%Devices.")
(typicalPart Crankshaft IntermittentCombustionEngine)
(typicallyContainsPart Crankshaft IntermittentCombustionEngine)

(typicalPart Crankshaft Crankcase)
(typicallyContainsPart Crankshaft Crankcase)

(typicalPart Piston EngineCylinder)
(typicallyContainsPart Piston EngineCylinder)

(relatedInternalConcept typicallyContainsPart typicalPart)

(=>
  (and
    (instance ?C Crankshaft)
    (instance ?I IntermittentCombustionEngine)
    (part ?I ?C))
  (hasPurpose ?C
    (exists (?E ?R)
      (and
        (instance ?E Explosion)
        (instance ?R Rotating)
        (patient ?R ?C)
        (eventLocated ?R ?I)
        (causes ?E ?R)))))

(instance Vacuum InternalAttribute)
(termFormat EnglishLanguage Vacuum "vacuum")
(documentation Vacuum EnglishLanguage "An area of space in which does not
contain any matter.")

(=>
  (and
    (instance ?X Region)
    (attribute ?X Vacuum))
  (not
    (exists (?O)
      (and
        (instance ?O Object)
        (located ?O ?X)))))

(instance PartialVacuum RelationalAttribute)
(termFormat EnglishLanguage PartialVacuum "partial vacuum")
(documentation PartialVacuum EnglishLanguage "An area of space which is at
a lower pressure than surrounding regions.")

(=>
  (attribute ?X PartialVacuum)
  (exists (?O ?G)
    (and
      (instance ?O SelfConnectedObject)
      (instance ?G Region)
      (not 
        (equal ?G ?X))
      (connected ?X ?O)
      (connected ?G ?O)
      (measure ?G (MeasureFn ?PM ?P1))
      (measure ?X (MeasureFn ?PM ?P2))
      (instance ?PM UnitOfAtmosphericPressure)
      (greaterThan ?P1 ?P2))))

(instance Pressurized RelationalAttribute)
(termFormat EnglishLanguage Pressurized "pressurized")
(documentation Pressurized EnglishLanguage "An area of space which is at
a higher pressure than surrounding regions.")

(=>
  (attribute ?X Pressurized)
  (exists (?O ?G)
    (and
      (instance ?O SelfConnectedObject)
      (instance ?G Region)
      (not 
        (equal ?G ?X))
      (connected ?X ?O)
      (connected ?G ?O)
      (measure ?G (MeasureFn ?PM ?P1))
      (measure ?X (MeasureFn ?PM ?P2))
      (instance ?PM UnitOfAtmosphericPressure)
      (greaterThan ?P2 ?P1))))

(subclass Spark ElectricTransmission)
(termFormat EnglishLanguage Spark "spark")
(documentation Spark EnglishLanguage "An electric charge that moves from point to
point across an &%Air gap, rather than travelling through a solid conductor.")
(subclass Lightning Spark)

(=>
  (instance ?S Spark)
  (exists (?E ?G) 
    (and
      (instance ?E Electricity)
      (patient ?S ?E)
      (instance ?G Substance)
      (attribute ?G Gas)
      (eventLocated ?S ?G))))
    
(subclass SparkPlug ElectricalComponent)
(termFormat EnglishLanguage SparkPlug "spark plug")
(documentation SparkPlug EnglishLanguage "A device, used to ignite &%Fuel, 
that generates a &%Spark.")

(=>
  (instance ?SP SparkPlug)
  (hasPurpose ?SP
    (exists (?S)
      (and
        (instance ?S Spark)
        (instrument ?S ?SP)))))

(=>
  (instance ?SP SparkPlug)
  (hasPurpose ?SP
    (exists (?S ?C)
      (and
        (instance ?S Spark)
        (instrument ?S ?SP)
        (instance ?C Combustion)
        (causes ?S ?C)))))

(subclass TwoStrokeIntake Motion)
(termFormat EnglishLanguage TwoStrokeIntake "two stroke intake")
(documentation TwoStrokeIntake EnglishLanguage "The portion of a two stroke engine
cycle where the piston moves into the combustion chamber creating a partial vacuum
in the crankcase that draws fuel into the crankcase.")

(=>
  (and 
    (instance ?E EngineCylinder)
    (instance ?I InternalCombustionChamber)
    (instance ?P Piston)
    (instance ?T TwoStrokeIntake)
    (holdsDuring ?T
      (located ?P ?E))
    (equal ?E (HoleHostFn ?I))
    (eventLocated ?T ?E))
  (hasPurpose ?P
    (holdsDuring ?T
      (partiallyFills ?P ?I))))

(=>
  (and
    (instance ?TSI TwoStrokeIntake)
    (instance ?C Crankcase)
    (eventPartlyLocated ?TSC ?C))
  (holdsDuring ?TSI
    (attribute ?C PartialVacuum)))

(subclass TwoStrokeCompression Motion)
(termFormat EnglishLanguage TwoStrokeCompression "two stroke compression")
(documentation TwoStrokeCompression EnglishLanguage "The portion of a two stroke engine
cycle where combustion occurs, forcing the piston out of the combustion chamber,
and the fuel mixture is compressed in the crankcase.")

(=>
  (and
    (instance ?TSC TwoStrokeCompression)
    (eventLocated ?TSC ?E)
    (instance ?E TwoStrokeEngine))
  (exists (?C)
    (and
      (instance ?C Explosion)
      (during ?C ?TSC)
      (eventLocated ?C ?E))))

(subclass TwoStrokeTransfer Motion)
(termFormat EnglishLanguage TwoStrokeTransfer "two stroke transfer")
(documentation TwoStrokeTransfer EnglishLanguage "The portion of a two stroke engine
cycle where the combustion chamber is opened to the crankcase and the exhaust.  This 
allows the exhaust to vent, and the pressurized fuel mixture to enter the combustion
chamber.  The piston is most fully removed from the combustion chamber at this point.")

(=>
  (and 
    (instance ?E EngineCylinder)
    (instance ?C Crankcase)
    (instance ?P Piston)
    (instance ?T TwoStrokeTransfer)
    (holdsDuring ?T
      (located ?P ?E))
    (equal ?E (HoleHostFn ?C))
    (eventLocated ?T ?E))
  (hasPurpose ?P
    (holdsDuring ?T
      (partiallyFills ?P ?C)))) 

(=>
  (and
    (instance ?T TwoStrokeTransfer)
    (instance ?C EngineCylinder)
    (instance ?I InternalCombustionChamber)
    (equal ?C (HoleHostFn ?I))
    (eventLocated ?F ?C))
  (exists (?E ?M)
    (and
      (instance ?M GasMotion)
      (instance ?E Exhaust)
      (subProcess ?M ?T)
      (origin ?M ?I)
      (patient ?M ?E))))

(subclass Brake Device)
(termFormat EnglishLanguage Brake "brake")
(documentation Brake EnglishLanguage "Any device that is designed to slow and stop
the &%Motion of an object.  This include brakes on wheeled vehicles as well as 
rock climbing equipment that uses friction to slow decent when rappelling.")

(=>
  (instance ?B Brake)
  (hasPurpose ?B
    (exists (?D)
      (and 
        (instance ?D Decelerating)
        (instrument ?D ?B)))))

(subclass VehicleBrake Brake)

(subclass ParkingBrake VehicleBrake)
(termFormat EnglishLanguage ParkingBrake "parking brake")
(documentation ParkingBrake EnglishLanguage "A kind of brake chiefly designed to prevent
motion from occuring in a stopped vehicle, although it can be used to slow a 
vehicle that is in motion.  Most other types of brakes are designed to be used
intermittently to slow a vehicle, or only temporarily to keep a vehicle stationary, while
the driver is applying the brake.  In contrast, most parking brakes employ some sort of
ratcheting system so the parking brake may remain active even when the driver is not
applying force to a braking actuator, or even being present in the vehicle.
Typically, it is implemented as a &%DrumBrake in most modern passenger vehicles.")

(typicallyContainsPart ParkingBrake DrumBrake)

(=>
  (and
    (instance ?P ParkingBrake)
    (instance ?V Vehicle)
    (part ?P ?V))
  (hasPurpose ?P
    (holdsDuring ?E
      (and 
        (attribute ?P DeviceOn)
        (not
          (exists (?T)
            (and 
              (instance ?T Translocation)
              (patient ?T ?V))))))))

(subclass WearingFrictionSurface Device)
(termFormat EnglishLanguage WearingFrictionSurface "wearing friction surface")
(documentation WearingFrictionSurface EnglishLanguage "A device designed to cause friction
and exhibit a particular process of wear.  This includes items such as brake pads and
match striking surfaces on a matchbox.")

(=>
  (instance ?S WearingFrictionSurface)
  (hasPurpose ?S 
    (exists (?F)
      (and
        (instance ?F Friction)
        (resource ?F ?S)))))

(subclass BrakeShoe WearingFrictionSurface)
(documentation BrakeShoe EnglishLanguage "A &%WearingFrictionSurface that is designed
to press against a rotating &%BrakeDrum to cause vehicle braking.")
(termFormat EnglishLanguage BrakeShoe "brake shoe")
(typicalPart BrakeShoe DrumBrake)

(subclass DrumBrake VehicleBrake)
(documentation DrumBrake EnglishLanguage "A &%Brake in which a &%BrakeShoe presses
against a rotating &%BrakeDrum to cause vehicle braking.")
(termFormat EnglishLanguage DrumBrake "drum brake")

(=>
  (instance ?B BrakePad)
  (hasPurpose ?B 
    (exists (?F ?BS)
      (and
        (instance ?F Friction)
        (resource ?F ?B)
        (instance ?BR BrakeRotor)
        (patient ?F ?BS)))))

(=>
  (and
    (instance ?BP BrakePad)
    (instance ?BR BrakeRotor)
    (instance ?R Rotating)
    (patient ?R ?BR)
    (instance ?F Friction)
    (resource ?F ?BP)
    (patient ?F ?BR))
  (not
    (patient ?R ?BP)))

(=>
  (instance ?B BrakeShoe)
  (hasPurpose ?B 
    (exists (?F ?BD)
      (and
        (instance ?F Friction)
        (resource ?F ?B)
        (instance ?BD BrakeDrum)
        (patient ?F ?BD)))))

(=>
  (and
    (instance ?BS BrakeShoe)
    (instance ?BD BrakeDrum)
    (instance ?R Rotating)
    (patient ?R ?BD)
    (instance ?F Friction)
    (resource ?F ?BS)
    (patient ?F ?BD))
  (not
    (patient ?R ?BS)))

(subclass DiscBrake VehicleBrake)

(termFormat EnglishLanguage DiscBrake "disc brake")

(typicalPart BrakePad DiscBrake)
(documentation BrakePad EnglishLanguage "A &%WearingFrictionSurface
that presses against a &%BrakeRotor to cause vehicle braking.")
(subclass BrakePad WearingFrictionSurface)

(subclass BrakeRotor Device)
(documentation BrakeRotor EnglishLanguage "A rotating &%Metal disc
that is pressed upon by a &%BrakePad to cause vehicle braking.")
(typicalPart BrakeRotor DiscBrake)
(typicallyContainsPart BrakeRotor DiscBrake)

(subclass BrakeDrum Device)
(documentation BrakeDrum EnglishLanguage "A rotating surface that is
pressed on by the &%BrakeShoe.")
(typicalPart BrakeDrum DrumBrake)
(typicallyContainsPart BrakeDrum DrumBrake)

(subclass BrakeCaliper Device)
(documentation BrakeCaliper EnglishLanguage "A &%Device assembly that 
presses a &%BrakePad against a &%BrakeRotor.")
(typicalPart BrakeCaliper VehicleBrake)

(subclass BrakePedal Device)
(termFormat EnglishLanguage BrakePedal "brake pedal")
(documentation BrakePedal EnglishLanguage "A brake pedal is a device inside
a vehicle that has the purpose of being pushed to activate the bakes of the
vehicle.  Although normally pushed with the foot, this concept also covers
handicapped-accessible devices mounted on the steering column that can be
activated by pressing with the hands or fingers.")

(=>
  (instance ?BP BrakePedal)
  (hasPurpose ?BP
    (exists (?PU)
      (and
        (instance ?PU Pushing)
        (destination ?PU ?BP)))))

(=>
  (and
    (instance ?BP BrakePedal)
    (instance ?P Pushing)
    (instance ?V Vehicle)
    (destination ?P ?BP)
    (eventLocated ?P ?V)
    (part ?BP ?V))
  (hasPurpose ?BP
    (exists (?FS ?F)
      (and 
        (instance ?FS WearingFrictionSurface)
        (instance ?F Friction)
        (instrument ?F ?FS)
        (causes ?P ?F)))))

(disjoint Pulling Pushing)

(=>
  (and
    (instance ?P Pulling)
    (origin ?P ?O)
    (agent ?P ?A)
    (holdsDuring 
      (BeginFn ?P)
      (located ?A ?ALOC))
    (destination ?P ?D))
  (holdsDuring 
    (ImmediateFutureFn 
      (BeginFn ?P))
    (and
      (distance ?ALOC ?D ?SMALLER)
      (distance ?ALOC ?O ?LARGER)
      (greaterThan ?LARGER ?SMALLER))))

(documentation Pushing EnglishLanguage "Pushing describes the exertion of force so 
as to cause or tend to cause motion away from the agent.")
(subclass Pushing Motion)
(termFormat EnglishLanguage Pushing "pushing")

(=>
  (and
    (instance ?P Pushing)
    (origin ?P ?O)
    (agent ?P ?A)
    (holdsDuring 
      (BeginFn ?P)
      (located ?A ?ALOC))
    (destination ?P ?D))
  (holdsDuring 
    (ImmediateFutureFn 
      (BeginFn ?P))
    (and
      (distance ?ALOC ?D ?SMALLER)
      (distance ?ALOC ?O ?LARGER)
      (greaterThan ?LARGER ?SMALLER))))

;MSv: Commented out because of domain inconsistency - doesn't fit parent's domain Object
;(subrelation systemPart part)

;(=>
;  (instance ?S PhysicalSystem)
;  (exists (?P)
;    (hasPurpose ?S ?P)))

(subclass AutoSuspensionSystem PhysicalSystem)
(termFormat EnglishLanguage AutoSuspensionSystem "auto suspension system")
(documentation AutoSuspensionSystem EnglishLanguage "A system, typically consisting of
&%Springs and &%Shocks that couples the &%Wheels or &%Axles of a &%RoadVehicle to the rest of the
body, and serving to dampen the effect of uneven road surfaces on the occupants or cargo.")

(subclass WireSpring Spring)

(typicallyContainsPart Spring AutoSuspensionSystem)
(typicallyContainsPart AutoSuspensionSystem Automobile)
(typicalPart AutoSuspensionSystem Automobile)

(instance physicalAmplitude SpatialRelation)
(domain physicalAmplitude 1 Tremor)
(domain physicalAmplitude 2 LengthMeasure)
(format EnglishLanguage physicalAmplitude "the amplitude %1 is %n %2")
(documentation physicalAmplitude EnglishLanguage "A relation between a periodic motion and the
distance between the physical extremes of the period.")

(=>
  (and
    (physicalAmplitude ?T ?L)
    (patient ?T ?O))
  (exists (?P1 ?P2 ?T1 ?T2)
    (and
      (during ?T1 (WhenFn ?T))
      (during ?T2 (WhenFn ?T))
      (holdsDuring ?T1
        (located ?O ?P1))
      (holdsDuring ?T2
        (located ?O ?P2))
      (distance ?P1 ?P2 ?L))))

(=>
  (and
    (physicalAmplitude ?T ?L)
    (patient ?T ?O))
  (not
    (exists (?P1 ?P2 ?T1 ?T2)
      (and
        (during ?T1 (WhenFn ?T))
        (during ?T2 (WhenFn ?T))
        (holdsDuring ?T1
          (located ?O ?P1))
        (holdsDuring ?T2
          (located ?O ?P2))
        (distance ?P1 ?P2 ?L2)
        (greaterThan ?L2 ?L)))))

(subclass Damper MechanicalDevice)
(termFormat EnglishLanguage Damper "damper")
(documentation Damper EnglishLanguage "A &%Device designed to lessen or to remove a &%Tremor from
a &%PhysicalSystem.  Examples include a car's air shocks, or rubber and fluid-filled
foundation mounts for buildings in earthquake-prone areas.")
(externalImage Damper "http://upload.wikimedia.org/wikipedia/commons/2/2b/Damped_spring.gif")

(=>
  (and
    (instance ?E Motion)
    (instance ?T Tremor)
    (instance ?D Damper)
    (patient ?T ?O)
    (part ?D ?O)
    (causes ?E ?T)
    (holdsDuring (WhenFn ?E)
      (physicalAmplitude ?T ?A1))
    (holdsDuring (ImmediateFutureFn ?E)
      (physicalAmplitude ?T ?A2)))
  (greaterThan ?A1 ?A2))

(instance dampingRatio BinaryPredicate)
(domain dampingRatio 1 PhysicalSystem)
(domain dampingRatio 2 RealNumber)
(format EnglishLanguage dampingRatio "the damping ratio of %1 is %n %2")
(documentation dampingRatio EnglishLanguage "(dampingRation ?SYSTEM ?NUM) is a measure 
of to what degree a system is free to oscillate or not.  In an overdamped system ?NUM 
is greater than 1. The system returns (exponentially decays) to equilibrium without 
oscillating. Larger values of the damping ratio signify a return to equilibrium more slowly.
In a critically damped ?NUM equals 1. The system returns to equilibrium as quickly as possible 
without oscillating. This is often desired for the damping of systems such as doors.
In an underdamped system 0 < ?NUM < 1. The system oscillates (at reduced frequency compared 
to the undamped case) with the amplitude gradually decreasing to zero.  Finally, in an
undamped system ?NUM is 0. The system oscillates at its natural &%resonantFrequency. 
[adapted from Wikipedia].")

(=>
  (and 
    (dampingRatio ?P ?R)
    (greaterThan ?R 0)
    (instance ?T Tremor)
    (patient ?T ?P)
    (holdsDuring ?T1
      (physicalAmplitude ?T ?A1))
    (holdsDuring ?T2
      (physicalAmplitude ?T ?A2))
    (during ?T1 ?T)
    (during ?T2 ?T)
    (earlier ?T1 ?T2))
  (greaterThan ?A1 ?A2))

(instance resonantFrequency BinaryPredicate)
(domain resonantFrequency 1 PhysicalSystem)
(domain resonantFrequency 2 PhysicalQuantity)
(format EnglishLanguage resonantFrequency "the resonant frequency of %1 is %n %2")
(documentation resonantFrequency EnglishLanguage "The natural resonancy frequency of a 
system.  A system that is undamped or underdamped will oscillate at this frequency, at
least for a while, after a force is applied.")
(relatedInternalConcept resonantFrequency dampingRatio)

(subclass Automobile PhysicalSystem)

(subclass AutomobileShock Damper)
(termFormat EnglishLanguage AutomobileShock "shock")
(typicalPart AutomobileShock AutoSuspensionSystem)
(documentation AutomobileShock EnglishLanguage "A &%Damper that is part of a modern &%RoadVehicle's
&%AutoSuspensionSystem.  It may include various kinds of fluids that have the effect
of being a &%Damper on &%Motion.")

(=>
  (instance ?A AutomobileShock)
  (hasPurpose ?A
    (exists (?C)
      (and
        (instance ?C Automobile)
        (part ?A ?C)))))

(=>
  (and
    (instance ?A1 Automobile)
    (instance ?A2 Automobile)
    (instance ?S1 AutomobileShock)
    (part ?S1 ?A1)
    (not
      (exists (?S2)
        (and
          (instance ?S2 AutomobileShock)
          (part ?S2 ?A2))))
    (dampingRatio ?A1 ?R1)
    (dampingRatio ?A2 ?R2))
  (greaterThan ?R2 ?R1))    

(typicalPart AutomobileShock Automobile)
(typicallyContainsPart AutomobileShock Automobile)

(=>
  (and
    (instance ?AS AutomobileShock)
    (instance ?C Compressing)
    (instance ?H Hole)
    (attribute ?F Fluid)
    (equal ?AS (HoleHostFn ?H))
    (contains ?AS ?F)
    (patient ?C ?AS))
  (exists (?T)
    (and
      (instance ?T Transfer)
      (objectTransferred ?T ?F)
      (path ?T ?H)
      (causes ?C ?T))))

(subclass LeafSpring Spring)
(documentation LeafSpring EnglishLanguage "A type of spring found in &%Trucks
and older &%Automobiles, and is designed to minimize the transmission of shocks 
to the frame of a &%LandVehicle from hitting imperfections in a road surface.
They are typically arranged into a group of layers that provides stronger resistance
when the shock encountered is greater.")

(externalImage LeafSpring "http://upload.wikimedia.org/wikipedia/commons/6/63/Leafs1.jpg")
(termFormat EnglishLanguage LeafSpring "leaf spring")
(typicalPart LeafSpring AutoSuspensionSystem)

(=>
  (instance ?L LeafSpring)
  (attribute ?L LongAndThin))

(=>
  (and
    (instance ?L LeafSpring)
    (part ?L ?RV)
    (instance ?RV RoadVehicle))
  (modalAttribute 
    (exists (?L2)
      (and
        (instance ?L2 LeafSpring)
        (part ?L2 ?RV)
        (not
          (equal ?L ?L2))
        (meetsSpatially ?L ?L2)))
    Likely))

(subclass FuelFilter Filter)
(termFormat EnglishLanguage FuelFilter "fuel filter")
(documentation FuelFilter EnglishLanguage "A fuel filter is designed to remove impurities
from &%Fuel.")

(=>
  (instance ?FILTER FuelFilter)
  (hasPurpose ?FILTER
    (exists (?REMOVE ?FUEL ?NONFUEL ?SOLUTION)
      (and
        (instance ?REMOVE Removing)
        (part ?FUEL ?SOLUTION)
        (instance ?FUEL Fuel)
        (not
          (instance ?NONFUEL Fuel))
        (patient ?REMOVE ?NONFUEL)
        (part ?NONFUEL ?SOLUTION)
        (origin ?REMOVE ?SOLUTION)
        (instance ?SOLUTION Solution)
        (instrument ?REMOVE ?FILTER)))))

(subclass AirFilter Filter)
(termFormat EnglishLanguage AirFilter "air filter")
(documentation AirFilter EnglishLanguage "An air filter is designed to remove 
&%Solid impurities from &%Air.")

(=>
  (instance ?FILTER AirFilter)
  (hasPurpose ?FILTER
    (exists (?REMOVE ?AIR ?NONAIR ?MIX)
      (and
        (instance ?REMOVE Removing)
        (part ?AIR ?MIX)
        (instance ?AIR Air)
        (not
          (instance ?NONAIR Air))
        (attribute ?NONAIR Solid)
        (patient ?REMOVE ?NONAIR)
        (part ?NONAIR ?MIX)
        (origin ?REMOVE ?MIX)
        (instance ?MIX Mixture)
        (instrument ?REMOVE ?FILTER)))))

(subclass AirIntake Tube)
(termFormat EnglishLanguage AirIntake "air intake")
(documentation AirIntake EnglishLanguage "A &%Tube that channels &%Air on a 
&%path ultimately into an &%Engine.")

(=>
  (instance ?AI AirIntake)
  (hasPurpose ?AI
    (exists (?A)
      (and
        (instance ?A Air)
        (contains ?AI ?A)))))

(=>
  (instance ?AI AirIntake)
  (hasPurpose ?AI
    (exists (?A)
      (and
        (instance ?A Air)
        (instance ?E Engine)
        (instance ?T Transfer)
        (origin ?T ?AI)
        (destination ?T ?E)
        (patient ?T ?A)))))

(subclass GasTank FluidContainer)
(termFormat EnglishLanguage GasTank "gas tank")
(documentation GasTank EnglishLanguage "A &%Container in a &%Vehicle designed to
hold a &%Liquid &%Fuel for use in its &%Engine.  Note that this does not include
container such as portable fuel tanks that may be used to carry gas, but which
do not directly supply an engine.")

(=>
  (instance ?GT GasTank)
  (hasPurpose ?GT
    (exists (?F)
      (and
        (instance ?F Fuel)
        (contains ?GT ?F)))))

(=>
  (instance ?GT GasTank)
  (hasPurpose ?GT
    (exists (?F ?T ?E)
      (and
        (instance ?F Fuel)
        (contains ?GT ?F)
        (instance ?E Engine)
        (instance ?T Transfer)
        (origin ?T ?GT)
        (destination ?T ?E)
        (patient ?T ?F)))))

        
(subclass FuelCapLock SecurityDevice)
(documentation FuelCapLock EnglishLanguage "A &%SecurityDevice that is to be located on the opening of a &%GasTank to prevent &%Stealing the &%Fuel from the &%GasTank.")
(=>
  (instance ?X FuelCapLock)
  (hasPurpose ?X
    (exists (?TANK ?HOLE)
        (and
            (instance ?TANK GasTank)
            (hole ?HOLE ?TANK)
            (decreasesLikelihood
                (holdsDuring ?T
                    (and
                        (connected ?X ?HOLE)
                        (attribute ?X Locked)))
                (holdsDuring ?T
                    (exists (?STEAL ?FUEL)
                        (and
                            (instance ?STEAL Stealing)
                            (instance ?FUEL Fuel)
                            (located ?FUEL ?TANK)
                            (patient ?STEAL ?FUEL)))))))))
                            
(subclass FuelPump Pump)
(termFormat EnglishLanguage FuelPump "fuel pump")
(documentation FuelPump EnglishLanguage "A pump that moves fuel from the gas tank
through a &%FuelFilter and ultimately to the &%EngineCylinder.")

(=>
  (instance ?FP FuelPump)
  (hasPurpose ?FP
    (exists (?F ?T)
      (and
        (instance ?T Transportation)
        (instance ?F Fuel)
        (patient ?T ?F)
        (instrument ?F ?FP)))))

(=>
  (and
    (instance ?FP FuelPump)
    (instance ?A Automobile)
    (part ?FP ?A)
    (instance ?T Transportation)
    (instance ?F Fuel)
    (patient ?T ?F)
    (instrument ?F ?FP))
  (hasPurpose ?FP
    (exists (?GT ?EC)
      (and
        (instance ?GT GasTank)
        (part ?GT ?A)
        (instance ?EC EngineCylinder)
        (part ?EC ?A)
        (origin ?T ?GT)
        (destination ?T ?EC)))))

(=>
  (and
    (instance ?FP FuelPump)
    (instance ?A Automobile)
    (part ?FP ?A)
    (instance ?T Transportation)
    (instance ?F Fuel)
    (patient ?T ?F)
    (instrument ?F ?FP)
    (instance ?GT GasTank)
    (part ?GT ?A)
    (instance ?EC EngineCylinder)
    (part ?EC ?A)
    (origin ?T ?GT)
    (destination ?T ?EC)
    (path ?T ?P))
  (hasPurpose ?T
    (exists (?FF)
      (and
        (instance ?FF FuelFilter)
        (betweenOnPath ?GT ?FF ?EC ?P)))))

(=>
  (instance ?S Spraying)
  (exists (?G ?L ?M)
    (and
      (attribute ?G Gas)
      (attribute ?L Liquid)
      (instance ?M GasMixture)
      (part ?M ?G)
      (part ?M ?L)
      (patient ?S ?G)
      (patient ?S ?L)
      (result ?S ?M))))

(subclass FuelAtomizer Device)
(termFormat EnglishLanguage FuelAtomizer "fuel atomizer")
(documentation FuelAtomizer EnglishLanguage "A &%Device designed to atomize fuel to
put into a &%GasMixture for use in &%Combustion.  In a gas-powered automobile that 
typically has 14.7 parts air per part gasoline.  Principal subclasses are 
&%FuelInjectors and &%Carburetors.")

(=>
  (instance ?FA FuelAtomizer)
  (hasPurpose ?FA
    (exists (?F ?S ?A ?C)
      (and
        (instance ?F Fuel)
        (instance ?S Spraying)
        (instance ?A Air)
        (instance ?C Combustion)
        (patient ?S ?A)
        (patient ?S ?F)
        (resource ?C ?F)
        (resource ?C ?A)))))

(subclass FuelInjector FuelAtomizer)
(termFormat EnglishLanguage FuelInjector "fuel injector")
(documentation FuelInjector EnglishLanguage "A &%Device that atomizes &%Fuel by
forcing it through a small orifice under high pressure. They have largely
superceded the use of &%Carburetors in modern &%Automobiles, since the late 1980's.")

(subclass Carburetor FuelAtomizer)
(termFormat EnglishLanguage Carburetor "carburetor")
(externalImage Carburetor "http://upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Carburetor.svg/220px-Carburetor.svg.png")
(documentation Carburetor EnglishLanguage "A &%Device that uses the suction created
by engine cycles, and the venturi effect in the carburetor itself to draw fuel
through and out a small opening to atomize it and combine it with &%Air.")

(subclass Exhaust Mixture)
(subclass Smoke Exhaust)
(termFormat EnglishLanguage Exhaust "exhaust")
(documentation Exhaust EnglishLanguage "A concept to broadly cover all physical
byproducts of &%Combustion, other than light or heat.  While exhaust is often 
an undesirable byproduct of combustion that serves some particular purpose, and 
where heat or light is desired, there is also the case of smoke signals or 
mosquito-repelling smudge pots in which exhaust (and often ineffecient 
combustion, to produce the most smoke) is the desirable output of combustion.
Exhaust differs from Smoke in that it need not be visible.")

(=>
  (instance ?E Exhaust)
  (exists (?S ?G ?C)
    (and
      (instance ?C Combustion)
      (attribute ?S Solid)
      (attribute ?G Gas)
      (part ?S ?E)
      (part ?G ?E)
      (result ?C ?E))))

(=>
  (instance ?E Exhaust)
  (modalAttribute 
    (capability Seeing patient ?E)
    Possibility))

(=>
  (instance ?E Exhaust)
  (modalAttribute 
    (not
      (capability Seeing patient ?E))
    Possibility))

(instance AllWheelDrive RelationalAttribute)
(termFormat EnglishLanguage AllWheelDrive "all wheel drive")
(documentation AllWheelDrive EnglishLanguage "An &%Attribute of an &%Automobile,
specifying that it is capable of supplying power to all of its wheels at the 
same time, typically for the purpose of increasing traction on slippery or
uneven surfaces.")

;; need some notion of direct force

(instance TwoWheelDrive RelationalAttribute)
(termFormat EnglishLanguage TwoWheelDrive "two wheel drive")
(documentation TwoWheelDrive EnglishLanguage "An &%Attribute of an &%Automobile,
specifying that it is capable of supplying power only to two of its wheels at the 
same time.  Note that this attribute can be used with temporal qualification to
specify that a four-wheel-drive vehicle is in two-wheel-drive mode.")

(subclass Generator Machine)
(termFormat EnglishLanguage Generator "generator")
(documentation Generator EnglishLanguage "Any &%Machine that generates &%Electricity.")

(=>
  (instance ?G Generator)
  (hasPurpose ?G
    (exists (?P ?E)
      (and
        (instance ?P Process)
        (instance ?E Electricity)
        (result ?P ?E)
        (instrument ?P ?G)))))

(subclass Alternator Generator)
(termFormat EnglishLanguage Alternator "alternator")
(documentation Alternator EnglishLanguage "A &%Generator that is part of a &%Vehicle,
intended to use the power of the motor to generate electricity to keep the &%Battery
charged and supply &%Electricity for the systems of the &%Vehicle, including the &%SparkPlugs,
lights, radio etc.")

(typicalPart Alternator Vehicle)
(typicallyContainsPart Alternator Vehicle)

(subclass AirPump Pump)
(termFormat EnglishLanguage AirPump "air pump")
(documentation AirPump EnglishLanguage "Any &%Pump designed to move &%Air.")

(=>
  (instance ?AP AirPump)
  (hasPurpose ?AP
    (exists (?T ?A)
      (and
        (instance ?T Transportation)
        (instance ?A Air)
        (instrument ?T ?AP)
        (patient ?T ?A)))))

(subclass Antifreeze Substance)
(termFormat EnglishLanguage Antifreeze "antifreeze")
(documentation Antifreeze EnglishLanguage "Any &%Substance designed to lower the
&%meltingPoint of &%Water.")

(=>
  (and
    (instance ?W Water)
    (instance ?M Mixture)
    (part ?W ?M)
    (instance ?A Antifreeze)
    (part ?A ?M)
    (attribute ?M Solid)
    (measure ?M (MeasureFn ?D CelsiusDegree)))
  (greaterThan 32 ?D))

(subclass BrakeSystem PhysicalSystem)
(termFormat EnglishLanguage BrakeSystem "brake system")
(documentation BrakeSystem EnglishLanguage "A system, typically consisting of
&%VehicleBrakes, and often a &%MasterCylinder, &%BrakeCalipers and &%BrakePads that serves
to slow or stop a vehicle (or just reduce its downhill acceleration).")

(typicallyContainsPart BrakeSystem Automobile)
(typicalPart BrakeSystem Automobile)

(=>
  (instance ?BS BrakeSystem)
  (hasPurpose ?BS
    (exists (?B)
      (and
        (instance ?B Braking)
        (instrument ?B ?BS)))))

(subclass Braking Decreasing)
(termFormat EnglishLanguage Braking "braking")
(documentation Braking EnglishLanguage "An application of a &%BrakeSystem to slow
or stop a vehicle (or just reduce its downhill acceleration).")

(=>
  (and 
    (instance ?B Braking)
    (patient ?B ?O))
  (and
    (holdsDuring 
      (ImmediatePastFn (WhenFn ?B))
      (equal ?A1 (AccelerationFn ?FQ ?T ?O ?D)))
    (holdsDuring 
      (ImmediateFutureFn (WhenFn ?B))
      (equal ?A2 (AccelerationFn ?FQ ?T ?O ?D)))
    (greaterThan ?A1 ?A2)))

(documentation AccelerationFn EnglishLanguage "Specifies the acceleration of an object, 
i.e. the change in speed for a given direction.")
(format EnglishLanguage AccelerationFn "the accelleration %1 of %3 in %2 in the 
direction %4")	

(domain AccelerationFn 1 FunctionQuantity) 	
(domain AccelerationFn 2 TimeDuration) 
(domain AccelerationFn 3 Object) 
(domain AccelerationFn 4 DirectionalAttribute)
(instance AccelerationFn QuaternaryFunction) 
(instance AccelerationFn TotalValuedRelation)
(range AccelerationFn FunctionQuantity)

(subclass AntilockBrake VehicleBrake)
(termFormat EnglishLanguage AntilockBrake "antilock brake")
(documentation AntilockBrake EnglishLanguage "A &%VehicleBrake with an electronic component
that reduces the likelihood of locking up the wheels during a sudden stop.  If the
wheels stop turning, the controller reduces pressure on the brakes until they begin
turning again, then alternates application and reduction of braking pressure in short
intervals.  The goal is to keep the wheels at as near as possible the point of 
transition between dynamic or sliding friction and the point of static friction (at
which the stopping force is greater).")

(=>
  (and
    (instance ?T Transportation)
    (instance ?W Wheel)
    (instance ?A Automobile)
    (part ?W ?A)
    (instrument ?T ?A)
    (instance ?AB AntilockBrake)
    (instance ?D Decelerating)
    (instrument ?D ?AB)
    (part ?AB ?W))
  (hasPurpose ?AB
    (exists (?R)
      (and
        (instance ?R Rotating)
        (during ?R ?D)))))

(subclass EngineChoke Device)
(termFormat EnglishLanguage EngineChoke "engine choke")
(documentation EngineChoke EnglishLanguage "A device to restrict the flow of &%Air to
an engine, typically when cold, that increases the &%Fuel to &%Air ratio.")

(=>
  (and
    (instance ?EC EngineChoke)
    (holdsDuring ?FSC1
      (attribute ?EC DeviceOn))
    (holdsDuring ?FSC2
      (attribute ?EC DeviceOff))
    (instance ?C EngineCylinder)
    (capacity ?C ?M)
    (instance ?FSC1 FourStrokeCompression)
    (instance ?FSC2 FourStrokeCompression)
    (eventLocated ?FSC1 ?C) 
    (eventLocated ?FSC2 ?C) 
    (instance ?A1 Air)
    (instance ?F1 Fuel)
    (part ?A1 ?MIX1)
    (part ?F1 ?MIX1)
    (measure ?MIX1 ?M)
    (instance ?A2 Air)
    (instance ?F2 Fuel)
    (part ?A2 ?MIX2)
    (part ?F2 ?MIX2)
    (measure ?MIX2 ?M)
    (measure ?A1 ?A1M)
    (measure ?A2 ?A2M)
    (measure ?F1 ?F1M)
    (measure ?F2 ?F2M))
  (greaterThan 
    (DivisionFn ?A2M ?F2M)
    (DivisionFn ?A1M ?F1M)))
  
(subclass Backfire Combustion)
(termFormat EnglishLanguage Backfire "backfire")
(documentation Backfire EnglishLanguage "An improper case of &%Engine operation where
&%Combustion occurs in the &%Exhaust or intake.")
(=>
  (instance ?B Backfire)
  (exists (?E ?NC)
    (and
      (not
        (instance ?NC EngineCylinder))
      (instance ?E Engine)
      (part ?NC ?E)
      (eventLocated ?B ?NC))))

(subclass BallJoint MechanicalJoint)
(externalImage BallJoint "http://upload.wikimedia.org/wikipedia/en/thumb/0/0f/Ball_joint_cross_section.jpg/220px-Ball_joint_cross_section.jpg")

(documentation BallJoint EnglishLanguage "A ball joint allows for travel of two linked entities, where if one
entity is fixed, the other can travel on paths that describe a portion of the surface of a sphere.  A typical
application is a linkage between the &%Wheels and &%AutoSuspensionSystem.  A spring is typically included
in order to reduce vibration.")
(termFormat EnglishLanguage BallJoint "ball joint")
(typicallyContainsPart Spring BallJoint)

(subclass Hinge MechanicalJoint)

(subclass MechanicalJoint EngineeringComponent)
(termFormat EnglishLanguage MechanicalJoint "mechanical joint")
(documentation MechanicalJoint EnglishLanguage "A &%Device that links two parts of a &%PhysicalSystem and
allows them to move in relation to one another.  Examples include &%Hinges, drawer slides and &%BallJoints.")

(=>  
  (instance ?MJ MechanicalJoint)
  (hasPurpose ?MJ
    (exists (?S ?P1 ?P2 ?M)
      (and
        (instance ?M Motion)
        (instance ?S PhysicalSystem)
        (instance ?P1 EngineeringComponent)
        (instance ?P2 EngineeringComponent)
        (part ?P1 PhysicalSystem)
        (part ?MJ PhysicalSystem)
        (part ?P2 PhysicalSystem)
        (not
          (patient ?M ?P1))
        (patient ?M ?P2)
        (connectedEngineeringComponents ?P1 ?MJ)
        (connectedEngineeringComponents ?P2 ?MJ)))))

(subclass Bearing MechanicalJoint)
(termFormat EnglishLanguage Bearing "bearing")
(documentation Bearing EnglishLanguage "A &%Device designed to let the surfaces of two objects move in relation
to one another with limited friction.  Ball bearings roll in a channel affixed to one surface.")
 
(subclass BallBearing Device)
(termFormat EnglishLanguage BallBearing "ball bearing")
(documentation BallBearing EnglishLanguage "A small &%Metal &%Sphere designed for use in applications where it
is desirable to reduce friction between two parts.")

(=>
  (instance ?BB BallBearing)
  (material Metal ?BB))

(=>
  (instance ?BB BallBearing)
  (attribute ?BB Sphere))

(subclass BevelGear Gear)
(termFormat EnglishLanguage BevelGear "bevel gear")
(documentation BevelGear EnglishLanguage "A &%Gear that is shaped as a segment of a &%Cone, which allows
axles connected to a pair of gears not to be parallel.")

(=>
  (instance ?BV BevelGear)
  (attribute ?BV ConeSegment))

(instance ConeSegment ShapeAttribute)
(termFormat EnglishLanguage ConeSegment "cone segment")
(documentation ConeSegment EnglishLanguage "A &%ShapeAttribute that specifies a figure described by 
rotating a quadrilateral with two &%RightAngles around its right-angled axis.")

(instance typicalTemporalPart BinaryPredicate)
(instance typicalTemporalPart TemporalRelation)
(relatedInternalConcept typicalTemporalPart temporalPart)
(relatedInternalConcept typicalTemporalPart typicalPart)

(format EnglishLanguage typicalTemporalPart "a %1 is typically a part of a %2")

(documentation typicalTemporalPart EnglishLanguage "An instance of the first argument is typically 
a temporal part of an instance of the second argument.  This is a 
class-level relation roughly corresponding to &%temporalPart.  Note that this does 
not imply that such wholes typically have such parts.") 
(domainSubclass typicalTemporalPart 1 Process)
(domainSubclass typicalTemporalPart 2 Process)

(=>
  (typicalTemporalPart ?PART ?WHOLE)
  (exists (?X ?Y)
    (and      
      (instance ?X ?WHOLE)
      (instance ?Y ?PART)
      (temporalPart ?Y ?X)))) 

(=>
  (and
    (typicalTemporalPart ?PART ?WHOLE)
    (instance ?X ?PART)
    (equal ?PARTPROB
      (ProbabilityFn
        (exists (?Y)
          (and
            (instance ?Y ?WHOLE)
            (temporalPart ?X ?Y)))))
    (equal ?NOTPARTPROB
      (ProbabilityFn
        (not
          (exists (?Z)
            (and
              (instance ?Z ?WHOLE)
              (temporalPart ?X ?Z)))))))
  (greaterThan ?PARTPROB ?NOTPARTPROB))

(instance typicallyContainsTemporalPart BinaryPredicate)
(instance typicallyContainsTemporalPart TemporalRelation)
(relatedInternalConcept typicallyContainsTemporalPart typicallyContainsPart)
(relatedInternalConcept typicallyContainsTemporalPart temporalPart)

(format EnglishLanguage typicallyContainsTemporalPart "a %2 typically contains a %1")
(documentation typicallyContainsTemporalPart EnglishLanguage "An instance of the second argument typically 
contains an instance of the first argument.  This is a 
class-level relation roughly corresponding to &%part.  Note that this does 
not imply that such parts typically have such wholes.") 
(domainSubclass typicallyContainsTemporalPart 1 Process)
(domainSubclass typicallyContainsTemporalPart 2 Process)

(=>
  (typicallyContainsTemporalPart ?PART ?WHOLE)
  (exists (?X ?Y)
    (and      
      (instance ?X ?WHOLE)
      (instance ?Y ?PART)
      (temporalPart ?Y ?X)))) 

(=>
  (and
    (typicallyContainsTemporalPart ?PART ?WHOLE)
    (instance ?Y ?WHOLE)
    (equal ?PARTPROB
      (ProbabilityFn
        (exists (?X1)
          (and
            (instance ?X1 ?PART)
            (temporalPart ?X1 ?Y)))))
    (equal ?NOTPARTPROB
      (ProbabilityFn
        (not
          (exists (?X2)
            (and
              (instance ?X2 ?PART)
              (temporalPart ?X2 ?Y)))))))
  (greaterThan ?PARTPROB ?NOTPARTPROB))

(subclass BleedingAir LiquidMotion)
(subclass BleedingAir Removing)
(termFormat EnglishLanguage BleedingAir "bleeding air")
(documentation BleedingAir EnglishLanguage "The process of removing fluid under pressure
to locate and remove pockets of &%Air.  This is done typically in hydraulic applications
since air is compressible, and therefore undesirable in a hydraulic line.")

(=>
  (instance ?BA BleedingAir)
  (hasPurpose ?BA
    (exists (?FC ?A)
      (and
        (instance ?FC FluidContainer)
        (instance ?A Air)
        (holdsDuring (ImmediatePastFn ?BA)
          (contains ?FC ?A))
        (holdsDuring (ImmediateFutureFn ?BA)
          (not (contains ?FC ?A)))))))
     
(instance cylinderBore SpatialRelation)
(instance cylinderBore BinaryPredicate)
(format EnglishLanguage cylinderBore "the bore of %1 is %2")
(documentation cylinderBore EnglishLanguage "The diameter of a cylindrical &%Hole.")
(domain cylinderBore 1 Cylinder)
(domain cylinderBore 2 LengthMeasure)

(=>
  (and
    (cylinderBore ?CY ?M)
    (instance ?CY Cylinder)
    (instance ?CI Circle)
    (part ?CI ?CY))
  (diameter ?CI ?M))

(subclass BleederValve Valve)
(termFormat EnglishLanguage BleederValve "bleeder valve")
(documentation BleederValve EnglishLanguage "A &%Valve designed for use in &%BleedingAir, 
typically from hydraulics such a brake lines.")

(=>
  (instance ?BV BleederValve)
  (hasPurpose ?BV
    (exists (?B)
      (and 
        (instance ?B BleedingAir)
        (instrument ?B ?BV)))))

(typicalPart BrakeCaliper BrakeSystem)
(typicallyContainsPart BrakeCaliper BrakeSystem)

(=>
  (instance ?BC BrakeCaliper)
  (hasPurpose ?BC
    (exists (?P ?W)
      (and
        (instance ?P Pushing)
        (instrument ?P ?BC)
        (patient ?P ?W)
        (instance ?W WearingFrictionSurface)))))

(=>
  (instance ?BC BrakeCaliper)
  (hasPurpose ?BC
    (exists (?B)
      (and
        (instance ?B Braking)
        (instrument ?B ?BC)))))

(subclass HydraulicFluid Mixture)
(termFormat EnglishLanguage HydraulicFluid "hydraulic fluid")
(documentation HydraulicFluid EnglishLanguage "A &%Substance that is virtuall incompressible.
It is intended to be used in its &%Liquid state.  It can be thought of as a liquid gear,
creating a mechanical advantage in a hydraulic system.  Small amounts of fluid can be
easily and rapidly added to a chamber that actuates a piston which can generate great force.")

(=>
  (instance ?H HydraulicFluid)
  (hasPurpose ?H
    (exists (?P)
      (and
        (instance ?P Process)
        (instrument ?P ?H)
        (holdsDuring 
          (WhenFn ?P)
          (attribute ?H Liquid))))))

(instance objectTransferred CaseRole)
(subrelation objectTransferred patient)
(domain objectTransferred 1 Transfer)
(domain objectTransferred 2 Object)
(format EnglishLanguage objectTransferred "the object transferred in %1 is %n %2")
(documentation objectTransferred EnglishLanguage "A relation that specifies the object that
is transferred during the process.  For example, in a &%Mailing process, the object
transferred is a letter or package.")

(=>
  (objectTransferred ?P ?OBJ)
  (exists (?O ?D)
    (and
      (origin ?P ?O)
      (destination ?P ?D)
      (holdsDuring
        (ImmediatePastFn ?P)
        (located ?OBJ ?O))
      (holdsDuring
        (ImmediateFutureFn ?P)
        (located ?OBJ ?D)))))

(subclass HydraulicCylinder PhysicalSystem)
(termFormat EnglishLanguage HydraulicCylinder "hydraulic cylinder")
(documentation HydraulicCylinder EnglishLanguage "A &%Device consisting of a &%Hole that
is the cylinder, and a &%Piston.  Oil is forces into one part of the cylinder, moving the
piston in the opposite direction, imparting force to a shaft that is part of the piston.
Note that a cylinder without a piston, or a piston without a cylinder, is not considered
a hydraulic cylinder. Both parts are essential to its identity.")

(=>
  (instance ?HC HydraulicCylinder)
  (exists (?HH ?C ?P)
    (and
      (instance ?C Hole)
      (equal ?HH (HoleHostFn ?C))
      (attribute ?C Cylinder)
      (instance ?P Piston)
      (part ?P ?HC)
      (part ?HH ?HC))))

(subclass BrakeMasterCylinder HydraulicCylinder)
(termFormat EnglishLanguage BrakeMasterCylinder "master cylinder")
(documentation BrakeMasterCylinder EnglishLanguage "This is the source of hydraulic pressure
that actuates the &%BrakeCaliper, and is in turn actuated by the driver stepping on the
&%BrakePedal.")

(=>
  (instance ?BMC BrakeMasterCylinder)
  (hasPurpose ?BMC
    (exists (?BS)
      (and
        (instance ?BS BrakeSystem)
        (part ?BMC ?BS)))))

(typicalPart BrakeMasterCylinder BrakeSystem)
(typicallyContainsPart BrakeMasterCylinder BrakeSystem)

(subclass Cam Device)
(termFormat EnglishLanguage Cam "cam")
(documentation Cam EnglishLanguage "An eccentric lobe that presses against a valve or level
as it rotates.")

(=>
  (instance ?C Cam)
  (hasPurpose ?C
    (exists (?R)
      (and
        (instance ?R Rotating)
        (patient ?R ?C)))))

(subclass Camshaft Shaft)
(termFormat EnglishLanguage Camshaft "camshaft")
(documentation Camshaft EnglishLanguage "A rotating &%Shaft, tied to the &%Crankshaft,
which serves to move &%Cams that open and close &%Valves in an &%InternalCombustionEngine.")

(=>
  (instance ?C Camshaft)
  (hasPurpose ?C
    (exists (?R)
      (and
        (instance ?R Rotating)
        (patient ?R ?C)))))

(=>
  (and
    (instance ?C Cam)
    (instance ?CS Camshaft)
    (instance ?E Engine)
    (part ?C ?E)
    (part ?CS ?E))
  (hasPurpose ?CS
    (connectedEngineeringComponents ?C ?CS)))

(subclass CharcoalFilter Filter)
(termFormat EnglishLanguage CharcoalFilter "charcoal filter")
(documentation CharcoalFilter EnglishLanguage "A &%Filter that uses &%Charcoal to remove
impurities from a &%Gas or &%Liquid &%Mixture.")

(=>
  (instance ?CF CharcoalFilter)
  (exists (?C)
    (and
      (subclass ?C Charcoal)
      (material ?C ?CF))))

(subclass CombustionChamber Device)
(termFormat EnglishLanguage CombustionChamber "combustion chamber")
(documentation CombustionChamber EnglishLanguage "Any host of a &%Hole that is intended
to contain &%Combustion events.")

(=>
  (instance ?CC CombustionChamber)
  (exists (?H)
    (and
      (instance ?H Hole)
      (equal ?CC (HoleHostFn ?H)))))

(subclass CatalyticConverter CombustionChamber)
(termFormat EnglishLanguage CatalyticConverter "catalytic converter")
(documentation CatalyticConverter EnglishLanguage "A &%Device that decreases pollution
output by creating a secondary &%Combustion, outside the &%Engine that burns any
&%Fuel that is in the &%Exhaust of the primary combustion in the engine.  It typically
employs rare metals that act as catalysts for the chemical reaction.")

(typicalPart CatalyticConverter AutomobileExhaustSystem)
(typicallyContainsPart CatalyticConverter AutomobileExhaustSystem)

(=>
  (and
    (instance ?E Exhaust)
    (material Fuel ?E)
    (instance ?T Transfer)
    (instance ?ENG Engine)
    (origin ?T ?ENG)
    (instance ?CC CatalyticConverter)
    (destination ?T ?CC)
    (objectTransferred ?T ?E))
  (hasPurpose ?CC
    (exists (?C)
      (and 
        (instance ?C Combustion)
        (instrument ?C ?CC)
        (patient ?C ?E)
        (eventLocated ?C ?CC)))))

(subclass Cavitating LiquidMotion)
(termFormat EnglishLanguage Cavitating "cavitating")
(documentation Cavitating EnglishLanguage "A process whereby a &%PartialVacuum forms
in a &%Liquid, near the blades or impellers of a &%Pump, reducing its ability to
move the liquid.")

(=>
  (and
    (instance ?C Cavitating)
    (instance ?P Pump)
    (attribute ?P DeviceOn)
    (attribute ?L1 Liquid)
    (contains ?P ?L1))
  (exists (?PP)
    (and
      (part ?PP ?P)
      (hasPurpose ?PP
        (and
          (attribute ?L2 Liquid)
          (meetsSpatially ?L2 ?PP)))
      (holdsDuring 
        (WhenFn ?C)
        (not
          (exists (?L3)
            (and
              (attribute ?L3 Liquid)
              (meetsSpatially ?PP ?L3))))))))

(instance molecularRatio TernaryRelation)
(format EnglishLanguage molecularRatio "the number of molecules of %1 in a molecule
of %3 is %n %2")
(documentation molecularRatio EnglishLanguage "The number of molecules of a particular
&%ElementalSubstance in a given &%CompoundSubstance.")
(domainSubclass molecularRatio 1 ElementalSubstance)
(domain molecularRatio 2 Integer)
(domainSubclass molecularRatio 3 CompoundSubstance)

(=>
  (and
    (instance ?CS1 ?CLASS)
    (subclass ?CLASS CompoundSubstance)
    (not
      (exists (?CS2)
        (and
          (instance ?CS2 ?CLASS)
          (part ?CS2 ?CS1))))
    (molecularRatio ?ECLASS ?N ?CLASS)
    (instance ?G Group)
    (member ?E ?G)
    (part ?E ?CS1)
    (instance ?E ?ECLASS))
  (memberCount ?G ?N)) 

(subclass Chlorofluorocarbon CompoundSubstance)
(termFormat EnglishLanguage Chlorofluorocarbon "chlorofluorocarbon")
(documentation Chlorofluorocarbon EnglishLanguage "A chlorofluorocarbon (CFC) is an 
organic compound that contains carbon, chlorine, and fluorine, produced as a volatile 
derivative of methane and ethane. A common subclass are the hydrochlorofluorocarbons 
(HCFCs), which contain hydrogen, as well. They are also commonly known by the DuPont 
trade name Freon. The most common representative is dichlorodifluoromethane (R-12 or 
Freon-12). Many CFCs have been widely used as refrigerants, propellants (in aerosol 
applications), and solvents. The manufacture of such compounds has been phased out 
by the Montreal Protocol because they contribute to ozone depletion. [from Wikipedia]")

(subclass Freon12 Chlorofluorocarbon)
(termFormat EnglishLanguage Freon12 "freon-12")
(documentation Freon12 EnglishLanguage "A &%Chlorofluorocarbon with formula CCl2F2,
which prior to widespread environmental concerns about its use was the most common
refridgerant.")
(molecularRatio Carbon 1 Freon12)
(molecularRatio Chlorine 2 Freon12)
(molecularRatio Fluorine 2 Freon12)

(subclass Clutch Device)
(termFormat EnglishLanguage Clutch "clutch")
(documentation Clutch EnglishLanguage "A &%Device used to engage and disengage moving
parts.  It consists of a friction plate and a spring-loaded mechanism that engages
the plate with varying force as the clutch is released.  In an &%Automobile it
ultimately connects the &%Engine with the &%Gearbox. For the purposes of this
definition, we consider the &%DeviceOn state of the clutch to mean that it is
not engaged with the clutch plate.")

(=>
  (and
    (instance ?C Clutch)
    (instance ?A Automobile)
    (instance ?E Engine)
    (instance ?G Gearbox)
    (instance ?GEAR Gear)
    (part ?GEAR ?G)
    (part ?G ?A)
    (part ?C ?A)
    (part ?E ?A)
    (instance ?M Motion)
    (patient ?M ?E)
    (attribute ?C DeviceOn))
  (not
    (exists (?M2)
      (and
        (instance ?M2 Motion)
        (patient ?M2 ?G)
        (causes ?M ?M2)))))

(=>
  (and
    (instance ?C Clutch)
    (instance ?A Automobile)
    (instance ?E Engine)
    (instance ?G Gearbox)
    (instance ?GEAR Gear)
    (part ?GEAR ?G)
    (part ?G ?A)
    (part ?C ?A)
    (part ?E ?A)
    (instance ?M Motion)
    (patient ?M ?E)
    (attribute ?C DeviceOff))
  (exists (?M2)
    (and
      (instance ?M2 Motion)
      (patient ?M2 ?G)
      (causes ?M ?M2))))

(instance minCylinderVolume BinaryPredicate)
(domain minCylinderVolume 1 Engine)
(domain minCylinderVolume 2 VolumeMeasure)
(format EnglishLanguage minCylinderVolume 
"the minimum volume of the cylinders in the engine %1 is %n %2")

(documentation minCylinderVolume EnglishLanguage "The volume of the
&%CombustionChamber of the &%EngineCylinder at the maximum point of
compression of the cylinder.")

(=>
  (and
    (instance ?EC EngineCycle)
    (instance ?E InternalCombustionEngine)
    (instance ?CC CombustionChamber)
    (part ?CC ?E)
    (eventLocated ?EC ?E)
    (holdsDuring 
      (WhenFn ?EC)
      (minCylinderVolume ?E ?V1)))
  (not
    (exists (?V2 ?T)
      (and
        (during ?T (WhenFn ?EC))
        (holdsDuring ?T
          (measure ?CC ?V2))
        (greaterThan ?V1 ?V2)))))

(instance maxCylinderVolume BinaryPredicate)
(domain maxCylinderVolume 1 Engine)
(domain maxCylinderVolume 2 VolumeMeasure)
(format EnglishLanguage maxCylinderVolume 
"the maximum volume of the cylinders in the engine %1 is %n %2")
(documentation maxCylinderVolume EnglishLanguage "The volume of the
&%CombustionChamber of the &%EngineCylinder at the maximum point of
extension of the piston.")

(=>
  (and
    (instance ?EC EngineCycle)
    (instance ?E InternalCombustionEngine)
    (instance ?CC CombustionChamber)
    (part ?CC ?E)
    (eventLocated ?EC ?E)
    (holdsDuring 
      (WhenFn ?EC)
      (maxCylinderVolume ?E ?V1)))
  (not
    (exists (?V2 ?T)
      (and
        (during ?T (WhenFn ?EC))
        (holdsDuring ?T
          (measure ?CC ?V2))
        (greaterThan ?V2 ?V1)))))

(instance compressionRatio BinaryPredicate)
(domain compressionRatio 1 Engine)
(domain compressionRatio 2 RealNumber)
(format EnglishLanguage compressionRatio "the compression ratio of %1 is %n %2")
(documentation compressionRatio EnglishLanguage "The ratio of the volume of the
&%CombustionChamber of the &%EngineCylinder at the maximum point of
compression of the cylinder, to the volume of the chamber with the piston fully
retracted.")

(<=>
  (compressionRatio ?E ?R)
  (and
    (minCylinderVolume ?E (MeasureFn ?MIN ?M))
    (maxCylinderVolume ?E (MeasureFn ?MAX ?M))
    (equal ?R (DivisionFn ?MIN ?MAX))))

(instance pistonStroke BinaryPredicate)
(domain pistonStroke 1 Engine)
(domain pistonStroke 2 LengthMeasure)
(format EnglishLanguage pistonStroke 
"the maximum distance that the pistons of engine %1 travel is %n %2")
(documentation pistonStroke EnglishLanguage "The maximum &%distance that a piston
travels during normal operation of the &%Engine.")

(=>
  (and
    (instance ?EC EngineCycle)
    (instance ?E InternalCombustionEngine)
    (instance ?P Piston)
    (part ?P ?E)
    (patient ?EC ?P)
    (eventLocated ?EC ?E)
    (pistonStroke ?E ?LM))
  (not
    (exists (?T1 ?T2 ?L1 ?L2 ?D)
      (and
        (during ?T1 (WhenFn ?EC))
        (during ?T2 (WhenFn ?EC))
        (holdsDuring ?T1
          (located ?P ?L1))
        (holdsDuring ?T2
          (located ?P ?L2))
        (distance ?L1 ?L2 ?D)
        (greaterThan ?D ?LM)))))

(subclass EngineConnectingRod Device)
(termFormat EnglishLanguage EngineConnectingRod "engine connecting rod")
(documentation EngineConnectingRod EnglishLanguage "A &%Device that connects
the &%Piston to the &%Crankshaft.")

(=>
  (instance ?ECR EngineConnectingRod)
  (hasPurpose ?ECR
    (exists (?P ?C)
      (and
        (instance ?P Piston)
        (instance ?C Crankshaft)
        (connectedEngineeringComponents ?P ?ECR)
        (connectedEngineeringComponents ?C ?ECR)))))

(subclass Compressing Motion)
(termFormat EnglishLanguage Compressing "compressing")
(documentation Compressing EnglishLanguage "Forcing some &%SelfConnectedObject
into a smaller space than at the beginning of the action.")

(=>
  (and
    (instance ?SCO SelfConnectedObject)
    (instance ?C Compressing)
    (patient ?C ?SCO)
    (holdsDuring 
      (ImmediatePastFn (WhenFn ?C))
      (measure ?SCO (MeasureFn ?N1 ?V)))
    (instance ?V VolumeMeasure)
    (holdsDuring 
      (ImmediateFutureFn (WhenFn ?C))
      (measure ?SCO (MeasureFn ?N2 ?V))))
  (greaterThan ?N1 ?N2))

(subclass AirConditioningCompressor GasCompressor)
(termFormat EnglishLanguage AirConditioningCompressor "air conditioning compressor")
(documentation AirConditioningCompressor EnglishLanguage "A &%Machine that pulls
refrigerant in its &%Gas state out of the &%AirConditioningEvaporator and 
subjects it to &%Compressing in a &%VaporCompressionCycle.")
(typicalPart AirConditioningCompressor AirConditioner)
(typicallyContainsPart AirConditioningCompressor AirConditioner)

(=>
  (instance ?ACC AirConditioningCompressor)
  (hasPurpose ?ACC
    (exists (?C)
      (and
        (instance ?C Cooling)
        (instrument ?C ?ACC)))))

(subclass VaporCompressionCycle Cooling)
(termFormat EnglishLanguage VaporCompressionCycle "vapor compression cycle")
(documentation VaporCompressionCycle EnglishLanguage "A complete cycle of &%Compressing,
&%Condensing and &%Evaporating, for the purpose of &%Cooling.")
(externalImage VaporCompressionCycle "http://upload.wikimedia.org/wikipedia/commons/5/5d/Refrigeration.png")

(=>
  (instance ?VCC VaporCompressionCycle)
  (exists (?CMP ?COND ?EV ?CMP2)
    (and
      (instance ?CMP Compressing)
      (instance ?COND Condensing)
      (instance ?EV Evaporating)
      (instance ?CMP2 Compressing)
      (subProcess ?CMP ?VCC)
      (subProcess ?COND ?VCC)
      (subProcess ?EV ?VCC)
      (subProcess ?CMP2 ?VCC)
      (meetsTemporally 
        (WhenFn ?CMP)
        (WhenFn ?COND))
      (meetsTemporally 
        (WhenFn ?COND)
        (WhenFn ?EV))
      (meetsTemporally 
        (WhenFn ?EV)
        (WhenFn ?CMP2)))))

(subclass AirConditioningCondenser Machine)
(termFormat EnglishLanguage AirConditioningCondenser "air conditioning condenser")
(documentation AirConditioningCondenser EnglishLanguage "A &%Machine that pulls
compressed refrigerant in its &%Gas state out of the &%AirConditioningCompressor and turns 
it into a &%Liquid via a &%VaporCompressionCycle.")
(typicalPart AirConditioningCondenser AirConditioner)
(typicallyContainsPart AirConditioningCondenser AirConditioner)

(=>
  (instance ?ACC AirConditioningCondenser)
  (hasPurpose ?ACC
    (exists (?C)
      (and
        (instance ?C Cooling)
        (instrument ?C ?ACC)))))
      
(=>
  (instance ?ACC AirConditioningCondenser)
  (hasPurpose ?ACC
    (exists (?C)
      (and
        (instance ?C Condensing)
        (instrument ?C ?ACC)))))

(subclass AirConditioningEvaporator Machine)
(termFormat EnglishLanguage AirConditioningEvaporator "air conditioning evaporator")
(documentation AirConditioningEvaporator EnglishLanguage "A &%Machine that pulls
refrigerant in its &%Liquid state out of the &%AirConditioningCondenser and turns 
it into a &%Gas via a &%VaporCompressionCycle.")
(typicalPart AirConditioningEvaporator AirConditioner)
(typicallyContainsPart AirConditioningEvaporator AirConditioner)

(=>
  (instance ?ACE AirConditioningEvaporator)
  (hasPurpose ?ACE
    (exists (?C)
      (and
        (instance ?C Cooling)
        (instrument ?C ?ACE)))))
      
(=>
  (instance ?ACE AirConditioningEvaporator)
  (hasPurpose ?ACE
    (exists (?C)
      (and
        (instance ?E Evaporating)
        (instrument ?C ?ACE)))))

(instance RevolutionsPerMinute UnitOfMeasure)
(termFormat EnglishLanguage RevolutionsPerMinute "revolutions per minute")
(documentation RevolutionsPerMinute EnglishLanguage "The number 
of complete revolutions in one plane of motion for a given object.")

(instance RotationFn BinaryFunction)
(format EnglishLanguage RotationFn "the rotation of %1 during %2")
(documentation RotationFn EnglishLanguage "A &%Function that maps an instance
of &%Rotating to the speed of the rotation.")
(domain RotationFn 1 Rotating)
(domain RotationFn 2 TimeDuration)
(range RotationFn FunctionQuantity)

(subclass CVJoint MechanicalJoint)
(termFormat EnglishLanguage CVJoint "C.V. joint")
(documentation CVJoint EnglishLanguage "A &%MechanicalJoint that allows two joined
shafts to turn at the same speed throughout a range of angles with respect to 
each other.  The most common type of CV joint is a &%BallJoint, although there are
also other kinds.")

(=>
  (and
    (instance ?SH1 Shaft)
    (instance ?SH2 Shaft)
    (not
      (equal ?SH1 ?SH2))
    (instance ?R1 Rotating)
    (patient ?R1 ?SH1)
    (instance ?R2 Rotating)
    (patient ?R2 ?SH2)
    (causes ?R1 ?R2)
    (instance ?CV CVJoint)
    (connectedEngineeringComponents ?R1 ?CV)
    (connectedEngineeringComponents ?R2 ?CV)
    (holdsDuring 
      (WhenFn ?R1)
      (equal ?SH1 (RotationFn ?N ?T))))
  (holdsDuring 
    (WhenFn ?R2)
    (equal ?SH2 (RotationFn ?N ?T))))

(subclass EngineCoolingSystem PhysicalSystem)
(termFormat EnglishLanguage EngineCoolingSystem "engine cooling system")
(documentation EngineCoolingSystem EnglishLanguage "A system designed to keep the 
engine cool (and therefore prevent it from seizing), that may also heat the
passenger compartment as a byproduct.")
(typicallyContainsPart EngineCoolingSystem Pump)

(=>
  (and
    (instance ?ECS EngineCoolingSystem)
    (instance ?E Engine)
    (instance ?A Automobile)
    (part ?ECS ?A)
    (part ?E ?A))
  (hasPurpose ?ECS
    (exists (?C)
      (and
        (instance ?C Cooling)
        (instrument ?C ?ECS)
        (patient ?C ?E)))))

(subclass LiquidEngineCoolingSystem EngineCoolingSystem)
(termFormat EnglishLanguage LiquidEngineCoolingSystem "water cooling system")
(documentation LiquidEngineCoolingSystem EnglishLanguage "A kind of 
&%EngineCoolingSystem found in most &%Automobiles, that uses a liquid coolant 
to cool the &%Engine. It consists of a series of tubes through which a coolant 
can flow, a radiator, a pump, and a temperature sensor that allows
the engine to reach a normal operating temperature before starting the cooling
mechanism.")    
(typicallyContainsPart Thermometer LiquidEngineCoolingSystem)

(=>
  (and
    (instance ?LECS LiquidEngineCoolingSystem)
    (instance ?C Cooling)
    (instrument ?C ?LECS))
  (exists (?L)
    (and
      (attribute ?L Liquid)
      (objectTransferred ?C ?L))))

(subclass AirEngineCoolingSystem EngineCoolingSystem)
(termFormat EnglishLanguage AirEngineCoolingSystem "air cooling system")
(documentation AirEngineCoolingSystem EnglishLanguage "A kind of 
&%EngineCoolingSystem less commonly found in &%Automobiles than
a &%LiquidEngineCoolingSystem. It uses a &%Air to cool the &%Engine.") 

(=>
  (and
    (instance ?LECS AirEngineCoolingSystem)
    (instance ?C Cooling)
    (instrument ?C ?LECS))
  (exists (?A)
    (and
      (instance ?A Air)
      (objectTransferred ?C ?A))))

(subclass Radiator EngineeringComponent)
(termFormat EnglishLanguage Radiator "radiator")
(documentation Radiator EnglishLanguage "A &%Device which is designed for
having a &%Liquid travel through a metal honeycomb, in order to cool the
liquid, which in turn is used to cool something else.")
(typicalPart Radiator LiquidEngineCoolingSystem)
(typicallyContainsPart Radiator LiquidEngineCoolingSystem)

(=>
  (instance ?R Radiator)
  (hasPurpose ?R
    (exists (?C)
      (and
        (instance ?C Cooling)
        (instrument ?C ?R)))))

(subclass EngineCranking Motion)
(termFormat EnglishLanguage EngineCranking "engine cranking")
(documentation EngineCranking EnglishLanguage "Starting an 
&%InternalCombustionEngine, in which an electric motor is employed to
initiate &%Rotating of the &%Crankshaft and &%Flywheel to the point where 
&%Combusion can sustain the rotation.")

(=>
  (instance ?EC EngineCranking)
  (exists (?EM ?E ?S ?R1 ?C ?R2)
    (and
      (instance ?EM ElectricalMotor)
      (instance ?E InternalCombustionEngine)
      (instance ?S Shaft)
      (instance ?C Crankshaft)
      (part ?S ?EM)
      (instance ?R1 Rotating)
      (patient ?R ?S)
      (part ?C ?E)
      (instance ?R2 Rotating)
      (patient ?R2 ?C)
      (part ?C ?E)
      (causes ?R1 ?R2))))

(subclass Flywheel EngineeringComponent)
(termFormat EnglishLanguage Flywheel "flywheel")
(documentation Flywheel EnglishLanguage "Any &%Device designed to smooth
the application of force or keep a &%Shaft spinning in the absence of other
power inputs.  It can either be massive or spin quickly (or both), in order 
to have significant intertia.")

(=>
  (instance ?F Flywheel)
  (hasPurpose ?F
    (exists (?R1 ?R2)
      (and
        (instance ?R1 Rotating)
        (instance ?R2 Rotating)
        (patient ?R1 ?F)
        (causes ?R1 ?R2)))))

(instance RightAngle PositionalAttribute)

(subclass Differential GearTrain)
(termFormat EnglishLanguage Differential "differential")
(documentation Differential EnglishLanguage "A set of &%Gears that change the
axis of &%Rotating of a &%Shaft, in order to transmit power from an &%Automobile
&%Engine to its &%Wheels.")

(=>
  (instance ?D Differential)
  (exists (?G1 ?G2)
    (and 
      (instance ?G1 Gear)
      (instance ?G2 Gear)
      (part ?G1 ?D)
      (part ?G2 ?D)
      (orientation ?G1 ?G2 RightAngle))))

(subclass Distributor Device)
(termFormat EnglishLanguage Distributor "distributor")
(documentation Distributor EnglishLanguage "A mechanical &%Device that is part of an
&%InternalCombustionEngine that sends electric power to the &%SparkPlugs at
intervals that track the speed of engine rotation.  They have been largely
superceded in modern &%Automobile engines by electronic devices.")

(=>
  (instance ?D Distributor)
  (hasPurpose ?D
    (exists (?SP ?S ?O ?R ?E)
      (and
        (instance ?E Engine)
        (instance ?SP SparkPlug)
        (instance ?S Spark)
        (part ?O ?D)
        (part ?D ?E)
        (part ?SP ?E)
        (instance ?R Rotating)
        (causes ?R ?S)))))

(subclass Pulley DriveComponent)
(termFormat EnglishLanguage Pulley "pulley")
(documentation Pulley EnglishLanguage "A grooved wheel designed to hold a 
&%Drivebelt, and transmit the force of &%Rotating to another &%Pulley.")

(=>
  (instance ?P Pulley)
  (hasPurpose ?P
    (exists (?P2 ?D ?R1 ?R2)
      (and
        (instance ?P2 Pulley)
        (not
          (equal ?P ?P2))
        (instance ?D Drivebelt)
        (instance ?R1 Rotating)
        (instance ?R2 Rotating)
        (connectedEngineeringComponents ?P ?D)
        (connectedEngineeringComponents ?P2 ?D)
        (patient ?R1 ?P)
        (patient ?R2 ?P2)
        (causes ?R1 ?R2)))))

(subclass Drivebelt Device)
(termFormat EnglishLanguage Drivebelt "drivebelt")
(documentation Drivebelt EnglishLanguage "A &%Pliable belt that links two
&%Pulleys")

(=>
  (instance ?D Drivebelt)
  (attribute ?D Pliable))

(subclass Driveshaft Shaft)
(termFormat EnglishLanguage Driveshaft "driveshaft")
(documentation Driveshaft EnglishLanguage "A &%Shaft that transmits power
from the &%AutomobileTransmission to a &%Differential or more directly to
the &%Wheels of an &%Automobile.")

(=>
  (instance ?D Driveshaft)
  (hasPurpose ?D
    (exists (?R1 ?R2 ?W ?A)
      (and
        (instance ?A Automobile)
        (instance ?W Wheel)
        (part ?D ?A)
        (part ?W ?A)
        (instance ?R1 Rotating)
        (patient ?R1 ?D)
        (patient ?R2 ?W)
        (causes ?R1 ?R2)))))

(subclass AutomobileTransmission Gearbox)
(termFormat EnglishLanguage AutomobileTransmission "transmission")
(documentation AutomobileTransmission EnglishLanguage "A &%Gearbox with
several &%Gears that allow a given rotational speed of the &%Crankshaft
to be translated ultimately to different speeds of the &%Driveshaft (within
the power and maximum RPM capabilities of the &%Engine).")

(=>
  (instance ?AT AutomobileTransmission)
  (hasPurpose ?AT
    (exists (?C ?D ?A ?R1 ?N1 ?R2 ?R3 ?R4 ?N2 ?N3)
      (and
        (instance ?C Crankshaft)
        (instance ?D Driveshaft)
        (instance ?A Automobile)
        (part ?D ?A)
        (part ?AT ?A)
        (part ?C ?A)
        (connectedEngineeringComponents ?C ?AT)
        (connectedEngineeringComponents ?D ?AT)
        (instance ?R1 Rotating)
        (instance ?R2 Rotating)        
        (instance ?R3 Rotating)
        (instance ?R4 Rotating)
        (patient ?R1 ?C)
        (patient ?R2 ?C)
        (patient ?R3 ?D)
        (patient ?R4 ?D)
        (causes ?R1 ?R3)
        (causes ?R2 ?R4)
        (not
          (equal ?R1 ?R2))
        (holdsDuring ?R1
          (measure ?C (RotationFn ?N1 MinuteDuration)))
        (holdsDuring ?R2
          (measure ?C (RotationFn ?N1 MinuteDuration))) 
        (holdsDuring ?R3
          (measure ?D (RotationFn ?N2 MinuteDuration))) 
        (holdsDuring ?R4
          (measure ?D (RotationFn ?N3 MinuteDuration))) 
        (not
          (equal ?N2 ?N3))))))

(subclass ElectricTransmission Transfer)
(subclass ElectricTransmission RadiatingElectromagnetic)
(termFormat EnglishLanguage ElectricTransmission "electric transmission")
(documentation ElectricTransmission EnglishLanguage "The movement of a
electric potential (modeled as a &%Substance) from one point to another
necessarily through a conductive medium (although the degree of 
conductivity may be quite low, as in &%Lightning through &%Air).")

(=>
  (instance ?EC ElectricTransmission)
  (exists (?E)
    (and
      (instance ?E Electricity)
      (objectTransferred ?EC ?E))))

(subclass Charging ElectricTransmission)
(termFormat EnglishLanguage Charging "charging")
(documentation Charging EnglishLanguage "The &%Process of moving electric
potential into a &%RechargeableBattery.")

(=>
  (instance ?C Charging)
  (exists (?RB)
    (and
      (instance ?RB RechargeableBattery)
      (destination ?C ?RB))))

(documentation Charger EnglishLanguage "An &%ElectricDevice that is the &%instrument of &%Charging")
(subclass Charger ElectricDevice)
(=>
  (instance ?CH Charger)
  (hasPurpose ?CH
    (exists (?P)
      (and
        (instance ?P Charging)
        (instrument ?P ?CH)))))

(subclass Discharging ElectricTransmission)
(termFormat EnglishLanguage Discharging "discharging")
(documentation Charging EnglishLanguage "The &%Process of moving electric
potential out of a &%Battery.")

(=>
  (instance ?D Discharging)
  (exists (?B)
    (and
      (instance ?B Battery)
      (origin ?D ?B))))

(subclass RechargeableBattery Battery)
(termFormat EnglishLanguage RechargeableBattery "rechargeable battery")
(documentation RechargeableBattery EnglishLanguage "A &%Battery that may
be recharged after discharge.  &%LeadAcidWetBattery(s) are the most common
subclass.")

(=>
  (instance ?RB RechargeableBattery)
  (capability Charging destination ?RB))

(subclass NonRechargeableBattery Battery)
(termFormat EnglishLanguage NonRechargeableBattery "non-rechargeable battery")
(documentation NonRechargeableBattery EnglishLanguage "A &%Battery that is
not capable of being subjected to &%Recharging.")

(=>
  (instance ?RB RechargeableBattery)
  (not 
    (capability Charging destination ?RB)))

(subclass LeadAcidWetBattery RechargeableBattery)
(termFormat EnglishLanguage LeadAcidWetBattery "lead acid battery")
(documentation LeadAcidWetBattery EnglishLanguage "One of the most prevalent
types of &%Battery.  It consists of plates made (in part) of &%Lead, in
an &%Acid solution.")

(=>
  (instance ?LAWB LeadAcidWetBattery)
  (material Lead ?LAWB))

(=>
  (instance ?LAWB LeadAcidWetBattery)
  (material Acid ?LAWB))

(=>
  (instance ?LAWB LeadAcidWetBattery)
  (material Water ?LAWB))

(externalImage LeadAcidWetBattery "http://en.wikipedia.org/wiki/File:Photo-CarBattery.jpg")

(subclass ChemicalAcid Substance)
(termFormat EnglishLanguage ChemicalAcid "acid")
(documentation ChemicalAcid EnglishLanguage "Acids are substances which increase 
the concentration of hydronium ions (H3O+) in solution, substances which 
can act as a proton donor, and substances which are electron-pair acceptors.
This is a restrictive definition combining the 'Arrhenius definition',
the 'Brønsted-Lowry definition' and the 'Lewis definition' [adapted from Wikipedia]")

(subclass SulfuricAcid ChemicalAcid)
(termFormat EnglishLanguage SulfuricAcid "sulfuric acid")
(documentation SulfuricAcid EnglishLanguage "Sulfuric acid 
is a highly corrosive strong mineral acid with the molecular formula H2SO4. 
It is a colorless to slightly yellow viscous &%Liquid and is soluble in &%Water.
The corrosiveness of it is mainly due to its strong acidic nature, strong 
dehydrating property and if concentrated strong oxidizing property.
It has many applications and is a central &%Substance in the chemical industry. 
Principal uses include &%LeadAcidWetBattery(s) for &%Automobiles and other &%Vehicles, 
mineral processing, fertilizer manufacturing, oil refining, wastewater 
processing, and &%ChemicalSynthesis. [from Wikipedia]")

(molecularRatio Hydrogen 2 SulfuricAcid)
(molecularRatio Sulphur 1 SulfuricAcid)
(molecularRatio Oxygen 4 SulfuricAcid)

(subclass Electrolyte ConductorSubstance)
(termFormat EnglishLanguage Electrolyte "electrolyte")
(documentation Electrolyte EnglishLanguage "A &%Substance that conducts 
&%Electricity and is a &%Liquid, typically found in &%Battery(s).  In a
&%LeadAcidWetBattery the electrolyte is a &%Mixture of distilled &%Water and
&%SulfuricAcid.")
 
(=>
  (instance ?E Electrolyte)
  (hasPurpose ?E
    (exists (?ET)
      (and
        (instance ?ET ElectricTransmission)
        (patient ?ET ?E)
        (holdsDuring ?ET
          (attribute ?E Liquid))))))

(subclass EngineControlModule Computer)
(termFormat EnglishLanguage EngineControlModule "engine control module")
(documentation EngineControlModule EnglishLanguage "A &%Computer that is 
present in most modern &%Automobiles, which controls the major functions of
the &%Engine, including the &%Air - &%Fuel &%Mixture, ignition timing and
pollution control systems.")

(=>
  (instance ?ECM EngineControlModule)
  (hasPurpose ?ECM
    (exists (?A ?E ?P1 ?P2)
      (and
        (instance ?A Automobile)
        (instance ?E Engine)
        (instance ?P1 Process)
        (instance ?P2 Process)
        (part ?E ?A)
        (part ?ECM ?A)
        (eventLocated ?P1 ?ECM)
        (eventLocated ?P2 ?E)
        (causes ?P1 ?P2)))))

(subclass GasPedal Device)
(termFormat EnglishLanguage GasPedal "gas pedal")
(documentation GasPedal EnglishLanguage "A &%Device that controls the
flow of &%Fuel (which may be &%Diesel as well as &%Gasoline) to the
&%Engine.")

(=>
  (instance ?GP GasPedal)
  (hasPurpose ?GP
    (exists (?P ?T ?F ?E ?A)
      (and
        (instance ?P Pushing)
        (instance ?T Transfer)
        (instance ?F Fuel)
        (instance ?E Engine)
        (instance ?A Automobile)
        (part ?GP ?A)
        (part ?E ?A)
        (destination ?P ?GP)
        (destination ?T ?E)
        (patient ?T ?F)
        (causes ?P ?T)))))

(instance engineIdleSpeed BinaryPredicate)
(domain engineIdleSpeed 1 InternalCombustionEngine)
(domain engineIdleSpeed 2 FunctionQuantity)
(format EnglishLanguage engineIdleSpeed "the idle speed of %1 is %n %2")
(documentation engineIdleSpeed EnglishLanguage "The rotation rate of the
&%Crankshaft that exists when the &%Engine is running but the &%GasPedal
is not depressed. Note that under certain conditions of load on the engine 
and gear ratio, the same speed is possible even when the gas pedal is
depressed.")

(=>
  (and
    (holdsDuring ?T
      (measure ?C ?S))
    (engineIdleSpeed ?E ?S)
    (instance ?A Automobile)
    (part ?E ?A)
    (part ?C ?E))
  (modalAttribute
    (not
      (exists (?P ?GP)
        (and
          (during ?P ?T)
          (instance ?P Pushing)
          (destination ?P ?GP)
          (part ?GP ?A))))
    Likely))

(=>
  (and
    (engineIdleSpeed ?E (RotationFn ?N1 ?M))
    (instance ?A Automobile)
    (instance ?P GasPedal)
    (instance ?P Pushing)
    (destination ?P ?GP)
    (part ?GP ?A)
    (instance ?C Crankshaft)
    (part ?C ?A)
    (measure ?C (RotationFn ?N2 ?M)))
  (modalAttribute
    (greaterThan ?N2 ?N1)
    Likely))

(subclass AutomobileExhaustSystem PhysicalSystem)
(termFormat EnglishLanguage AutomobileExhaustSystem "exhaust system")
(documentation AutomobileExhaustSystem EnglishLanguage "A &%part of an
&%Automobile that handles the venting of &%Exhaust from the &%Engine.
It typically includes an exhaust manifold, &%Muffler and &%Tailpipe.
Modern engines may also include a &%CatalyticConverter and exhaust
recirculation hoses and controls.")

(subclass AutomobileMuffler Device)
(termFormat EnglishLanguage AutomobileMuffler "muffler")
(documentation AutomobileMuffler EnglishLanguage "A &%part of an
&%AutomobileExhaustSystem that serves to reduce the amount of noise
transmitted from the &%Engine to the environment.")

(subclass ExhaustManifold Device)
(termFormat EnglishLanguage ExhaustManifold "exhaust manifold")
(documentation ExhaustManifold EnglishLanguage "A junction of several &%Tubes,
which take exhaust &%Gases from the &%Engine &%Cylinders and route them to the
&%Muffler and &%Tailpipe. Note that this class also includes what are known as
headers, since a header is essentially just a high performance manifold.")

(typicalPart ExhaustManifold AutomobileExhaustSystem)
(typicallyContainsPart ExhaustManifold AutomobileExhaustSystem)

(=>
  (instance ?EM ExhaustManifold)
  (hasPurpose ?EM
    (exists (?A ?E ?C ?M ?T)
      (and
        (instance ?A Automobile)
        (instance ?E Exhaust)
        (instance ?C EngineCylinder)
        (instance ?M AutomobileMuffler)
        (instance ?T Transfer)
        (part ?EM ?A)
        (part ?C ?A)
        (part ?M ?A)
	(origin ?T ?C)
        (destination ?T ?M)
        (patient ?T ?E)
        (instrument ?T ?E)))))

(=>
  (instance ?EM ExhaustManifold)
  (exists (?T1 ?T2)
    (and
      (instance ?T1 Tube)
      (instance ?T2 Tube)
      (not
        (equal ?T1 ?T2))
      (part ?T1 ?EM)
      (part ?T2 ?EM))))

(subclass ExhaustValve Valve)
(termFormat EnglishLanguage ExhaustValve "exhaust valve")
(documentation ExhaustValve EnglishLanguage "A &%Valve that opens to let the
&%Exhaust escape into the &%ExhaustManifold.")
(typicalPart ExhaustValve FourStrokeEngine)
(typicallyContainsPart ExhaustValve FourStrokeEngine)

(=>
  (instance ?EV ExhaustValve)
  (hasPurpose ?EV
    (exists (?E ?T)
      (and
        (instance ?T Transfer)
        (objectTransferred ?T ?E)
        (path ?T ?EV)
        (instance ?E Exhaust)))))

(=>
  (instance ?EV ExhaustValve)
  (hasPurpose ?EV
    (exists (?EM)
      (and
        (instance ?EM ExhaustManifold)
        (connectedEngineeringComponents ?EV ?EM)))))

(subclass IntakeValve Valve)
(termFormat EnglishLanguage IntakeValve "intake valve")
(documentation ExhaustValve EnglishLanguage "A &%Valve that opens to let the
&%FuelVapor in to the &%CombustionChamber.")
(typicalPart IntakeValve FourStrokeEngine)
(typicallyContainsPart IntakeValve FourStrokeEngine)

(=>
  (instance ?IV IntakeValve)
  (hasPurpose ?IV
    (exists (?A ?FV ?CC ?T)
      (and
        (instance ?A Automobile)
        (instance ?FV FuelVapor)
        (instance ?CC CombustionChamber)
        (instance ?T Transfer)
        (part ?IV ?A)
        (part ?CC ?A)
        (patient ?T ?FV)
        (path ?T ?IV)
        (destination ?T ?CC)))))

(subclass FanBelt Drivebelt)
(termFormat EnglishLanguage FanBelt "fan belt")
(documentation FanBelt EnglishLanguage "A &%Drivebelt driven from a &%Pulley &%connected
to the &%Crankshaft, which drives other systems, such as the &%EngineFan, &%EngineWaterPump
etc.")

(=>
  (instance ?FB FanBelt)
  (hasPurpose ?FB
    (exists (?P1 ?P2 ?C ?A)
      (and
        (instance ?P1 Pulley)
        (instance ?P2 Pulley)
        (not
          (equal ?P1 ?P2))
        (instance ?C Crankshaft)
        (instance ?A Automobile)
        (part ?P1 ?A)
        (part ?P2 ?A)
        (part ?C ?A)
        (part ?FB ?A)
        (connectedEngineeringComponents ?C ?P1)
        (connectedEngineeringComponents ?P1 ?FB)
        (connectedEngineeringComponents ?FB ?P2)))))

(=>
  (and
    (instance ?FB FanBelt)
    (instance ?EF EngineFan)
    (instance ?A Automobile)
    (part ?FB ?A)
    (part ?EF ?A)
    (instance ?M Motion)
    (patient ?M ?FB))
  (hasPurpose ?FB
    (exists (?M2)
      (and
        (instance ?M2 Rotating)
        (causes ?M ?M2)
        (patient ?M2 ?EF)))))

(subclass EngineFan FanDevice)
(termFormat EnglishLanguage EngineFan "engine fan")
(documentation EngineFan EnglishLanguage "A &%FanDevice that is part of an &%Engine, designed
for &%Cooling the engine, and therefore distinguished from fans that are for
moving &%Air in the passenger compartment of an &%Automobile.")

(=>
  (instance ?EF EngineFan)
  (hasPurpose ?EF
    (exists (?C ?E ?A)
      (and 
        (instance ?A Automobile)
        (instance ?C Cooling)
        (instance ?E InternalCombustionEngine)
        (part ?E ?A)
        (part ?EF ?A)
        (instrument ?C ?EF)
        (patient ?C ?E)))))

(subclass WaterPump Pump)
(termFormat EnglishLanguage WaterPump "water pump")
(documentation WaterPump EnglishLanguage "A &%Pump that is designed to move &%Water.")

(=>
  (instance ?WP WaterPump)
  (hasPurpose ?WP
    (exists (?T ?W)
      (and
        (instance ?T Transfer)
        (instance ?W Water)
        (objectTransferred ?T ?W)
        (instrument ?T ?WP)))))

(subclass EngineWaterPump WaterPump)
(termFormat EnglishLanguage EngineWaterPump "engine water pump")
(documentation EngineWaterPump EnglishLanguage "A &%WaterPump that is intended to move
&%Water (and possibly other additives such as &%Alcohol to lower the &%meltingPoint) 
in the &%EngineCoolingSystem.")

(typicalPart EngineWaterPump EngineCoolingSystem)
(typicallyContainsPart EngineWaterPump EngineCoolingSystem)

(subclass FeelerGauge MeasuringDevice)
(termFormat EnglishLanguage FeelerGauge "feeler gauge")
(documentation FeelerGauge EnglishLanguage "A &%Device used to measure small gaps.  It
is typically a &%Collection of several such gauges of varying thicknesses that a user
places into the gap until one is found that fits with slight resistence, which indicates
a good assessment of the size of the gap.  A typical use is measure the gap between
electrodes of a &%SparkPlug.")

(=>
  (instance ?FG FeelerGauge)
  (hasPurpose ?FG
    (exists (?TP ?M)
      (and
        (instance ?M Measuring)
        (instance ?TP TactilePerception)
        (subProcess ?TP ?M)
        (instrument ?M ?FG)))))

(instance EngineFlooded RelationalAttribute)
(termFormat EnglishLanguage EngineFlooded "engine flooded")
(documentation EngineFlooded EnglishLanguage "A state in which an &%InternalCombustionEngine
has too much &%Fuel in its &%CombustionChamber to operate as intended.")

(=>
  (and
    (instance ?E InternalCombustionEngine)
    (instance ?CC CombustionChamber)
    (part ?CC ?E)
    (instance ?F Fuel)
    (instance ?M UnitOfVolume)
    (holdsDuring ?T
      (and
        (contains ?CC ?F)
        (measure ?F (MeasureFn ?N1 ?M))
        (attribute ?E EngineFlooded))))
  (hasPurpose ?CC
    (not
      (exists (?F2)
        (and
          (instance ?F2 Fuel)
          (contains ?CC ?F2)
          (measure ?F2 (MeasureFn ?N2 ?M))
          (greaterThanOrEqualTo ?N2 ?N1))))))

(subclass Gasket Device)
(termFormat EnglishLanguage Gasket "gasket")
(documentation Gasket EnglishLanguage "A &%Device that is designed to allow two 
imperfect surfaces to mate cleanly, without gaps, and therefore prevent leakage 
of any &%Liquids.")

;; complex rule below needs review.  It attempts to state that a Gasket has the
;; purpose such that there is no path through the Gasket such that something
;; can arrive outside the gasketed object and its mate without passing through
;; the mate.

(=>
  (instance ?G Gasket)
  (hasPurpose ?G
    (exists (?O1 ?O2)
      (and
        (instance ?O1 CorpuscularObject)
        (instance ?O2 CorpuscularObject)
        (meetsSpatially ?O1 ?G)
        (meetsSpatially ?O2 ?G)
        (not 
          (exists (?H)
            (and
              (instance ?H Hole)
              (equal ?G (HoleHostFn ?H))
              (instance ?T Translocation)
              (path ?T ?H)
              (origin ?T ?O)
              (destination ?T ?D)
              (contains ?O1 ?O)
              (not
                (contains ?O1 ?D))
              (meetsSpatially ?O1 ?D)
              (not
                (exists (?O3)
                  (and 
                    (contains ?H ?O3)
                    (not
                      (contains ?O1 ?O3))
                    (not 
                      (contains ?O2 ?O3))))))))))))

(documentation governorSpeed EnglishLanguage "The maximum speed under normal conditions 
that a governor will allow a moving part or vehicle to attain before killing power. Note
that a vehicle could still conceivably exceed governed speed while coasting down a hill, 
after the governor has activated.") 
(format EnglishLanguage governorSpeed "the maximum speed allowed by %1 is %n %2")

(domain governorSpeed 1 SpeedGovernor) 	
(domain governorSpeed 2 FunctionQuantity) 
(instance governorSpeed BinaryPredicate) 

(=>
  (and
    (governorSpeed ?V ?Q)
    (equal ?FASTPROB
      (ProbabilityFn
        (measure ?V
          (PerFn ?L1 ?T1))))
    (equal ?SLOWPROB
      (ProbabilityFn
        (measure ?V
          (PerFn ?L2 ?T2))))
    (greaterThan
      (PerFn ?L1 ?T1)
      (PerFn ?L2 ?T2)))
  (greaterThan ?SLOWPROB ?FASTPROB))

(subclass SpeedGovernor Device)
(termFormat EnglishLanguage SpeedGovernor "governor")
(documentation SpeedGovernor EnglishLanguage "Any &%Device that is designed
to limit the speed of an object under power.")

(=>
  (and
    (instance ?G SpeedGovernor)
    (governorSpeed ?V ?S)
    (connectedEngineeringComponents ?G ?V))
  (hasPurpose ?G
    (not
      (exists (?SP2)
        (and
          (measure ?V ?SP2)
          (greaterThan ?SP2 ?S))))))
            
(subclass EngineGovernor SpeedGovernor)
(termFormat EnglishLanguage EngineGovernor "governor")
(documentation EngineGovernor EnglishLanguage "A &%Device that limits the 
rotational speed of the &%Crankshaft of an engine.  This is distinguished 
from an &%AutomobileGovernor which is designed to limit the speed of an 
entire &%Automobile.")

(=>
  (and
    (instance ?EG EngineGovernor)
    (instance ?E Engine)
    (connectedEngineeringComponents ?EG ?E)
    (governorSpeed ?E ?S))
  (hasPurpose ?EG
    (not
      (exists (?R ?P ?M)
        (and
          (instance ?P Device)
          (part ?P ?E)
          (instance ?R Rotating)
          (holdsDuring (WhenFn ?R)
            (and
              (measure ?P ?M)
              (greaterThan ?M ?S))))))))

(subclass AutomobileGovernor SpeedGovernor)
(termFormat EnglishLanguage AutomobileGovernor "governor")
(documentation AutomobileGovernor EnglishLanguage "A &%Device that limits the 
translational speed of a &%Vehicle.  This is distinguished 
from an &%EngineGovernor which is designed to limit the rotational speed of part
of an &%Engine.")

(=>
  (and
    (instance ?EG EngineGovernor)
    (instance ?V Vehicle)
    (connectedEngineeringComponents ?EG ?V)
    (governorSpeed ?E ?S))
  (hasPurpose ?EG
    (not
      (exists (?T ?M)
        (and
          (instance ?T Translocation)
          (holdsDuring (WhenFn ?T)
            (and
              (measure ?V ?M)
              (greaterThan ?M ?S))))))))

(subclass Lubricant Substance)
(termFormat EnglishLanguage Lubricant "lubricant")
(documentation Lubricant EnglishLanguage "Any &%Substance that reduces &%Friction
between two objects that are in contact and move with respect to one another.  Note
that this does not include &%CorpuscularObjects like &%BallBearings.")

(subclass Grease Lubricant)
(termFormat EnglishLanguage Grease "grease")
(documentation Grease EnglishLanguage "Any &%Lubricant that is a &%Solid at 
standard ambient temperature.")

(=>
  (and
    (instance ?G Grease)
    (holdsDuring ?T
      (measure ?G (MeasureFn 77 FahrenheitDegree))))
  (holdsDuring ?T
    (attribute ?G Solid)))

(subclass Lubricating Putting)
(termFormat EnglishLanguage Lubricating "lubricating")
(documentation Lubricating EnglishLanguage "&%Putting a &%Lubricant on some
&%Object with the purpose to reduce &%Friction when that part moves against another.")

(=>
  (instance ?LP Lubricating)
  (exists (?L)
    (and
      (instance ?L Lubricant)
      (objectTransferred ?LP ?L))))

(subclass GreaseFitting Device)
(termFormat EnglishLanguage GreaseFitting "grease fitting")
(documentation GreaseFitting EnglishLanguage "A grease fitting is a small &%Device
that is designed for use with a &%GreaseGun, and includes a &%Valve that lets
&%Grease get pumped into (but not out of) a small space, for the purpose of 
&%Lubricating parts.")

(=>
  (instance ?GF GreaseFitting)
  (exists (?V)
    (and
      (instance ?V Valve)
      (part ?V ?GF))))

(=>
  (instance ?GF GreaseFitting)
  (hasPurpose ?GF
    (exists (?P ?G)
      (and
        (instance ?G Grease)
        (instance ?P Putting)
        (path ?P ?GF)
        (objectTransferred ?P ?G)))))

(subclass GreaseGun Device)
(termFormat EnglishLanguage GreaseGun "grease gun")
(documentation GreaseGun EnglishLanguage "A &%Device used to inject &%Grease through
a &%GreaseFitting or other mechanicm. This includes manual guns that use some sort of 
lever action for mechanical advantage as well as electric or battery-powered guns.")

(=>
  (instance ?GG GreaseGun)
  (hasPurpose ?GG
    (exists (?P ?G)
      (and
        (instance ?G Grease)
        (instance ?P Putting)
        (instrument ?P ?GG)
        (objectTransferred ?P ?G)))))

(subclass Hydrometer MeasuringDevice)
(termFormat EnglishLanguage Hydrometer "hydrometer")
(documentation Hydrometer EnglishLanguage "A &%MeasuringDevice that is used in
&%Measuring the &%DensityFn of a liquid, usually with respect to &%Water.")

(=>
  (instance ?H Hydrometer)
  (hasPurpose ?H
    (exists (?M ?S)
      (and
        (instance ?M Measuring)
        (instance ?S Substance)
        (attribute ?S Liquid)
        (patient ?M ?S)
        (instrument ?M ?H)))))

(subclass WireCoil Wire)
(termFormat EnglishLanguage WireCoil "wire coil")
(documentation WireCoil EnglishLanguage "A length of &%Wire wound in
a set of &%Circles or &%Polygons, intended to conduct &%Electricity,
and often used in the construction of &%ElectricalTransformers.")

(=>
  (instance ?WC WireCoil)
  (material ConductorSubstance ?WC))

(=>
  (instance ?WC WireCoil)
  (exists (?P)
    (and
      (part ?P ?WC)
      (attribute ?P ClosedTwoDimensionalFigure))))

(subclass ElectricalTransformer Transformer)
(termFormat EnglishLanguage ElectricalTransformer "electrical transformer")
(documentation ElectricalTransformer EnglishLanguage "A &%Device for converting
one measure of &%Volts to another.  Two coils of wire are inductively coupled
around a common core.  The ratio of the number of windings in each coil is same
as the ratio of the resulting voltages.")

(=>
  (instance ?ET ElectricalTransformer)
  (exists (?WC1 ?WC2)
    (and
      (instance ?WC1 WireCoil)
      (instance ?WC2 WireCoil)
      (part ?WC1 ?ET)
      (part ?WC2 ?ET))))

(=>
  (and
    (instance ?T ElectricalTransformer)
    (instance ?WC1 WireCoil)
    (instance ?WC2 WireCoil)
    (coilCount ?WC1 ?N1)
    (coilCount ?WC2 ?N2)
    (holdsDuring ?T
      (measure ?WC1 (MeasureFn Volt ?V1))))
  (and
    (holdsDuring ?T
      (measure ?WC2 (MeasureFn Volt ?V2)))
    (equal ?V2 
      (MultiplicationFn ?V1 
        (DivisionFn ?N2 ?N1)))))

(instance coilCount BinaryPredicate)
(domain coilCount 1 WireCoil)
(domain coilCount 2 Integer)
(format EnglishLanguage coilCount "the number of coils in %1 is %n %2")
(documentation coilCount EnglishLanguage "The number of windings in a &%WireCoil.")

(=>
  (coilCount ?WC ?N)
  (exists (?C)
    (and
      (instance ?C Collection)
      (memberCount ?C ?N)  
      (forall (?M)
        (=>
          (member ?M ?C)
          (and
            (attribute ?M ClosedTwoDimensionalFigure)         
            (part ?M ?WC)
            (not
              (exists (?M2)
                (and
                  (overlapsSpatially ?M2 ?M)
                  (member ?M2 ?C))))))))))

(subclass IgnitionCoil ElectricalTransformer)
(termFormat EnglishLanguage IgnitionCoil "ignition coil")
(documentation IgnitionCoil EnglishLanguage "An &%ElectricalTransformer designed
to take 12 &%Volt power from the &%Battery of an &%Automobile and convert it
to the 10,000-50,000 volts required to produce a &%Spark across the &%SparkPlugs.")
(typicalPart IgnitionCoil Automobile)
(typicallyContainsPart IgnitionCoil Automobile)

(=>
  (instance ?IC IgnitionCoil)
  (hasPurpose ?IC
    (exists (?E1 ?E2 ?P)
      (and
        (instance ?P ElectricTransmission)
        (resource ?P ?E1)
        (instance ?E1 Electricity)
        (instance ?E2 Electricity)
        (result ?P ?E2)
        (instrument ?P ?IC)))))

(=>
  (and
    (instance ?IC IgnitionCoil)
    (instance ?P ElectricTransmission)
    (resource ?P ?E1)
    (instance ?E1 Electricity)
    (instance ?E2 Electricity)
    (result ?P ?E2)
    (instrument ?P ?IC)
    (measure ?E1 (MeasureFn Volt ?N1)))
  (approximateValue ?N1 12))

(=>
  (instance ?IC IgnitionCoil)
  (hasPurpose ?IC
    (exists (?P ?S)
      (and
        (instance ?P ElectricTransmission)
        (instrument ?P ?IC)
        (instance ?S Spark)
        (causes ?P ?S)))))

(subclass IgnitionControlModule Computer)
(termFormat EnglishLanguage IgnitionControlModule "ignition control module")
(documentation IgnitionControlModule EnglishLanguage "A &%Computer that controls
the ignition system, and may itself be controlled by the &%EngineControlModule.")

(=>
  (instance ?ICM IgnitionControlModule)
  (hasPurpose ?ICM
    (exists (?S ?A ?CP)
      (and
        (instance ?A Automobile)
        (instance ?S Spark)
        (instance ?CP ComputerProcess)
        (part ?ICM ?A)
        (eventLocated ?CP ?A)
        (eventLocated ?S ?A)
        (causes ?CP ?S)))))

(subclass AutomobileIgnitionSystem PhysicalSystem)
(termFormat EnglishLanguage AutomobileIgnitionSystem "automobile ignition system")
(documentation AutomobileIgnitionSystem EnglishLanguage "The system of
an &%Automobile that is responsible for taking power from the &%Battery,
increasing its voltage and sending it, with the appropriate timing, to
the &%SparkPlugs so that sparks ignite the &%FuelVapor in the 
&%CombustionChambers of the &%Engine.")

(typicalPart IgnitionControlModule AutomobileIgnitionSystem)
(typicallyContainsPart IgnitionControlModule AutomobileIgnitionSystem)

(typicalPart SparkPlug AutomobileIgnitionSystem)
(typicallyContainsPart SparkPlug AutomobileIgnitionSystem)

(subclass JumperCable Device)
(termFormat EnglishLanguage JumperCable "jumper cable")
(documentation JumperCable EnglishLanguage "A &%Wire with &%Clamps on both ends, designed for
making temporary electrical connections.")

(=>
  (instance ?JC JumperCable)
  (exists (?C1 ?C2 ?W)
    (and
      (instance ?C1 Clamp)
      (instance ?C2 Clamp)
      (instance ?W Wire)
      (connectedEngineeringComponents ?C1 ?W)
      (connectedEngineeringComponents ?C2 ?W)
      (not (equal ?C1 ?C2)))))

(subclass LaminatedWindshield Windshield)
(termFormat EnglishLanguage LaminatedWindshield "windshield")
(documentation LaminatedWindshield EnglishLanguage "A type of glass required
in all modern &%Automobiles that consists of two layers of glass with a layer
of plastic sandwiched in between.  The plastic layer keeps shards of glass
from separating completely from the rest of the windshield when broken, and
is therefore a key feature in accident safety.")

(=>
  (instance ?LW LaminatedWindshield)
  (exists (?G1 ?G2 ?P)
    (and
      (instance ?G1 Glass)
      (instance ?G2 Glass)
      (instance ?P Plastic)
      (part ?G1 ?LW)
      (part ?G2 ?LW)
      (part ?P ?LW)
      (between ?G1 ?P ?G2))))

(subclass MacPhersonStrut AutomobileShock)
(termFormat EnglishLanguage MacPhersonStrut "MacPherson strut")
(documentation MacPhersonStrut EnglishLanguage "A type of oversized
shock absorber that has easily replaceable components.")

(typicalPart MacPhersonStrut AutoSuspensionSystem)

(subclass ManifoldHeatControlValve Valve)
(documentation ManifoldHeatControlValve EnglishLanguage "A device 
present on older vehicles with &%Carburetors that sends hot &%Exhaust
gases to pre-heat the &%FuelVapor for more efficient &%Combustion.")

(typicalPart ManifoldHeatControlValve Manifold)

(=>
  (instance ?MHCV ManifoldHeatControlValve)
  (hasPurpose ?MHCV
    (exists (?H ?O ?E ?FV ?T)
      (and
        (instance ?H Heating)
        (instance ?O Opening)
        (instance ?E Exhaust)
        (instance ?T Transfer)
        (instance ?FV FuelVapor)
        (patient ?O ?MHCV)
        (instrument ?H ?E)
        (patient ?H ?FV)
        (path ?T ?MHCV)
        (causes ?O ?T)
        (causes ?T ?H)))))

(subclass EngineMAPSensor PressureMeasuringDevice)
(documentation EngineMAPSensor EnglishLanguage "A sensor that measures
the pressure in the &%ExhaustManifold and adjusts &%FuelVapor mixture 
and &%Engine timing accordingly.")
(termFormat EnglishLanguage EngineMAPSensor "manifold absolute pressure sensor")
(typicalPart EngineMAPSensor ExhaustManifold)

(=>
  (instance ?EMS EngineMAPSensor)
  (hasPurpose ?EMS
    (exists (?ECM ?A)
      (and
        (instance ?ECM EngineControlModule)
        (instance ?A Automobile)
        (part ?EMS ?A)
        (part ?ECM ?A)
        (connectedEngineeringComponents ?EMS ?ECM)))))

(subclass MassAirflowSensor MeasuringDevice)
(termFormat EnglishLanguage MassAirflowSensor "mass airflow sensor")
(documentation MassAirflowSensor EnglishLanguage "A &%Device that measures the
amount of &%Air flowing to the throttle body in a fuel injection system.  It
sends this information to the &%EngineControlModule.")

(=>
  (instance ?MAS MassAirflowSensor)
  (hasPurpose ?MAS
    (exists (?T ?M ?A)
      (and
        (instance ?T Transfer)
        (instance ?A ?Air)
        (patient ?GM ?A)
        (instance ?M Measuring)
        (patient ?M ?A)
        (instrument ?M ?MAS)))))

(subclass OilPan FluidContainer)
(termFormat EnglishLanguage OilPan "oil pan")
(documentation OilPan EnglishLanguage "A &%Container for the &%Oil that is used
in &%Lubricating the &%Engine of an &%Automobile.  The oil is pumped continuously
to the engine's moving parts, when in operation, by the &%OilPump.")
(typicalPart OilPan InternalCombustionEngine)
(typicallyContainsPart OilPan InternalCombustionEngine)      

(=>
  (instance ?OP OilPan)
  (hasPurpose ?OP
    (exists (?O)
      (and
        (instance ?O Oil)
        (contains ?OP ?O)))))

(subclass ORing Gasket)
(documentation ORing EnglishLanguage "A &%Gasket that has an O-shaped cross section.
It is often made of &%Rubber or a synthetic rubber which is actually &%Plastic.")

(subclass OxygenSensor MeasuringDevice)
(documentation OxygenSensor EnglishLanguage "A sensor that measures &%Oxygen.  
Typically it is to measure the &%Exhaust of an &%Automobile.  More oxygen signals
a lean fuel mixture, and less a rich one.")

(=>
  (instance ?OS OxygenSensor)
  (hasPurpose ?OS
    (exists (?O ?M)
      (and
        (instance ?O Oxygen)
        (instance ?M Measuring)
        (patient ?M ?O)
        (instrument ?M ?OS)))))

(subclass SafetyDevice Device)
(termFormat EnglishLanguage SafetyDevice "safety device")
(documentation SafetyDevice EnglishLanguage "Any &%Device that is designed to 
prevent (or lessen the likelihood of) the &%Injuring of a &%Human.")

(=>
    (instance ?X SafetyDevice)
    (hasPurpose ?X
        (exists (?P ?H)
            (and
                (instance ?H Human)
                (instance ?P Process)
                (patient ?P ?H)
                (instrument ?P ?X)
                (prevents ?P 
                  (KappaFn ?I
                    (and
                      (instance ?I Injuring)
                      (=>
                        (holdsDuring ?T
                          (experiencer ?I ?H))
                        (not
                          (holdsDuring ?T
                            (patient ?P ?H)))))))))))

(subclass VehicleSafetyDevice SafetyDevice)
(termFormat EnglishLanguage VehicleSafetyDevice "vehicle safety device")
(documentation VehicleSafetyDevice EnglishLanguage "Any &%SafetyDevice 
that is designed to prevent (or lessen the likelihood of) the &%Injuring 
of a &%Human while in &%Vehicle.")

(=>
  (instance ?VSD VehicleSafetyDevice)
  (hasPurpose ?VSD
    (exists (?V)
      (and
        (instance ?V Vehicle)
        (part ?VSD ?V)))))
        
(=>
    (instance ?SH SafetyHarness)
    (hasPurpose ?SH
        (=>
            (and
                (instance ?PERSON Animal)
                (wears ?PERSON ?SH))
            (exists (?PROC ?INJ)
                (and
                    (instance ?PROC Process)
                    (instrument ?PROC ?SH)
                    (patient ?PROC ?PERSON)
                    (subclass ?INJ
                        (KappaFn ?I
                            (and
                                (instance ?I Injuring)
                                (exists (?F ?H)
                                    (and
                                        (instance ?H Human)
                                        (experiencer ?I ?H)
                                        (instance ?F Falling)
                                        (experiencer ?F ?H)
                                        (causes ?F ?I)))
                                (=>
                                    (holdsDuring ?T
                                        (experiencer ?I ?PERSON))
                                    (not
                                        (holdsDuring ?T
                                        (patient ?PROC ?PERSON)))))))
                    (prevents ?PROC ?INJ))))))

(subclass SafetyHarness SafetyDevice)
(subclass SafetyHarness WearableItem)
(documentation SafetyHarness EnglishLanguage "A &%SafetyDevice designed to protect a person from &%Injuring. The &%SafetyHarness is an attachment between a stationary and non-stationary object and is usually fabricated from rope, cable or webbing and locking hardware.")
;;(=>
;;  (instance ?SH SafetyHarness)
;;  (hasPurpose ?SH
;;    (exists (?STAT ?PERSON ?ATTACH)
;;      (and
;;        (instance ?PERSON Human)
;;        (wears ?PERSON ?SH)
;;        (instance ?STAT Object)
;;        (instance ?ATTACH Attaching)
;;        (patient ?ATTACH ?STAT)
;;        (patient ?ATTACH ?SH)
;;        (=>
;;          (and
;;            (instance ?FALL Falling)
;;            (experiencer ?FALL ?PERSON))
;;          (not
;;            (exists (?MOTION)
;;              (and
;;                (instance ?MOTION Translocation)
;;                (patient ?MOTION ?STAT)
;;                (causes ?FALL ?MOTION)))))))))
                
(subclass HearingProtection SafetyDevice)
(subclass HearingProtection WearableItem)
(documentation HearingProtection EnglishLanguage "A &%SafetyDevice that has the purpose to protect &%Human from &%Injuring caused by &%RadiatingSound")
(=>
    (instance ?HP HearingProtection)
    (hasPurpose ?HP
        (=>
            (and
                (instance ?PERSON Human)
                (wears ?PERSON ?HP))
            (exists (?PROC ?INJ)
                (and
                    (instance ?PROC Process) 
                    (subclass ?INJ
                        (KappaFn ?I
                            (and
                                (instance ?I Injuring)
                                (exists (?SOUND ?HEAR ?HUMAN)
                                    (and
                                        (instance ?SOUND RadiatingSound)
                                        (instance ?HEAR Hearing)
                                        (instance ?HUMAN Human)
                                        (patient ?HEAR ?SOUND)
                                        (experiencer ?HEAR ?HUMAN)
                                        (causes ?HEAR ?I)
                                        (experiencer ?I ?HUMAN)))
                                (=>
                                    (holdsDuring ?T
                                        (experiencer ?I ?PERSON))
                                    (not
                                        (holdsDuring ?T
                                        (patient ?PROC ?PERSON)))))))
                    (prevents ?PROC ?INJ)
                    (instrument ?PROC ?HP))))))

          
(subclass ProtectiveEyewear SafetyDevice)
(subclass ProtectiveEyewear WearableItem)
(documentation ProtectiveEyewear EnglishLanguage "A general concept for a &%WearableItem (like goggles and protective glasses) designed to prevent the &%Injuring of &%Eye of the wearer.")
(=>
    (instance ?PE ProtectiveEyewear)
    (hasPurpose ?PE
        (=>
            (and
                (instance ?PERSON Human)
                (wears ?PERSON ?PE))
            (exists (?PROTECT ?EYE ?INJ)
                (and
                    (instance ?PROTECT Process)
                    (instrument ?PROTECT ?PE)
                    (subclass ?INJ 
                        (KappaFn ?I
                            (exists (?EYE ?HUMAN)
                                (and
                                    (instance ?I Injuring)
                                    (instance ?EYE Eye)
                                    (instance ?HUMAN Human)
                                    (properPart ?EYE ?HUMAN)
                                    (patient ?I ?EYE)
                                    (=>
                                        (holdsDuring ?T
                                            (patient ?I ?PERSON))
                                        (not
                                            (holdsDuring ?T
                                                (patient ?PROTECT ?PERSON))))))))
                    (prevents ?PROTECT ?INJ))))))
        
(=>
  (instance ?PE ProtectiveEyewear)
  (hasPurpose ?PE
    (exists (?PERSON ?FACE ?EYE ?COVER)
      (and
        (instance ?PERSON Animal)
        (instance ?FACE Face)
        (instance ?EYE Eye)
        (properPart ?EYE ?FACE)
        (properPart ?FACE ?PERSON)
        (wears ?PERSON ?PE)
        (instance ?COVER Covering)
        (agent ?COVER ?PE)
        (patient ?COVER ?FACE)))))
        
(subclass Respirator SafetyDevice)
(subclass Respirator WearableItem)
(documentation Respirator EnglishLanguage "&%Device designed to protect the wearer from &%Injuring caused by &%Inhaling of harmful substances.")

(=>
    (instance ?X Respirator)
    (hasPurpose ?X
        (=>
            (and
                (instance ?PERSON Animal)
                (wears ?PERSON ?X))
            (exists (?INHAL ?INJ ?PROTECT)
                (and
                    (instance ?PROTECT Process)
                    (instrument ?PROTECT ?X)
                    (prevents ?PROTECT ?INJ)
                    (subclass ?INJ 
                        (KappaFn ?I 
                            (and
                                (instance ?I Injuring)
                                (exists (?H ?INHAL)
                                    (and
                                        (instance ?H Human)
                                        (patient ?I ?H)
                                        (instance ?INHAL Inhaling)
                                        (agent ?INHAL ?H)
                                        (causes ?I ?INHAL)))))))))))
          

(subclass SafetyVest Clothing)
(subclass SafetyVest SafetyDevice)
(documentation SafetyVest EnglishLanguage "&%Clothing designed to increas the visibility of the wearer and so protect him from &%Injuring")

(=>
  (instance ?SV SafetyVest)
  (hasPurpose ?SV
    (exists (?PERSON ?SPECTATOR)
      (and
        (instance ?PERSON Animal)
        (instance ?SPECTATOR Human)
        (increasesLikelihood
          (wears ?PERSON ?SV)
          (exists (?SEE)
            (and
              (instance ?SEE Seeing)
              (patient ?SEE ?PERSON)
              (experiencer ?SEE ?SPECTATOR))))
        (decreasesLikelihood
          (exists (?SEE)
            (and
              (instance ?SEE Seeing)
              (patient ?SEE ?PERSON)
              (experiencer ?SEE ?SPECTATOR)))
          (exists (?INJ)
            (and
              (instance ?INJ Injuring)
              (agent ?INJ ?SPECTATOR)
              (patient ?INJ ?PERSON))))))))
             
(subclass Balloon FluidContainer)
(termFormat EnglishLanguage Balloon "balloon")
(documentation Balloon EnglishLanguage "Any &%Pliable container that is
made for holding a &%Gas.")

(=>
  (instance ?B Balloon)
  (attribute ?B Pliable))

(=>
  (instance ?B Balloon)
  (hasPurpose ?B
    (exists (?G)
      (and
        (attribute ?G Gas)
        (contains ?B ?G)))))

(subclass Inflating Increasing)
(termFormat EnglishLanguage Inflating "inflating")
(documentation Inflating EnglishLanguage "Any &%Process where a &%Balloon is
filled with a &%Gas.")

(=>
  (instance ?I Inflating)
  (exists (?G1 ?G2 ?V1 ?V2 ?S)
    (and
      (instance ?G1 ?S)
      (instance ?G2 ?S)
      (attribute ?G1 Gas)
      (attribute ?G2 Gas)
      (instance ?V1 VolumeMeasure)
      (holdsDuring (ImmediatePastFn (WhenFn ?I))
        (measure ?G1 ?V1))
      (holdsDuring (ImmediateFutureFn (WhenFn ?I))
        (measure ?G2 ?V2))
      (greaterThan ?G2 ?G1))))

(subclass AutoAirbag VehicleSafetyDevice)
(subclass AutoAirbag Balloon)
(termFormat EnglishLanguage AutoAirbag "airbag")
(documentation AutoAirbag EnglishLanguage "Sensors that detect a sudden &%Decelerating
deploy the airbag by an explosive release of a &%Gas that fills the bag before the
occupant can be thrown against the hard interior surfaces of the &%Vehicle.")
(typicallyContainsPart AutoAirbag Automobile)

(=>
    (instance ?X AutoAirbag)
    (hasPurpose ?X
        (exists (?CAR ?PERSON ?IMP ?INF)
            (and
                (instance ?CAR Automobile)
                (part ?X ?CAR)
                (instance ?PERSON Human)
                (contains ?CAR ?PERSON)
                (instance ?IMP Impacting)
                (patient ?IMP ?CAR)
                (instance ?INF Inflating)
                (patient ?INF ?X)
                (causes ?IMP ?INF)
                (hinders ?INF
                    (KappaFn ?INJ
                        (and
                            (instance ?INJ Injuring)
                            (experiencer ?INJ ?PERSON)
                            (exists (?HIT)      
                                (and
                                    (instance ?HIT Impacting)
                                    (destination ?HIT ?CAR)
                                    (experiencer ?HIT ?PERSON)
                                    (causes ?HIT ?INJ))))))))))
        
(subclass SeatBelt VehicleSafetyDevice)
(termFormat EnglishLanguage SeatBelt "seat belt")
(documentation SeatBelt EnglishLanguage "A flexible belt that is part of
a &%Vehicle, and worn across the waist, and also typically the shoulder,
that prevents impact of the wearer into the interior surfaces of the 
&%Vehicle during rapid &%Decelerating.")

(typicallyContainsPart SeatBelt Automobile)

(=>
    (instance ?X SeatBelt)
    (exists (?BELT)
        (and
            (part ?BELT ?X)
            (attribute ?BELT Pliable)
            (material Fabric ?BELT))))
            
(=>
    (instance ?X SeatBelt)
    (hasPurpose ?X
        (exists (?PERSON ?STOP ?VEHICLE)
            (and
                (instance ?VEHICLE Vehicle)
                (part ?X ?VEHICLE)
                (instance ?PERSON Human)
                (contains ?VEHICLE ?PERSON)
                (instance ?STOP Process)
                (prevents ?STOP
                    (KappaFn ?M
                        (and
                            (instance ?M Translocation)
                            (patient ?M ?PERSON)
                            (exists (?COLLISION)
                                (and
                                    (or
                                        (instance ?COLLISION Decelerating)
                                        (instance ?COLLISION Impacting))
                                    (experiencer ?COLLISION ?VEHICLE)
                                    (causes ?COLLISION ?M)))
                            (modalAttribute
                                (exists (?INJ ?IMP)
                                    (and
                                        (instance ?INJ Injuring)
                                        (instance ?IMP Impacting)
                                        (causes ?M ?INJ)
                                        (patient ?INJ ?PERSON)
                                        (subProcess ?IMP ?INJ)))  Possibility))))))))

                                        
(subclass CarAlarm SecurityDevice)
(documentation CarAlarm EnglishLanguage "A &SecurityDevice which is a &%typicalPart of cars and other &%SelfPoweredRoadVehicle. ")
(typicalPart CarAlarm SelfPoweredRoadVehicle)
(=>
    (and
        (instance ?X CarAlarm)
        (instance ?CAR SelfPoweredRoadVehicle)
        (part ?X ?CAR))
    (hasPurpose ?X
        (=>
            (and
                (or
                    (instance ?HARM Stealing)
                    (instance ?HARM Damaging))
                (instance ?THIEF Human)
                (agent ?HARM ?THIEF)
                (patient ?HARM ?CAR)
                (equal (WhenFn ?HARM) ?T)
                (eventPartlyLocated ?HARM ?L))
            (exists (?ALARM)
                (and
                    (instance ?ALARM RadiatingSound)
                    (agent ?ALARM ?X)
                    (causes ?HARM ?ALARM)
                    (hasPurpose ?ALARM
                        (increasesLikelihood
                            (exists (?WITNESS)
                                (and
                                    (instance ?WITNESS Human)
                                    (holdsDuring ?T
                                        (orientation ?WITNESS ?L Near))))
                            (or
                                (knows ?WITNESS
                                    (exists (?H)
                                        (and
                                            (or
                                                (instance ?H Stealing)
                                                (instance ?H Damaging))
                                            (eventPartlyLocated ?H ?L)
                                            (holdsDuring ?T
                                                (patient ?H ?CAR)))))
                                (finishes 
                                    (WhenFn ?ALARM)
                                    (WhenFn ?HARM))))))))))
                                    
(subclass RemoteIgnitionControl RemoteControl)
(documentation RemoteIgnitionControl EnglishLanguage "A &%RemoteControl able to start the &%Engine of a &%PoweredVehicle using &%ElectronicSignalling.")
(=>
    (instance ?X RemoteIgnitionControl)
    (hasPurpose ?X
        (exists (?VEHICLE ?ENGINE ?SIGNAL ?PROC)
            (and
                (instance ?VEHICLE PoweredVehicle)
                (instance ?SIGNAL ElectronicSignalling)
                (instrument ?SIGNAL ?X)
                (destination ?SIGNAL ?VEHICLE)
                (instance ?ENGINE Engine)
                (component ?ENGINE ?VEHICLE)
                (instance ?PROC
                    (OperatingFn Engine))
                (experiencer ?PROC ?ENGINE)
                (causes ?SIGNAL ?PROC)))))
                

(subclass RemoteKeylessSystem SecurityDevice)
(subclass RemoteKeylessSystem Collection)
(documentation RemoteKeylessSystem EnglishLanguage "A &%SecurityDevice that consists of two parts a &%Key and a matching &%Lock. The &%Key is also a &%RemoteControl that &%controls the &Ľock.")
(=>
    (instance ?X RemoteKeylessSystem)
    (exists (?KEY ?LOCK)
        (and
            (instance ?KEY Key)
            (instance ?KEY RemoteControl)
            (member ?KEY ?X)
            (instance ?LOCK Lock)
            (member ?LOCK ?X)
            (capability 
                    (KappaFn ?CLOSE
                        (and
                            (instance ?CLOSE Closing)
                            (patient ?CLOSE ?LOCK)
                            (holdsDuring
                                (ImmediateFutureFn ?CLOSE)
                                (attribute ?LOCK Locked)))) instrument ?KEY)
                (capability 
                    (KappaFn ?OPEN
                        (and
                            (instance ?OPEN Closing)
                            (patient ?OPEN ?LOCK)
                            (holdsDuring
                                (ImmediateFutureFn ?OPEN)
                                (not
                                    (attribute ?LOCK Locked))))) instrument ?KEY))))
               
(subclass PistonRing Gasket)
(termFormat EnglishLanguage PistonRing "piston ring")
(documentation PistonRing EnglishLanguage "A &%Piston typically has several
such rings to seal the piston against the &%EngineCylinder while allowing it
to move, and yet contain &%Combustion and the &%Oil that is used for 
&%Lubricating the involved surfaces.")
(typicalPart PistonRing Piston)
(typicallyContainsPart PistonRing Piston)

(subclass PositiveCrankcaseVentilationValve Valve)
(termFormat EnglishLanguage PositiveCrankcaseVentilationValve "positive crankcase ventilation valve")
(documentation PositiveCrankcaseVentilationValve EnglishLanguage "A valve
that is designed to send unburned fuel that escapes into the &%Crankcase
back to the &%CombustionChamber.")
(typicalPart PositiveCrankcaseVentilationValve FourStrokeEngine)

(=>
  (instance ?PCVV PositiveCrankcaseVentilationValve)
  (hasPurpose ?PCVV
    (exists (?CR ?F ?CC ?T ?A)
      (and
        (instance ?CR Crankcase)
        (instance ?F Fuel)
        (instance ?CC CombustionChamber)
        (instance ?T Transfer)
        (instance ?A Automobile)
        (part ?CR ?A)
        (part ?CC ?A)
        (part ?PCVV ?A)
        (origin ?T ?CR)
        (destination ?T ?CC)
        (objectTransferred ?T ?F)
        (path ?T ?PCVV)))))

(subclass RockerArm Device)
(termFormat EnglishLanguage RockerArm "rocker arm")
(documentation RockerArm EnglishLanguage "A &%Device located in the &%Cylinder
head of a &%FourStrokeEngine that opens a &%Valve.  It is typically 
activated by contact from a &%Cam on the &%Camshaft.")
(typicalPart RockerArm FourStrokeEngine)
(typicallyContainsPart RockerArm FourStrokeEngine)

(=>
  (instance ?RA RockerArm)
  (hasPurpose ?RA
    (exists (?P1 ?C ?P2 ?V ?O ?FSE)
      (and
        (instance ?P1 Pushing)
        (instance ?C Cam)
        (instance ?P2 Pushing)
        (instance ?V Valve)
        (instance ?O Opening)
        (instance ?FSE FourStrokeEngine)
        (part ?RA ?FSE)
        (part ?C ?FSE)
        (part ?V ?FSE)
        (instrument ?P1 ?C)
        (destination ?P1 ?RA)
        (instrument ?P2 ?RA)
        (destination ?P2 ?V)
        (causes ?P1 ?P2)
        (causes ?P2 ?O)
        (patient ?O ?V)))))

(subclass Magnet Object)
(termFormat EnglishLanguage Magnet "magnet")
(documentation Magnet EnglishLanguage "Any object that emits &%Magnetism.
Note that this includes both &%NaturalMagnets and &%Electromagnets and
therefore the most specific superclass is &%Object, since natural magnets
are divisible &%Substances and electromagnets are &%CorpuscularObjects.")

(=>
  (instance ?M Magnet)
  (exists (?MAG)
    (and
      (instance ?MAG Magnetism)
      (instrument ?MAG ?M))))

(subclass NaturalMagnet Magnet)
(subclass NaturalMagnet NaturalSubstance)
(termFormat EnglishLanguage NaturalMagnet "magnet")
(documentation NaturalMagnet EnglishLanguage "Any &%Substance from nature that
exhibits &%Magnetism.")

(subclass Electromagnet Magnet)
(subclass Electromagnet ElectricDevice)
(termFormat EnglishLanguage Electromagnet "electromagnet")
(documentation Electromagnet EnglishLanguage "A &%Magnet that is created by
sending &%Electricity through coils of &%Wire that are wound around a 
ferromagnetic core.")

(=>
  (and
    (instance ?EM Electromagnet)
    (instance ?T Transfer)
    (instance ?E Electricity)
    (objectTransferred ?T ?E)
    (path ?T ?EM))
  (exists (?M)
    (and
      (instance ?M Magnetism)
      (instrument ?M ?EM))))

(=>
  (and
    (instance ?EM Electromagnet)
    (not
      (holdsDuring ?T1
        (exists (?T ?E)
          (and
            (instance ?T Transfer)
            (instance ?E Electricity)
            (objectTransferred ?T ?E)
            (path ?T ?EM))))))
  (not
    (holdsDuring ?T1
      (exists (?M)
        (and
          (instance ?M Magnetism)
          (instrument ?M ?EM))))))

(subclass Solenoid ElectricDevice)
(termFormat EnglishLanguage Solenoid "solenoid")
(documentation Solenoid EnglishLanguage "A &%Device that uses an
&%Electromagnet to actuate an arm or shaft to perform some function.")

(=>
  (instance ?S Solenoid)
  (hasPurpose ?S
    (exists (?P ?T1 ?T2 ?L1 ?L2)
      (and
        (part ?P ?S)
        (holdsDuring ?T1
          (and 
            (attribute ?S DeviceOn)
            (located ?P ?L1)))
        (holdsDuring ?T2
          (and 
            (attribute ?S DeviceOn)
            (located ?P ?L2)))
        (not
          (equal ?L1 ?L2))))))

(subclass StarterMotor Motor)
(termFormat EnglishLanguage StarterMotor "starter motor")
(documentation StarterMotor EnglishLanguage "Any &%Motor that has the
intended use of starting an &%IntermittentCombustionEngine.  In most
&%Automobiles it is a small electric motor, but in a diesel heavy
equipment engine there may be an electric motor that starts a gas engine
that in turn starts the diesel engine.")

(=>
  (instance ?SM StarterMotor)
  (hasPurpose ?SM
    (exists (?P1 ?P2 ?ICE)
      (and
        (instance ?ICE InternalCombustionEngine)
        (instrument ?P1 ?SM)
        (instrument ?P2 ?ICE)
        (causes ?P1 ?P2)))))

(subclass SteeringBox Gearbox)
(termFormat EnglishLanguage SteeringBox "steering box")
(documentation SteeringBox EnglishLanguage "A &%Gearbox at the end of
the &%SteeringColumn that transmits &%Motion to the &%SteeringArms.")
(typicalPart SteeringBox Automobile)
(typicallyContainsPart SteeringBox Automobile)

(=>
  (instance ?SB SteeringBox)
  (hasPurpose ?SB
    (exists (?SW ?SC)
      (and
        (instance ?SW SteeringWheel)
        (instance ?SC SteeringColumn)
        (connectedEngineeringComponents ?SW ?SC)
        (connectedEngineeringComponents ?SC ?SB)))))

(subclass SteeringColumn Shaft)
(termFormat EnglishLanguage SteeringColumn "steering column")
(documentation SteeringColumn EnglishLanguage "A &%Shaft that connects
the &%SteeringWheel of an &%Automobile to the &%SteeringBox.")
(typicalPart SteeringColumn Automobile)
(typicallyContainsPart SteeringColumn Automobile)

(termFormat EnglishLanguage SteeringWheel "steering wheel")

(typicalPart SteeringWheel Automobile)
(typicallyContainsPart SteeringWheel Automobile)

(subclass SteeringColumnLock SecurityDevice)
(documentation SteeringColumnLock EnglishLanguage "A &%SecurityDevice design to protect  an &%Automobile from &%Stealing and which is a part of the &%Automobile's &%SteeringColumn.")
(=>
  (instance ?X SteeringColumnLock)
  (hasPurpose ?X
    (exists (?SC ?P ?CAR)
        (and
            (instance ?SC SteeringColumn)
            (instance ?CAR Automobile)
            (component ?SC ?CAR)
            (part ?X ?SC)
            (instance ?P Protecting)
            (instrument ?P ?X)
            (decreasesLikelihood
                (holdsDuring ?T
                    (attribute ?X Locked))
                (holdsDuring ?T
                    (exists (?STEAL)
                        (and
                            (instance ?STEAL Stealing)
                            (patient ?STEAL ?CAR)))))))))

(subclass Tachometer MeasuringDevice)
(termFormat EnglishLanguage Tachometer "tachometer")
(documentation Tachometer EnglishLanguage "A &%Device for &%Measuring the number
of &%RevolutionsPerMinute of an object, typically an &%Engine &%Crankshaft.")

(=>
  (instance ?T Tachometer)
  (hasPurpose ?T
    (exists (?R ?M ?O)
      (and
        (instance ?R Rotating)
        (patient ?R ?O)
        (instance ?M Measuring)
        (instrument ?M ?T)
        (patient ?M ?O)))))

(subclass Tailpipe Tube)
(typicalPart Tailpipe AutomobileExhaustSystem)
(typicallyContainsPart Tailpipe AutomobileExhaustSystem)
(termFormat EnglishLanguage Tailpipe "tailpipe")
(documentation Tailpipe EnglishLanguage "Typically the last portion of an 
AutomobileExhaustSystem, which is after the &%Muffler, just before &%Engine
&%Exhaust is vented to the surrounding &%Air.")

(=>
  (instance ?T Tailpipe)
  (hasPurpose ?T
    (exists (?M)
      (and
        (instance ?M Muffler)
        (connectedEngineeringComponents ?M ?T)))))

(=>
  (and
    (instance ?T Tailpipe)
    (instance ?TR Transfer)
    (instance ?E Exhaust)
    (instance ?A Automobile)
    (instance ?AES AutomobileExhaustSystem)
    (part ?T ?A)
    (path ?TR ?T)
    (patient ?TR ?E))
  (hasPurpose ?T
    (not
      (exists (?O)
        (and
          (part ?O ?A)
          (beforeOnPath ?T ?O ?T ?TR))))))

(subclass BimetalTemperatureSensor MeasuringDevice)
(termFormat EnglishLanguage BimetalTemperatureSensor "bi-metal temperature sensor")
(documentation BimetalTemperatureSensor EnglishLanguage "Two metals bonded together
that have dissimilar thermal expansion properties.  This leads to the strip curling
one direction or another with changes in &%TemperatureMeasure, typically activating a 
switch or other device.")

(=>
  (instance ?BTS BimetalTemperatureSensor)
  (exists (?M1 ?M2)
    (and
      (instance ?M1 Metal)
      (instance ?M2 Metal)
      (part ?M1 ?BTS)
      (part ?M2 ?BTS)
      (not
        (equal ?M1 ?M2)))))

(=>
  (and
    (instance ?BTS BimetalTemperatureSensor)
    (instance ?M1 Metal)
    (instance ?M2 Metal)
    (not
      (equal ?M1 ?M2))
    (part ?M1 ?BTS)
    (part ?M2 ?BTS)
    (instance ?T1 TemperatureMeasure)
    (instance ?T2 TemperatureMeasure)
    (instance ?L1 LengthMeasure)
    (instance ?L2 LengthMeasure)
    (instance ?L3 LengthMeasure)
    (instance ?L4 LengthMeasure)
    (not
      (equal ?T1 ?T2))
    (holdsDuring ?TM1
      (and
        (measure ?BTS ?T1)
        (measure ?M1 ?L1)
        (measure ?M2 ?L2)))
    (holdsDuring ?TM2
      (and
        (measure ?BTS ?T2)
        (measure ?M1 ?L3)
        (measure ?M2 ?L4))))
  (not
    (equal 
      (DivisionFn ?L1 ?L2)
      (DivisionFn ?L3 ?L4))))

(instance physicalEnd BinaryPredicate)    
(subrelation physicalEnd properPart) 
(format EnglishLanguage physicalEnd "one end of %2 is %1")
(documentation physicalEnd EnglishLanguage "A notion of an indeterminate portion
at the end of an &%Object that has a &%LongAndThin &%ShapeAttribute.")
(domain physicalEnd 1 Object) 	
(domain physicalEnd 2 Object)

(=>
  (physicalEnd ?E ?O)
  (attribute ?O LongAndThin))

(=>
  (physicalEnd ?E ?O)
  (not 
    (attribute ?E LongAndThin)))

(=>
  (and
    (physicalEnd ?E1 ?O)
    (physicalEnd ?E2 ?O)
    (not
      (equal ?E1 ?E2)))
  (not
    (overlapsSpatially ?E1 ?E2)))

(=>
  (and
    (physicalEnd ?E1 ?O)
    (physicalEnd ?E2 ?O)
    (not
      (equal ?E1 ?E2)))
  (not
    (meetsSpatially ?E1 ?E2)))

(=>
  (and 
    (physicalEnd ?E ?O)
    (superficialPart ?SP ?O))
  (meetsSpatially ?E ?SP))

(=>
  (and
    (physicalEnd ?E1 ?O)
    (physicalEnd ?E2 ?O)
    (part ?P1 ?E1)
    (part ?P2 ?E2)
    (distance ?P1 ?P2 ?D1)
    (not
      (equal ?E1 ?E2)))
  (not
    (exists (?OP1 ?OP2 ?D2)
      (and
        (not
          (part ?OP1 ?E1))
        (not
          (part ?OP2 ?E2))
        (distance ?OP1 ?OP2 ?D2)
        (greaterThan ?D2 ?D1)))))

(subclass Rod Device)
(termFormat EnglishLanguage Rod "rod")
(documentation Rod EnglishLanguage "Any &%LongAndThin object that has some structural
function in another &%Device.")

(=>
  (instance ?R Rod)
  (hasPurpose ?R
    (exists (?D)
      (connectedEngineeringComponents ?R ?D))))

(=>
  (instance ?R Rod)
  (attribute ?R LongAndThin))

(subclass TieRod Rod)
(externalImage TieRod "http://img217.imageshack.us/img217/5804/4tierodremovalop3.jpg")
(termFormat EnglishLanguage TieRod "tie rod")
(documentation TieRod EnglishLanguage "A &%Rod in an &%Automobile that serves to link
the steering system to the &%Wheels.  A tie rod is distinct from many other types of
rods in that it functions in both compression and tension forces.")
(typicalPart TieRod Automobile)
(typicallyContainsPart TieRod Automobile)
        
(subclass TorqueWrench MeasuringDevice)
(subclass TorqueWrench Wrench)
(termFormat EnglishLanguage TorqueWrench "torque wrench")
(documentation TorqueWrench EnglishLanguage "A &%Wrench that measures the amount of
force applied, typically in pound-feet or Newton-meters.")

(subclass Wrench Device)
(termFormat EnglishLanguage Wrench "wrench")
(documentation Wrench EnglishLanguage "A &%Device that is designed to apply a rotational force
to an &%AttachingDevice, such as a &%Bolt.")

(=>
  (instance ?W Wrench)
  (hasPurpose ?W
    (exists (?R ?AD)
      (and
        (instance ?R Rotating)
        (instance ?AD AttachingDevice)
        (patient ?R ?AD)
        (instrument ?R ?W)))))

(subclass Bolt AttachingDevice)
(termFormat EnglishLanguage Bolt "bolt")
(documentation Bolt EnglishLanguage "Any &%AttachingDevice that is designed to mate with a 
&%MechanicalNut thereby &%Attaching two &%Objects.  This includes nuts with hexagonal heads
that must be held or turned by a &%Wrench or &%Screwdriver as well as those that have round
heads but some non-round feature that is designed to catch on the material being attached, 
and therefore prevent rotation, as in a carriage bolt.  Bolts are distinguished from 
&%Screws in that screws must create a mating surface by gouging a thread into material, 
whereas bolts are designed to slip through a hole and are held in place by a nut at the 
opposite end from the head of the bolt.  This includes threaded rods that may have nuts as 
spacers for freely rotating items.")

(=>
  (instance ?B Bolt)
  (hasPurpose ?B
    (exists (?A ?N)
      (and
        (instance ?A Attaching)
        (instance ?N Nut)
        (instrument ?A ?B)
        (instrument ?A ?N)))))

(subclass MechanicalNut AttachingDevice)
(termFormat EnglishLanguage MechanicalNut "nut")
(documentation MechanicalNut EnglishLanguage "Any object with threads designed to mate with those
of a &%Bolt.  This includes any large object with a region that functions as a nut.  However,
it does not include regions of objects where a screw has created a threaded area and where
typically therefore the material is soft enough that retracting and reinserting a screw may
create a different thread pattern.  This can also be contrasted with regions that are created
to be nuts by the use of a &%MechanicalTap and &%MechanicalDie set.")

(=>
  (instance ?N Nut)
  (hasPurpose ?N
    (exists (?A ?B)
      (and
        (instance ?A Attaching)
        (instance ?B Bolt)
        (instrument ?A ?B)
        (instrument ?A ?N)))))

(subclass WasherForBolt Device)
(termFormat EnglishLanguage WasherForBolt "washer")
(documentation WasherForBolt EnglishLanguage "A durable material in the shape of a &%Circle
with a &%Hole in it, designed to isolate an object fixed by the &%Bolt from the head of the
bolt or from contact with a &%MechanicalNut.")

(=>
  (instance ?W WasherForBolt)
  (hasPurpose ?W
    (exists (?B)
      (and
        (instance ?B Bolt)
        (contains ?W ?B)))))

(=>
  (instance ?W WasherForBolt)
  (exists (?H)
    (and
      (instance ?H Hole)
      (equal ?W (HoleHostFn ?H)))))

(=>
  (instance ?W WasherForBolt)
  (attribute ?W Circle))

(subclass MechanicalTap Device)
(termFormat EnglishLanguage MechanicalTap "tap")
(documentation MechanicalTap EnglishLanguage "A &%Device for creating a &%Bolt out of a piece of metal (or other hard material) with a &%Hole in it.")

(=>
  (instance ?MT MechanicalTap)
  (hasPurpose ?MT
    (exists (?M ?B)
      (and
        (instance ?M Making)
        (instance ?B Bolt)
        (instrument ?M ?MT)
        (result ?M ?B)))))

(subclass MechanicalDie Device)
(termFormat EnglishLanguage MechanicalDie "die")
(documentation MechanicalDie EnglishLanguage "A &%Device for creating a &%MechanicalNut out of a &%Rod.")

(=>
  (instance ?MT MechanicalDie)
  (hasPurpose ?MT
    (exists (?M ?N)
      (and
        (instance ?M Making)
        (instance ?N MechanicalNut)
        (instrument ?M ?MT)
        (result ?M ?N)))))

(subclass UniversalJoint MechanicalJoint)
(externalImage UniversalJoint "http://upload.wikimedia.org/wikipedia/commons/b/b5/Universal_joint.gif")
(termFormat EnglishLanguage UniversalJoint "universal joint")
(documentation UniversalJoint EnglishLanguage "A joint that couples two shafts at
variables angles to one another.  It is distinct from a &%CVJoint in that the
shafts do not travel at a constant velocity with respect to one another.  This
causes vibration and wear.  However, universal joints are simpler to make than
CV joints.")

(subclass VacuumGauge MeasuringDevice)
(termFormat EnglishLanguage VacuumGauge "vacuum gauge")
(documentation VacuumGauge EnglishLanguage "A &%MeasuringDevice that measures the
degree of &%Vacuum, relative to the surrounding air pressure.")

(subclass VacuumHose Hose)
(termFormat EnglishLanguage VacuumHose "vacuum hose")
(documentation VacuumHose EnglishLanguage "A &%Hose, typically found in modern
&%Automobiles that link one area of &%PartialVacuum to another.")

(=>
  (instance ?VH VacuumHose)
  (hasPurpose ?VH
    (exists (?H)
      (and
        (instance ?H Hole)
        (equal ?VH (HoleHostFn ?H))
        (attribute ?H PartialVacuum)))))
        
(subclass Hose Tube)
(termFormat EnglishLanguage Hose "hose")
(documentation Hose EnglishLanguage "A &%Tube that is &%Pliable.  Note however that
it may not be pliable outside its intended operating range, such as with a garden
hose in freezing weather.")

(=>
  (instance ?H Hose)
  (hasPurpose ?H
    (attribute ?H Pliable)))

(subclass Reel Device)
(documentation Reel EnglishLanguage "A &%Device for &%Keeping something &%Pliable and &%LongAndThin in place, typically in a coiled shape.")

(=>
  (instance ?X Reel)
  (attribute ?X Round))

(=>
  (instance ?X Reel)
  (hasPurpose ?X 
    (exists (?K ?H)
      (and
        (instance ?K Keeping)
        (instance ?H CorpuscularObject)
        (attribute ?H LongAndThin)
        (attribute ?H Pliable)
        (instrument ?K ?X)
        (patient ?K ?H)))))

(=>
  (and 
    (instance ?HR Reel)
    (instance ?K Keeping)
    (instance ?H CorpuscularObject)
    (attribute ?H LongAndThin)
    (attribute ?H Pliable)
    (instrument ?K ?HR)
    (patient ?K ?H))
  (exists (?P)
    (and
      (part ?P ?H)
      (meetsSpatially ?P ?HR))))

(=>
  (and 
    (instance ?HR Reel)
    (instance ?K Keeping)
    (instance ?H CorpuscularObject)
    (attribute ?H LongAndThin)
    (attribute ?H Pliable)
    (instrument ?K ?HR)
    (patient ?K ?H))
  (exists (?R)
    (and
      (instance ?R Rotating)
      (patient ?R ?HR)
      (subProcess ?R ?K))))

(subclass WheelChock Device)
(termFormat EnglishLanguage WheelChock "wheel chock")
(documentation WheelChock EnglishLanguage "A &%Device that is designed to keep
a &%Vehicle's &%Wheels, and thus the vehicle itself, from moving.")

(=>
  (instance ?WC WheelChock)
  (hasPurpose ?WC
    (exists (?W)
      (and
        (instance ?W Wheel)
        (holdsDuring ?T
          (and
            (meetsSpatially ?WC ?W)
            (not
              (exists (?R)
                (and
                  (instance ?R Rotating)
                  (patient ?R ?W))))))))))

(subclass OutboardEngine Engine)
(documentation OutboardEngine EnglishLanguage "An outboard motor is a propulsion 
system for boats, consisting of a self-contained unit that includes engine, 
gearbox and propeller or jet drive, designed to be affixed to the outside of the 
transom. They are the most common motorized method of propelling small 
watercraft. As well as providing propulsion, outboards provide steering control, 
as they are designed to pivot over their mountings and thus control the direction 
of thrust. The skeg also acts as a rudder when the engine is not running. 
Compared to inboard motors, outboard motors can be easily removed for storage or 
repairs. [from Wikipedia]")
(termFormat EnglishLanguage OutboardEngine "outboard engine")
(termFormat EnglishLanguage OutboardEngine "outboard motor")
(externalImage OutboardMotor "http://upload.wikimedia.org/wikipedia/commons/c/c5/Trim_outboard_engine.jpg")

(=>
  (instance ?OE OutboardEngine)
  (hasPurpose ?OE
    (exists (?W)
      (and
        (instance ?W WaterVehicle)
        (meetsSpatially ?OE ?W)
        (orientation ?OE ?W Outside)))))

(subclass Helmet SafetyDevice)
(subclass Helmet (CoveringFn Head))
(documentation Helmet EnglishLanguage "Any &%WearableItem designed to protect the
&%Head of the individual who &%wears it.")

(subclass MotorcycleHelmet Helmet)
(documentation MotorcycleHelmet EnglishLanguage "A &%Helmet designed to be worn
by the driver of a &%Motorcycle.")
(termFormat EnglishLanguage MotorcycleHelmet "motorcycle helmet")

(=>
  (instance ?MH MotorcycleHelmet)
  (hasPurpose ?MH
    (exists (?P ?D ?M)
      (and
        (instance ?D Driving)
        (agent ?D ?P)
        (instance ?M Motorcycle)
        (patient ?D ?M)
        (instance ?P Human)
        (holdsDuring (WhenFn ?D)
          (wears ?P ?MH))))))

(subclass Chain Artifact)
(termFormat EnglishLanguage Chain "chain")
(documentation Chain EnglishLanguage "A number of interconnected loops of metal that
has strength in tension and is used like rope, although it often is much stronger.
Note that this class does not include loops of metal not arranged in an interconnected
line, such as chain mail armor or a chain link fence, which are connected in a plane.  
Chain may however be used to make up other artifacts, such as tire chains, in which 
sections of chain are joined into a grid or other arrangement.")

(=>
  (instance ?C Chain)
  (exists (?CL1 ?CL2 ?CL3)
    (and
      (instance ?CL1 ChainLink)
      (instance ?CL2 ChainLink)
      (instance ?CL3 ChainLink)
      (not 
        (equal ?CL1 ?CL2))
      (not 
        (equal ?CL2 ?CL3))
      (not 
        (equal ?CL3 ?CL1))
      (crosses ?CL1 ?CL2)
      (crosses ?CL2 ?CL3)
      (not
        (crosses ?CL1 ?CL3)))))

(instance RingTorus ShapeAttribute)
(termFormat EnglishLanguage RingTorus "ring torus")
(documentation RingTorus EnglishLanguage "Informally, the shape of a donut.
More formally, the shape described by the edge of an oval when its center
follows a oval path perpendicular to the plane of the first oval, and when
the axis of the moving oval in the plane of the fixed oval is smaller than 
the shorter axis of the fixed oval.")

(=>
  (attribute ?X RingTorus)
  (exists (?H)
    (and
      (instance ?H Hole)
      (equal ?X (HoleHostFn ?H)))))

(subclass ChainLink Artifact)
(termFormat EnglishLanguage ChainLink "chain link")
(documentation ChainLink EnglishLanguage "Any closed form of metal rod or wire 
intended for use as part of a chain.")

(=>
  (instance ?CL ChainLink)
  (material Metal ?CL))

(=>
  (instance ?CL ChainLink)
  (attribute ?CL RingTorus))
 

(subclass TireChain Device)
(termFormat EnglishLanguage TireChain "tire chain")
(termFormat EnglishLanguage TireChain "snow chain")
(documentation TireChain EnglishLanguage "Any web of chains designed to be
mounted covering a tire, to increase traction of the tire on soft surfaces.
While primarily for use on snow in passenger vehicles, these devices can be
used on any other soft surface for the same purpose.")

(=>
  (instance ?TC TireChain)
  (exists (?C)
    (and
      (instance ?C Chain)
      (part ?C ?TC))))

(=>
  (instance ?TC TireChain)
  (hasPurpose ?TC
    (exists (?V ?W ?F)
      (and
        (instance ?V RoadVehicle)
        (instance ?W Wheel)
        (part ?W ?V)
        (instance ?F Friction)
        (covers ?TC ?W)
        (instrument ?F ?TC)))))

(instance SnapOnTools Corporation)
(termFormat EnglishLanguage SnapOnTools "Snap-on Tools")

(instance HarleyDavidson Corporation)
(termFormat EnglishLanguage HarleyDavidson "Harley Davidson")

(subclass HandTool UnpoweredDevice)
(termFormat EnglishLanguage HandTool "hand tool")
(documentation HandTool EnglishLanguage "Any &%UnpoweredDevice that a &%Human
is capable of &%Carrying and is designed for a particular purpose.")

(=>
  (instance ?HT HandTool)
  (capability Carrying objectTransferred ?HT))

(subclass UnpoweredDevice Device)
(disjoint UnpoweredDevice ElectricDevice)
(documentation UnpoweredDevice EnglishLanguage "Any &%Device that lacks a 
&%part that is a power source.")

(=>
  (instance ?UD UnpoweredDevice)
  (not
    (exists (?E)
      (and
        (instance ?E Engine)
        (part ?E ?UD)))))

(instance GeneralMotorsCorp Corporation)
(termFormat EnglishLanguage GeneralMotorsCorp "General Motors")
(headquartersOfOrganization GeneralMotorsCorp UnitedStates)

(instance HoldenCorporation Corporation)
(headquartersOfOrganization HoldenCorporation Austrailia)
(termFormat EnglishLanguage HoldenCorporation "Holden Corporation")
(documentation HoldenCorporation EnglishLanguage "A &%manufacturer of
&%Automobiles in &%Austrailia that is a &%subOrganization of 
&%GeneralMotorsCorp and is the &%manufacturer of the &%CommodoreAutomobile.")
(subOrganization HoldenCorporation GeneralMotorsCorp)

(instance manufacturer BinaryPredicate)
(documentation manufacturer EnglishLanguage "A relation between a class of &%Objects
and an &%Agent that is responsible for the &%Manufacture of that object.")
(domainSubclass manufacturer 1 Object)
(domain manufacturer 2 Agent)
(format EnglishLanguage manufacturer "the maker of %1 is %2")

(subclass CommodoreAutomobile Automobile)
(documentation CommodoreAutomobile EnglishLanguage "A brand of &%Automobile
that is the output of &%Manufacture by &%HoldenCorporation.")
(manufacturer CommodoreAutomobile HoldenCorporation)

(subclass CommodoreWheel Wheel)
(documentation CommodoreWheel EnglishLanguage "A wheel (timre rim) made for the
&%CommodoreAutomobile.")
(termFormat EnglishLanguage CommodoreWheel "Commodore wheel")
(manufacturer CommodoreWheel Holden)

(=>
  (instance ?CW CommodoreWheel)
  (hasPurpose ?CW
    (exists (?CA)
      (and
        (instance ?CA CommodoreAutomobile)
        (part ?CW ?CA)))))

(instance engineCylinders BinaryPredicate)
(domain engineCylinders 1 Engine)
(domain engineCylinders 2 NonNegativeInteger)
(format EnglishLanguage engineCylinders "engine %1 has %2 cylinders")
(documentation engineCylinders EnglishLanguage "The number of 
&%EngineCylinders in a particular &%Engine.")

(=>
  (engineCylinders ?E ?N)
  (exists (?G)
    (and
      (instance ?G Collection)
      (memberTypeCount ?G EngineCylinder ?N)
      (member ?EC ?G)
      (part ?EC ?E))))

(subclass TwoCylinderEngine IntermittentCombustionEngine)
(documentation TwoCylinderEngine EnglishLanguage "An
&%IntermittentCombustionEngine that has two &%EngineCylinders.")
(termFormat EnglishLanguage TwoCylinderEngine "two cylinder engine")
(=>
  (instance ?TCE TwoCylinderEngine)
  (engineCylinders ?TCE 2))

(subclass FourCylinderEngine IntermittentCombustionEngine)
(documentation FourCylinderEngine EnglishLanguage "An
&%IntermittentCombustionEngine that has four &%EngineCylinders.")
(termFormat EnglishLanguage FourCylinderEngine "four cylinder engine")
(=>
  (instance ?FCE FourCylinderEngine)
  (engineCylinders ?FCE 2))

(subclass SixCylinderEngine IntermittentCombustionEngine)
(documentation SixCylinderEngine EnglishLanguage "An
&%IntermittentCombustionEngine that has six &%EngineCylinders.")
(termFormat EnglishLanguage SixCylinderEngine "six cylinder engine")
(=>
  (instance ?E SixCylinderEngine)
  (engineCylinders ?E 6))

(subclass EightCylinderEngine IntermittentCombustionEngine)
(documentation EightCylinderEngine EnglishLanguage "An
&%IntermittentCombustionEngine that has eight &%EngineCylinders.")
(termFormat EnglishLanguage EightCylinderEngine "eight cylinder engine")
(=>
  (instance ?E EightCylinderEngine)
  (engineCylinders ?E 8))

(instance HarleyDavidsonCorp Corporation)
(termFormat EnglishLanguage HarleyDavidsonCorp "Harley Davidson")
(documentation HarleyDavidsonCorp EnglishLanguage "An iconic &%manufacturer
of &%Motorcyles in the &%UnitedStates.")
(headquartersOfOrganization HarleyDavidsonCorp UnitedStates)

(subclass HarleyDavidsonKnuckleheadEngine TwoCylinderEngine)
(externalImage HarleyDavidsonKnuckleheadEngine "http://en.wikipedia.org/wiki/File:Harley035.jpg")
(termFormat EnglishLanguage HarleyDavidsonKnuckleheadEngine "knucklehead")
(manufacturer HarleyDavidsonKnuckleheadEngine HarleyDavidsonCorp)

(subclass FourWheelDriveVehicle LandVehicle)
(termFormat EnglishLanguage FourWheelDriveVehicle "four wheel drive")
(documentation FourWheelDriveVehicle EnglishLanguage "A &%LandVehicle
that is capable of providing power to all four &%Wheels.")

(=>
  (instance ?FWD FourWheelDriveVehicle)
  (hasPurpose ?FWD
    (forall (?W)
      (and
        (part ?W ?FWD)
        (exists (?E ?C ?R1 ?R2)
          (and
            (instance ?E Engine)
            (part ?E ?FWD)
            (instance ?C Crankshaft)
            (part ?C ?E)
            (instance ?R1 Rotating)
            (patient ?R1 ?C)
            (instance ?R2 Rotating)
            (patient ?R2 ?W)
            (causes ?R1 ?R2)))))))

(subclass TwoWheelDriveVehicle LandVehicle)
(termFormat EnglishLanguage TwoWheelDriveVehicle "four wheel drive")
(documentation TwoWheelDriveVehicle EnglishLanguage "A &%LandVehicle
that is capable of providing power to all four &%Wheels.")

(=>
  (instance ?TWD TwoWheelDriveVehicle)
  (hasPurpose ?TWD
    (exists (?W1 ?W2)
      (and
        (part ?W1 ?TWD)
        (part ?W2 ?TWD)
        (not
          (equal ?W1 ?W2))
        (exists (?E ?C ?R1 ?R2 ?R3)
          (and
            (instance ?E Engine)
            (part ?E ?TWD)
            (instance ?C Crankshaft)
            (part ?C ?E)
            (instance ?R1 Rotating)
            (patient ?R1 ?C)
            (instance ?R2 Rotating)
            (patient ?R2 ?W1)
            (causes ?R1 ?R2)
            (patient ?R3 ?W2)
            (causes ?R1 ?R3)
            (not
              (exists (?W3 ?R4)
                (and
                  (not 
                    (equal ?W1 ?W3))
                  (not
                     (equal ?W2 ?W3))
                  (part ?W3 ?TWD)
                  (instance ?R4 Rotating)
                  (patient ?R4 ?W3)
                  (causes ?R1 ?R4))))))))))

(termFormat EnglishLanguage FourByFourTire "4x4 tire")
(termFormat EnglishLanguage FourByFourTire "4 by 4 tire")
(termFormat EnglishLanguage FourByFourTire "four wheel drive tire")
(subclass FourByFourTire Tire)
(documentation FourByFourTire EnglishLanguage "A &%VehicleTire that is
intended for use on a &%FourWheelDriveVehicle, having increased traction
compared to vehicle tires intended for use on Asphalt.")

(=>
  (instance ?FFT FourByFourTire)
  (hasPurpose ?FFT
    (exists (?FWDV)
      (and
        (instance ?FWDV FourWheelDriveVehicle)
        (part ?FFT ?FWDV)))))

(termFormat EnglishLanguage VehicleRoofRack "roof bars")
(termFormat EnglishLanguage VehicleRoofRack "roof rack")
(termFormat EnglishLanguage VehicleRoofRack "cargo rack")
(subclass VehicleRoofRack Device)
(documentation VehicleRoofRack EnglishLanguage "A structure designed
to be attached to, or made as part of a &%RoadVehicle, to which
cargo, or cargo-carrying &%Containers may be temporarily attached.")

(=>
  (instance ?VRR VehicleRoofRack)
  (hasPurpose ?VRR
    (exists (?T ?A)
      (and
        (instance ?T Transfer)
        (patient ?T ?C)
        (instance ?A Automobile)
        (orientation ?VRR ?A Outside)
        (meetsSpatially ?C ?VRR)
        (part ?VRR ?A)
        (instrument ?T ?A)))))

(subclass HarleyDavidsonPanheadEngine TwoCylinderEngine)
(externalImage HarleyDavidsonPanheadEngine "http://upload.wikimedia.org/wikipedia/commons/d/d8/Panhead.jpg")
(termFormat EnglishLanguage HarleyDavidsonPanheadEngine "panhead")
(manufacturer HarleyDavidsonPanheadEngine HarleyDavidsonCorp)

(termFormat de InteriorVehicleEquipment "fahrzeugeinrichtung")
(termFormat EnglishLanguage InteriorVehicleEquipment "vehicle interior")
(subclass InteriorVehicleEquipment Artifact)
(documentation InteriorVehicleEquipment EnglishLanguage "The objects &%Inside
the passenger compartment of a &%RoadVehicle, such as the seats, dashboard and
radio.")

(=>
  (instance ?IVE InteriorVehicleEquipment)
  (hasPurpose ?IVE
    (exists (?V ?E)
      (and
        (instance ?V Automobile)
        (instance ?E Engine)
        (part ?E ?V)
        (not 
          (part ?IVE ?E))
        (part ?IVE ?V)
        (orientation ?IVE ?V Inside)))))

(instance RoverGroup Corporation)
(documentation RoverGroup EnglishLanguage "A British motor car company that has gone through
many different eras as a brand, independant corporation, and subsidiary.")
(headquartersOfOrganization RoverGroup UnitedKingdom)

(subclass RoverV8Engine EightCylinderEngine)
(externalImage RoverV8Engine "http://upload.wikimedia.org/wikipedia/commons/4/45/Rover_V8_engine.jpg")
(manufacturer RoverV8Engine RoverGroup)
(termFormat EnglishLanguage RoverV8Engine "Rover v8")
(documentation RoverV8Engine EnglishLanguage "The Rover V8 engine is a compact V8 internal 
combustion engine with aluminium cylinder heads and cylinder block, originally designed by 
General Motors and later re-designed and produced by Rover in the United Kingdom. It has 
been used in a wide range of vehicles from Rover and other manufacturers since its British 
debut in 1967. [from Wikipedia]")

(=>
  (instance ?RV8 RoverV8Engine)
  (material Aluminum ?RV8))

(instance BritishSeagullCorp Corporation)
(termFormat EnglishLanguage BritishSeagullCorp "British Seagull corp")
(headquartersOfOrganization BritishSeagullCorp UnitedKingdom)
(documentation BritishSeagullCorp EnglishLanguage "British Seagull was a British manufacturer 
of two-stroke outboard engines from the early 1930s until the mid 1990s. The company went out 
of business due to the motor design not being able to keep up with more modern boat engines 
and increasingly tight emissions regulations. British Seagull no longer produces new engines 
but still operates for parts.")

(subclass SeagullOutboard OutboardMotor)
(subclass SeagullOutboard TwoStrokeEngine)
(termFormat EnglishLanguage SeagullOutboard "Seagull outboard")
(manufacturer SeagullOutboard BritishSeagullCorp)
(externalImage BritishSeagullOutboardMotor "http://upload.wikimedia.org/wikipedia/commons/1/1f/BritishSeagull.jpg")

(subclass MotorcycleGlove Glove)
(subclass MotorcycleGlove SafetyDevice)
(equal Glove (CoveringFn Hand))
(termFormat EnglishLanguage MotorcycleGlove "motorcycle glove")
(documentation MotorcycleGlove EnglishLanguage "&%Gloves that are intended for use while
riding a &%Motorcycle.  They may include features such as special fabrics or armor to
protect the hands in case of an accident.")

(=>
  (instance ?MG MotorcycleGlove)
  (hasPurpose ?MG
    (exists (?M ?D ?T)
      (and
        (instance ?T Driving)
        (agent ?T ?D)
        (instrument ?T ?M)
        (instance ?M Motorcycle)
        (holdsDuring (WhenFn ?T)
          (wears ?D ?MG))))))

(subclass AllTerrainVehicle LandVehicle)
(documentation AllTerrainVehicle EnglishLanguage "A &%Vehicle that travels on low-pressure 
tires, with a seat that is straddled by the operator, along with handlebars for &%Steering 
control, that is designed to handle a wider variety of terrain than most &%RoadVehicles")
(termFormat EnglishLanguage AllTerrainVehicle "ATV")
(termFormat EnglishLanguage AllTerrainVehicle "all-terrain vehicle")

(=>
  (instance ?ATV AllTerrainVehicle)
  (hasPurpose ?ATV
    (exists (?D ?L)
      (and
        (instance ?D Transportation)
        (instrument ?D ?ATV)
        (holdsDuring (WhenFn ?D)
          (orientation ?ATV ?L On))
        (not
          (instance ?L Roadway))))))

(subclass Tire Device)
(documentation Tire EnglishLanguage "Any &%Pliable object with a &%RoundShape that is
designed to cover the &%WheelRim, and provide a &%WearingFrictionSurface that can
be replaced more cheaply and/or easily than the rim.  It may also increase traction, and
provide some shock absorbtion or act as a &%Damper, thus smoothing the ride of a &%Vehicle.")
(termFormat EnglishLanguage Tire "tire")

(=>
  (instance ?T Tire)
  (hasPurpose ?T
    (exists (?W ?R)
      (and
        (instance ?W Wheel)
        (instance ?R WheelRim)
        (part ?T ?W)
        (part ?R ?W)
        (covers ?T ?R)))))

(=>
  (instance ?T Tire)
  (attribute ?T Pliable))

(=>
  (instance ?T Tire)
  (attribute ?T RoundShape))

(subclass WheelRim Device)
(documentation WheelRim EnglishLanguage "The rigid portion of a &%Wheel on a 
&%RoadVehicle that is designed to have a &%Tire that &%covers it.")
(termFormat EnglishLanguage WheelRim "rim")

(=>
  (instance ?WR WheelRim)
  (attribute ?WR Rigid))

(subclass ATVTire Tire)
(documentation ATVTire EnglishLanguage "A &%Tire designed to fit the
&%WheelRim on an &%AllTerrainVehicle.")
(termFormat EnglishLanguage ATVTire "atv tire")


(subclass HandToolBox Box)
(documentation HandToolBox EnglishLanguage "A &%Box designed for &%Carrying
&%HandTools, such as a &%Hammer or &%Wrench.")
(termFormat EnglishLanguage HandToolBox "tool box")

(=>
  (instance ?HTB HandToolBox)
  (hasPurpose ?HTB
    (exists (?HT)
      (and
        (instance ?HT HandTool)
        (contains ?HTB ?HT)))))
 
(instance SimmonsCorp Corporation)
(documentation SimmonsCorp EnglishLanguage "An &%Australian manufacturer of
custom alloy &%WheelRims.")
(headquartersOfOrganization SimmonsCorp Australia)

(subclass SimmonsWheelRim WheelRim)
(documentation SimmonWheelRim EnglishLanguage "A &%WheelRim &%Manufactured by
&%SimmonsCorp.")
(termFormat EnglishLanguage SimmonsWheelRim "Simmons rim")
(termFormat EnglishLanguage SimmonsWheelRim "Simmons wheel")
(manufacturer SimmonsWheelRim SimmonsCorp)

(instance BritishMotorCorp Corporation)
(termFormat EnglishLanguage BritishMotorCorp "British Motors")
(documentation BritishMotorCorp EnglishLanguage "A company based in the 
&%UnitedKingdom that was responsible for &%Making the original iconic Mini car.")

(subclass MiniCooper Automobile)
(documentation MiniCooper EnglishLanguage "A family of small &%Automobile models that
is an iconic British vehicle.  It has been revived by &%BMW.")
(termFormat EnglishLanguage MiniCooper "mini cooper")
(manufacturer MiniCooper BritishMotorCorp)

(subclass MiniCooperEngine IntermittentCombustionEngine)
(termFormat EnglishLanguage MiniCooperEngine "mini cooper engine")
(termFormat EnglishLanguage MiniCooperEngine "mini engine")
(typicalPart MiniCooperEngine MiniCooper)
(typicallyContainsPart MiniCooperEngine MiniCooper)

(subclass HoldenToranaAutomobile Automobile)
(documentation HoldenToranaAutomobile EnglishLanguage "A brand of &%Automobile
that is the output of &%Manufacture by &%HoldenCorporation.")
(termFormat EnglishLanguage HoldenToranaAutomobile "Torana")
(termFormat EnglishLanguage HoldenToranaAutomobile "Holden Torana")
(manufacturer HoldenToranaAutomobile HoldenCorporation)

(subclass TireChanger Device)
(documentation TireChanger EnglishLanguage "A &%Device for putting &%Tires on
&%WheelRims, or removing them.")
(termFormat EnglishLanguage TireChanger "tire changer")

(=>
  (instance ?TC TireChanger)
  (hasPurpose ?TC
    (exists (?P ?T ?R)
      (and
        (instance ?P Putting)
        (instance ?T Tire)
        (instance ?R WheelRim)
        (destination ?P ?R)
        (objectTransferred ?P ?T)
        (instrument ?P ?TC)))))

(=>
  (instance ?TC TireChanger)
  (hasPurpose ?TC
    (exists (?RE ?T ?R)
      (and
        (instance ?RE Removing)
        (instance ?T Tire)
        (instance ?R WheelRim)
        (origin ?RE ?R)
        (objectTransferred ?RE ?T)
        (instrument ?RE ?TC)))))

(termFormat EnglishLanguage RecreationalVehicle "caravan")
(termFormat EnglishLanguage RecreationalVehicle "RV")
(termFormat EnglishLanguage RecreationalVehicle "camper")

(subclass FordWheelRim WheelRim)
(documentation FordWheelRim EnglishLanguage "A &%WheelRim intended for
a &%FordAutomobile.")
(termFormat EnglishLanguage FordWheelRim "Ford rim")
(termFormat EnglishLanguage FordWheelRim "Ford wheel")

(subclass FordAutomobile Automobile)
(documentation FordAutomobile EnglishLanguage "A brand of &%Automobile
that is the output of &%Manufacture by &%FordCorporation.")
(termFormat EnglishLanguage FordAutomobile "Ford")
(termFormat EnglishLanguage FordAutomobile "Ford car")
(manufacturer FordAutomobile FordCorporation)

(instance FordCorporation Corporation)
(termFormat EnglishLanguage FordCorporation "Ford")
(documentation FordCorporation EnglishLanguage "A company based in the 
&%UnitedStates that is one of the oldest and largest existing passenger car makers.")

(subclass Ratchet Wrench)
(documentation Ratchet EnglishLanguage "A &%Wrench that allows an engaged &%Bolt to
exhibit &%Rotating freely in one direction but not another, with respect to the 
handle of the wrench. Some wrenches have a switch that allows selection of one of
two directions of free rotation.")

(=>
  (and 
    (instance ?R Ratchet)
    (instance ?A AttachingDevice)
    (instance ?RO1 Rotating)
    (attribute ?RO1 ?DIR1)
    (instance ?RO2 Rotating)
    (attribute ?RO2 ?DIR2)
    (instance ?DIR1 RotationalAttribute)
    (instance ?DIR2 RotationalAttribute)
    (not
      (equal ?RO1 ?RO2))
    (causes ?RO1 ?RO2)
    (patient ?RO1 Ratchet)
    (patient ?RO2 ?A))
  (equal ?DIR1 ?DIR2))
  
(subclass RotationalAttribute PositionalAttribute)
(documentation RotationalAttribute EnglishLanguage "A &%PositionalAttribute characterizing the direction of &%Rotating.")
(=>
  (manner ?PROC RotationalAttribute)
  (instance ?PROC Rotating))

(instance Clockwise RotationalAttribute)
(termFormat EnglishLanguage Clockwise "clockwise")
(documentation Clockwise EnglishLanguage "The &%direction in which the hands of a modern
&%Clock move when reading the clock.")

(instance CounterClockwise RotationalAttribute)
(termFormat EnglishLanguage CounterClockwise "counter-clockwise")
(documentation CounterClockwise EnglishLanguage "The opposite &%direction from which the hands of a modern
&%Clock move when reading the clock.")

(contraryAttribute Clockwise CounterClockwise)

(subclass SnapOnRatchet Ratchet)
(termFormat EnglishLanguage SnapOnRatchet "Snap-On ratchet")
(manufacturer SnapOnRatchet SnapOnTools)

(subclass ChevroletAutomobile Automobile)
(manufacturer ChevroletAutomobile GeneralMotorsCorp)

(subclass ChevroletEngine IntermittentCombustionEngine)
(typicalPart ChevroletEngine ChevroletAutomobile)
(typicallyContainsPart ChevroletEngine ChevroletAutomobile)

(subclass Chevrolet350Engine ChevroletEngine)

(instance engineDisplacement BinaryPredicate)
(domain engineDisplacement 1 IntermittentCombustionEngine)
(domain engineDisplacement 2 VolumeMeasure)
(documentation engineDisplacement EnglishLanguage "The total 
&%VolumeMeasure of all the &%EngineCylinders.")

(subclass Mud Soil)
(documentation Mud EnglishLanguage "A &%Mixture of &%Soil and &%Water.")
(termFormat EnglishLanguage Mud "mud")

(=>
  (instance ?M Mud)
  (exists (?W)
    (and
      (instance ?W Water)
      (part ?W ?M))))

(subclass MudTire Tire)
(documentation MudTire EnglishLanguage "A &%Tire designed to be used for
&%Driving in &%Mud.")
(termFormat EnglishLanguage MudTire "mud tire")
(termFormat EnglishLanguage MudTire "mud tyre")

(=>
  (instance ?MT MudTire)
  (hasPurpose ?MT
    (exists (?M)
      (and
        (instance ?M Mud)
        (meetsSpatially ?MT ?M)))))

(subclass PeterbiltCorp Corporation)
(headquartersOfOrganization PeterbiltCorp Texas)
(termFormat EnglishLanguage PeterbiltCorp "Peterbilt")
(documentation PeterbiltCorp EnglishLanguage "An American &%manufacturer of
&%TruckTractors that was one of the first truck makers.")

(subclass PeterbiltTruck TruckTractor)
(manufacturer PeterbiltTruck PeterbiltCorp)
(termFormat EnglishLanguage PeterbiltTruck "Peterbilt")
(termFormat EnglishLanguage PeterbiltTruck "Peterbilt truck")

(=>
  (instance ?S Seat)
  (hasPurpose ?S
    (exists (?H ?T)
      (and
        (instance ?H Human)
        (holdsDuring ?T
          (and
            (attribute ?H Sitting)
            (located ?H ?S)))))))

(subclass VehicleSeat Artifact)
(=>
  (instance ?S VehicleSeat)
  (hasPurpose ?S
    (exists (?H ?T ?V)
      (and
        (instance ?H Human)
        (instance ?V Vehicle)
        (holdsDuring ?T
          (and
            (attribute ?H Sitting)
            (located ?H ?S)
            (located ?S ?V)))))))

(subclass AutomobileSeat VehicleSeat)
(termFormat EnglishLanguage AutomobileSeat "car seat")
(termFormat EnglishLanguage AutomobileSeat "auto seat")

(=>
  (instance ?S AutomobileSeat)
  (hasPurpose ?S
    (exists (?H ?T ?V)
      (and
        (instance ?H Human)
        (instance ?V Automobile)
        (holdsDuring ?T
          (and
            (attribute ?H Sitting)
            (located ?H ?S)
            (located ?S ?V)))))))

(subclass BoatSeat VehicleSeat)
(termFormat EnglishLanguage BoatSeat "boat seat")

(=>
  (instance ?S BoatSeat)
  (hasPurpose ?S
    (exists (?H ?T ?V)
      (and
        (instance ?H Human)
        (instance ?V WaterVehicle)
        (holdsDuring ?T
          (and
            (attribute ?H Sitting)
            (located ?H ?S)
            (located ?S ?V)))))))

(subclass ElectricLightFixture LightFixture)
(subclass ElectricLightFixture ElectricDevice)

(subclass IncandescentLightFixture ElectricLightFixture)
(subclass LEDLightFixture ElectricLightFixture)
(subclass FluorescentLightFixture ElectricLightFixture)

(subclass LightBulb ElectricLightFixture)
(termFormat EnglishLanguage LightBulb "light bulb")
(documentation LightBulb EnglishLanguage "The smallest removable
&%LightFixture that is the component that emits light.")

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

(typicalPart LightBulb LightFixture)
(typicallyContainsPart LightBulb LightFixture)

(subclass LED LightBulb)
(termFormat EnglishLanguage LED "LED")
(termFormat EnglishLanguage LED "LED light")

(subclass FluorescentLightBulb LightBulb)
(termFormat EnglishLanguage FluorescentLightBulb "fluorescent light bulb")

(subclass IncandescentLightBulb LightBulb)
(termFormat EnglishLanguage IncandescentLightBulb "incandescent light bulb")
(termFormat EnglishLanguage IncandescentLightBulb "light bulb")

(instance SortimoCorp Corporation)
(termFormat EnglishLanguage SortimoCorp "Sortimo Corporation")
(headquartersOfOrganization SortimoCorp Germany)

(exists (?T)
  (and
    (subclass ?T Toolbox)
    (manufacturer SortimoCorp ?T)))

(subclass GMLs1V8engine EightCylinderEngine)
(termFormat EnglishLanguage GMLs1V8engine "ls1 engine")
(manufacturer GMLs1V8engine GeneralMotorsCorp)

(subclass Corvette Automobile)
(termFormat EnglishLanguage Corvette "Corvette")
(manufacturer Corvette GeneralMotorsCorp)
(typicalPart GMLs1V8engine Corvette)

(instance UsedItem RelationalAttribute)
(documentation UsedItem EnglishLanguage "An item that is 'used' in a retail
sense, that it has been purchased by a customer.  Note that it need not have
actually been used for its intended purpose.")
(termFormat EnglishLanguage UsedItem "used")

(=>
  (attribute ?O UsedItem)
  (exists (?B)
    (and
      (instance ?B Buying)
      (objectTransferred ?B ?O))))

(instance NewItem RelationalAttribute)
(documentation NewItem EnglishLanguage "An item that is 'new' in a retail
sense, that it has not been purchased by a customer.")
(termFormat EnglishLanguage NewItem "new")
(contraryAttribute UsedItem NewItem)

(=>
  (attribute ?O NewItem)
  (not
    (exists (?B)
      (and
        (instance ?B Buying)
        (objectTransferred ?B ?O)))))

(instance IconMotorcyleEquipmentCorporation Corporation)
(termFormat EnglishLanguage IconMotorcyleEquipmentCorporation "Icon")
(termFormat EnglishLanguage IconMotorcyleEquipmentCorporation "Icon Corporation")

(subclass IconHelmet MotorcycleHelmet)
(manufacturer IconHelmet IconMotorcyleEquipmentCorporation)
(termFormat EnglishLanguage IconHelmet "Icon helmet")

(instance CosworthCorp Corporation)
(headquartersOfOrganization CosworthCorp England)
(termFormat EnglishLanguage CosworthCorp "Cosworth Corporation")
(documentation CosworthCorp EnglishLanguage "A British &%manufacturer of
high performance &%Automobile &%Engines and equipment.")

(subclass CosworthEngine IntermittentCombustionEngine)
(manufacturer CosworthEngine CosworthCorp)
(termFormat EnglishLanguage CosworthEngine "Cosworth engine")

(subclass GasCompressor Machine)
(termFormat EnglishLanguage GasCompressor "compressor")
(documentation GasCompressor EnglishLanguage "Any device designed for
&%Compressing a &%Gas.  This includes compressors designed for 
refrigeration applications as well as air tools.")

(=>
  (instance ?GC GasCompressor)
  (hasPurpose ?GC
    (exists (?C ?G)
      (and
        (instance ?C Compressing)
        (attribute ?G Gas)
        (patient ?C ?G)
        (instrument ?C ?GC)))))

(subclass Supercharger GasCompressor)
(typicalPart Supercharger IntermittentCombustionEngine)
(documentation Supercharger EnglishLanguage "A &%Device that injects
compressed &%Air into the intake of a &%Vehicle &%Engine.  By effectively
increasing the amount of &%Oxygen in the &%CombustionChamber, it 
increases the power and efficiency and the engine.")
(termFormat EnglishLanguage Supercharger "supercharger")

(=>
  (instance ?S Supercharger)
  (hasPurpose ?S
    (exists (?T ?IV ?A)
      (and
        (instance ?T GasMotion)
        (origin ?T ?S)
        (instance ?IV IntakeValve)
        (destination ?T ?IV)
        (instance ?A Air)
        (objectTransferred ?T ?A)
        (holdsDuring (WhenFn ?T)
          (attribute ?A Pressurized))))))

