Documentation

CslibFrontier.Computability.Complexity.Classes.IP.TQBF.Words

Words of the machine verifier for quantified Boolean formulas #

The machine realizing the verifier of Cslib.Complexity.QBFProtocol.verifyAt over ZMod p represents ring elements by natural numbers below p, in unary, which is polynomial since p is chosen of polynomial size. This file gives the arithmetic it performs and its words:

All are polynomial-time in their unary or binary inputs.

Main definitions #

Main results #

References #

Arithmetic modulo p #

The difference a - b modulo p.

Instances For

    The value of a connective on residues modulo p.

    Instances For

      The value of an operator on residues modulo p.

      Instances For

        The value at z of a coefficient list modulo p, by Horner's rule from the last coefficient. The modulus 0 is read as 1, so that the intermediate values stay small.

        Instances For
          theorem Cslib.Complexity.QBFProtocol.natCast_subMod {p : ℕ} [NeZero p] (a b : ℕ) :
          ↑(subMod p a b) = ↑a - ↑b
          theorem Cslib.Complexity.QBFProtocol.natCast_operatorMod {p : ℕ} [NeZero p] (o : Logic.PL.ArithQBF.Operator) (t a b : ℕ) :
          ↑(operatorMod p o t a b) = o.apply ↑t ↑a ↑b

          For p ≠ 0, operatorMod computes the operators of the arithmetization in ZMod p.

          For p ≠ 0, Horner's rule modulo p evaluates the coefficient list l at z in ZMod p.

          theorem Cslib.Complexity.QBFProtocol.mod_eq_val_mod_iff {p : ℕ} [NeZero p] (a : ℕ) (c : ZMod p) :
          a % p = c.val % p ↔ ↑a = c

          A residue below p compares with an element of ZMod p through its value.

          Points #

          The value of the variable w at a point given as a list of pairs of a variable and its value: the value of the first pair for w, or 0.

          Instances For

            The point r on the variables of xs, as a list of pairs of a variable and its value.

            Instances For

              A point rebuilt on the variables of xs, with values reduced modulo p.

              Instances For

                A point rebuilt on the variables of xs, with the variable v set to z.

                Instances For
                  theorem Cslib.Complexity.QBFProtocol.lookupPt_canonPt {p : ℕ} {xs : List ℕ} (r : ℕ → ZMod p) {w : ℕ} (hw : w ∈ xs) :
                  lookupPt (canonPt xs r) w = (r w).val
                  theorem Cslib.Complexity.QBFProtocol.normPt_canonPt {p : ℕ} [NeZero p] (xs : List ℕ) (r : ℕ → ZMod p) :
                  normPt p xs (canonPt xs r) = canonPt xs r
                  theorem Cslib.Complexity.QBFProtocol.updatePt_canonPt {p : ℕ} [NeZero p] (xs : List ℕ) (r : ℕ → ZMod p) (v z : ℕ) :
                  updatePt p xs (canonPt xs r) v z = canonPt xs (Function.update r v ↑z)

                  For p ≠ 0, setting the variable v to z in the point r on the variables of xs gives the point Function.update r v z on the same variables.

                  Replies #

                  The number of bits of a residue modulo p in a reply.

                  Instances For

                    The number of bits of a reply that the verifier reads: D + 1 rows.

                    Instances For

                      A reply read as D + 1 rows of width p bits, missing bits being false, each row read in binary and reduced modulo p.

                      Instances For

                        The reply of the honest prover for a list of residues: their bits, row after row.

                        Instances For
                          theorem Cslib.Complexity.QBFProtocol.lt_of_mem_decodeReply {p : ℕ} [NeZero p] {D : ℕ} {word : List Bool} {a : ℕ} (ha : a ∈ decodeReply p D word) :
                          a < p
                          theorem Cslib.Complexity.QBFProtocol.decodeReply_encodeReply {p D : ℕ} {l : List ℕ} (hl : ∀ a ∈ l, a < p) (hlen : l.length ≤ D + 1) :
                          decodeReply p D (List.take (replyLimit p D) (encodeReply p l)) = List.map (fun (i : ℕ) => l.getD i 0) (List.range (D + 1))

                          Decoding inverts the honest encoding of at most D + 1 residues, padded with zeros.

                          Samples #

                          A uniform index in the dyadic range above p, reduced modulo p.

                          Instances For

                            The samples are nearly uniform: every residue has probability at most 2 / p.

                            Polynomial time #

                            @[reducible, inline]

                            Points as lists of pairs (x, v) of a variable x in binary and its value v in unary, as lookupPt, normPt and updatePt read them: the pairs are framed and concatenated in order, each with its variable framed.

                            Instances For

                              The samples are strict PPT in a unary modulus.