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 ray within the Kireth Research Semantic Library. A ray is a one-dimensional geometric entity with one endpoint that extends indefinitely in one direction. This ontology supports incidence, direction, angle formation, collinearity, coordinate representation, constructions, transformations and relationships with points, lines and segments.
FLOW_ALGEBRA_RECORD {
METADATA {
FLOW_NAME = "Ray 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/ray-ontology.html"
LANGUAGE = "en-GB"
VERSION = "1.0"
STATUS = "active"
}
IDENTITY {
PRIMARY_ENTITY = Ray
SYMBOLIC_FORMS = ["ray AB", "A->B direction", "{A+t(B-A) | t>=0}"]
ENTITY_CLASS = OneDimensionalDirectedGeometricEntity
PRIMARY_CONTEXT = Geometry
DEFINITION = "A ray is a one-dimensional straight geometric entity with one endpoint that extends indefinitely in one direction."
SEMANTIC_ROLE = "Represents directed half-line geometry and serves as a fundamental component of angles, constructions and directional relations."
}
SCOPE {
INCLUDE = [
Ray,
Endpoint,
Direction,
HalfLine,
AngleSide,
OppositeRay,
CollinearRay,
CoordinateRay,
VectorRay,
ConstructibleRay,
ImageRay,
FixedRay
]
EXCLUDE_AS_PRIMARY = [
Line,
LineSegment,
Curve,
PhysicalLightRayUnlessMathematicallyIdealised,
TextualArrowWithoutGeometricMeaning
]
DISAMBIGUATION_RULE =
"When ray occurs with endpoint, direction, angle, line, segment, coordinates, construction or geometric transformation, interpret it as a geometric ray."
}
CORE_CONCEPTS {
Ray {
definition = "A straight one-dimensional geometric object beginning at one endpoint and extending indefinitely in one direction."
intrinsic_dimension = 1
}
Endpoint {
definition = "The unique finite starting point of a ray."
}
Direction {
definition = "The orientation from the endpoint through another point or along a direction vector."
}
HalfLine {
equivalence = "HalfLine ≡ Ray in standard geometric usage."
}
AngleSide {
definition = "A ray acting as one side of an angle."
}
OppositeRay {
definition = "A ray sharing an endpoint with another ray but extending in the opposite direction along the same line."
}
CoordinateRay {
definition = "A ray represented using coordinate or parametric conditions."
form = "r=a+t*d, t>=0"
}
VectorRay {
definition = "A ray represented by an initial point and a nonzero direction vector."
}
}
RELATIONS {
Ray --is_geometric_entity_of--> Geometry
Ray --has--> Endpoint
Ray --has--> Direction
Ray --lies_on--> Line
Point --can_lie_on--> Ray
PairOfDistinctPoints --can_determine--> Ray
Ray --can_form--> Angle
Ray --can_have--> OppositeRay
Ray --can_be_collinear_with--> Ray
Ray --can_be_transformed_to--> Ray
CoordinateRay --can_be_represented_by--> ParametricEquation
VectorRay --uses--> DirectionVector
Endpoint --is_incident_with--> Ray
}
OPERATORS {
RAY_FROM(A,B) :=
{A+t(B-A) | t>=0} WHEN A!=B
IS_INCIDENT(P,R) :=
P lies_on R
DIRECTION_VECTOR(R) :=
any_nonzero_vector_parallel_to_R_and_oriented_from_endpoint
IS_OPPOSITE(R1,R2) :=
same_endpoint(R1,R2)
AND collinear(R1,R2)
AND opposite_directions(R1,R2)
FORM_ANGLE(R1,R2) :=
angle_with_common_endpoint(R1,R2)
TRANSFORM_RAY(R,T) :=
image_of_ray_under_transformation(R,T)
PARAMETRIC_FORM(A,d) :=
r=A+t*d WITH t>=0 AND d!=0
IS_COLLINEAR_WITH_LINE(R,L) :=
supporting_line(R)==L
}
DEFINITIONS {
D1 = "A ray has exactly one endpoint."
D2 = "A ray extends indefinitely in one direction."
D3 = "A ray is one-dimensional."
D4 = "Two distinct points A and B determine the ray starting at A and passing through B."
D5 = "An angle is formed by two rays with a common endpoint."
D6 = "Opposite rays share an endpoint and lie on the same line in opposite directions."
D7 = "A ray is contained in a unique supporting line."
D8 = "A vector or parametric ray requires a nonzero direction vector."
D9 = "A ray differs from a segment because it has no second endpoint."
D10 = "A ray differs from a line because it extends infinitely in only one direction."
}
AXIOMS {
A1_ONE_ENDPOINT:
Every ray has exactly one endpoint
A2_ONE_DIRECTION:
Every ray extends indefinitely in exactly one direction from its endpoint
A3_ONE_DIMENSION:
A ray has intrinsic dimension one
A4_SUPPORTING_LINE:
Every ray lies on a unique supporting line
A5_TWO_POINT_DETERMINATION:
Two distinct points A and B determine exactly one ray from A through B
A6_ANGLE_FORMATION:
Two noncoincident rays sharing an endpoint determine an angle
A7_TRANSFORMATION:
Suitable affine transformations map rays to rays
}
REASONING {
R1_RAY_FROM_POINTS {
INPUT = [A,B]
REQUIRE = A!=B
SET_ENDPOINT = A
SET_DIRECTION = B-A
RETURN = ray_from_A_through_B
}
R2_POINT_ON_RAY {
INPUT = [P,R]
REQUIRE = P lies_on_supporting_line(R)
TEST = direction_parameter_t>=0
RETURN = PointOnRayOrNot
}
R3_OPPOSITE_RAYS {
INPUT = [R1,R2]
TEST = same_endpoint
TEST = same_supporting_line
TEST = opposite_direction
RETURN = OppositeOrNot
}
R4_ANGLE_REASONING {
INPUT = [R1,R2]
REQUIRE = common_endpoint
IDENTIFY = direction_vectors
COMPUTE_OR_CLASSIFY = angular_separation
RETURN = Angle
}
R5_COORDINATE_RAY {
INPUT = [endpoint A, direction d]
REQUIRE = d!=0
RETURN = "r=A+t*d, t>=0"
}
R6_TRANSFORMATION {
INPUT = [R,T]
APPLY = transformation_to_endpoint_and_direction
VERIFY = ray_structure_preserved
RETURN = image_ray
}
R7_SUPPORTING_LINE {
INPUT = R
EXTEND = R in opposite direction conceptually
RETURN = unique_supporting_line
}
}
CONSTRAINTS {
C1 = "A ray must not be confused with a full line or finite segment."
C2 = "The direction vector of a ray must be nonzero."
C3 = "The endpoint must remain distinguished from interior points."
C4 = "Point-on-ray tests require both collinearity and correct direction."
C5 = "Opposite rays must share the same endpoint."
C6 = "Angle formation requires a common endpoint."
C7 = "Transformation must preserve straightness and one-ended structure."
C8 = "Coordinate ray parameter restrictions must be preserved."
}
SEMANTIC_EQUIVALENCE {
"Ray" <=> "HalfLine"
"CoordinateRay" <=> "ParametricHalfLine"
"OppositeRays" <=> "SameEndpointSameLineOppositeDirections"
"AngleSide" <=> "RayBoundingAngle"
}
VALIDATION {
V1 = "Ray has one endpoint."
V2 = "Ray is one-dimensional."
V3 = "Ray extends infinitely in one direction."
V4 = "Two distinct points determine a ray when endpoint order is specified."
V5 = "Point membership respects t>=0 in parametric form."
V6 = "Opposite rays share endpoint and supporting line."
V7 = "Direction vector is nonzero."
V8 = "Suitable affine transformations preserve ray structure."
}
CONFIDENCE {
BASE_CONFIDENCE = 0.99
RAY_DEFINITION = 0.99
ENDPOINT_RELATION = 0.99
DIRECTION_RELATION = 0.99
OPPOSITE_RAY_RELATION = 0.99
ANGLE_RELATION = 0.99
PARAMETRIC_RELATION = 0.99
TRANSFORMATION_RELATION = 0.99
POLICY =
"Reduce confidence when endpoint ordering, supporting line, direction or transformation class are underspecified."
}
AI_CONSUMPTION {
PURPOSES = [
SemanticSearch,
OntologyGrounding,
GeometricEntityResolution,
DirectionReasoning,
AngleReasoning,
IncidenceReasoning,
CoordinateReasoning,
ConstructionReasoning,
TransformationReasoning,
KnowledgeGraphConstruction,
RetrievalAugmentation,
RecursiveInference
]
NORMALISE {
"ray" -> Ray WHEN geometry_context
"geometric ray" -> Ray
"half-line" -> Ray
"angle side" -> AngleSide
"opposite ray" -> OppositeRay
"parametric ray" -> CoordinateRay
}
INTERPRETATION_ORDER = [
detect_geometric_ray_context,
identify_endpoint,
identify direction,
identify supporting line,
classify ray role,
identify incidence angle opposite-ray or transformation context,
perform ray-specific reasoning,
verify parameter and endpoint constraints,
return semantic output
]
}
EXECUTION_RULES {
E1:
IF query_mentions("ray")
AND geometry_context
THEN activate(RayOntology)
E2:
IF two_distinct_points_given
THEN respect_order_and_construct_ray_from_first_through_second
E3:
IF point_membership_requested
THEN test_collinearity_and_direction_parameter
E4:
IF opposite_ray_requested
THEN verify_same_endpoint_same_line_opposite_direction
E5:
IF angle_context
THEN require_common_endpoint
E6:
IF vector_or_parametric_context
THEN enforce_t>=0_and_nonzero_direction
E7:
IF transformation_context
THEN transform_endpoint_and_direction
}
RECURSION {
ENTRY = Ray
EXPAND(Ray) -> [
Endpoint,
Direction,
SupportingLine,
AngleSide,
OppositeRay,
CoordinateRay,
VectorRay,
ConstructibleRay,
ImageRay
]
EXPAND(AngleSide) -> [
Angle,
Vertex,
Direction,
AngularMeasure
]
EXPAND(CoordinateRay) -> [
EndpointCoordinate,
DirectionVector,
Parameter,
SupportingLine
]
EXPAND(OppositeRay) -> [
SharedEndpoint,
Collinearity,
OppositeDirection,
StraightAngle
]
STOP_CONDITION =
"Stop when the ray's endpoint, direction, membership, angle role, opposite relation, parametric form or transformation property is sufficiently resolved."
}
ROUTING {
PARENT_ONTOLOGY = "Plane Geometry"
IMMEDIATE_CONTEXTS = [
"Point Ontology",
"Line Ontology",
"Angle Ontology",
"Coordinate Geometry Ontology"
]
RELATED_ONTOLOGIES = [
"Plane Geometry",
"Point Ontology",
"Line Ontology",
"Coordinate Geometry Ontology",
"Vector Geometry Ontology",
"Parametric Geometry Ontology",
"Geometric Construction Ontology",
"Transformation Ontology",
"Affine Transformation Ontology"
]
ROUTE_RULES = [
"Ray -> Point for endpoint reasoning",
"Ray -> Line for supporting-line reasoning",
"Ray -> Angle for angle-side reasoning",
"Ray -> Coordinate Geometry for coordinate representation",
"Ray -> Vector Geometry for direction-vector representation",
"Ray -> Parametric Geometry for r=a+t*d with t>=0",
"Ray -> Geometric Construction for constructible rays",
"Ray -> Transformation for image-ray reasoning"
]
}
UPDATE_MODEL {
MODE = "append-compatible semantic versioning"
MAJOR = "ontology-breaking conceptual change"
MINOR = "new compatible ray roles, relations or reasoning pathways"
PATCH = "clarification, metadata or formatting correction"
RULES = [
"Preserve ray as one-ended infinite straight entity.",
"Preserve distinction among ray, line and segment.",
"Preserve endpoint and direction semantics.",
"Preserve opposite-ray conditions.",
"Preserve t>=0 in parametric representations.",
"Preserve transformation-specific ray structure.",
"Preserve machine-readable ray semantics."
]
}
OUTPUT {
CANONICAL_DEFINITION =
"A ray is a one-dimensional straight geometric entity with one endpoint that extends indefinitely in one direction."
DIMENSION_SUMMARY =
"dim(Ray)=1"
ENDPOINT_SUMMARY =
"A ray has exactly one endpoint."
DIRECTION_SUMMARY =
"A ray extends from its endpoint in one direction."
PARAMETRIC_SUMMARY =
"r=a+t*d with t>=0 and d!=0"
OPPOSITE_RAY_SUMMARY =
"Opposite rays share an endpoint, lie on the same supporting line and point in opposite directions."
ANGLE_SUMMARY =
"Two rays with a common endpoint form an angle."
}
FLOW {
INPUT
-> detect_geometric_ray_context
-> identify_endpoint_and_direction
-> identify_supporting_line
-> identify coordinate vector or construction representation
-> evaluate point membership angle formation opposite-ray relation or transformation
-> perform ray-specific reasoning
-> verify one-endpoint direction and parameter constraints
-> route to point line angle coordinate vector or transformation ontology
-> recursively expand required dependencies
-> verify result
-> assign confidence
-> produce semantic output
-> END
}
SEMANTIC_SUMMARY {
"The Ray Ontology defines the one-dimensional straight geometric entity that begins at a single endpoint and extends indefinitely in one direction. Rays are fundamental to angle formation, directional geometry, constructions, coordinate and vector representations, and relationships with points and supporting lines."
}
FLOW_HASH {
METHOD = "semantic-content-identity"
ID = "KIRETH-MATH-GEOMETRY-RAY-ONTOLOGY-V1"
}
}
END_FLOW