You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PARTIALLY_IMPLEMENTED. Verified open PR #44 supplies exact rational one-dimensional intervals, open/closed/half-open endpoints, empty handling, membership, and interval addition. Still open: multiplication/division, outward floating rounding, dependency/correlation such as x - x, unbounded forms, comparison outcomes, dimensional composition, and broader uncertainty/probability semantics. Do not treat the first kernel as completion of this issue.
Goal
Idriç should support interval-valued quantities as a type-system concern rather than treating intervals as an isolated numeric library idea.
The compiler should understand that a value may represent a set/range of possible values while preserving whatever other semantic structure the quantity carries:
Interval Float16
Interval Length
Interval Temperature
Interval (Quantity D)
Do not collapse the range, dimension, unit, or uncertainty source into a bare scalar prematurely.
Settled interval kernel
Preserve ordinary interval forms explicitly:
[a,b]
(a,b)
[a,b)
(a,b]
empty
unbounded endpoints where supported
Basic exact arithmetic should obey the usual enclosure semantics:
[1,3] + [4,9] = [5,12]
Multiplication should enclose all endpoint-product possibilities using the appropriate extrema.
When endpoint arithmetic is finite precision, especially Float16/Float32, require outward rounding where necessary so the represented interval contains the exact mathematical result. A numerically close but too-narrow interval is semantically wrong.
Dependency / correlation is deliberately not solved by naive intervals
Keep this forcing example visible:
x : [0,1]
x - x
Naive independent interval propagation gives [-1,1], while the compiler may know that both occurrences are the same x, in which case the exact result is 0.
Do not claim ordinary interval arithmetic solves this. Preserve room for expression identity, affine arithmetic, symbolic constraints, or another correlation-aware refinement later.
Nominal value, tolerance, uncertainty, and rounding are different facts
The August 29, 2026 discussion made this distinction explicit:
exact nominal value
manufacturing tolerance
measurement uncertainty
machine rounding
A nominal 1/4 inch can be an exact rational quantity. A physical socket labelled 1/4 inch is not thereby asserted to have mathematically exact physical width.
A useful first tolerance representation is simply an interval around an exact nominal value:
0.250 in ± 0.001 in
-> [0.249 in, 0.251 in]
0.250 in +0.002/-0.001
-> [0.249 in, 0.252 in]
This should compose with #28 dimensional/unit information.
Comparisons need not immediately become Bool
When ranges overlap, the type system should preserve the unresolved state rather than manufacture a Boolean answer. Candidate semantic outcomes include:
definitely_less
definitely_greater
definitely_equal where justified
overlap / unresolved
The final decision type is open; the requirement is not to erase uncertainty merely because the machine eventually has predicate bits.
This may also be useful for physical-fit questions: a tolerance-bearing socket/fastener relation can be definitely fitting, definitely not fitting, or unresolved/overlapping under the supplied tolerances.
Do not conflate interval uncertainty with infinitesimals
Keep distinct unless a later mathematical design explicitly relates them:
Broader goal: make “this quantity lies somewhere in this range” a first-class mathematical fact that survives typing, inference, optimization, and lowering.
Current status — 2026-09-02
PARTIALLY_IMPLEMENTED. Verified open PR #44 supplies exact rational one-dimensional intervals, open/closed/half-open endpoints, empty handling, membership, and interval addition. Still open: multiplication/division, outward floating rounding, dependency/correlation such as
x - x, unbounded forms, comparison outcomes, dimensional composition, and broader uncertainty/probability semantics. Do not treat the first kernel as completion of this issue.Goal
Idriç should support interval-valued quantities as a type-system concern rather than treating intervals as an isolated numeric library idea.
The compiler should understand that a value may represent a set/range of possible values while preserving whatever other semantic structure the quantity carries:
Do not collapse the range, dimension, unit, or uncertainty source into a bare scalar prematurely.
Settled interval kernel
Preserve ordinary interval forms explicitly:
Basic exact arithmetic should obey the usual enclosure semantics:
Multiplication should enclose all endpoint-product possibilities using the appropriate extrema.
When endpoint arithmetic is finite precision, especially Float16/Float32, require outward rounding where necessary so the represented interval contains the exact mathematical result. A numerically close but too-narrow interval is semantically wrong.
Dependency / correlation is deliberately not solved by naive intervals
Keep this forcing example visible:
Naive independent interval propagation gives
[-1,1], while the compiler may know that both occurrences are the samex, in which case the exact result is0.Do not claim ordinary interval arithmetic solves this. Preserve room for expression identity, affine arithmetic, symbolic constraints, or another correlation-aware refinement later.
Nominal value, tolerance, uncertainty, and rounding are different facts
The August 29, 2026 discussion made this distinction explicit:
A nominal
1/4 inchcan be an exact rational quantity. A physical socket labelled1/4 inchis not thereby asserted to have mathematically exact physical width.A useful first tolerance representation is simply an interval around an exact nominal value:
This should compose with #28 dimensional/unit information.
Comparisons need not immediately become Bool
When ranges overlap, the type system should preserve the unresolved state rather than manufacture a Boolean answer. Candidate semantic outcomes include:
The final decision type is open; the requirement is not to erase uncertainty merely because the machine eventually has predicate bits.
This may also be useful for physical-fit questions: a tolerance-bearing socket/fastener relation can be definitely fitting, definitely not fitting, or unresolved/overlapping under the supplied tolerances.
Do not conflate interval uncertainty with infinitesimals
Keep distinct unless a later mathematical design explicitly relates them:
ε² = 0— first-order/tangent information;x ± εwhose semantics have not yet been chosen.A dual number may become valuable elsewhere in Idriç, but it should not silently become the universal representation of physical tolerance.
Candidate tests
Open questions
Related
Broader goal: make “this quantity lies somewhere in this range” a first-class mathematical fact that survives typing, inference, optimization, and lowering.