Documentation

MIPRE.Foundations.SAT.GateProg

Polynomial-time case analysis on circuit gates #

Unlike formula nodes, AND and OR gates carry two binary wire indices and NOT carries one. Dispatch retains those payloads and charges for copying them.

theorem MIPRE.SAT.GateDispatch.program_input {Fi Fc Fa Fo Fn : Cost.Prog} (hf : Cost.Prog.WellScoped 1 Fi) (ea : Cost.Data) (i : ℕ) {r : Cost.Data} {t : ℕ} (h : Cost.Eval [ea.cons (Cost.encode i)] Fi r t) :
Cost.Eval [ea.cons (Cost.encode (Gate.input i))] (program Fi Fc Fa Fo Fn) r (ea.size + Cost.esize i + t + 7)
theorem MIPRE.SAT.GateDispatch.program_const {Fi Fc Fa Fo Fn : Cost.Prog} (hf : Cost.Prog.WellScoped 1 Fc) (ea : Cost.Data) (b : Bool) {r : Cost.Data} {t : ℕ} (h : Cost.Eval [ea.cons (Cost.encode b)] Fc r t) :
Cost.Eval [ea.cons (Cost.encode (Gate.const b))] (program Fi Fc Fa Fo Fn) r (ea.size + Cost.esize b + t + 8)
theorem MIPRE.SAT.GateDispatch.program_and {Fi Fc Fa Fo Fn : Cost.Prog} (hf : Cost.Prog.WellScoped 1 Fa) (ea : Cost.Data) (u v : ℕ) {r : Cost.Data} {t : ℕ} (h : Cost.Eval [ea.cons (Cost.encode (u, v))] Fa r t) :
Cost.Eval [ea.cons (Cost.encode (Gate.and u v))] (program Fi Fc Fa Fo Fn) r (ea.size + Cost.esize (u, v) + t + 9)
theorem MIPRE.SAT.GateDispatch.program_or {Fi Fc Fa Fo Fn : Cost.Prog} (hf : Cost.Prog.WellScoped 1 Fo) (ea : Cost.Data) (u v : ℕ) {r : Cost.Data} {t : ℕ} (h : Cost.Eval [ea.cons (Cost.encode (u, v))] Fo r t) :
Cost.Eval [ea.cons (Cost.encode (Gate.or u v))] (program Fi Fc Fa Fo Fn) r (ea.size + Cost.esize (u, v) + t + 10)
theorem MIPRE.SAT.GateDispatch.program_not {Fi Fc Fa Fo Fn : Cost.Prog} (hf : Cost.Prog.WellScoped 1 Fn) (ea : Cost.Data) (u : ℕ) {r : Cost.Data} {t : ℕ} (h : Cost.Eval [ea.cons (Cost.encode u)] Fn r t) :
Cost.Eval [ea.cons (Cost.encode (Gate.not u))] (program Fi Fc Fa Fo Fn) r (ea.size + Cost.esize u + t + 11)
def MIPRE.SAT.PolyTimeFun.casesGateFun {α : Type u_1} {β : Type u_2} (Fi Fn : α × ℕ → β) (Fc : α × Bool → β) (Fa Fo : α × ℕ × ℕ → β) :
α × Gate → β

The mathematical branch dispatcher, retaining every gate's payload.

Equations
Instances For
    noncomputable def MIPRE.SAT.PolyTimeFun.casesGate {α : Type u_1} {β : Type u_2} [Cost.SizedEncoding α] [Cost.SizedEncoding β] (Fi : Cost.PolyTimeFun (α × ℕ) β) (Fc : Cost.PolyTimeFun (α × Bool) β) (Fa Fo : Cost.PolyTimeFun (α × ℕ × ℕ) β) (Fn : Cost.PolyTimeFun (α × ℕ) β) :

    Uniform ambient case analysis on a circuit gate.

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