Documentation

MIPRE.Foundations.SAT.GatePadding

Exact gate-count padding #

Our circuit representation designates its last gate as the output. To add any number of gates while retaining that convention, append copying OR gates, each reading the previous output twice. Every former output has fan-out two; the new output is terminal. This realizes the exact-size padding required by prop:explicit-padded-succinct-deciders, without a separate output-wire index.

Append one gate copying the previous output.

Equations
Instances For
    theorem MIPRE.SAT.Circuit.eval_copyOutput (C : Circuit) (hne : C.gates ≠ []) (x : ℕ → Bool) :

    A copying gate preserves the circuit's value.

    A copying gate preserves topological order, fan-out two, and a terminal output.

    Append exactly k copying gates.

    Equations
    Instances For
      @[simp]

      Exact gate padding preserves well-formedness.

      theorem MIPRE.SAT.Circuit.eval_padGates {C : Circuit} (hC : C.WellFormed) (k : ℕ) (x : ℕ → Bool) :
      (C.padGates k).eval x = C.eval x

      Exact gate padding preserves the function on every input.

      The pair representation of a circuit has the same encoding.

      Equations
      Instances For

        Construct exact gate padding in polynomial time in the original circuit and the number of padding gates, supplied in unary.

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