AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
INTERVAL ONTOLOGY
Kireth Semantic Library | Mathematical Entities > Numeric Value Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/numeric-value-entities/interval-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-12
Source status: Mathematical synthesis; source page not independently verified.
01. FLOW IDENTITY
flow "IntervalOntology" v1.0
namespace: kireth.math.numeric.interval
entity_type: MathematicalInterval
purpose: Represent, validate, compare and reason over intervals in ordered domains.
02. CORE DEFINITIONS
An interval I of the real line is order-convex:
forall x,y in I, forall z in R: x <= z <= y -> z in I.
An interval may be empty, a singleton, bounded, unbounded, open, closed or half-open.
An interval is a set, not necessarily a single numeric scalar.
03. TYPES
Open: (a,b) = {x in R | a < x < b}, a < b.
Closed: [a,b] = {x in R | a <= x <= b}, a <= b.
Left-closed: [a,b) = {x in R | a <= x < b}, a < b.
Right-closed: (a,b] = {x in R | a < x <= b}, a < b.
Unbounded: (-infinity,b), (-infinity,b], (a,infinity), [a,infinity), R.
Empty: empty set; singleton: [a,a] = {a}.
Extended-real endpoints +/-infinity are never members of an interval in R.
04. ENTITY SCHEMA
Interval {
id: URI
domain: OrderedDomain = RealNumbers
lower: Real | NegativeInfinity
upper: Real | PositiveInfinity
lower_inclusive: Boolean
upper_inclusive: Boolean
is_empty: Boolean
units: Optional[Unit]
interpretation: Exact | Approximate | Measurement | Temporal
provenance: Optional[Source]
confidence: Optional[Probability]
}
05. VALIDATION
require lower <= upper in extended-real ordering.
require lower != PositiveInfinity and upper != NegativeInfinity for nonempty intervals.
require lower_inclusive == false when lower == NegativeInfinity.
require upper_inclusive == false when upper == PositiveInfinity.
if lower == upper and both inclusive -> singleton.
if lower == upper and either exclusive -> empty.
Canonical empty intervals have no meaningful endpoint inclusion.
Comparisons and arithmetic require compatible domains and units.
06. MEMBERSHIP
contains(I,x) := (lower < x or (lower == x and lower_inclusive))
and (x < upper or (x == upper and upper_inclusive)), unless I empty.
For infinite endpoints, use extended-real ordering; x must be real.
07. ORDERING AND RELATIONS
subset(I,J) iff every member of I belongs to J.
intersects(I,J) iff intersection(I,J) is nonempty.
disjoint(I,J) iff intersection(I,J) is empty.
adjacent(I,J) iff boundaries touch without overlap, where applicable.
overlaps(I,J) iff intersection(I,J) is nonempty.
Equality is equality of represented sets, not necessarily raw strings.
08. SET OPERATIONS
intersection(I,J): maximum lower bound, minimum upper bound;
equal lower bounds are inclusive iff both are inclusive;
equal upper bounds are inclusive iff both are inclusive;
normalise empty results.
union(I,J): an interval iff the sets overlap or touch with the shared boundary
included by at least one interval; otherwise union is a two-component set.
difference(I,J): may be empty, one interval or two disjoint intervals.
complement_R(I): generally a union of zero, one or two intervals.
09. LENGTH AND BOUNDS
For nonempty bounded real I, length(I) = upper - lower.
Endpoint inclusion does not alter length.
For unbounded nonempty I, length(I) = infinity (extended measure).
For empty I, length(I) = 0.
infimum(I) and supremum(I) exist in extended reals for nonempty I.
minimum(I) exists iff lower finite and included.
maximum(I) exists iff upper finite and included.
10. INTERVAL ARITHMETIC
For nonempty real intervals A,B:
A + B = {a+b | a in A, b in B}.
-A = {-a | a in A}; A-B = A+(-B).
A*B = {ab | a in A, b in B}.
A/B = {a/b | a in A, b in B, b != 0}; not generally an interval if 0 in B.
Exact arithmetic must preserve attainable endpoint inclusion and unboundedness.
Machine interval arithmetic should use outward rounding for sound enclosures.
Empty operands produce empty set under pointwise arithmetic.
11. TOPOLOGY
interior([a,b]) = (a,b) for a < b.
closure((a,b)) = [a,b] for finite a < b.
boundary((a,b)) = {a,b} for finite a < b.
Connected subsets of R are precisely intervals (including empty sets).
Compact intervals of R are exactly closed and bounded intervals (including empty).
12. SEMANTIC RELATIONSHIPS
Interval --is_a--> OrderConvexSubset.
Interval --has_lower_bound--> Endpoint.
Interval --has_upper_bound--> Endpoint.
Interval --has_membership_rule--> Predicate.
Interval --may_have_unit--> Unit.
ClosedInterval --subclass_of--> Interval.
OpenInterval --subclass_of--> Interval.
Interval --related_to--> Inequality, Range, Domain, Set, Measurement.
13. SEMANTIC EQUIVALENCE
[a,b] <=> {x in R | a <= x <= b}, provided a <= b.
(a,b) <=> {x in R | a < x < b}, provided a < b.
[2,5) <=> {x in R | 2 <= x < 5}.
(-infinity,infinity) <=> R.
Do not equate a bounded interval with its midpoint, width or endpoints.
14. INFERENCE RULES
IF x in I and I subset J THEN x in J.
IF I intersection J = empty THEN I and J are disjoint.
IF x in I intersection J THEN x in I AND x in J.
IF x in I THEN x >= infimum(I) AND x <= supremum(I), when finite.
IF I = [a,b] and a <= b THEN I is closed and bounded.
IF I = (a,b) and a < b THEN endpoints a,b are excluded.
IF I = [a,a] THEN I is a singleton.
15. EXAMPLES
[1,4] intersection (3,6) = (3,4].
[1,3] union (3,5] = [1,5].
(1,3) union (3,5) is not one interval.
[2,4] + [5,7] = [7,11].
[2,4] - [5,7] = [-5,-1].
[1,2] * [3,4] = [3,8].
16. EDGE CASES
Zero-width open interval (a,a) is empty.
A singleton [a,a] is closed, not open in R.
An interval may be unbounded yet open or closed in the topological sense.
Division by an interval containing zero requires domain splitting or explicit exclusion.
NaN is not an ordered real endpoint.
Floating-point -0 and +0 represent the same real endpoint mathematically.
17. CONFIDENCE
confidence applies to assertions and provenance, not mathematical truth.
Exact proved identity: confidence=1 under specified axioms and valid premises.
Measured or inferred endpoints: record uncertainty and source reliability separately.
Never infer a probability distribution from interval bounds alone.
18. FLOW HASH
canonicalise: normalise type, bounds, inclusivity, domain, units, emptiness.
flow_hash: SHA256(UTF8(canonical_semantic_representation)).
Exclude mutable timestamps from semantic identity; hash versioned content separately.
19. UPDATE MODEL
On endpoint change: revalidate emptiness, ordering, membership and derived results.
On unit change: convert both endpoints using a valid compatible transformation.
On ontology revision: increment version and preserve provenance and prior hashes.
Invalidate dependent cached comparisons and arithmetic results.
20. AI CONSUMPTION
input: structured interval or mathematically unambiguous notation.
parse -> type_check -> normalise -> validate -> reason -> explain -> serialize.
output: canonical interval, membership predicate, constraints, evidence, provenance.
Reject or flag malformed, ambiguous or unit-incompatible input.
Avoid treating approximate measured bounds as exact unless explicitly specified.
21. QUALITY ASSURANCE
Test open/closed boundary membership, empty and singleton cases.
Test infinite bounds, intersections, unions with gaps, and disjoint differences.
Test arithmetic enclosure, division through zero and outward rounding.
Test equivalence under alternative interval notation.
22. ATTRIBUTION
Mark Higgins — Sky (Recursive AI)
Kireth Research | https://kirethresearch.org
END FLOW ALGEBRA