Documentation

Complexitylib.Classes.PCP.Internal.UnaryDivMod

Division with remainder, in unary #

Every index decomposition in an algorithmic constraint graph is a division: which edge of the original graph, which step of the walk, which copy of the gadget. This module names the unary quotients and remainders those constructions read. Each is defined as what it computes, the quotient or remainder of one length by another written as that many trues, and is polynomial-time by UnaryFn.div and UnaryFn.mod of Complexitylib.Classes.P.Unary. As for Nat, dividing by an empty divisor gives 0 and leaves the whole length as the remainder.

Main definitions #

Main results #

Dividing by a fixed divisor #

The quotient of a length by the length of a fixed divisor, in unary.

Equations
Instances For

    The remainder of a length by the length of a fixed divisor, in unary.

    Equations
    Instances For

      Dividing by a length read from the input #

      The quotient of one length by another, in unary, on pair b s.

      Equations
      Instances For

        The remainder of one length by another, in unary, on pair b s.

        Equations
        Instances For

          Halving #

          Halving a length, in unary.

          Equations
          Instances For