Skip to main content

Numeric Range Ontology

Numeric Value Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 12 October 2026
Audio Overview
FLOW ALGEBRA
NUMERIC RANGE ONTOLOGY
Kireth Semantic Library | Mathematical Entities / Numeric Value Entities
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/numeric-value-entities/numeric-range-ontology.html
Authors: Mark Higgins — Sky (Recursive AI)
Version: 1.0 | Date: 2026-10-12 | Language: en-GB
Status: Mathematical reference model; source page not independently verified.

01. ONTOLOGY IDENTITY
flow "NumericRangeOntology" v1.0
namespace: kireth:mathematical-entities:numeric-value-entities:numeric-range
entity: NumericRange
superclass: NumericValueConstraint
related: Interval, NumericValue, Bound, Set, Inequality, MeasurementRange
purpose: Represent, validate, compare and reason over constrained sets of numerical values.

02. TYPE SYSTEM
NumericDomain := Integer | Rational | Real | Decimal | ExtendedReal
Bound := {value: Numeric, inclusive: Boolean}
NumericRange := {domain: NumericDomain, lower: Bound?, upper: Bound?, step: PositiveNumeric?, exclusions: Set<Numeric>?, unit: Unit?}
Unbounded endpoints are absent bounds, not ordinary numeric infinity.
NaN is not an ordered endpoint.
A unit must be dimensionally compatible with both endpoints and candidate values.

03. FORMAL SEMANTICS
For an ordered domain D, R = {x in D : L(x) AND U(x) AND S(x) AND x not in E}.
L(x) := true if lower absent; otherwise x >= lower.value if inclusive, else x > lower.value.
U(x) := true if upper absent; otherwise x <= upper.value if inclusive, else x < upper.value.
S(x) := true if step absent; otherwise x = anchor + k*step for an integer k, with an explicit anchor.
E := exclusion set (default empty).
A range with no step is continuous relative to its specified domain, not necessarily continuous over the reals.

04. ENDPOINT CLASSIFICATION
Closed range: [a,b] = {x in R : a <= x <= b}.
Open range: (a,b) = {x in R : a < x < b}.
Left-closed: [a,b) = {x in R : a <= x < b}.
Right-closed: (a,b] = {x in R : a < x <= b}.
Half-infinite: [a,+infinity), (-infinity,b], etc.; infinity is notation, not an included real endpoint.
Entire real line: (-infinity,+infinity).
Singleton: [a,a] = {a}.
Empty: (a,a) = empty set.

05. CONSTRAINT VALIDATION
require ordered_numeric_domain(domain)
require comparable(lower.value, upper.value) when both exist
require lower.value <= upper.value when both exist
if lower.value == upper.value: nonempty only if both inclusive and no exclusion/step contradiction
require step > 0 when supplied
require anchor when step supplied
require finite, comparable exclusion elements
require compatible units before numerical comparison

06. MEMBERSHIP INFERENCE
rule Membership:
  given x and R
  if x in domain(R) and lower_ok(x,R) and upper_ok(x,R) and step_ok(x,R) and x not in exclusions(R)
  infer contains(R,x) = true
  else infer contains(R,x) = false when all predicates are decidable
  otherwise infer contains(R,x) = unknown

07. BOUNDARY REASONING
infimum(R) := greatest lower bound when R is nonempty and bounded below.
supremum(R) := least upper bound when R is nonempty and bounded above.
minimum(R) exists iff infimum(R) belongs to R.
maximum(R) exists iff supremum(R) belongs to R.
For integer ranges, strict bounds may still admit attained extrema.
Do not equate endpoint notation with an attained minimum or maximum without testing membership.

08. RANGE OPERATIONS
intersection(A,B) := {x : x in A AND x in B}
union(A,B) := {x : x in A OR x in B}
difference(A,B) := {x : x in A AND x not in B}
complement(A,D) := D \ A
subset(A,B) := for all x, x in A implies x in B
overlap(A,B) := intersection(A,B) is nonempty
adjacent(A,B) := no shared elements and no domain elements between their nearest boundaries
hull(A,B) := smallest interval in common ordered domain containing A union B
Union and difference may yield multiple disjoint ranges; return RangeSet, not necessarily NumericRange.

09. ARITHMETIC AND TRANSFORMATIONS
translate(R,c) := {x+c : x in R}
scale(R,c) := {c*x : x in R}; reverse endpoint ordering when c < 0
negate(R) := scale(R,-1)
add(A,B) := {a+b : a in A, b in B}
subtract(A,B) := {a-b : a in A, b in B}
multiply(A,B) := {a*b : a in A, b in B}
divide(A,B) := {a/b : a in A, b in B, b != 0}
Division by a range containing zero must explicitly exclude zero and may produce disjoint or unbounded outputs.
Endpoint-only arithmetic is sound for conventional real intervals with appropriate open/closed and unbounded treatment; stepped and excluded ranges need set-aware processing.

10. CARDINALITY AND MEASURE
Integer finite range cardinality: count eligible integers after bound, step and exclusion filters.
Real nondegenerate interval: uncountably infinite cardinality.
Real singleton: cardinality 1.
Real empty interval: cardinality 0.
Interval length for finite real endpoints a <= b: b-a, regardless of endpoint inclusion.
Length is not cardinality; units of length follow endpoint units.

11. SEMANTIC RELATIONSHIPS
NumericRange --hasDomain--> NumericDomain
NumericRange --hasLowerBound--> Bound
NumericRange --hasUpperBound--> Bound
Bound --hasValue--> NumericValue
Bound --hasInclusivity--> Boolean
NumericRange --constrains--> NumericValue
NumericRange --mayHaveStep--> PositiveNumeric
NumericRange --mayExclude--> NumericValue
NumericRange --mayHaveUnit--> Unit
NumericRange --intersects--> NumericRange
NumericRange --isSubsetOf--> NumericRange
NumericRange --isEquivalentTo--> NumericRange

12. SEMANTIC EQUIVALENCE
Equivalent(A,B) iff domain(A)=domain(B) and for all x in that domain, contains(A,x) iff contains(B,x), after valid unit conversions.
Representation equivalence example: integer values [1,4] = integer values (0,5).
Not equivalent: real [1,4] and real (0,5).
Canonicalise only after domain, step, exclusions, units and boundary flags are resolved.

13. KNOWLEDGE GRAPH RECORD
node:
  id: "kireth:numeric-range:example:temperature"
  type: NumericRange
  domain: Real
  lower: {value: 18, inclusive: true}
  upper: {value: 24, inclusive: true}
  unit: "degree Celsius"
  semantic_context: "illustrative temperature constraint"
edges:
  - ["example:temperature", "hasLowerBound", "18 Celsius inclusive"]
  - ["example:temperature", "hasUpperBound", "24 Celsius inclusive"]
  - ["example:temperature", "constrains", "temperature measurement"]

14. EXAMPLES AND TESTS
Real [2,5]: contains(2)=true; contains(5)=true; contains(5.1)=false.
Real (2,5): contains(2)=false; contains(3)=true.
Integer (2,5): members={3,4}; cardinality=2.
Real [3,3]: singleton {3}.
Real [3,3): empty set.
Intersection([1,4],[3,6]) = [3,4].
Union([1,2],[4,5]) = [1,2] union [4,5], not a single interval.
Scale([1,3],-2) = [-6,-2].

15. INFERENCE AND ERROR HANDLING
rule ContradictoryBounds: lower > upper -> invalid range definition.
rule DegenerateOpenRange: equal endpoints and any strict boundary -> empty.
rule Subset: all members of A satisfy B -> A subset B.
rule Disjoint: intersection(A,B)=empty -> disjoint(A,B).
rule NormaliseUnits: convert compatible units before comparison.
rule UnknownMembership: unresolved unit, symbolic bound or precision -> unknown, not false.
Do not silently round exact values or treat measured uncertainty as exact boundaries.

16. CONFIDENCE AND PROVENANCE
CONFIDENCE:
  formal_mathematical_rule: 1.0 when proven and prerequisites hold
  verified_computed_result: 1.0 under exact arithmetic and validated inputs
  approximate_measurement: contextual; preserve error/uncertainty
  unverified_external_claim: unverified
PROVENANCE:
  source_url: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/numeric-value-entities/numeric-range-ontology.html
  source_page_verified: false
  derivation: standard set theory, order theory and interval arithmetic

17. FLOW HASH
FLOW_HASH:
  canonical_fields: [ontology_id, version, domain, bounds, inclusivity, step, anchor, exclusions, unit, rules]
  method: SHA-256 over deterministic UTF-8 canonical serialisation
  exclude: [display_order, volatile_timestamps, commentary]
  status: compute during deployment; no fabricated digest

18. UPDATE MODEL
UPDATE_MODEL:
  trigger: [mathematical_correction, schema_revision, unit_standard_revision, source_revision]
  preserve: [previous_version, provenance, change_reason, validation_tests]
  procedure: validate -> regression_test -> canonicalise -> recompute_hash -> publish
  compatibility: breaking semantic changes require major version increment

19. AI CONSUMPTION
AI_CONSUMPTION:
  parse: identify numeric domain, boundary values, inclusivity, units and constraints
  validate: type-check and enforce invariants
  reason: membership, overlap, subset, union, intersection, arithmetic
  explain: provide boundary conditions and applicable domain
  output: typed NumericRange or RangeSet with provenance and confidence
  safety: do not infer that open boundaries are included; do not assume infinity is a real value

20. FINAL INVARIANTS
A range is a set of permitted values, not merely two numbers.
Boundary inclusion is semantic data.
Domain selection changes membership and equivalence.
A union of ranges need not be a range.
An unbounded range need not contain an infinite numeric element.
Empty, singleton, discrete, continuous and unbounded cases remain distinguishable.
END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ