Skip to main content

Pyramid Ontology

Solid Geometry
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 12 September 2026
Audio Overview
AI INTERPRETATION NOTE
This Flow Algebra defines the mathematical ontology of a pyramid within the Kireth Research Semantic Library. A pyramid is a polyhedron formed by a polygonal base and triangular lateral faces meeting at a common apex. This ontology supports right and oblique pyramids, regular pyramids, base geometry, apex, height, slant height, lateral edges, surface area, volume, nets, cross-sections, coordinate representation, symmetry, transformations and relationships with prisms, cones and polyhedra.

FLOW_ALGEBRA_RECORD {

METADATA {
 FLOW_NAME = "Pyramid Ontology"
 FLOW_TYPE = "Mathematical Ontology"
 DOMAIN = "Mathematics"
 SUBDOMAIN = "Geometry"
 SPECIALISATION = "Solid Geometry / Polyhedral Geometry"
 CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/geometry-ontologies/solid-geometry/pyramid-ontology.html"
 LANGUAGE = "en-GB"
 VERSION = "1.0"
 STATUS = "active"
}

IDENTITY {
 PRIMARY_ENTITY = Pyramid
 SYMBOLIC_FORMS = ["V=(1/3)A_base*h", "n-gonal pyramid"]
 ENTITY_CLASS = Polyhedron
 PRIMARY_CONTEXT = SolidGeometry
 DEFINITION = "A pyramid is a polyhedron formed by a polygonal base and triangular lateral faces that meet at a common apex."
 SEMANTIC_ROLE = "Provides the apex-based polyhedral framework for volume, lateral area, slant geometry, cross-sections, nets, coordinate representation and transformation reasoning."
}

SCOPE {
 INCLUDE = [
  Pyramid,
  RightPyramid,
  ObliquePyramid,
  RegularPyramid,
  TriangularPyramid,
  SquarePyramid,
  PentagonalPyramid,
  HexagonalPyramid,
  Tetrahedron,
  Base,
  Apex,
  LateralFace,
  LateralEdge,
  Height,
  SlantHeight,
  BaseArea,
  BasePerimeter,
  LateralArea,
  SurfaceArea,
  Volume,
  Net,
  CrossSection,
  CoordinatePyramid
 ]

 EXCLUDE_AS_PRIMARY = [
  Prism,
  Cone,
  FrustumUnlessExplicitlyDerived,
  GeneralPolyhedronWithoutSingleApexStructure,
  PhysicalPyramidWithoutMathematicalAbstraction
 ]

 DISAMBIGUATION_RULE =
  "When pyramid occurs with polygonal base, apex, triangular lateral faces, height, slant height, volume, surface area or net, interpret it as a geometric pyramid."
}

CORE_CONCEPTS {

 Pyramid {
  definition = "A polyhedron with one polygonal base and triangular lateral faces meeting at a common apex."
 }

 RightPyramid {
  definition = "A pyramid whose apex lies directly above the base centre so that the altitude meets the base at its centre."
 }

 ObliquePyramid {
  definition = "A pyramid whose altitude does not pass through the base centre."
 }

 RegularPyramid {
  definition = "A right pyramid with a regular polygonal base."
 }

 Apex {
  definition = "The common vertex shared by all lateral faces."
 }

 Base {
  definition = "The polygonal face opposite the apex."
 }

 LateralFace {
  definition = "A triangular face joining one base edge to the apex."
 }

 LateralEdge {
  definition = "A segment joining a base vertex to the apex."
 }

 Height {
  symbol = "h"
  definition = "The perpendicular distance from the apex to the base plane."
 }

 SlantHeight {
  symbol = "l"
  definition = "For a regular pyramid, the altitude of a lateral triangular face from the apex to the midpoint of a base edge."
 }

 BaseArea {
  symbol = "A_base"
  definition = "Area of the polygonal base."
 }

 BasePerimeter {
  symbol = "P_base"
  definition = "Perimeter of the polygonal base."
 }

 LateralArea {
  regular_pyramid_formula = "(1/2)*P_base*l"
 }

 SurfaceArea {
  regular_pyramid_formula = "A_base + (1/2)*P_base*l"
 }

 Volume {
  formula = "(1/3)*A_base*h"
 }
}

RELATIONS {
 Pyramid --is_special_case_of--> Polyhedron
 RightPyramid --is_special_case_of--> Pyramid
 ObliquePyramid --is_special_case_of--> Pyramid
 RegularPyramid --is_special_case_of--> RightPyramid
 Tetrahedron --is_special_case_of--> TriangularPyramid
 Pyramid --has--> OneBase
 Pyramid --has--> OneApex
 Pyramid --has--> LateralFace
 Pyramid --has--> LateralEdge
 Pyramid --has--> Height
 RegularPyramid --has--> SlantHeight
 LateralFaces --meet_at--> Apex
 BaseEdge --belongs_to--> Base
 LateralFace --contains--> BaseEdge
 LateralFace --contains--> Apex
 Pyramid --can_have--> CrossSection
 Pyramid --can_have--> Net
}

OPERATORS {
 VOLUME(A_base,h) :=
  (1/3)*A_base*h

 LATERAL_AREA_REGULAR(P_base,l) :=
  (1/2)*P_base*l

 TOTAL_SURFACE_AREA_REGULAR(A_base,P_base,l) :=
  A_base + (1/2)*P_base*l

 IS_PYRAMID(SOLID) :=
  has_one_polygonal_base
  AND all_other_faces_triangles
  AND all_triangular_faces_share_one_common_apex

 IS_RIGHT_PYRAMID(PYRAMID) :=
  altitude_foot_is_base_centre

 IS_REGULAR_PYRAMID(PYRAMID) :=
  IS_RIGHT_PYRAMID(PYRAMID)
  AND base_is_regular_polygon

 CROSS_SECTION_PARALLEL_TO_BASE(PYRAMID,PLANE) :=
  polygon_similar_to_base_when_plane_between_apex_and_base_and_parallel

 TRANSFORM_PYRAMID(P,T) :=
  image_of_pyramid_under_3D_transformation(P,T)
}

DEFINITIONS {
 D1 = "A pyramid has one polygonal base."
 D2 = "All nonbase faces are triangles."
 D3 = "All lateral triangular faces meet at one apex."
 D4 = "Height is perpendicular distance from apex to base plane."
 D5 = "A right pyramid's altitude passes through the base centre."
 D6 = "A regular pyramid is right and has a regular base."
 D7 = "Pyramid volume equals one third of base area times perpendicular height."
 D8 = "For a regular pyramid, lateral area equals one half base perimeter times slant height."
 D9 = "A plane parallel to the base cuts a pyramid in a similar polygon."
 D10 = "Pyramids are named by the shape of their bases."
}

AXIOMS {
 A1_SINGLE_BASE:
  A pyramid has exactly one distinguished polygonal base

 A2_COMMON_APEX:
  All lateral triangular faces share one common apex

 A3_TRIANGULAR_LATERAL_FACES:
  Every lateral face is a triangle

 A4_HEIGHT:
  Pyramid height is perpendicular distance from apex to base plane

 A5_VOLUME:
  Pyramid volume equals one third base_area times perpendicular_height

 A6_REGULAR_LATERAL_AREA:
  For a regular pyramid lateral area equals one half base_perimeter times slant_height

 A7_PARALLEL_SECTION_SIMILARITY:
  A section parallel to the base is similar to the base

 A8_AFFINE_STRUCTURE:
  Nondegenerate affine transformations map pyramids to pyramids
}

REASONING {

 R1_PYRAMID_CLASSIFICATION {
  INPUT = solid_properties
  TEST = one_polygonal_base
  TEST = remaining_faces_triangular
  TEST = common_apex
  IF true
   CLASSIFY = Pyramid
  ELSE
   RETURN NotPyramid
  IF altitude_foot_at_base_centre
   REFINE = RightPyramid
  ELSE
   REFINE = ObliquePyramid
  RETURN = classification
 }

 R2_BASE_CLASSIFICATION {
  INPUT = base_polygon
  IDENTIFY = side_count_and_regular_or_irregular_status
  RETURN = triangular_square_pentagonal_hexagonal_or_n_gonal_pyramid
 }

 R3_VOLUME {
  INPUT = [A_base,h]
  REQUIRE = A_base>=0 AND h>=0
  COMPUTE = (1/3)*A_base*h
  RETURN = volume
 }

 R4_REGULAR_SURFACE_AREA {
  INPUT = [A_base,P_base,l]
  REQUIRE = regular_pyramid_context
  COMPUTE = lateral=(1/2)*P_base*l
  COMPUTE = total=A_base+lateral
  RETURN = requested_area
 }

 R5_SLANT_HEIGHT {
  INPUT = regular_pyramid_dimensions
  IDENTIFY = base_apothem_or_half_relevant_base_measure
  APPLY = Pythagorean_relation_with_height
  RETURN = slant_height
 }

 R6_PARALLEL_CROSS_SECTION {
  INPUT = [pyramid,plane_parallel_to_base]
  INTERSECT = pyramid_with_plane
  USE = similarity
  RETURN = polygon_similar_to_base
 }

 R7_SIMILAR_PYRAMID_SCALING {
  INPUT = linear_scale_factor k
  RETURN = [
   area_scale=k^2,
   volume_scale=k^3
  ]
 }

 R8_NET_REASONING {
  INPUT = pyramid
  UNFOLD = base_plus_triangular_lateral_faces
  VERIFY = shared_edges_and_apex_correspondence
  RETURN = valid_net_structure
 }

 R9_COORDINATE_PYRAMID {
  INPUT = base_vertices_and_apex
  VERIFY = coplanar_base
  VERIFY = apex_not_in_base_plane
  JOIN = apex_to_each_base_vertex
  RETURN = coordinate_pyramid
 }

 R10_TRANSFORMATION {
  INPUT = [pyramid,T]
  IF affine_nondegenerate
   RETURN pyramid_with_transformed_base_and_apex
  TRACK = metric_invariants_only_when_transformation_supports_them
 }
}

CONSTRAINTS {
 C1 = "Pyramid height is perpendicular distance, not slant height."
 C2 = "Regular-pyramid lateral-area formula requires a regular base and common slant height."
 C3 = "Volume uses perpendicular height for both right and oblique pyramids."
 C4 = "A pyramid has one base, unlike a prism."
 C5 = "A cone is not a pyramid because its base need not be polygonal and its lateral surface is not a finite set of triangular faces."
 C6 = "A frustum is not a complete pyramid."
 C7 = "Parallel-to-base sections are similar, not generally congruent, to the base."
 C8 = "General affine transformations preserve pyramid incidence structure but not lengths or angles."
}

SEMANTIC_EQUIVALENCE {
 "Pyramid" <=> "PolyhedronWithOnePolygonalBaseAndCommonApex"
 "RightPyramid" <=> "PyramidWithAltitudeThroughBaseCentre"
 "RegularPyramid" <=> "RightPyramidWithRegularPolygonBase"
 "PyramidVolume" <=> "OneThirdBaseAreaTimesPerpendicularHeight"
 "ParallelBaseSection" <=> "ScaledSimilarCopyOfBase"
}

VALIDATION {
 V1 = "Pyramid has one polygonal base."
 V2 = "All lateral faces are triangles sharing one apex."
 V3 = "Volume equals (1/3)*A_base*h."
 V4 = "Regular-pyramid lateral area equals (1/2)*P_base*l."
 V5 = "Regular-pyramid total area equals A_base+(1/2)*P_base*l."
 V6 = "Parallel-to-base section is similar to base."
 V7 = "Oblique-pyramid volume uses perpendicular height."
 V8 = "Nondegenerate affine images preserve pyramid structure."
}

CONFIDENCE {
 BASE_CONFIDENCE = 0.99
 PYRAMID_DEFINITION = 0.99
 CLASSIFICATION = 0.99
 VOLUME_REASONING = 0.99
 SURFACE_AREA_REASONING = 0.99
 SLANT_HEIGHT_REASONING = 0.98
 CROSS_SECTION_REASONING = 0.99
 TRANSFORMATION_REASONING = 0.98

 POLICY =
  "Reduce confidence when base geometry, apex position, right-versus-oblique status, slant-height meaning or transformation class are underspecified."
}

AI_CONSUMPTION {
 PURPOSES = [
  SemanticSearch,
  OntologyGrounding,
  PyramidReasoning,
  PolyhedralReasoning,
  VolumeReasoning,
  SurfaceAreaReasoning,
  CrossSectionReasoning,
  SimilarityReasoning,
  NetReasoning,
  CoordinateReasoning,
  TransformationReasoning,
  KnowledgeGraphConstruction,
  RetrievalAugmentation,
  RecursiveInference
 ]

 NORMALISE {
  "pyramid" -> Pyramid
  "right pyramid" -> RightPyramid
  "oblique pyramid" -> ObliquePyramid
  "regular pyramid" -> RegularPyramid
  "triangular pyramid" -> TriangularPyramid
  "square pyramid" -> SquarePyramid
  "n-gonal pyramid" -> Pyramid
  "pyramid apex" -> Apex
 }

 INTERPRETATION_ORDER = [
  detect_pyramid_context,
  identify base_polygon apex lateral_faces and height,
  classify right oblique regular and base_type,
  identify volume surface_area slant_height cross_section net coordinate or transformation goal,
  apply pyramid_specific formulas_and_theorems,
  verify perpendicular_height regularity and common_apex constraints,
  return semantic output
 ]
}

EXECUTION_RULES {
 E1:
  IF query_mentions("pyramid")
  AND geometry_context
  THEN activate(PyramidOntology)

 E2:
  IF one_polygonal_base
  AND all_other_faces_triangular_with_common_apex
  THEN classify(Pyramid)

 E3:
  IF altitude_foot_at_base_centre
  THEN classify(RightPyramid)

 E4:
  IF right_pyramid
  AND regular_base
  THEN classify(RegularPyramid)

 E5:
  IF volume_requested
  THEN compute (1/3)*base_area*perpendicular_height

 E6:
  IF lateral_or_total_area_requested
  AND regular_pyramid_context
  THEN use (1/2)*base_perimeter*slant_height

 E7:
  IF cross_section_plane_parallel_to_base
  THEN return similar_scaled_base_shape

 E8:
  IF triangular_base
  THEN consider route_to(TetrahedronOntology)
}

RECURSION {
 ENTRY = Pyramid

 EXPAND(Pyramid) -> [
  Base,
  Apex,
  LateralFace,
  LateralEdge,
  Height,
  RightPyramid,
  ObliquePyramid,
  RegularPyramid,
  SurfaceArea,
  Volume,
  Net,
  CrossSection,
  CoordinatePyramid
 ]

 EXPAND(BaseTypes) -> [
  TriangularPyramid,
  SquarePyramid,
  PentagonalPyramid,
  HexagonalPyramid,
  NGonalPyramid
 ]

 EXPAND(RegularPyramid) -> [
  RegularPolygonBase,
  BaseCentre,
  BaseApothem,
  SlantHeight,
  CongruentLateralFaces,
  LateralArea
 ]

 EXPAND(CrossSection) -> [
  ParallelBaseSection,
  SimilarPolygon,
  ObliquePlaneSection
 ]

 STOP_CONDITION =
  "Stop when the pyramid's type, base structure, apex, height, slant height, surface measure, volume, net, cross-section, coordinate representation or transformation property is sufficiently resolved."
}

ROUTING {
 PARENT_ONTOLOGY = "Solid Geometry"

 IMMEDIATE_CONTEXTS = [
  "Solid Geometry Ontology",
  "Prism Ontology",
  "Cone Ontology",
  "Polyhedron Ontology"
 ]

 RELATED_ONTOLOGIES = [
  "Solid Geometry Ontology",
  "Prism Ontology",
  "Cone Ontology",
  "Plane Geometry",
  "Polygon Ontology",
  "Triangle Ontology",
  "Coordinate Geometry Ontology",
  "Cartesian Coordinate Ontology",
  "Vector Geometry Ontology",
  "Transformation Ontology",
  "Affine Transformation Ontology"
 ]

 ROUTE_RULES = [
  "Pyramid -> Solid Geometry Ontology for general 3D semantics",
  "Pyramid -> Polygon for base-shape reasoning",
  "Pyramid -> Triangle for lateral-face reasoning",
  "Pyramid -> Prism for comparative polyhedral reasoning",
  "Pyramid -> Cone for comparative apex-solid reasoning",
  "Pyramid -> Coordinate Geometry for vertex coordinates",
  "Pyramid -> Vector Geometry for plane and height reasoning",
  "Pyramid -> Transformation for affine images"
 ]
}

UPDATE_MODEL {
 MODE = "append-compatible semantic versioning"

 MAJOR = "ontology-breaking conceptual change"
 MINOR = "new compatible pyramid classes, formulas, relations or reasoning pathways"
 PATCH = "clarification, metadata or formatting correction"

 RULES = [
  "Preserve one-base common-apex semantics.",
  "Preserve triangular lateral-face structure.",
  "Preserve distinction between right and oblique pyramids.",
  "Preserve perpendicular-height meaning.",
  "Preserve regular-pyramid slant-height conditions.",
  "Preserve one-third volume relation.",
  "Preserve machine-readable pyramid semantics."
 ]
}

OUTPUT {
 CANONICAL_DEFINITION =
  "A pyramid is a polyhedron with one polygonal base and triangular lateral faces meeting at a common apex."

 VOLUME_SUMMARY =
  "V=(1/3)*A_base*h"

 REGULAR_LATERAL_AREA_SUMMARY =
  "A_lateral=(1/2)*P_base*l"

 REGULAR_TOTAL_AREA_SUMMARY =
  "A_total=A_base+(1/2)*P_base*l"

 CROSS_SECTION_SUMMARY =
  "A plane parallel to the base cuts a pyramid in a similar scaled copy of the base."

 CLASSIFICATION_SUMMARY =
  "Pyramids may be right or oblique and are named by the shape of their bases."

 TRANSFORMATION_SUMMARY =
  "Nondegenerate affine transformations preserve pyramid incidence structure."
}

FLOW {
 INPUT
 -> detect_pyramid_context
 -> identify base_apex_lateral_faces_lateral_edges_and_height
 -> verify one_base_common_apex_structure
 -> classify right_oblique_regular_and_base_shape
 -> identify volume_surface_area_slant_height_net_cross_section_coordinate_or_transformation goal
 -> apply pyramid_specific geometry
 -> verify perpendicular_height common_apex regularity and polygonal_base constraints
 -> route to solid_geometry polygon triangle prism cone coordinate vector or transformation ontology
 -> recursively_expand_required_dependencies
 -> verify_result
 -> assign_confidence
 -> produce_semantic_output
 -> END
}

SEMANTIC_SUMMARY {
 "The Pyramid Ontology defines polyhedra with one polygonal base and triangular lateral faces meeting at a common apex. It supports right and oblique classification, regular pyramids, base-shape specialisation, volume, lateral and total surface area, slant height, nets, similar cross-sections, coordinate constructions and affine transformation reasoning."
}

FLOW_HASH {
 METHOD = "semantic-content-identity"
 ID = "KIRETH-MATH-GEOMETRY-PYRAMID-ONTOLOGY-V1"
}

}

END_FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ