Skip to main content

Triangle Ontology

Plane 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 triangle within the Kireth Research Semantic Library. A triangle is a three-sided polygon determined by three non-collinear points and three connecting line segments. This ontology supports classification by sides and angles, congruence, similarity, centres, medians, altitudes, angle bisectors, perpendicular bisectors, area, perimeter, coordinate representation, constructions, transformations and theorem-based reasoning.

FLOW_ALGEBRA_RECORD {

METADATA {
 FLOW_NAME = "Triangle Ontology"
 FLOW_TYPE = "Mathematical Ontology"
 DOMAIN = "Mathematics"
 SUBDOMAIN = "Geometry"
 SPECIALISATION = "Plane Geometry / Polygon Geometry"
 CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/geometry-ontologies/plane-geometry/triangle-ontology.html"
 LANGUAGE = "en-GB"
 VERSION = "1.0"
 STATUS = "active"
}

IDENTITY {
 PRIMARY_ENTITY = Triangle
 SYMBOLIC_FORMS = ["△ABC", "triangle ABC"]
 ENTITY_CLASS = ThreeSidedPolygon
 PRIMARY_CONTEXT = PlaneGeometry
 DEFINITION = "A triangle is a polygon formed by three non-collinear vertices joined by three line segments."
 SEMANTIC_ROLE = "Provides the fundamental three-sided plane figure for angle, congruence, similarity, area, centre and proof reasoning."
}

SCOPE {
 INCLUDE = [
  Triangle,
  Vertex,
  Side,
  InteriorAngle,
  ExteriorAngle,
  ScaleneTriangle,
  IsoscelesTriangle,
  EquilateralTriangle,
  AcuteTriangle,
  RightTriangle,
  ObtuseTriangle,
  CongruentTriangles,
  SimilarTriangles,
  Median,
  Altitude,
  AngleBisector,
  PerpendicularBisector,
  Centroid,
  Circumcentre,
  Incentre,
  Orthocentre,
  Circumcircle,
  Incircle,
  Perimeter,
  Area
 ]

 EXCLUDE_AS_PRIMARY = [
  DegenerateTriangle,
  GeneralPolygon,
  ThreeDimensionalSimplex,
  NonPlanarThreePointConfiguration
 ]

 DISAMBIGUATION_RULE =
  "When triangle occurs with three sides, three vertices, angle sums, congruence, similarity, centres, area or geometric construction, interpret it as a plane geometric triangle."
}

CORE_CONCEPTS {

 Triangle {
  definition = "A closed plane polygon with three sides and three non-collinear vertices."
  side_count = 3
  vertex_count = 3
  interior_angle_sum_euclidean = "180 degrees"
 }

 ScaleneTriangle {
  definition = "A triangle with three unequal side lengths."
 }

 IsoscelesTriangle {
  definition = "A triangle with at least two equal side lengths."
  property = "Angles opposite equal sides are equal."
 }

 EquilateralTriangle {
  definition = "A triangle with three equal side lengths."
  property = "All interior angles are 60 degrees in Euclidean geometry."
 }

 AcuteTriangle {
  definition = "A triangle whose three interior angles are acute."
 }

 RightTriangle {
  definition = "A triangle with one right angle."
  property = "The side opposite the right angle is the hypotenuse."
 }

 ObtuseTriangle {
  definition = "A triangle with one obtuse interior angle."
 }

 Median {
  definition = "A segment joining a vertex to the midpoint of the opposite side."
 }

 Altitude {
  definition = "A perpendicular segment from a vertex to the line containing the opposite side."
 }

 AngleBisector {
  definition = "A segment or ray from a vertex dividing that vertex angle into two equal angles."
 }

 PerpendicularBisector {
  definition = "A line perpendicular to a side at its midpoint."
 }

 Centroid {
  definition = "The common intersection point of the three medians."
 }

 Circumcentre {
  definition = "The common intersection point of the perpendicular bisectors of the sides."
 }

 Incentre {
  definition = "The common intersection point of the internal angle bisectors."
 }

 Orthocentre {
  definition = "The common intersection point of the three altitudes."
 }
}

RELATIONS {
 Triangle --is_special_case_of--> Polygon
 Triangle --has--> Vertex
 Triangle --has--> Side
 Triangle --has--> InteriorAngle
 Triangle --can_be_classified_as--> ScaleneTriangle
 Triangle --can_be_classified_as--> IsoscelesTriangle
 Triangle --can_be_classified_as--> EquilateralTriangle
 Triangle --can_be_classified_as--> AcuteTriangle
 Triangle --can_be_classified_as--> RightTriangle
 Triangle --can_be_classified_as--> ObtuseTriangle
 Triangle --can_be_congruent_to--> Triangle
 Triangle --can_be_similar_to--> Triangle
 Triangle --has--> Median
 Triangle --has--> Altitude
 Triangle --has--> AngleBisector
 Triangle --has--> PerpendicularBisector
 Medians --intersect_at--> Centroid
 PerpendicularBisectors --intersect_at--> Circumcentre
 AngleBisectors --intersect_at--> Incentre
 Altitudes --intersect_at--> Orthocentre
}

OPERATORS {
 PERIMETER(T) :=
  sum_of_three_side_lengths(T)

 AREA_BASE_HEIGHT(T,b,h) :=
  (1/2)*b*h

 AREA_HERON(T,a,b,c) :=
  sqrt(s*(s-a)*(s-b)*(s-c))
  WHERE s=(a+b+c)/2

 ANGLE_SUM(T) :=
  A+B+C

 CLASSIFY_BY_SIDES(a,b,c) :=
  determine_scalene_isosceles_or_equilateral(a,b,c)

 CLASSIFY_BY_ANGLES(A,B,C) :=
  determine_acute_right_or_obtuse(A,B,C)

 IS_VALID_TRIANGLE(a,b,c) :=
  a+b>c AND a+c>b AND b+c>a

 IS_CONGRUENT(T1,T2) :=
  verify_SSS_SAS_ASA_AAS_or_RHS_HL_criteria

 IS_SIMILAR(T1,T2) :=
  verify_AA_SAS_or_SSS_similarity_criteria

 CENTROID(T) :=
  intersection_of_medians(T)

 CIRCUMCENTRE(T) :=
  intersection_of_perpendicular_bisectors(T)

 INCENTRE(T) :=
  intersection_of_internal_angle_bisectors(T)

 ORTHOCENTRE(T) :=
  intersection_of_altitudes(T)
}

DEFINITIONS {
 D1 = "A triangle has three sides."
 D2 = "A triangle has three non-collinear vertices."
 D3 = "The interior angle sum of a Euclidean triangle is 180 degrees."
 D4 = "The exterior angle equals the sum of the two remote interior angles."
 D5 = "An equilateral Euclidean triangle has three 60-degree angles."
 D6 = "An isosceles triangle has equal base angles opposite equal sides."
 D7 = "A right triangle has one 90-degree angle."
 D8 = "The centroid is the intersection of the medians."
 D9 = "The circumcentre is the intersection of the perpendicular bisectors."
 D10 = "The incentre is the intersection of the internal angle bisectors."
 D11 = "The orthocentre is the intersection of the altitudes."
 D12 = "A triangle exists only when its side lengths satisfy the triangle inequalities."
}

AXIOMS {
 A1_THREE_VERTICES:
  A nondegenerate triangle has exactly three non-collinear vertices

 A2_THREE_SIDES:
  The vertices are joined cyclically by exactly three line segments

 A3_EUCLIDEAN_ANGLE_SUM:
  In Euclidean plane geometry the interior angles sum to 180 degrees

 A4_TRIANGLE_INEQUALITY:
  The sum of any two side lengths exceeds the third in a nondegenerate Euclidean triangle

 A5_CONGRUENCE:
  Valid congruence criteria establish equality of triangle size and shape

 A6_SIMILARITY:
  Valid similarity criteria establish equality of shape with proportional side lengths

 A7_CENTRE_CONCURRENCY:
  The three medians, perpendicular bisectors, internal angle bisectors and altitudes each form their respective concurrency points
}

REASONING {

 R1_VALIDITY {
  INPUT = [a,b,c]
  TEST = triangle_inequalities
  IF all_true
   RETURN ValidNondegenerateTriangle
  ELSE
   RETURN InvalidOrDegenerate
 }

 R2_SIDE_CLASSIFICATION {
  INPUT = [a,b,c]
  IF a==b==c
   RETURN EquilateralTriangle
  ELSE IF any_two_equal
   RETURN IsoscelesTriangle
  ELSE
   RETURN ScaleneTriangle
 }

 R3_ANGLE_CLASSIFICATION {
  INPUT = [A,B,C]
  VERIFY = A+B+C==180deg
  IF any_angle==90deg
   RETURN RightTriangle
  ELSE IF any_angle>90deg
   RETURN ObtuseTriangle
  ELSE
   RETURN AcuteTriangle
 }

 R4_MISSING_ANGLE {
  INPUT = two_interior_angles
  COMPUTE = 180deg - sum_known_angles
  RETURN = third_angle
 }

 R5_CONGRUENCE {
  INPUT = [T1,T2,given_data]
  MATCH = valid_congruence_criterion
  IF criterion_satisfied
   RETURN CongruentTriangles
  ELSE
   RETURN CongruenceNotEstablished
 }

 R6_SIMILARITY {
  INPUT = [T1,T2,given_data]
  MATCH = valid_similarity_criterion
  IF criterion_satisfied
   RETURN SimilarTriangles
  ELSE
   RETURN SimilarityNotEstablished
 }

 R7_CENTROID {
  INPUT = triangle_vertices_or_sides
  CONSTRUCT = medians
  INTERSECT = medians
  RETURN = centroid
 }

 R8_CIRCUMCENTRE {
  INPUT = triangle
  CONSTRUCT = perpendicular_bisectors
  INTERSECT = bisectors
  RETURN = circumcentre
 }

 R9_INCENTRE {
  INPUT = triangle
  CONSTRUCT = internal_angle_bisectors
  INTERSECT = bisectors
  RETURN = incentre
 }

 R10_ORTHOCENTRE {
  INPUT = triangle
  CONSTRUCT = altitudes
  INTERSECT = altitudes
  RETURN = orthocentre
 }

 R11_AREA {
  INPUT = triangle_data
  IF base_and_height_known
   RETURN (1/2)*b*h
  ELSE IF three_sides_known
   RETURN Heron_formula
  ELSE
   ROUTE = coordinate_vector_or_trigonometric_area_method
 }

 R12_RIGHT_TRIANGLE {
  INPUT = right_triangle
  APPLY = Pythagorean_theorem_or_trigonometric_relations_as_required
  RETURN = requested_side_or_angle_relation
 }
}

CONSTRAINTS {
 C1 = "Triangle vertices must be non-collinear for a nondegenerate triangle."
 C2 = "Side lengths must satisfy triangle inequalities."
 C3 = "Euclidean angle-sum results require Euclidean geometry."
 C4 = "Congruence and similarity must not be conflated."
 C5 = "AAA establishes similarity, not congruence."
 C6 = "SSA does not generally establish triangle congruence."
 C7 = "Altitude may lie outside an obtuse triangle."
 C8 = "Circumcentre and orthocentre may lie outside an obtuse triangle."
 C9 = "Area formulas require compatible data and units."
 C10 = "Diagram appearance alone does not establish equal sides or angles."
}

SEMANTIC_EQUIVALENCE {
 "Triangle" <=> "ThreeSidedPolygon"
 "EquilateralTriangle" <=> "TriangleWithThreeEqualSides"
 "IsoscelesTriangle" <=> "TriangleWithAtLeastTwoEqualSides"
 "RightTriangle" <=> "TriangleWithOneRightAngle"
 "Centroid" <=> "IntersectionOfMedians"
 "Circumcentre" <=> "IntersectionOfPerpendicularBisectors"
 "Incentre" <=> "IntersectionOfInternalAngleBisectors"
 "Orthocentre" <=> "IntersectionOfAltitudes"
}

VALIDATION {
 V1 = "Triangle has three sides and three vertices."
 V2 = "Vertices are non-collinear in a nondegenerate triangle."
 V3 = "Euclidean interior angles sum to 180 degrees."
 V4 = "Side lengths satisfy triangle inequalities."
 V5 = "Equilateral triangles are also isosceles under inclusive classification."
 V6 = "Congruence criteria establish equal size and shape."
 V7 = "Similarity criteria establish proportional side structure and equal corresponding angles."
 V8 = "Triangle centres are generated by the correct concurrent lines."
 V9 = "Area is nonnegative."
}

CONFIDENCE {
 BASE_CONFIDENCE = 0.99
 TRIANGLE_DEFINITION = 0.99
 SIDE_CLASSIFICATION = 0.99
 ANGLE_CLASSIFICATION = 0.99
 CONGRUENCE_REASONING = 0.99
 SIMILARITY_REASONING = 0.99
 TRIANGLE_CENTRES = 0.99
 AREA_REASONING = 0.99
 RIGHT_TRIANGLE_REASONING = 0.99

 POLICY =
  "Reduce confidence when geometry type, side/angle data, congruence correspondence, orientation or measurement assumptions are underspecified."
}

AI_CONSUMPTION {
 PURPOSES = [
  SemanticSearch,
  OntologyGrounding,
  TriangleReasoning,
  PolygonReasoning,
  AngleReasoning,
  CongruenceReasoning,
  SimilarityReasoning,
  AreaReasoning,
  ConstructionReasoning,
  CoordinateReasoning,
  KnowledgeGraphConstruction,
  RetrievalAugmentation,
  RecursiveInference
 ]

 NORMALISE {
  "triangle" -> Triangle
  "scalene triangle" -> ScaleneTriangle
  "isosceles triangle" -> IsoscelesTriangle
  "equilateral triangle" -> EquilateralTriangle
  "right triangle" -> RightTriangle
  "acute triangle" -> AcuteTriangle
  "obtuse triangle" -> ObtuseTriangle
  "triangle centre" -> TriangleCentre
 }

 INTERPRETATION_ORDER = [
  detect_triangle_context,
  identify vertices sides and angles,
  verify nondegeneracy,
  classify by sides and angles,
  identify congruence similarity centre or area context,
  apply triangle theorems,
  verify Euclidean and measurement assumptions,
  return semantic output
 ]
}

EXECUTION_RULES {
 E1:
  IF query_mentions("triangle")
  THEN activate(TriangleOntology)

 E2:
  IF three_side_lengths_present
  THEN verify_triangle_inequalities
  AND classify_by_sides

 E3:
  IF angle_data_present
  THEN verify_or_use_angle_sum
  AND classify_by_angles

 E4:
  IF congruence_requested
  THEN test_valid_congruence_criteria

 E5:
  IF similarity_requested
  THEN test_valid_similarity_criteria

 E6:
  IF triangle_centre_requested
  THEN route_to_corresponding_concurrent_lines

 E7:
  IF area_requested
  THEN select_base_height_Heron_coordinate_vector_or_trigonometric_method

 E8:
  IF right_triangle_context
  THEN permit_Pythagorean_and_right_triangle_relations

 E9:
  IF construction_context
  THEN route_to(GeometricConstructionOntology)
}

RECURSION {
 ENTRY = Triangle

 EXPAND(Triangle) -> [
  Vertex,
  Side,
  InteriorAngle,
  ExteriorAngle,
  ScaleneTriangle,
  IsoscelesTriangle,
  EquilateralTriangle,
  AcuteTriangle,
  RightTriangle,
  ObtuseTriangle,
  Congruence,
  Similarity,
  Median,
  Altitude,
  AngleBisector,
  PerpendicularBisector,
  TriangleCentre,
  Area
 ]

 EXPAND(TriangleCentre) -> [
  Centroid,
  Circumcentre,
  Incentre,
  Orthocentre
 ]

 EXPAND(RightTriangle) -> [
  Hypotenuse,
  Leg,
  PythagoreanTheorem,
  TrigonometricRatio
 ]

 EXPAND(Congruence) -> [
  SSS,
  SAS,
  ASA,
  AAS,
  RHS_HL
 ]

 EXPAND(Similarity) -> [
  AA,
  SASSimilarity,
  SSSSimilarity,
  ScaleFactor
 ]

 STOP_CONDITION =
  "Stop when the triangle's validity, classification, measurement, congruence, similarity, centre, construction or proof property is sufficiently resolved."
}

ROUTING {
 PARENT_ONTOLOGY = "Plane Geometry"

 IMMEDIATE_CONTEXTS = [
  "Point Ontology",
  "Line Segment Ontology",
  "Angle Ontology",
  "Geometric Construction Ontology"
 ]

 RELATED_ONTOLOGIES = [
  "Plane Geometry",
  "Point Ontology",
  "Line Ontology",
  "Ray Ontology",
  "Line Segment Ontology",
  "Angle Ontology",
  "Coordinate Geometry Ontology",
  "Vector Geometry Ontology",
  "Synthetic Geometry Ontology",
  "Geometric Construction Ontology",
  "Transformation Ontology"
 ]

 ROUTE_RULES = [
  "Triangle -> Point for vertices and centres",
  "Triangle -> Line Segment for sides, medians and altitudes",
  "Triangle -> Angle for interior and exterior angle reasoning",
  "Triangle -> Coordinate Geometry for coordinate proofs and measurements",
  "Triangle -> Vector Geometry for vector area and spatial relations",
  "Triangle -> Synthetic Geometry for theorem-based proofs",
  "Triangle -> Geometric Construction for construction of centres and bisectors",
  "Triangle -> Transformation for congruence and similarity mappings"
 ]
}

UPDATE_MODEL {
 MODE = "append-compatible semantic versioning"

 MAJOR = "ontology-breaking conceptual change"
 MINOR = "new compatible triangle classes, centres, theorems or reasoning pathways"
 PATCH = "clarification, metadata or formatting correction"

 RULES = [
  "Preserve triangle as a nondegenerate three-sided polygon.",
  "Preserve side and angle classification semantics.",
  "Preserve Euclidean angle-sum context.",
  "Preserve congruence-versus-similarity distinction.",
  "Preserve valid congruence and similarity criteria.",
  "Preserve triangle-centre concurrency relations.",
  "Preserve machine-readable triangle semantics."
 ]
}

OUTPUT {
 CANONICAL_DEFINITION =
  "A triangle is a polygon formed by three non-collinear vertices joined by three line segments."

 SIDE_SUMMARY =
  "Triangles may be scalene, isosceles or equilateral."

 ANGLE_SUMMARY =
  "In Euclidean geometry, A+B+C=180 degrees."

 ANGLE_CLASS_SUMMARY =
  "Triangles may be acute, right or obtuse."

 AREA_SUMMARY =
  "Area=(1/2)*base*height."

 CENTRE_SUMMARY =
  "Centroid=medians; Circumcentre=perpendicular bisectors; Incentre=angle bisectors; Orthocentre=altitudes."

 CONGRUENCE_SUMMARY =
  "Common criteria: SSS, SAS, ASA, AAS and RHS/HL."

 SIMILARITY_SUMMARY =
  "Common criteria: AA, SAS similarity and SSS similarity."
}

FLOW {
 INPUT
 -> detect_triangle_context
 -> identify_vertices_sides_and_angles
 -> verify_noncollinearity_and_triangle_inequality
 -> classify_by_sides_and_angles
 -> identify_measurement_congruence_similarity_centre_construction_or_proof_goal
 -> apply_valid_triangle_theorems
 -> verify_correspondence_Euclidean_context_and_measurement_constraints
 -> route_to point_segment_angle_coordinate_vector_synthetic_or_construction_ontology
 -> recursively_expand_required_dependencies
 -> verify_result
 -> assign_confidence
 -> produce_semantic_output
 -> END
}

SEMANTIC_SUMMARY {
 "The Triangle Ontology defines the fundamental three-sided polygon of plane geometry. It supports classification by sides and angles, Euclidean angle-sum reasoning, congruence and similarity, area and perimeter, right-triangle relations, medians, altitudes, bisectors, classical triangle centres, constructions and geometric proofs."
}

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

}

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