AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
AI INTERPRETATION NOTE
This Flow Algebra defines the mathematical ontology of a geometric line segment within the Kireth Research Semantic Library. A line segment is a finite one-dimensional geometric entity bounded by two endpoints. This ontology supports length, midpoint, incidence, collinearity, congruence, division ratios, constructions, coordinate representation, vector representation, transformations and relationships with points, lines, rays and polygons.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Line Segment Ontology"
FLOW_TYPE = "Mathematical Ontology"
DOMAIN = "Mathematics"
SUBDOMAIN = "Geometry"
SPECIALISATION = "Plane Geometry / Core Geometric Entity"
CANONICAL_PAGE = "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/geometry-ontologies/plane-geometry/line-segment-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = LineSegment
SYMBOLIC_FORMS = ["AB", "[A,B]", "{(1-t)A+tB | 0<=t<=1}"]
ENTITY_CLASS = FiniteOneDimensionalGeometricEntity
PRIMARY_CONTEXT = Geometry
DEFINITION = "A line segment is a finite one-dimensional straight geometric entity bounded by two endpoints."
SEMANTIC_ROLE = "Represents finite straight-line extent and provides the basic geometric object for length, midpoint, edges, distances, constructions and subdivision."
}
SCOPE {
INCLUDE = [
LineSegment,
Endpoint,
Length,
Midpoint,
Subsegment,
CongruentSegment,
DirectedSegment,
CoordinateSegment,
VectorSegment,
ConstructibleSegment,
ImageSegment,
PolygonEdge,
Chord
]
EXCLUDE_AS_PRIMARY = [
InfiniteLine,
Ray,
Curve,
Arc,
PhysicalRodWithoutGeometricIdealisation
]
DISAMBIGUATION_RULE =
"When segment occurs with endpoints, length, midpoint, line, polygon edge, chord, coordinates, vectors or construction, interpret it as a geometric line segment."
}
CORE_CONCEPTS {
LineSegment {
definition = "The portion of a straight line between two endpoints, including both endpoints."
intrinsic_dimension = 1
}
Endpoint {
definition = "One of the two boundary points of a nondegenerate segment."
}
Length {
definition = "The nonnegative metric distance between the endpoints of a segment."
form = "|AB|=d(A,B)"
}
Midpoint {
definition = "The point on a segment equidistant from its two endpoints."
condition = "AM=MB"
}
Subsegment {
definition = "A segment contained within another segment."
}
CongruentSegment {
definition = "A segment having the same length as another segment."
}
DirectedSegment {
definition = "A segment together with an ordered endpoint orientation from initial point to terminal point."
}
CoordinateSegment {
definition = "A segment represented by endpoint coordinates and the points between them."
}
VectorSegment {
definition = "A directed segment represented by displacement vector B-A."
}
PolygonEdge {
definition = "A line segment forming part of the boundary of a polygon."
}
Chord {
definition = "A segment whose endpoints lie on a circle or other curve."
}
}
RELATIONS {
LineSegment --is_subset_of--> Line
LineSegment --has--> Endpoint
LineSegment --has--> Length
LineSegment --can_have--> Midpoint
Point --can_lie_on--> LineSegment
PairOfPoints --determines--> LineSegment
LineSegment --can_be_congruent_to--> LineSegment
LineSegment --can_be_subsegment_of--> LineSegment
LineSegment --can_form--> PolygonEdge
LineSegment --can_form--> Chord
LineSegment --can_be_transformed_to--> LineSegment
CoordinateSegment --can_be_represented_by--> ParametricInterval
DirectedSegment --can_be_represented_by--> Vector
}
OPERATORS {
SEGMENT(A,B) :=
{(1-t)A+tB | 0<=t<=1}
LENGTH(AB) :=
distance(A,B)
MIDPOINT(A,B) :=
point M SUCH_THAT M lies_on SEGMENT(A,B) AND AM=MB
IS_ON_SEGMENT(P,A,B) :=
P collinear_with A,B
AND P lies_between_or_equals_endpoints(A,B)
DIVIDE_SEGMENT(A,B,lambda) :=
point P satisfying directed_ratio(AP:PB)=lambda WHEN defined
VECTOR(A,B) :=
B-A
IS_CONGRUENT(AB,CD) :=
LENGTH(AB)==LENGTH(CD)
TRANSFORM_SEGMENT(AB,T) :=
SEGMENT(T(A),T(B))
BISECT_SEGMENT(AB) :=
MIDPOINT(A,B)
}
DEFINITIONS {
D1 = "A line segment has exactly two endpoints unless degenerate."
D2 = "A line segment is finite."
D3 = "A line segment is one-dimensional."
D4 = "The segment AB includes A, B and every point between them."
D5 = "The length of AB is the distance between A and B."
D6 = "The midpoint divides a segment into two congruent subsegments."
D7 = "Congruent segments have equal length."
D8 = "A directed segment distinguishes AB from BA by orientation."
D9 = "A polygon edge is a segment."
D10 = "A chord is a segment with endpoints on a curve, commonly a circle."
}
AXIOMS {
A1_TWO_ENDPOINTS:
Every nondegenerate line segment has exactly two distinct endpoints
A2_FINITE_EXTENT:
A segment contains only points between its endpoints along its supporting line
A3_ONE_DIMENSION:
A line segment has intrinsic dimension one
A4_LENGTH:
Segment length equals metric distance between endpoints
A5_MIDPOINT:
Every Euclidean segment has a unique midpoint
A6_CONGRUENCE:
Segment congruence is determined by equality of length in Euclidean geometry
A7_AFFINE_IMAGE:
Affine transformations map segments to segments
}
REASONING {
R1_SEGMENT_FROM_POINTS {
INPUT = [A,B]
RETURN = closed_straight_interval_between_A_and_B
}
R2_POINT_MEMBERSHIP {
INPUT = [P,A,B]
TEST_1 = collinearity(P,A,B)
TEST_2 = betweenness_or_endpoint_condition(P,A,B)
IF TEST_1 AND TEST_2
RETURN PointOnSegment
ELSE
RETURN PointNotOnSegment
}
R3_LENGTH {
INPUT = [A,B]
IDENTIFY = metric
COMPUTE = distance(A,B)
RETURN = segment_length
}
R4_MIDPOINT {
INPUT = [A,B]
IF coordinate_context
COMPUTE = componentwise_average
ELSE
CONSTRUCT = perpendicular_bisector_method
VERIFY = AM=MB
RETURN = M
}
R5_CONGRUENCE {
INPUT = [AB,CD]
COMPARE = lengths
RETURN = CongruentOrNot
}
R6_RATIO_DIVISION {
INPUT = [A,B,ratio]
DERIVE = internal_or_external_division_point
VERIFY = ratio_condition
RETURN = point
}
R7_TRANSFORMATION {
INPUT = [AB,T]
COMPUTE = T(A),T(B)
RETURN = image_segment_between_transformed_endpoints
}
R8_VECTOR_RELATION {
INPUT = [A,B]
COMPUTE = displacement_vector B-A
RETURN = directed_segment_representation
}
}
CONSTRAINTS {
C1 = "A segment must not be confused with an infinite line or ray."
C2 = "A degenerate segment with coincident endpoints has zero length."
C3 = "Point-on-segment tests require both collinearity and betweenness."
C4 = "Length depends on the active metric."
C5 = "Midpoint uniqueness assumes the relevant Euclidean or affine setting."
C6 = "Directed segment orientation matters when vectors or ratios are used."
C7 = "Affine transformations preserve segment structure but not necessarily length."
C8 = "Congruence under length equality assumes an appropriate metric geometry."
}
SEMANTIC_EQUIVALENCE {
"LineSegment" <=> "ClosedStraightIntervalBetweenTwoPoints"
"SegmentLength" <=> "DistanceBetweenEndpoints"
"Midpoint" <=> "PointBisectingSegment"
"CongruentSegments" <=> "EqualLengthSegments" WHEN Euclidean_metric_context
"DirectedSegmentAB" <=> "DisplacementVectorBMinusA"
}
VALIDATION {
V1 = "A nondegenerate segment has two endpoints."
V2 = "Segment is finite and one-dimensional."
V3 = "Length is nonnegative."
V4 = "Midpoint lies on the segment and is equidistant from endpoints."
V5 = "Point membership respects betweenness."
V6 = "Congruent segments have equal length."
V7 = "Affine images of segments are segments."
V8 = "Degenerate segment has zero length."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
SEGMENT_DEFINITION = 0.99
ENDPOINT_RELATION = 0.99
LENGTH_RELATION = 0.99
MIDPOINT_RELATION = 0.99
BETWEenness_RELATION = 0.99
CONGRUENCE_RELATION = 0.99
TRANSFORMATION_RELATION = 0.99
POLICY =
"Reduce confidence when metric, endpoint identity, ratio convention or transformation class are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
GeometricEntityResolution,
LengthReasoning,
MidpointReasoning,
BetweennessReasoning,
CongruenceReasoning,
CoordinateReasoning,
VectorReasoning,
ConstructionReasoning,
TransformationReasoning,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"line segment" -> LineSegment
"segment" -> LineSegment WHEN geometry_context
"edge" -> PolygonEdge WHEN polygon_context
"chord" -> Chord WHEN circle_or_curve_context
"midpoint" -> Midpoint
"directed segment" -> DirectedSegment
}
INTERPRETATION_ORDER = [
detect_line_segment_context,
identify endpoints,
identify supporting line and metric,
identify segment role,
identify length midpoint congruence ratio vector or transformation context,
perform segment-specific reasoning,
verify finiteness endpoint and betweenness constraints,
return semantic output
]
}
EXECUTION_RULES {
E1:
IF query_mentions("line segment")
OR query_mentions("segment")
AND geometry_context
THEN activate(LineSegmentOntology)
E2:
IF endpoints_given
THEN construct_segment_between_endpoints
E3:
IF point_membership_requested
THEN test_collinearity_and_betweenness
E4:
IF length_requested
THEN compute_metric_distance_between_endpoints
E5:
IF midpoint_requested
THEN compute_or_construct_unique_midpoint
E6:
IF congruence_requested
THEN compare_segment_lengths
E7:
IF ratio_division_requested
THEN compute_internal_or_external_division_point
E8:
IF transformation_context
THEN transform_both_endpoints
AND construct_image_segment
}
RECURSION {
ENTRY = LineSegment
EXPAND(LineSegment) -> [
Endpoint,
Length,
Midpoint,
Subsegment,
CongruentSegment,
DirectedSegment,
CoordinateSegment,
VectorSegment,
PolygonEdge,
Chord
]
EXPAND(Midpoint) -> [
Betweenness,
EqualDistance,
PerpendicularBisector,
CoordinateAverage
]
EXPAND(DirectedSegment) -> [
InitialPoint,
TerminalPoint,
DisplacementVector,
Orientation
]
EXPAND(PolygonEdge) -> [
Polygon,
Vertex,
Boundary,
Perimeter
]
STOP_CONDITION =
"Stop when the segment's endpoints, membership, length, midpoint, congruence, ratio, vector representation or transformation property is sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Plane Geometry"
IMMEDIATE_CONTEXTS = [
"Point Ontology",
"Line Ontology",
"Ray Ontology",
"Coordinate Geometry Ontology"
]
RELATED_ONTOLOGIES = [
"Plane Geometry",
"Point Ontology",
"Line Ontology",
"Ray Ontology",
"Coordinate Geometry Ontology",
"Cartesian Coordinate Ontology",
"Vector Geometry Ontology",
"Parametric Geometry Ontology",
"Geometric Construction Ontology",
"Transformation Ontology",
"Affine Transformation Ontology"
]
ROUTE_RULES = [
"Line Segment -> Point for endpoint and midpoint reasoning",
"Line Segment -> Line for supporting-line reasoning",
"Line Segment -> Coordinate Geometry for distance and midpoint formulas",
"Line Segment -> Vector Geometry for directed-segment representation",
"Line Segment -> Geometric Construction for bisection and copying",
"Line Segment -> Transformation for image-segment reasoning",
"Line Segment -> Plane Geometry for polygon and chord context"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible segment roles, relations or reasoning pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve segment as finite one-dimensional straight entity.",
"Preserve exactly two endpoints for nondegenerate segments.",
"Preserve distinction among segment, line and ray.",
"Preserve length and midpoint semantics.",
"Preserve point-on-segment betweenness requirements.",
"Preserve transformation-specific metric changes.",
"Preserve machine-readable line-segment semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION =
"A line segment is a finite one-dimensional straight geometric entity bounded by two endpoints."
DIMENSION_SUMMARY =
"dim(LineSegment)=1"
ENDPOINT_SUMMARY =
"A nondegenerate segment has exactly two endpoints."
LENGTH_SUMMARY =
"|AB|=d(A,B)"
MIDPOINT_SUMMARY =
"M is midpoint of AB iff M lies on AB and AM=MB."
PARAMETRIC_SUMMARY =
"AB={(1-t)A+tB | 0<=t<=1}"
VECTOR_SUMMARY =
"Directed segment AB corresponds to displacement vector B-A."
TRANSFORMATION_SUMMARY =
"An affine transformation maps segment AB to segment T(A)T(B)."
}
FLOW {
INPUT
-> detect_line_segment_context
-> identify_endpoints
-> identify_supporting_line_metric_and_representation
-> identify segment role
-> evaluate membership length midpoint congruence ratio vector or transformation relation
-> perform segment-specific reasoning
-> verify finite_extent endpoint betweenness and metric constraints
-> route to point line coordinate vector construction or transformation ontology
-> recursively expand required dependencies
-> verify result
-> assign confidence
-> produce semantic output
-> END
}
SEMANTIC_SUMMARY {
"The Line Segment Ontology defines the finite straight one-dimensional entity bounded by two endpoints. Segments provide the basis for length, midpoint, subdivision, congruence, polygon edges, chords, directed vectors, geometric constructions and transformation reasoning."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-GEOMETRY-LINE-SEGMENT-ONTOLOGY-V1"
}
}
END_FLOW