Documentation

LeanPool.BeyondBethe.BeyondBethe.MachineDirectedLog

Polynomial-time directed rational logarithm #

This file assembles the exact odd-series loop into the full dyadically range-reduced lower and upper logarithms. The precision is supplied as a unary ruler. Leading binary positions are read from word lengths, powers of two are constructed directly as bitstrings, and all rational arithmetic is performed by the verified unreduced-rational machines.

The binary encoding of the raw-rational constant two.

Equations
Instances For

    Extracts the unary series-length ruler from a directed-logarithm input.

    Equations
    Instances For

      Extracts the encoded raw-rational argument of the directed logarithm.

      Equations
      Instances For

        Computes the numerator y - 1 of the logarithmic series parameter.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Computes the raw-rational logarithmic series parameter (y - 1) / (y + 1).

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            Evaluates the rational logarithmic series at the transformed argument for the supplied ruler length.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Builds a unary ruler of length 2 * N + 1 from the series-length ruler.

              Equations
              Instances For

                Raises the logarithmic series parameter to the odd power 2 * N + 1.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Computes the square of the logarithmic series parameter.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Computes the tail-estimate denominator 1 - x^2 for the series parameter x.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Computes the geometric tail expression 2 * x^(2*N+1) / (1 - x^2).

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Adds the geometric tail expression to the unit-logarithm lower approximation.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Dyadic range reduction #

                          Drops one numerator bit to form the ruler for its binary logarithmic scale.

                          Equations
                          Instances For

                            Drops one denominator bit to form the ruler for its binary logarithmic scale.

                            Equations
                            Instances For

                              Encodes the signed difference between numerator and denominator binary logarithmic scales.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                Encodes 2^ruler.length as a binary natural number.

                                Equations
                                Instances For

                                  Encodes the ratio of the numerator and denominator powers of two used for logarithmic scaling.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For

                                    Divides the logarithm argument by its encoded power-of-two scale.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For

                                      Chooses the residual or its reciprocal according to whether the residual is at least one.

                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For

                                        Builds a logarithm-series query for two with the original series-length ruler.

                                        Equations
                                        Instances For

                                          Builds a logarithm-series query for the chosen unit residual with the original ruler.

                                          Equations
                                          Instances For

                                            Encodes the signed binary scaling exponent as a raw rational with denominator one.

                                            Equations
                                            Instances For

                                              Computes the lower approximation to the exponent times log 2, reversing bounds for negative exponents.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For

                                                Computes the upper approximation to the exponent times log 2, reversing bounds for negative exponents.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For

                                                  Chooses the unit-log lower approximation or negated upper approximation for the residual term.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For

                                                    Chooses the unit-log upper approximation or negated lower approximation for the residual term.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For

                                                      Adds the scaling and residual lower approximations to encode a directed logarithm result.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For

                                                        Adds the scaling and residual upper approximations to encode a directed logarithm result.

                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For

                                                          Normalizes the raw lower logarithm approximation into canonical rational encoding.

                                                          Equations
                                                          Instances For

                                                            Normalizes the raw upper logarithm approximation into canonical rational encoding.

                                                            Equations
                                                            Instances For

                                                              Exact unit-interval semantics #

                                                              The raw-rational series parameter (y - 1) / (y + 1) for logarithm evaluation.

                                                              Equations
                                                              Instances For

                                                                Twice the truncated logarithmic series at the transformed argument.

                                                                Equations
                                                                Instances For

                                                                  The raw-rational geometric tail expression 2 * x^(2*N+1) / (1 - x^2) for the transformed argument.

                                                                  Equations
                                                                  Instances For

                                                                    The unit-logarithm lower approximation plus its geometric tail expression.

                                                                    Equations
                                                                    Instances For

                                                                      The ratio of powers of two determined by the binary logarithms of the numerator and denominator.

                                                                      Equations
                                                                      Instances For

                                                                        The raw-rational residual obtained by dividing q by its power-of-two scale.

                                                                        Equations
                                                                        Instances For

                                                                          Selects the scaled residual or its reciprocal according to whether the residual is at least one.

                                                                          Equations
                                                                          Instances For

                                                                            Embeds an integer as a raw rational with denominator one.

                                                                            Equations
                                                                            Instances For
                                                                              @[simp]

                                                                              Approximates the binary exponent times log 2 from below, with bound choice determined by its sign.

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For

                                                                                Approximates the binary exponent times log 2 from above, with bound choice determined by its sign.

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For

                                                                                  Selects the unit-log lower approximation or negated upper approximation for the scaled residual.

                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For

                                                                                    Selects the unit-log upper approximation or negated lower approximation for the scaled residual.

                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For

                                                                                      Adds the lower approximations for the binary scaling and residual logarithms.

                                                                                      Equations
                                                                                      Instances For

                                                                                        Adds the upper approximations for the binary scaling and residual logarithms.

                                                                                        Equations
                                                                                        Instances For