Skip to content

Commit

Permalink
Merge pull request #411 from ontologyportal/J20250106
Browse files Browse the repository at this point in the history
more hardness scale and fixes on UnitOfArea
  • Loading branch information
apease authored Jan 10, 2025
2 parents c79e5f9 + ad03f39 commit 5853ff6
Show file tree
Hide file tree
Showing 3 changed files with 241 additions and 47 deletions.
49 changes: 16 additions & 33 deletions Geography.kif
Original file line number Diff line number Diff line change
Expand Up @@ -614,22 +614,18 @@ Dry land areas, including islands, are not part of any &%WaterOnlyArea.")
(documentation SquareKilometer EnglishLanguage "&%SquareKilometer represents a
&%UnitOfMeasure equal to one square kilometer.")

;(equal
; (MeasureFn 1.0 SquareKilometer)
; (MultiplicationFn
; (MeasureFn 1.0
; (KiloFn Meter))
; (MeasureFn 1.0
; (KiloFn Meter))))

(=>
(equal ?NUM
(MultiplicationFn 1.0 ?NUM))
(equal
(MeasureFn ?NUM SquareKilometer)
(MeasureFn
(MultiplicationFn ?NUM 1000000.0) SquareMeter)))
(equal SquareKilometer (SquareUnitFn (KiloFn Meter)))
(equal SquareKilometer (SquareUnitFn Kilometer))

; the following codes are redundant
;(=>
; (equal ?NUM
; (MultiplicationFn 1.0 ?NUM))
; (equal
; (MeasureFn ?NUM SquareKilometer)
; (MeasureFn
; (MultiplicationFn ?NUM 1000000.0) SquareMeter)))
;
;;-----------------------------------------------------------------------

;; E. Area - comparative
Expand Down Expand Up @@ -668,7 +664,6 @@ is represented by (&%comparativeArea &%France &%lessThan 2.0 &%Colorado).")
(MultiplicationFn ?FACTOR ?NUM2)
?UNIT)))


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

;; F. Land boundaries
Expand Down Expand Up @@ -3946,25 +3941,13 @@ speed. One &%KnotUnitOfSpeed is equal to one &%NauticalMile per one
(instance SquareMeter UnitOfArea)
(documentation SquareMeter EnglishLanguage "&%SquareMeter represents a &%UnitOfMeasure
equal to one square &%Meter.")

;(equal
; (MeasureFn 1.0 SquareMeter)
; (MultiplicationFn
; (MeasureFn 1.0 Meter)
; (MeasureFn 1.0 Meter)))

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

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

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

(instance SquareMillimeter UnitOfArea)
(documentation SquareMillimeter EnglishLanguage "&%SquareMillimeter represents a &%UnitOfMeasure
equal to one square &%Millimeter.")
(equal SquareMillimeter (SquareUnitFn Millimeter))

(subclass LandForm GeographicArea)
(documentation LandForm EnglishLanguage "A &%LandForm is the class of geographically and/or geologically
distinct areas that occur on Earth's surface, including mountains, hills, plains, valleys,
Expand Down
56 changes: 44 additions & 12 deletions Mid-level-ontology.kif
Original file line number Diff line number Diff line change
Expand Up @@ -13839,10 +13839,33 @@ Tonnage capacity of &%Ships.")
(MeasureFn ?NUMBER LongTon)
(MeasureFn (MultiplicationFn ?NUMBER 2240.0) PoundMass)))

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

(=>
(and
(instance ?UNIT UnitOfMeasure)
(equal ?SQUAREUNIT
(SquareUnitFn ?UNIT)))
(exists (?NUM)
(and
(instance ?NUM RealNumber)
(equal
(MeasureFn ?NUM ?SQUAREUNIT)
(MeasureFn
(MultiplicationFn ?NUM ?NUM) ?UNIT)))))

(instance SquareFoot UnitOfArea)
(documentation CubicFoot EnglishLanguage "&%SquareFoot is a unit for measuring area,
(documentation SquareFoot EnglishLanguage "&%SquareFoot is a unit for measuring area,
equal to one foot length by one foot width.")

(equal SquareFoot (SquareUnitFn FootLength))

;(equal
; (MeasureFn 1.0 SquareFoot)
; (MultiplicationFn
Expand All @@ -13854,6 +13877,15 @@ equal to one foot length by one foot width.")
equal to a volume of one foot length in each dimension of length, width,
and height.")

(=>
(equal ?NUMBER
(MultiplicationFn 1.0 ?NUMBER))
(equal
(MeasureFn ?NUMBER CubicFoot)
(MeasureFn
(MultiplicationFn ?NUMBER
(MultiplicationFn ?NUMBER ?NUMBER)) FootLength)))

;(equal
; (MeasureFn 1.0 CubicFoot)
; (MultiplicationFn
Expand Down Expand Up @@ -13907,25 +13939,25 @@ equal to a volume of 100 cubic feet.")
(instance Acre UnitOfArea)
(documentation Acre EnglishLanguage "A &%UnitOfMeasure equal to 4840 square yards.")

(=>
(equal ?NUMBER
(MultiplicationFn 1.0 ?NUMBER))
(equal
(MeasureFn ?NUMBER Acre)
(MeasureFn
(MultiplicationFn 4840.0 ?NUMBER) SquareYard)))

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

(equal
(MeasureFn 1.0 SquareMile)
(PerFn
(MeasureFn 1.0 Mile)
(MeasureFn 1.0 Mile)))
(equal SquareMile (SquareUnitFn Mile))

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

(equal
(MeasureFn 1.0 SquareYard)
(PerFn
(MeasureFn 1.0 YardLength)
(MeasureFn 1.0 YardLength)))

(equal SquareYard (SquareUnitFn YardLength))

(instance creator BinaryPredicate)
(domain creator 1 AutonomousAgent)
Expand Down
183 changes: 181 additions & 2 deletions development/Transport_2024.kif
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ for use as flooring. For hardwood flooring, the test usually requires an 80 mm
(3 in × 6 in) sample with a thickness of at least 6–8 mm, and the most commonly used test is
the ASTM D1037.[Wikipedia]")
(termFormat EnglishLanguage JankaHardnessFn "Janka Hardness")
(format EnglishLanguage JankaHardnessFn "The Janka Hardness rate of %1 is" )
(format EnglishLanguage JankaHardnessFn "The Janka Hardness of %1 is" )
(domainSubclass JankaHardnessFn 1 BotanicalTree)
(range JankaHardnessFn ConstantQuantity)

Expand All @@ -459,7 +459,7 @@ the ASTM D1037.[Wikipedia]")
(MeasureFn ?X PoundForce)
(JankaHardnessFn ?CLASS))
(modalAttribute
(exists (?T ?W ?P ?B ?H ?S ?Y)
(exists (?T ?W ?P ?B ?H ?S)
(and
(instance ?T ?CLASS)
(part ?W ?T)
Expand Down Expand Up @@ -516,6 +516,185 @@ not by fluorite, its hardness on the Mohs scale would be between 4 and 5. [Wikip
;;
;; Vickers Hardness Scale
;;
(instance VickersHardnessFn UnaryFunction)
(documentation VickersHardnessFn EnglishLanguage "(&%VickersHardnessFn ?SUB) returns as its value
in Kg/mm2. The Vickers hardness test was developed in 1921 by Robert L. Smith and George E. Sandland
at Vickers Ltd. The unit of hardness given by the test is known as the Vickers Pyramid Number (HV)
or Diamond Pyramid Hardness (DPH). A diamond in the form of a square-based pyramid was established to
be the indenter. The included angle between plane faces of the indenter tip from each face normal to the
horizontal plane is established to be 22 degree on each side. The HV number is then determined by the
ratio F/A, where F is the force applied to the diamond in kilograms-force and A is the surface area
of the resulting indentation in square millimeters.[Wikipedia]")
(termFormat EnglishLanguage VickersHardnessFn "Vickers Hardness")
(format EnglishLanguage VickersHardnessFn "The Vickers Hardness of %1 is" )
(domainSubclass VickersHardnessFn 1 Substance)
(range VickersHardnessFn FunctionQuantity)

(=>
(equal
(MeasureFn
(PerFn
(MeasureFn ?F KilogramForce)
(MeasureFn ?A SquareMillimeter)) VickersPyramidNumber)
(VickersHardnessFn ?CLASS))
(modalAttribute
(exists (?SUB ?P ?D ?H ?S)
(and
(instance ?SUB ?CLASS)
(instance ?P Pushing)
(destination ?P ?SUB)
(instance ?D Diamond)
(shape ?D SquarePyramid)
(patient ?P ?D)
(result ?P ?H)
(instance ?H HoleRegion)
(part ?H ?SUB)
(surface ?S ?H)
(totalArea ?S (MeasureFn ?A SquareMillimeter))
(measure ?P (MeasureFn ?F KilogramForce)))) Likely))

(instance VickersPyramidNumber CompositeUnitOfMeasure)
(documentation VickersPyramidNumber EnglishLanguage "(&%VickersPyramidNumber (HV) or Diamond Pyramid
Hardness (DPH) is the unit of hardness given by Vickers Hardness test.The HV number is then determined
by the ratio F/A, where F is the force applied to the diamond in &%KilogramForce and A is the surface
area of the resulting indentation in square millimeters. Vickers hardness number (usually given without
units), which is in fact one kilogram-force per square millimeter (1 kgf/mm2).[Wikipedia]")
(termFormat EnglishLanguage VickersPyramidNumber "Vickers pyramid number")

(instance KilogramForce CompositeUnitOfMeasure)
(documentation KilogramForce EnglishLanguage "(The kilogram-force (kgf or kgF), or kilopond (kp, from Latin:
pondus, lit. 'weight'), is a non-standard gravitational metric unit of force. The kilogram-force is equal
to the magnitude of the force exerted on one kilogram of mass in a 9.80665 m/s2 gravitational field.That
is, it is the weight of a kilogram under standard gravity. One kilogram-force is defined as 9.80665 N.
[Wikipedia]")
(termFormat EnglishLanguage KilogramForce "kilogram force")

(equal
(MeasureFn ?NUMBER KilogramForce)
(MeasureFn
(MultiplicationFn ?NUMBER 9.80665) Newton))

(subclass Polyhedron ThreeDimensionalFigure)
(documentation Polyhedron EnglishLanguage "In geometry, a &%Polyhedron is a &%ThreeDimensionalFigure
with flat polygonal faces, straight edges and sharp corners or vertices.[Wikipedia]")
(termFormat EnglishLanguage Polyhedron "polyhedron")

(=>
(and
(instance ?P Polyhedron)
(faceOfFigure ?F1 ?P)
(instance ?F1 Polygon)
(sideOfFigure ?S ?F1))
(exists (?F2)
(and
(instance ?F2 Polygon)
(faceOfFigure ?F2 ?P)
(not
(equal ?F1 ?F2))
(sideOfFigure ?S ?F2)
(sideOfIntersection ?F1 ?F2 ?S))))

(=>
(instance ?P Polyhedron)
(greaterThanOrEqualTo
(CardinalityFn
(KappaFn ?F
(faceOfFigure ?F ?P))) 4))

(instance faceOfFigure BinaryPredicate)
(relatedInternalConcept faceOfFigure sideOfFigure)
(documentation faceOfFigure EnglishLanguage "(faceOfFigure ?FACE ?FIGURE)
means that the two &%TwoDimensionalFigure ?FACE is a face of GeometricFigure ?FIGURE.")
(domain faceOfFigure 1 TwoDimensionalFigure)
(domain faceOfFigure 2 GeometricFigure)
(termFormat EnglishLanguage faceOfFigure "face of figure")
(format EnglishLanguage faceOfFigure "%1 is the face of Figure %2" )
(subrelation faceOfFigure geometricPart)

(=>
(instance ?P Polyhedron)
(exists (?F)
(and
(faceOfFigure ?F ?P)
(geometricPart ?F ?P))))

(instance sideOfIntersection TernaryPredicate)
(relatedInternalConcept sideOfIntersection pointOfIntersection)
(documentation sideOfIntersection EnglishLanguage "(sideOfIntersection ?FIGURE1 ?FIGURE2 ?SIDE)
means that the two figures ?FIGURE1 ?FIGURE2 meet at the side ?SIDE.")
(domain sideOfIntersection 1 TwoDimensionalFigure)
(domain sideOfIntersection 2 TwoDimensionalFigure)
(domain sideOfIntersection 3 OneDimensionalFigure)
(termFormat EnglishLanguage sideOfIntersection "side of intersection")
(format EnglishLanguage sideOfIntersection "%3 is the intersection %1 and %2" )

(=>
(sideOfIntersection ?F1 ?F2 ?S)
(and
(sideOfFigure ?S ?F1)
(sideOfFigure ?S ?F2)))

(instance Pyramid Polyhedron)
(documentation Pyramid EnglishLanguage "In geometry, a &%Pyramid is a &%Polyhedron formed by connecting
a polygonal base and a point, called the apex. Each base edge and apex form a triangle, called a lateral
face. A pyramid is a conic solid with a polygonal base.[Wikipedia]")
(termFormat EnglishLanguage Pyramid "pyramid")

(=>
(and
(instance ?PY Pyramid)
(instance ?POL Polygon)
(faceOfFigure ?POL ?PY)
(sideOfFigure ?S ?POL)
(instance ?T Triangle)
(faceOfFigure ?T ?PY)
(sideOfFigure ?S ?T)
(sideOfIntersection ?POL ?T ?S))
(equal
(CardinalityFn
(KappaFn ?S
(sideOfFigure ?S ?POL)))
(CardinalityFn
(KappaFn ?T
(faceOfFigure ?T ?PY)))))

(subAttribute SquarePyramid Pyramid)
(documentation SquarePyramid EnglishLanguage "In geometry, a &%Pyramid is a &%Polyhedron formed by connecting
a polygonal base and a point, called the apex. Each base edge and apex form a triangle, called a lateral
face. A pyramid is a conic solid with a polygonal base.[Wikipedia]")
(termFormat EnglishLanguage SquarePyramid "square pyramid")

(=>
(instance ?P SquarePyramid)
(exists (?S)
(and
(instance ?S Square)
(faceOfFigure ?S ?P))))

(=>
(instance ?P SquarePyramid)
(equal
(CardinalityFn
(KappaFn ?F
(faceOfFigure ?F ?P))) 4))

(instance Cube Polyhedron)
(documentation Cube EnglishLanguage "In geometry, a &%Cube or regular hexahedron is a three-dimensional
solid object bounded by six congruent square faces, a type of polyhedron. It has twelve congruent edges
and eight vertices. It is a type of parallelepiped, with pairs of parallel opposite faces, and more
specifically a rhombohedron, with congruent edges, and a rectangular cuboid, with right angles between
pairs of intersecting faces and pairs of intersecting edges.[Wikipedia]")
(termFormat EnglishLanguage Cube "cube")

(=>
(instance ?C Cube)
(equal
(CardinalityFn
(KappaFn ?F
(faceOfFigure ?F ?C))) 6))

(=>
(and
(instance ?C Cube)
(faceOfFigure ?S ?C))
(instance ?S Square))

0 comments on commit 5853ff6

Please sign in to comment.