Documentation

Complexity.Logics.FirstOrder.Ordered.Multiplication.Columns

Native multiplication columns #

The contributing rows of column j are encoded by the bits x[t] ∧ y[j-t]. This word is always at most x, so it fits in every canonical universe containing x, not only universes whose size is a power of two. Native Bit Sum counts the rows, and PLUS checks the exact carry equation without modular overflow.

Main definitions #

Main results #

References #

noncomputable def Cslib.Logic.FO.Ordered.Multiplication.columnWord (L : FirstOrder.Language) {α : Type u_1} (x y j w : (language L).Term α) :

A word marking the input bits contributing to one multiplication column.

Instances For
    noncomputable def Cslib.Logic.FO.Ordered.Multiplication.columnCount (L : FirstOrder.Language) {α : Type u_1} (x y j a : (language L).Term α) :

    Native Bit Sum counts the contributing rows of a column.

    Instances For
      noncomputable def Cslib.Logic.FO.Ordered.Multiplication.carryStep (L : FirstOrder.Language) {α : Type u_1} (x y z i c c' : (language L).Term α) :

      One exact carry equation. All addition and doubling witnesses must fit in the universe.

      Instances For
        @[simp]

        columnCount L x y j a holds exactly when a is the number of rows contributing to column j of the product of x and y (BitString.mulColumn).

        carryStep L x y z i c c' holds exactly when the carry c into column i plus its column count is bit i of z plus twice the outgoing carry c', and that sum fits in the universe.