TorchLean API

FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Plan.Construction

Static-byte capability construction #

Static-byte candidates and first-order dispatchers form verified ExecFloat capabilities. Runtime planning remains in Plan.Runtime; the equations consumed here are isolated in Plan.Proof.

The planner chooses between a table and a direct kernel. These constructors attach the corresponding refinement theorem and expose the result through the shared operation interfaces.

The common table plan for a nominal static-byte format.

The record supplies certified tables and profile choices for four binary operations and square root. FMA is separate: a package can offer a table candidate or use a model kernel directly.

Concrete instances should be marked instance_reducible. The capability instances below can then specialize each projection to the same first-order table kernel that a hand-written per-format instance would name.

Instances
    @[inline]

    Name reported for the certified addition table.

    Instances For
      @[inline]

      Name reported for the certified subtraction table.

      Instances For
        @[inline]

        Name reported for the certified multiplication table.

        Instances For
          @[inline]

          Name reported for the certified division table.

          Instances For
            @[inline]

            Name reported for the certified square-root table.

            Instances For
              @[instance_reducible, always_inline]

              Construct a static-byte addition capability with certified profile selection.

              Instances For
                @[instance_reducible, always_inline]

                Construct a static-byte subtraction capability with certified profile selection.

                Instances For
                  @[instance_reducible, always_inline]

                  Construct a static-byte multiplication capability with certified profile selection.

                  Instances For
                    @[instance_reducible, always_inline]

                    Construct a static-byte division capability with certified profile selection.

                    Instances For
                      @[instance_reducible, always_inline]

                      Construct a static-byte square-root capability with certified profile selection.

                      Instances For
                        @[instance_reducible, always_inline]
                        def FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Plans.Internal.fmaCapability {F : Type u} [Family F] [ExecFloat.Backend.PolicyFor F] (name : String) (selection : BuiltinSelection (Family.format F) name ExecFloat.Backend.Operation.fma) (run : ExecFloat FExecFloat FExecFloat FExecFloat F) (run_eq_spec : ∀ (left right addend : ExecFloat F), run left right addend = Spec.fma left right addend) (exactRun : ExecFloat FExecFloat FExecFloat FExecFloat F) (exactRun_eq_spec : ∀ (left right addend : ExecFloat F), exactRun left right addend = Spec.fma left right addend) :

                        Construct a static-byte FMA capability from named table and exact kernels.

                        Instances For
                          @[instance_reducible, always_inline]
                          def FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Plans.Internal.directFmaCapability {F : Type u} [Family F] [ExecFloat.Backend.PolicyFor F] (run : ExecFloat FExecFloat FExecFloat FExecFloat F) (run_eq_spec : ∀ (left right addend : ExecFloat F), run left right addend = Spec.fma left right addend) :

                          Construct an exact-only static-byte FMA without retaining certificate closure dispatch.

                          Instances For
                            @[instance_reducible, always_inline]

                            Construct an addition capability directly from a certified byte table.

                            The executable table lookup and its refinement proof are derived from the same certificate, so a format package cannot accidentally pair a kernel with the wrong theorem.

                            Instances For
                              @[instance_reducible, always_inline]

                              Construct a subtraction capability directly from a certified byte table.

                              Instances For
                                @[instance_reducible, always_inline]

                                Construct a multiplication capability directly from a certified byte table.

                                Instances For
                                  @[instance_reducible, always_inline]

                                  Construct a division capability directly from a certified byte table.

                                  Instances For
                                    @[instance_reducible, always_inline]

                                    Construct a square-root capability directly from a certified byte table.

                                    Instances For
                                      @[instance_reducible, always_inline]

                                      Construct a policy-selected FMA capability from a certified table and a proved exact kernel.

                                      Instances For
                                        @[instance_reducible, always_inline]
                                        def FloatLib.Floats.Formats.BinaryInterchange.StaticByte.Plans.modelFmaCapability {F : Type u} [Family F] [ExecFloat.Backend.PolicyFor F] (width_le_eight : (Family.format F).bitWidth 8) (run : ModelValue (Family.format F)ModelValue (Family.format F)ModelValue (Family.format F)ModelValue (Family.format F)) (run_eq_spec : ∀ (left right addend : ModelValue (Family.format F)), run left right addend = Model.Spec.fma left right addend) :

                                        Construct an exact-only FMA capability from a proved model-level kernel.

                                        Instances For

                                          The planned instances deliberately outrank the direct-family instances in StaticByte.Backend.Construction. A static-byte family without a TablePlan therefore keeps its ordinary family kernels. With a TablePlan, the planning profile chooses between a table and the exact baseline.

                                          @[instance_reducible, always_inline, instance 200]
                                          @[instance_reducible, always_inline, instance 200]
                                          @[instance_reducible, always_inline, instance 200]
                                          @[instance_reducible, always_inline, instance 200]
                                          @[instance_reducible, always_inline, instance 200]