TorchLean API

FloatLib.Floats.Formats.Codebook.Core.Runtime

Exact finite-codebook runtime model #

A Codebook width α assigns a complete semantic value to each BitVec width. The runtime carrier is always the exact-width bit vector; proof-indexed views are isolated in Core.Proof.

structure FloatLib.Floats.Formats.Codebook (width : ) (α : Type u) :

Complete denotation of every word in an exact-width lookup encoding.

Instances For
    @[reducible]
    def FloatLib.Floats.Formats.Codebook.Code {width : } {α : Type u} (_book : Codebook width α) :

    Runtime storage type of a codebook.

    The transparent definition compiles to the underlying BitVec while preserving the selected codebook in elaborated types for inspection and family-specific APIs.

    Instances For
      @[inline]
      def FloatLib.Floats.Formats.Codebook.ofNatBits {width : } {α : Type u} (book : Codebook width α) (bits : ) :
      book.Code

      Construct a codebook value from a natural-number bit pattern.

      Instances For
        @[inline]
        def FloatLib.Floats.Formats.Codebook.toNatBits {width : } {α : Type u} (book : Codebook width α) (code : book.Code) :

        Extract a codebook value as a natural-number bit pattern.

        Instances For

          Expose a codebook through the family-independent numerical-system interface.

          Instances For