TorchLean API

NN.Floats.FP32.Notation

Notation for TorchLean's FP32 model #

TorchLean uses a proof-oriented float32 model (FP32) defined by:

This file provides small, ergonomic aliases for the corresponding real-level operators:

We keep these under TorchLean.Floats so they are available where float semantics are in focus, without polluting unrelated namespaces.

@[reducible, inline]
noncomputable abbrev TorchLean.Floats.round32 (x : ) :

Real-level binary32 rounding operator for the canonical fexp32/rnd32 configuration.

This is definitionally the same rounding operator used in the NF/FP32 semantics, but phrased as a function $\mathbb{R}\to\mathbb{R}$ (useful for bridge theorems and error bounds).

Instances For
    @[reducible, inline]
    noncomputable abbrev TorchLean.Floats.ulp32 (x : ) :

    One ULP at x for the canonical binary32 exponent configuration.

    Instances For
      @[reducible, inline]
      noncomputable abbrev TorchLean.Floats.eps32 (x : ) :

      Convenience abbreviation: half an ULP at x.

      Instances For
        @[simp]

        Binary32 has a smallest grid step, so its ULP at zero is $2^{-149}$.

        @[reducible, inline]
        noncomputable abbrev TorchLean.Floats.round₃₂ (x : ) :

        Unicode alias for round32 (useful in error-bound statements).

        Instances For
          @[reducible, inline]
          noncomputable abbrev TorchLean.Floats.ulp₃₂ (x : ) :

          Unicode alias for ulp32 (useful in error-bound statements).

          Instances For
            @[reducible, inline]
            noncomputable abbrev TorchLean.Floats.eps₃₂ (x : ) :

            Unicode alias for eps32 (half-ULP).

            Instances For
              @[simp]

              round₃₂ is definitionally equal to round32 (unicode → ASCII simp).

              @[simp]

              ulp₃₂ is definitionally equal to ulp32 (unicode → ASCII simp).

              @[simp]

              eps₃₂ is definitionally equal to eps32 (unicode → ASCII simp).