TorchLean API

FloatLib.Floats.Formats.DecimalInterchange.Neighbors.Endpoints

Infinite endpoints of decimal adjacency #

An infinite neighbor of a finite datum is justified by a bound on every finite datum in the format. Moving inward from infinity selects the extreme finite value. The status theorem remains unchanged at each endpoint.

A finite input can have positive infinity as successor only at the finite maximum.

theorem FloatLib.Floats.Formats.DecimalInterchange.Arithmetic.nextUp_infinite_bound (f : Format) (x : Datum) (hx : Datum.Valid f x) (a : ) (ha : x.toRat? = some a) (hout : (nextUp f x).value = Datum.infinity false) (y : Datum) (v : ) (hy : Datum.Valid f y) (hv : y.toRat? = some v) :
v a

There is no larger finite datum when nextUp reaches positive infinity.

theorem FloatLib.Floats.Formats.DecimalInterchange.Arithmetic.nextDown_infinite_bound (f : Format) (x : Datum) (hx : Datum.Valid f x) (a : ) (ha : x.toRat? = some a) (hout : (nextDown f x).value = Datum.infinity true) (y : Datum) (v : ) (hy : Datum.Valid f y) (hv : y.toRat? = some v) :
a v

There is no smaller finite datum when nextDown reaches negative infinity.

Moving inward from negative infinity returns the smallest finite value.

Moving inward from positive infinity returns the largest finite value.