Documentation

MIPRE.TM.CookLevin.Window

The window family, on decoded fields #

The window clauses of the tableau are the Tseitin clauses of the check circuit chk at every step t and window js (windowClauses). Every such clause has a gate literal (aux t js g) in its third position: the templates of a gate (gateTemplates) list its clauses as triples of literal specs — a gate index (.aux u) or a window input (.win n) — with their signs, and the clause is recovered from the templates by instantiating the specs at (t, js) (gateClauses_eq_templates). A candidate matches a template when its third record is a gate variable of the template's gate and the other two records denote the spec's variable relative to it (SpecMatch: the time and centers are read off the third record). windowPred_iff: the candidate decodes to a window clause iff it matches a template of a gate, or is the output unit clause (planning/succinct-cook-levin.md, S3).

Templates #

A literal of a Tseitin clause, before instantiation: a gate variable or a window input.

Instances For

    The Tseitin clauses of gate g, as templates (gateClauses, Tseitin.lean).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      noncomputable def MIPRE.TM.CookLevin.Desc.specVar {S G : ℕ} (t : Fin S) (js : Tape 7 6 → Center S) :

      The tableau variable of a spec at step t and window js.

      Equations
      Instances For
        noncomputable def MIPRE.TM.CookLevin.Desc.Tpl.clause {S G : ℕ} (t : Fin S) (js : Tape 7 6 → Center S) (tp : Tpl) :

        The clause of a template at step t and window js.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          theorem MIPRE.TM.CookLevin.Desc.gateClauses_eq_templates {S G : ℕ} (t : Fin S) (js : Tape 7 6 → Center S) (g : ℕ) (gate : SAT.Gate) :
          SAT.gateClauses (inpOf t js) (auxOf t js) (auxOf t js g) gate = List.map (Tpl.clause t js) (gateTemplates g gate)
          theorem MIPRE.TM.CookLevin.Desc.third_of_templates (g : ℕ) (gate : SAT.Gate) (tp : Tpl) (h : tp ∈ gateTemplates g gate) :
          tp.2.2.1 = LitSpec.aux g

          The third spec of every template of gate g is the gate itself.

          theorem MIPRE.TM.CookLevin.Desc.spec_of_templates (g : ℕ) (gate : SAT.Gate) (tp : Tpl) (h : tp ∈ gateTemplates g gate) (sp : LitSpec) (hsp : sp = tp.1.1 ∨ sp = tp.2.1.1 ∨ sp = tp.2.2.1) :
          (∃ (u : ℕ), sp = LitSpec.aux u ∧ (u = g ∨ u ∈ gate.refs)) ∨ ∃ (i : ℕ), sp = LitSpec.win i ∧ gate = SAT.Gate.input i

          A spec of a template of gate g is the gate, a gate it reads, or the input it reads.

          Matching a spec against the gate literal #

          The record F denotes the window variable wv of the window of the record Fa (a gate variable: its time and centers are Fa.t, Fa.js).

          Equations
          Instances For

            The record F denotes the variable of the spec, relative to the gate record Fa.

            Equations
            Instances For
              theorem MIPRE.TM.CookLevin.Desc.winMatch_iff (e G : ℕ) {Fa : Fields} {t : Fin (Sof e)} {js : Tape 7 6 → Center (Sof e)} (ht : Fa.t = ↑t) (hjs : ∀ (d : Tape 7 6), Fa.js ⟨tapeCode d, ⋯⟩ = ↑(js d)) (wv : WinVar 7 6 Interp.Sym Interp.Ctl) (F : Fields) :
              WinMatch e Fa wv F ↔ decodeVar e G F = some (winVarOf t js wv)
              theorem MIPRE.TM.CookLevin.Desc.specMatch_aux_iff (e G : ℕ) {Fa : Fields} {t : Fin (Sof e)} {js : Tape 7 6 → Center (Sof e)} (ht : Fa.t = ↑t) (hjs : ∀ (d : Tape 7 6), Fa.js ⟨tapeCode d, ⋯⟩ = ↑(js d)) (u : ℕ) (hu : u < G) (F : Fields) :
              SpecMatch e G Fa (LitSpec.aux u) F ↔ decodeVar e G F = some (specVar t js (LitSpec.aux u))
              theorem MIPRE.TM.CookLevin.Desc.specMatch_win_iff (e G : ℕ) {Fa : Fields} {t : Fin (Sof e)} {js : Tape 7 6 → Center (Sof e)} (ht : Fa.t = ↑t) (hjs : ∀ (d : Tape 7 6), Fa.js ⟨tapeCode d, ⋯⟩ = ↑(js d)) (n : ℕ) (hn : n < winCard 7 6 Interp.Sym Interp.Ctl) (F : Fields) :
              SpecMatch e G Fa (LitSpec.win n) F ↔ decodeVar e G F = some (specVar t js (LitSpec.win n))

              The window predicate #

              The candidate matches the template, its third record being the gate literal.

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

                The candidate matches a template of some gate of chk.

                Equations
                Instances For

                  The candidate is the output unit clause of a window.

                  Equations
                  Instances For
                    theorem MIPRE.TM.CookLevin.Desc.spec_lt (chk : SAT.Circuit) (hC : chk.RefsLt) (hin : chk.InputsLt) (hinp : chk.inputs = winCard 7 6 Interp.Sym Interp.Ctl) (g : Fin chk.gates.length) (tp : Tpl) (h : tp ∈ gateTemplates (↑g) chk.gates[g]) (sp : LitSpec) (hsp : sp = tp.1.1 ∨ sp = tp.2.1.1 ∨ sp = tp.2.2.1) :
                    (∃ (u : ℕ), sp = LitSpec.aux u ∧ u < chk.gates.length) ∨ ∃ (i : ℕ), sp = LitSpec.win i ∧ i < winCard 7 6 Interp.Sym Interp.Ctl

                    The specs of a template of a gate of chk are in range.

                    theorem MIPRE.TM.CookLevin.Desc.specMatch_iff (e : ℕ) (chk : SAT.Circuit) (hC : chk.RefsLt) (hin : chk.InputsLt) (hinp : chk.inputs = winCard 7 6 Interp.Sym Interp.Ctl) {Fa : Fields} {t : Fin (Sof e)} {js : Tape 7 6 → Center (Sof e)} (ht : Fa.t = ↑t) (hjs : ∀ (d : Tape 7 6), Fa.js ⟨tapeCode d, ⋯⟩ = ↑(js d)) (g : Fin chk.gates.length) (tp : Tpl) (h : tp ∈ gateTemplates (↑g) chk.gates[g]) (sp : LitSpec) (hsp : sp = tp.1.1 ∨ sp = tp.2.1.1 ∨ sp = tp.2.2.1) (F : Fields) :
                    SpecMatch e chk.gates.length Fa sp F ↔ decodeVar e chk.gates.length F = some (specVar t js sp)
                    theorem MIPRE.TM.CookLevin.Desc.windowPred_iff (e : ℕ) (chk : SAT.Circuit) (hC : chk.RefsLt) (hin : chk.InputsLt) (hinp : chk.inputs = winCard 7 6 Interp.Sym Interp.Ctl) (hne : chk.gates ≠ []) (c : Cand) :
                    WindowPred e chk.gates.length chk c ↔ ∃ cl ∈ windowClauses (Sof e) chk, Cand.Dec e chk.gates.length c cl

                    The window family is exact: a candidate satisfies WindowPred iff it decodes to a window clause of the tableau.

                    The whole tableau #

                    theorem MIPRE.TM.CookLevin.Desc.tableau_dec_iff (e : ℕ) (fixed : Fin 7 → Option (List Interp.Sym)) (chk : SAT.Circuit) (hC : chk.RefsLt) (hin : chk.InputsLt) (hinp : chk.inputs = winCard 7 6 Interp.Sym Interp.Ctl) (hne : chk.gates ≠ []) (c : Cand) :
                    MainPred e fixed c ∨ WindowPred e chk.gates.length chk c ↔ ∃ cl ∈ tableau Interp.U Interp.Sym.zero Interp.Sym.one (Sof e) fixed chk, Cand.Dec e chk.gates.length c cl

                    The candidate decodes to a clause of the tableau iff it satisfies one of the family predicates.