TorchLean API

FloatLib.Floats.Formats.Flocq.Theory.Rounding.Predicates

Rounding Predicates #

Semantic specifications for directed, toward-zero, and nearest rounding. They are independent of any radix or concrete format: a predicate F : ℝ → Prop identifies the representable values, and the point predicates characterize the required output among those values.

These definitions correspond to Flocq's Rnd_DN_pt, Rnd_UP_pt, Rnd_ZR_pt, and Rnd_N_pt.

f is the greatest F-value no larger than x.

Instances For

    f is the least F-value no smaller than x.

    Instances For

      A downward rounding point is a greatest element of the representable lower bounds.

      An upward rounding point is a least element of the representable upper bounds.

      Directed down on nonnegative inputs and directed up on nonpositive inputs.

      Instances For

        f is an F-value at least as close to x as every other representable value.

        Instances For

          A rounding function rounds downward with respect to F at every input.

          Instances For

            A rounding function rounds upward with respect to F at every input.

            Instances For

              A rounding function rounds toward zero with respect to F at every input.

              Instances For

                A rounding function rounds to a nearest F-value at every input.

                Instances For
                  theorem FloatLib.Floats.Formats.Flocq.roundDownPoint_unique {F : Prop} {x f g : } (hf : RoundDownPoint F x f) (hg : RoundDownPoint F x g) :
                  f = g

                  A downward rounding point is unique.

                  theorem FloatLib.Floats.Formats.Flocq.roundUpPoint_unique {F : Prop} {x f g : } (hf : RoundUpPoint F x f) (hg : RoundUpPoint F x g) :
                  f = g

                  An upward rounding point is unique.

                  A representable value is its own downward rounding point.

                  theorem FloatLib.Floats.Formats.Flocq.roundUpPoint_refl {F : Prop} {x : } (hx : F x) :

                  A representable value is its own upward rounding point.

                  theorem FloatLib.Floats.Formats.Flocq.roundUpPoint_neg {F : Prop} (hneg : ∀ (x : ), F xF (-x)) {x f : } (hf : RoundDownPoint F x f) :
                  RoundUpPoint F (-x) (-f)

                  Negation turns a downward point into an upward point for a symmetric format.

                  theorem FloatLib.Floats.Formats.Flocq.roundDownPoint_neg {F : Prop} (hneg : ∀ (x : ), F xF (-x)) {x f : } (hf : RoundUpPoint F x f) :

                  Negation turns an upward point into a downward point for a symmetric format.

                  theorem FloatLib.Floats.Formats.Flocq.roundDownUpPoint_split {F : Prop} {x d u f : } (hd : RoundDownPoint F x d) (hu : RoundUpPoint F x u) (hf : F f) :
                  f d u f

                  Any representable value lies below the downward point or above the upward point.

                  theorem FloatLib.Floats.Formats.Flocq.roundNearestPoint_of_down_up {F : Prop} {x d u f : } (hd : RoundDownPoint F x d) (hu : RoundUpPoint F x u) (hf : F f) (hfd : |f - x| |d - x|) (hfu : |f - x| |u - x|) :

                  A representable value no farther than both directed neighbors is globally nearest. Every other representable value lies outside the interval between those neighbors.