AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
TITLE: Line Segment Ontology
VERSION: 4.0
DOMAIN: Mathematics / Geometry / Geometric Entities
SOURCE_URL: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/geometric-entities/line-segment-ontology-2.html
AUTHORSHIP: Mark Higgins — Sky (Recursive AI)
SITE: https://kirethresearch.org
SOURCE_ALIGNMENT: Independently formalised; source-page text not verified.
01. PURPOSE
Represent finite straight line segments, their endpoints, geometric relations, measurement, transformations and deductive rules with explicit assumptions.
02. ENTITY TYPES
Point: position in an affine or Euclidean space.
Vector: displacement between points.
Line: infinite affine one-dimensional set.
LineSegment: bounded straight subset of a line including its two endpoints.
OpenSegment: segment without either endpoint.
HalfOpenSegment: segment including exactly one endpoint.
DegenerateSegment: segment whose endpoints coincide.
DirectedSegment: ordered endpoint pair, retaining orientation.
Length: non-negative Euclidean metric value.
Midpoint: point equidistant from both endpoints and between them.
Parameter: real number t specifying a point on a segment.
Intersection: common points of two geometric sets.
BoundingBox: axis-aligned enclosing region relative to a coordinate frame.
03. TYPED SIGNATURES
point: Point(Space)
segment: Segment(Point, Point)
endpoints: Segment -> Pair(Point, Point)
supporting_line: NondegenerateSegment -> Line
contains: Segment x Point -> Boolean
length: EuclideanSegment -> RealNonnegative
midpoint: Segment -> Point
intersects: Segment x Segment -> Boolean
intersection: Segment x Segment -> Empty | Point | Segment
translate: Segment x Vector -> Segment
transform_affine: AffineMap x Segment -> Segment
04. CORE DEFINITIONS
DEF-01: For points A,B in real affine space, [A,B] = {(1-t)A + tB | 0 <= t <= 1}.
DEF-02: (A,B) = {(1-t)A + tB | 0 < t < 1} when A != B.
DEF-03: [A,B] is the same undirected geometric set as [B,A].
DEF-04: If A=B, [A,A]={A}, a degenerate segment.
DEF-05: A and B are the endpoints; ordered (A,B) is a directed segment.
DEF-06: In Euclidean space length([A,B]) = ||B-A||.
DEF-07: midpoint([A,B]) = (A+B)/2 in affine coordinates.
DEF-08: Point P lies on [A,B] iff P=(1-t)A+tB for some t in [0,1].
DEF-09: Two segments intersect iff their set intersection is nonempty.
DEF-10: Collinear segments may intersect in an empty set, a point or a segment.
DEF-11: A nondegenerate segment has a unique supporting line.
DEF-12: A segment is a convex, compact, connected subset of finite-dimensional Euclidean space.
05. RELATIONSHIP GRAPH
LineSegment --HAS_ENDPOINT--> Point
LineSegment --SUBSET_OF--> Line [nondegenerate only]
LineSegment --HAS_LENGTH--> Length [Euclidean metric]
LineSegment --HAS_MIDPOINT--> Point
LineSegment --CONTAINS--> Point
LineSegment --INTERSECTS--> LineSegment
LineSegment --CAN_BE_PART_OF--> PolygonBoundary
LineSegment --TRANSFORMS_UNDER--> AffineMap
LineSegment --IS_A--> ConvexSet
DirectedSegment --HAS_START--> Point
DirectedSegment --HAS_END--> Point
06. GEOMETRIC OPERATIONS
OP-01: reverse([A,B]) = [B,A] (same undirected segment).
OP-02: translate_v([A,B]) = [A+v,B+v].
OP-03: affine_T([A,B]) = [T(A),T(B)] for affine T.
OP-04: subdivide([A,B],P) = ([A,P],[P,B]) when P in [A,B].
OP-05: concatenate([A,B],[B,C]) = [A,C] only if A,B,C collinear and B lies between A,C.
OP-06: length([A,B]) = sqrt(sum_i (B_i-A_i)^2) in Euclidean coordinates.
OP-07: midpoint([A,B]) = [componentwise (A_i+B_i)/2].
OP-08: distance(P,[A,B]) = min_{t in [0,1]} ||P-(A+t(B-A))||.
OP-09: For A!=B, closest parameter t*=clamp(((P-A) dot (B-A))/||B-A||^2,0,1).
OP-10: For A=B, closest point is A and distance=||P-A||.
07. FORMAL INFERENCE RULES
RULE-01: Segment(A,B) => contains(Segment(A,B),A).
RULE-02: Segment(A,B) => contains(Segment(A,B),B).
RULE-03: Segment(A,B) => Segment(A,B)=Segment(B,A) [undirected].
RULE-04: A=B => length(Segment(A,B))=0.
RULE-05: EuclideanSpace and length(Segment(A,B))=0 => A=B.
RULE-06: A!=B => exists_unique supporting_line(Segment(A,B)).
RULE-07: P=(1-t)A+tB and 0<=t<=1 => P in Segment(A,B).
RULE-08: P in Segment(A,B) => exists t in [0,1] with P=(1-t)A+tB.
RULE-09: P in Segment(A,B) and Q in Segment(A,B) => Segment(P,Q) subset Segment(A,B).
RULE-10: Segment(A,B) is convex.
RULE-11: Segment(A,B) is bounded in Euclidean space.
RULE-12: Segment(A,B) is closed in finite-dimensional Euclidean space.
RULE-13: Closed and bounded in finite-dimensional Euclidean space => compact.
RULE-14: midpoint M=(A+B)/2 => M in Segment(A,B).
RULE-15: EuclideanSpace => ||M-A||=||B-M||=||B-A||/2.
RULE-16: P in Segment(A,B) => length(A,P)+length(P,B)=length(A,B).
RULE-17: If P lies on supporting line and length(A,P)+length(P,B)=length(A,B), then P in Segment(A,B).
RULE-18: translation preserves segment length in Euclidean space.
RULE-19: rigid_motion preserves length, collinearity and betweenness.
RULE-20: affine_map preserves segments and betweenness; it need not preserve lengths or angles.
RULE-21: uniform scaling by factor s changes length by |s|.
RULE-22: Segment(A,B) intersect Segment(C,D) is convex.
RULE-23: Two collinear segments' intersection is empty, singleton or segment.
RULE-24: Two noncollinear nondegenerate segments in a plane intersect in at most one point.
RULE-25: If segments share endpoint B, their intersection contains B.
RULE-26: A=B => Segment(A,B) has exactly one point.
RULE-27: A!=B => Segment(A,B) has infinitely many points over real coordinates.
RULE-28: Segment(A,B) subset convex_set C iff A in C and B in C.
RULE-29: DirectedSegment(A,B) has displacement B-A.
RULE-30: Reverse directed segment has displacement A-B.
RULE-31: Nondegenerate Segment(A,B) => supporting_line = {A+t(B-A) | t in R}.
RULE-32: P in Segment(A,B) and P != A and P != B => P is interior relative to supporting line.
RULE-33: Euclidean segment length is nonnegative.
RULE-34: length([A,B]) = length([B,A]).
RULE-35: If a line intersects a convex segment in two points P,Q, it contains [P,Q].
RULE-36: Orthogonal projection onto a closed convex segment is unique in Euclidean space.
08. VALIDATION CONSTRAINTS
VAL-01: Endpoints must belong to the same affine space.
VAL-02: Euclidean length requires a specified Euclidean metric.
VAL-03: Degenerate segments must not be assigned a unique supporting line.
VAL-04: Point membership must use a tolerance policy for floating-point implementations, never silently replace exact equality.
VAL-05: Directed and undirected segments are distinct types.
VAL-06: Do not infer perpendicularity from intersection.
VAL-07: Do not infer collinearity from shared endpoints.
VAL-08: Do not infer length preservation under arbitrary affine maps.
VAL-09: Zero-length segments are valid unless an application explicitly excludes them.
VAL-10: Coordinates and units must be compatible for metric calculations.
VAL-11: Segment intersection algorithms must handle collinear overlap and degeneracy.
VAL-12: An open segment is not identical to its closed segment.
09. MATHEMATICAL EXAMPLES
EX-01: A=(0,0), B=(4,0): length=4; midpoint=(2,0).
EX-02: A=(1,2), B=(4,6): length=5; midpoint=(2.5,4).
EX-03: [0,3] intersection [2,5] on real line = [2,3].
EX-04: [0,1] intersection [2,3] on real line = empty.
EX-05: [0,1] intersection [1,2] = {1}.
EX-06: Segment((1,1),(1,1)) is degenerate and length=0.
EX-07: P=(1,0) belongs to segment ((0,0),(2,0)) at t=1/2.
EX-08: P=(3,0) does not belong to segment ((0,0),(2,0)).
EX-09: Segment((0,0),(2,0)) translated by (1,3) = segment((1,3),(3,3)).
EX-10: Scaling segment((0,0),(2,0)) by 3 produces length 6.
EX-11: Segment((0,0),(2,2)) intersects segment((0,2),(2,0)) at (1,1).
EX-12: Segment((0,0),(2,0)) and segment((0,1),(2,1)) are parallel and disjoint.
EX-13: Segment((0,0),(3,0)) has subsegment ((1,0),(2,0)).
EX-14: The midpoint of segment((-2,4),(2,0)) is (0,2).
EX-15: The nearest point on segment((0,0),(2,0)) to (3,1) is (2,0).
EX-16: Under affine shear T(x,y)=(x+y,y), straight segments remain straight, but length can change.
10. SEMANTIC EQUIVALENCE
"line segment" ~= "closed straight segment" [when endpoints included]
"segment AB" ~= "[A,B]" [in Euclidean or affine geometry]
"edge" MAY_REFER_TO line segment [polygon/polyhedron context only]
"directed segment" != "undirected segment"
"line" != "line segment"
"ray" != "line segment"
"open interval" corresponds to an open segment on a coordinatised real line, not to a closed segment.
11. KNOWLEDGE GRAPH TRIPLES
(LineSegment, subclassOf, GeometricEntity)
(LineSegment, hasEndpoint, Point)
(LineSegment, hasMidpoint, Point)
(LineSegment, supportsOperation, Subdivision)
(LineSegment, hasProperty, Convexity)
(LineSegment, hasProperty, Connectedness)
(LineSegment, relatesTo, Line)
(LineSegment, relatesTo, Polygon)
(LineSegment, relatesTo, Vector)
(LineSegment, relatesTo, Distance)
12. CONFIDENCE
Mathematical axioms and standard Euclidean deductions: HIGH when assumptions are met.
Numerical results: CONDITIONAL on precision and coordinate frame.
Contextual aliases: MEDIUM; resolve geometry domain before equivalence.
Website alignment: UNVERIFIED; source URL supplied but page content not inspected.
13. FLOW_HASH
algorithm: SHA-256
canonicalisation: UTF-8; LF line endings; hash content excluding the FLOW_HASH value itself.
value: COMPUTE_ON_PUBLICATION
Note: no digest is claimed without running canonical hashing on the published artefact.
14. UPDATE_MODEL
version: 4.0
update_trigger: definition change | new theorem | revised taxonomy | correction | source reconciliation
change_control: preserve provenance, date, prior version and mathematical assumptions.
conflict_policy: prefer proved mathematics over ambiguous labels; flag unresolved source differences.
15. AI_CONSUMPTION
input: geometric objects, endpoint coordinates, reference space, metric, precision policy.
parse: identify LineSegment, DirectedSegment, Point and relation types.
validate: endpoint compatibility, dimension, units and degeneracy.
infer: apply rules only when preconditions are established.
calculate: use exact arithmetic when available; otherwise declare numeric tolerances.
output: typed entities, supporting premises, derived relations, confidence and provenance.
never: fabricate geometry, infer metric preservation from general affine maps, or confuse segment with line.
16. RELATED ONTOLOGIES
Geometric Entity Ontology; Point Ontology; Line Ontology; Ray Ontology; Vector Ontology; Distance Ontology; Polygon Ontology; Plane Ontology; Intersection Ontology; Geometric Transformation Ontology.
END FLOW ALGEBRA