Documentation

DescriptiveComplexity.Problems.Wide.NexRun

The clocked program's whole run, and its clock #

The two halves are counted separately – the opening and the evaluation (DescriptiveComplexity.Draw.Data.nexEval_reachesIn) – and this file puts them together and compares the sum with the clock.

The opening is DescriptiveComplexity.Draw.Data.reachesIn_openingRegion, here: the approach walk up to the file's base, the file-laying sweep, and the guess along the region below the file – one bit per address, which is what the guessed relations are – for 2·R + 2·base + (the guessed stretch out and back) + 4, and openingRegion_le bounds that by the number of addresses.

Two things are worth naming. The presentation bridge: the opening is stated with the tape walked along the mirror track and the evaluation along VAL, and the two are the same tape whenever both marks are the background's own (DescriptiveComplexity.Draw.trackTape_of_back), so the caller hands that equality over rather than either run being restated. And the arithmetic: the total is «opening + rounds × width», which is mul_add_lt_two_pow's shape – so what the clock asks is that the opening and each of the evaluation's two factors fit the region, with one surplus block of slack for the additive term. The opening is a bare number there (nexTotal_lt_two_pow), so either shape of it is compared the same way.

The initial end is here as well, and it is three small facts. DescriptiveComplexity.Draw.Prog.trackTapeAt_initBack says the all-blank tape is the pass-layer presentation at any file – which a clocked program needs, because its file does not exist at time zero – and DescriptiveComplexity.Draw.Data.startBack with startBack_frame / startBack_wr is the background the opening's first step leaves: the one it started from with the marker planted, which is the frame condition and the write that step asks for.

The forward direction lands here too (nexProg_wideAccept): an accepting run of fewer than 2 ^ n steps from the initial configuration is a yes-instance of DescriptiveComplexity.WideAccept. Two of its hypotheses are rfl at the assembled program, and that is the point of the program declining the input channel's marks: with mark the blank, the tape is blank everywhere at time zero and the channel's ruler is not there to be mistaken for a register (trackTape_blank_congr for the presentations).

The backward direction's foundation is here as well: nexProg_sepOn – the program separates at every post-guess phase, across sites by the owner map and within a site by nexSep_postGuess – and nexProg_uniqueFrom, which is what a reduction reads its certificate off an arbitrary accepting run with. The fact it stands on – that the evaluation's rules never leave the post-guess phases – is proved, not assumed: nexEvalRuleF_postGuess, and under it a chain of «this machinery leaves only into its own phases or its exit» lemmas, one per builder, down to the trips.

theorem DescriptiveComplexity.Draw.Data.reachesIn_nexTotal {A : Type} {M : TMData A} {o e : } {c₀ c₁ c₂ c₃ : Config A} (hopen : M.ReachesIn o c₀ c₁) (heval : M.ReachesIn e c₁ c₂) (hexit : M.Step c₂ c₃) :
M.ReachesIn (o + e + 1) c₀ c₃

The clocked program's run, summed: the opening, the evaluation and the step that leaves it. Nothing here is about the program – the three legs are the caller's – and what it records is the arithmetic: an opening of o, an evaluation of e, and one step to accept.

Dependency graph
theorem DescriptiveComplexity.Draw.Data.trackTape_ixBack_congr {L : FirstOrder.Language} {dt : Data L} {A R' P' I : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [LinearOrder R'] [LinearOrder P'] [FirstOrder.Language.wide.Structure (Univ A R' P' dt.KIx dt.dd)] {PR : Prog A R' P' dt.CtlIx dt.SlotIx dt.KIx dt.dd} {F : LaidFile dt A R' P' I} {st : TapeSt dt A R' P' I} {t t' : dt.SlotIx} {m m' : IProp} (hm : ∀ (r : Univ A R' P' dt.KIx dt.ddProp), dt.ixBack F.toLayout PR.zero PR.one st r t = bitVal PR.zero PR.one (bitAtOf F.cell m r)) (hm' : ∀ (r : Univ A R' P' dt.KIx dt.ddProp), dt.ixBack F.toLayout PR.zero PR.one st r t' = bitVal PR.zero PR.one (bitAtOf F.cell m' r)) :
PR.trackTapeAt F.cell t (dt.ixBack F.toLayout PR.zero PR.one st) m = PR.trackTapeAt F.cell t' (dt.ixBack F.toLayout PR.zero PR.one st) m'

Two presentations of one tape: a run stated along a track whose digits the background already carries is the same tape as one stated along another such track, so a leg walking the mirror composes with a leg walking VAL without either being restated.

Dependency graph
theorem DescriptiveComplexity.Draw.Data.trackTape_ixBack_mir_val {L : FirstOrder.Language} {dt : Data L} {A R' P' I : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [LinearOrder R'] [LinearOrder P'] [FirstOrder.Language.wide.Structure (Univ A R' P' dt.KIx dt.dd)] {PR : Prog A R' P' dt.CtlIx dt.SlotIx dt.KIx dt.dd} {F : LaidFile dt A R' P' I} {st : TapeSt dt A R' P' I} :
PR.trackTapeAt F.cell Slot.mir (dt.ixBack F.toLayout PR.zero PR.one st) st.mir = PR.trackTapeAt F.cell Slot.val (dt.ixBack F.toLayout PR.zero PR.one st) st.val

The mirror and VAL presentations agree: the opening walks the mirror and the evaluation walks VAL, and both marks are the state's own, so the two runs compose with no rewriting in between.

Dependency graph
theorem DescriptiveComplexity.Draw.Data.trackTape_ixBack_mir_empty_val {L : FirstOrder.Language} {dt : Data L} {A R' P' I : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [LinearOrder R'] [LinearOrder P'] [FirstOrder.Language.wide.Structure (Univ A R' P' dt.KIx dt.dd)] {PR : Prog A R' P' dt.CtlIx dt.SlotIx dt.KIx dt.dd} {F : LaidFile dt A R' P' I} {st : TapeSt dt A R' P' I} (hmir : st.mir = fun (x : I) => False) :
(PR.trackTapeAt F.cell Slot.mir (dt.ixBack F.toLayout PR.zero PR.one st) fun (x : I) => False) = PR.trackTapeAt F.cell Slot.val (dt.ixBack F.toLayout PR.zero PR.one st) st.val

The opening leaves the tape the evaluation starts from: the opening walks the mirror at the empty mark, the evaluation walks VAL at the state's own, and the state whose mirror is empty presents the same tape either way. This is the one rewrite between reachesIn_openingRegion and DescriptiveComplexity.Draw.Data.nexIxEvalB_reachesIn.

Dependency graph
theorem DescriptiveComplexity.Draw.Data.config_openingEnd_eq_evalStart {L : FirstOrder.Language} {dt : Data L} {A R' P' I : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [LinearOrder R'] [LinearOrder P'] [FirstOrder.Language.wide.Structure (Univ A R' P' dt.KIx dt.dd)] {PR : Prog A R' P' dt.CtlIx dt.SlotIx dt.KIx dt.dd} {F : LaidFile dt A R' P' I} {st : TapeSt dt A R' P' I} (hmir : st.mir = fun (x : I) => False) (p : P') (f : dt.CtlIxA) (w : Univ A R' P' dt.KIx dt.ddProp) :
{ state := Sum.inr (PR.stElt p f), head := Sum.inl w, tape := wideTape (PR.trackTapeAt F.cell Slot.mir (dt.ixBack F.toLayout PR.zero PR.one st) fun (x : I) => False) (PR.syElt PR.blank) } = { state := Sum.inr (PR.stElt p f), head := Sum.inl w, tape := wideTape (PR.trackTapeAt F.cell Slot.val (dt.ixBack F.toLayout PR.zero PR.one st) st.val) (PR.syElt PR.blank) }

The opening's last configuration is the evaluation's first: same phase, same head, and the same tape – the opening presents it along the mirror at the empty mark, the evaluation along VAL at the state's own, and a state whose mirror is empty presents both the same way. This is the junction of the two legs: with it the whole run is hopen.trans heval, and DescriptiveComplexity.Draw.Data.nexProg_wideAccept_of_legs does the clock.

Dependency graph
theorem DescriptiveComplexity.Draw.Data.trackTape_blank_congr {L : FirstOrder.Language} {dt : Data L} {A R' P' I : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] {PR : Prog A R' P' dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I' : Type} {cell : IUniv A R' P' dt.KIx dt.ddProp} {cell' : I'Univ A R' P' dt.KIx dt.ddProp} {t t' : dt.SlotIx} {rest rest' : (Univ A R' P' dt.KIx dt.ddProp)dt.SlotIxA} (hrest : ∀ (r : Univ A R' P' dt.KIx dt.ddProp), rest r = PR.blank) (hrest' : ∀ (r : Univ A R' P' dt.KIx dt.ddProp), rest' r = PR.blank) (hb : PR.blank t = PR.zero) (hb' : PR.blank t' = PR.zero) :
(PR.trackTapeAt cell t rest fun (x : I) => False) = PR.trackTapeAt cell' t' rest' fun (x : I') => False

A blank tape is any presentation of the blank background: a program that declines the input channel's marks starts with every cell blank, and that tape is what a run stated along any clear track begins from. This is the bridge between the initial configuration (DescriptiveComplexity.Draw.Prog.wideAccept_prog presents it along the channel's file) and the opening's own presentation along the mirror.

Dependency graph
theorem DescriptiveComplexity.Draw.Data.trackTape_empty_congr {L : FirstOrder.Language} {dt : Data L} {A R' P' I : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] {PR : Prog A R' P' dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I' : Type} {cell : IUniv A R' P' dt.KIx dt.ddProp} {cell' : I'Univ A R' P' dt.KIx dt.ddProp} {t : dt.SlotIx} {rest : (Univ A R' P' dt.KIx dt.ddProp)dt.SlotIxA} :
(PR.trackTapeAt cell t rest fun (x : I) => False) = PR.trackTapeAt cell' t rest fun (x : I') => False

A tape walked along an empty track does not depend on which file presents it: the only cell-dependent part of the presentation is the bit at the walked mark, and an empty mark has none. This is the bridge a program handed its file needs, where trackTape_blank_congr is the one a program starting on a blank tape needs: there the background is the blank, here it is the channel's own marks, and neither is read by the presentation.

Dependency graph

The opening, with the guess over the region #

noncomputable def DescriptiveComplexity.Draw.Data.startBack {L : FirstOrder.Language} {dt : Data L} {A R' PE : Type} [DecidableEq dt.SlotIx] (bg : (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)dt.SlotIxA) (one : A) (v : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp) :
(Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)dt.SlotIxA

The background the opening's first step leaves: the one it started from, with the marker planted at the address the head is on. A clocked program starts on a blank tape, so this – with DescriptiveComplexity.Draw.Prog.initBack for the background – is what its opening runs from.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Dependency graph
    theorem DescriptiveComplexity.Draw.Data.startBack_frame {L : FirstOrder.Language} {dt : Data L} {A R' PE : Type} [DecidableEq dt.SlotIx] {bg : (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)dt.SlotIxA} {one : A} {v r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp} (hr : r v) :
    startBack bg one v r = bg r

    Planting the marker changes nothing elsewhere: the frame condition of the opening's first step.

    Dependency graph
    theorem DescriptiveComplexity.Draw.Data.startBack_wr {L : FirstOrder.Language} {dt : Data L} {A R' PE : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] {PR : Prog A R' (NexPh (Option dt.KIx) PE) dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I : Type} (cell : IUniv A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp) {bg : (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)dt.SlotIxA} (v : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp) :
    PR.passTracksAt cell Slot.mir (startBack bg PR.one v) (fun (x : I) => False) v = Function.update (Function.update (PR.passTracksAt cell Slot.mir bg (fun (x : I) => False) v) Slot.wk PR.one) Slot.bot PR.one

    Planting the two marks is the write the opening's first step makes: at the address the head is on, the presentation with them is the presentation without them, updated at the marker slot and at the bottom mark's.

    Dependency graph

    The state a clocked program starts in #

    Its first step plants the marker at the empty address and nothing else has been written, so the state is clear but for the marker – and its background is the blank tape everywhere off the file, which is what the opening's frame hypotheses (hbelow, habove, hwr) ask of the caller.

    noncomputable def DescriptiveComplexity.Draw.Data.nexEntrySt {L : FirstOrder.Language} (dt : Data L) {A R' PE I : Type} (v : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp) :
    TapeSt dt A R' (NexPh (Option dt.KIx) PE) I

    The state a clocked program enters its opening in: every register and every track clear, the marker and the bottom mark at the address the head stands on – the two the opening's first step writes, and the two the evaluation's walks read.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph
      theorem DescriptiveComplexity.Draw.Data.reachesIn_openingRegion {L : FirstOrder.Language} {dt : Data L} {A R' PE SE : Type} {ShE : SEType} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [LinearOrder R'] [Nonempty A] [Finite A] [Finite R'] [Finite dt.KIx] [LinearOrder (NexPh (Option dt.KIx) PE)] [Finite (NexPh (Option dt.KIx) PE)] [FirstOrder.Language.wide.Structure (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] [Finite (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] {PR : Prog A R' (NexPh (Option dt.KIx) PE) dt.CtlIx dt.SlotIx dt.KIx dt.dd} {coord : Fin dt.dddt.CtlIx} {f₀ : dt.CtlIxA} {ruleE : (e : SE) → ShE eRule A dt.CtlIx dt.SlotIx (NexPh (Option dt.KIx) PE)} {evalEntry : PE} (hcoord : Function.Injective coord) (hR : PR.table.Reads) (h : IsLinOrd WMLe) {base : } (hpos : 0 < base) (hbase : base + Nat.card (Wide.BlkIx dt.KIx A dt.dd) < Nat.card { p : WPoint (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd) // (wideData (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)).Posn p }) {st : TapeSt dt A R' (NexPh (Option dt.KIx) PE) (Wide.BlkIx dt.KIx A dt.dd)} (hmir : ∀ (u : Wide.BlkIx dt.KIx A dt.dd), ¬st.mir u) (htgt : ∀ (u : Wide.BlkIx dt.KIx A dt.dd), ¬st.tgt u) (hsav : ∀ (u : Wide.BlkIx dt.KIx A dt.dd), ¬st.sav u) (hval : ∀ (u : Wide.BlkIx dt.KIx A dt.dd), ¬st.val u) (hwk : ∀ (v : Wide.BlkIx dt.KIx A dt.dd), ¬st.wk ((dt.blkLaid h hpos ).cell v)) (hbotR : ∀ (v : Wide.BlkIx dt.KIx A dt.dd), ¬st.bot ((dt.blkLaid h hpos ).cell v)) (hltp : ∀ (v : Wide.BlkIx dt.KIx A dt.dd), ¬st.ltp ((dt.blkLaid h hpos ).cell v)) (hold : ∀ (i : dt.d.B.ι) (v : Wide.BlkIx dt.KIx A dt.dd), ¬st.old i ((dt.blkLaid h hpos ).cell v)) (hnew : ∀ (i : dt.d.B.ι) (v : Wide.BlkIx dt.KIx A dt.dd), ¬st.new i ((dt.blkLaid h hpos ).cell v)) {v v' v₁ x s₀ top : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp} (hwkS : st.wk = fun (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp) => r = v) (hv0 : wideRank v = 0) (hle : WMSetLe WMLe v ((dt.blkLaid h hpos ).cell (blkTop A dt.KIx dt.dd))) (hvi₁ : WMIncr WMLe v v₁) (hwalk : WMSetLe WMLe v₁ x) (hxb : WMIncr WMLe x ((dt.blkLaid h hpos ).cell (blkBot A dt.KIx dt.dd))) (hs₀ : WMIncr WMLe v s₀) (hvi' : WMIncr WMLe v v') {bg bg₀ : (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)dt.SlotIxA} (hframe : ∀ (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp), r vbg₀ r = bg r) (hwr : PR.passTracksAt (dt.blkLaid h hpos ).cell Slot.mir bg₀ (fun (x : Wide.BlkIx dt.KIx A dt.dd) => False) v = Function.update (Function.update (PR.passTracksAt (dt.blkLaid h hpos ).cell Slot.mir bg (fun (x : Wide.BlkIx dt.KIx A dt.dd) => False) v) Slot.wk PR.one) Slot.bot PR.one) (hbelow : ∀ (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp), WMSetLt WMLe r ((dt.blkLaid h hpos ).cell (blkBot A dt.KIx dt.dd))dt.ixBack (dt.blkLaid h hpos ).toLayout PR.zero PR.one st r = bg₀ r) (habove : ∀ (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp), ¬WMSetLt WMLe r (ixSegTop (Wide.BlkIx dt.KIx A dt.dd) h base)dt.ixBack (dt.blkLaid h hpos ).toLayout PR.zero PR.one st r = bg₀ r) (σ : dt.d.B.ι(Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)Prop) (htop : WMSetLe WMLe s₀ top) (htopne : ∃ (y : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd), top y) (hout : ∀ (i : dt.d.B.ι) (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp), WMSetLt WMLe r s₀ ¬WMSetLt WMLe r top → (σ i r st.old i r)) (hexB : dt.exitG PR.one (PR.passTracksAt (dt.blkLaid h hpos ).cell Slot.mir (dt.ixBack (dt.blkLaid h hpos ).toLayout PR.zero PR.one st) (fun (x : Wide.BlkIx dt.KIx A dt.dd) => False) v)) (hexG : dt.exitG PR.one (PR.passTracksAt (dt.blkLaid h hpos ).cell Slot.mir (dt.ixBack (dt.blkLaid h hpos ).toLayout PR.zero PR.one { mir := st.mir, tgt := st.tgt, sav := st.sav, val := st.val, old := σ, new := st.new, wk := st.wk, bot := st.bot, ltp := st.ltp }) (fun (x : Wide.BlkIx dt.KIx A dt.dd) => False) v)) {rEmb0 : (i : NexSite SE) → NexSh SE (Option dt.KIx) (dt.d.B.ιBool) ShE iR'} (hrules0 : ∀ (i : NexSite SE) (ρ : NexSh SE (Option dt.KIx) (dt.d.B.ιBool) ShE i), PR.rules (rEmb0 i ρ) = dt.nexRule PR.one (dt.buildSpec PR.zero PR.one coord) (dt.regionSpec PR.zero PR.one) ruleE evalEntry (blkBot A dt.KIx dt.dd).1 i ρ) :
      (wideData (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)).ReachesIn (2 * Nat.card (Wide.BlkIx dt.KIx A dt.dd) + 2 * base + (wideRank top - wideRank s₀ + wideRank top) + 4) { state := Sum.inr (PR.stElt NexPh.start (dt.ctlOf coord f₀ (blkBot A dt.KIx dt.dd).2)), head := Sum.inl v, tape := wideTape (PR.trackTapeAt (dt.blkLaid h hpos ).cell Slot.mir bg fun (x : Wide.BlkIx dt.KIx A dt.dd) => False) (PR.syElt PR.blank) } { state := Sum.inr (PR.stElt (NexPh.evalP evalEntry) (dt.ctlOf coord f₀ (blkBot A dt.KIx dt.dd).2)), head := Sum.inl v', tape := wideTape (PR.trackTapeAt (dt.blkLaid h hpos ).cell Slot.mir (dt.ixBack (dt.blkLaid h hpos ).toLayout PR.zero PR.one { mir := st.mir, tgt := st.tgt, sav := st.sav, val := st.val, old := σ, new := st.new, wk := st.wk, bot := st.bot, ltp := st.ltp }) fun (x : Wide.BlkIx dt.KIx A dt.dd) => False) (PR.syElt PR.blank) }

      The clocked program's opening: the opening step, the approach walk up to the file's base, the file-laying phase, the walk home with the turn into the guess, the region-wide guess with its stop and its own walk home, and the dispatch into the evaluation.

      The file is laid above the program's data and the certificate is guessed below it, which is what lets a stage atom seek to a dictionary entry: the entry is a logical address and every logical address is below every register. The approach is the price of that arrangement – the base is not the marker's neighbor, so getting there is a walk and not a step – and where it stops is the program's choice, a machine having no landmark but the cell it started on.

      Dependency graph

      What the guess writes #

      The stage tracks a clocked program guesses are an assignment's, restricted to the stretch the guess sweeps – the file's first register up to the end marker. Restricting them is what makes the opening's frame condition true (outside that stretch the tracks are the entry state's, which is empty), and it costs the dictionary nothing, since every entry the evaluation reads is inside the stretch (a track marks no empty address, nonempty_of_trackOf).

      def DescriptiveComplexity.Draw.Data.guessTracks {L : FirstOrder.Language} (dt : Data L) {A R' PE : Type} [LinearOrder A] [L.Structure A] [FirstOrder.Language.wide.Structure (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] (zero one : A) (σ : dt.d.B.Assignment (dt.X.Map A)) (bot top : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp) :
      dt.d.B.ι(Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)Prop

      The tracks the guess writes: an assignment's, inside the swept stretch.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.not_guessTracks_out {L : FirstOrder.Language} {dt : Data L} {A R' PE : Type} [LinearOrder A] [L.Structure A] [FirstOrder.Language.wide.Structure (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] [Finite (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] (h : IsLinOrd WMLe) {zero one : A} {σ : dt.d.B.Assignment (dt.X.Map A)} {bot top r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp} (hr : WMSetLt WMLe r bot ¬WMSetLt WMLe r top) (iv : dt.d.B.ι) :
        ¬dt.guessTracks zero one σ bot top iv r

        Outside the swept stretch the guess writes nothing – the opening's hout, at tracks that are an assignment's inside it.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.guessTracks_iff_of_lt {L : FirstOrder.Language} {dt : Data L} {A R' PE : Type} [LinearOrder A] [L.Structure A] [FirstOrder.Language.wide.Structure (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] [Finite (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] (h : IsLinOrd WMLe) {zero one : A} {σ : dt.d.B.Assignment (dt.X.Map A)} {s₀ top s : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp} (hs₀ : WMIncr WMLe (fun (x : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd) => False) s₀) (harity : ∀ (iv : dt.d.B.ι), 0 < dt.d.B.arity iv) (hhi : WMSetLt WMLe s top) (iv : dt.d.B.ι) :
        dt.guessTracks zero one σ s₀ top iv s trackOf dt.ly zero one σ s

        Below the guess's top the tracks are the assignment's, and nothing has to be said about the bottom: a track marks no empty address (nonempty_of_trackOf), so an address it marks is at or above the marker's neighbor by wmSetLe_succ_bot_of_nonempty, which is where the guess begins. This is the hdict an evaluation asks for, and it asks of the data only what wmSetLt_ixStageTgt_logicalTop already proves: that a dictionary address is below the last logical one.

        What it asks of the reduction is that every fixed-point variable have an argument. A nullary one has the empty address for its entry, which is the marker's own cell and below every stretch the machine writes; padding its relation with a dummy argument costs nothing and is the intended reading.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.guessTracks_hdict_of_old {L : FirstOrder.Language} {dt : Data L} {A R' PE : Type} [LinearOrder A] [L.Structure A] [FirstOrder.Language.wide.Structure (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] [Finite (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] {I : Type} (h : IsLinOrd WMLe) {zero one : A} {σ : dt.d.B.Assignment (dt.X.Map A)} {s₀ top s : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp} {st : TapeSt dt A R' (NexPh (Option dt.KIx) PE) I} (hst : st.old = dt.guessTracks zero one σ s₀ top) (hs₀ : WMIncr WMLe (fun (x : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd) => False) s₀) (harity : ∀ (iv : dt.d.B.ι), 0 < dt.d.B.arity iv) (hhi : WMSetLt WMLe s top) (iv : dt.d.B.ι) :
        st.old iv s trackOf dt.ly zero one σ s

        The dictionary the evaluation reads, off a tape state: the same reading as guessTracks_iff_of_lt, at a state whose stage tracks are the guess's. Every leg of the spine leaves them alone (ixSpineStOfB_old), so this is what the evaluation's hdict is discharged by, at whatever program and whatever rule names the reduction runs – nothing here mentions either.

        Dependency graph

        The opening of a program that is handed its file #

        A program handed its file has nothing to lay: its file-laying phase is the two steps of nullSpec and the rest of the opening is the same. So the whole opening is stated here at an arbitrary file – the five steps of NexBuild's AnyFile section, the sweep that is over at once, the two walks home and the guess, which was generic already. Nothing of the file is read but its cells.

        theorem DescriptiveComplexity.Draw.Data.reachesIn_openingHanded {L : FirstOrder.Language} {dt : Data L} {A R' PE SE : Type} {ShE : SEType} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [LinearOrder R'] [Finite A] [Finite R'] [Finite dt.KIx] [LinearOrder (NexPh (Option dt.KIx) PE)] [Finite (NexPh (Option dt.KIx) PE)] [FirstOrder.Language.wide.Structure (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] [Finite (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] {PR : Prog A R' (NexPh (Option dt.KIx) PE) dt.CtlIx dt.SlotIx dt.KIx dt.dd} {ruleE : (e : SE) → ShE eRule A dt.CtlIx dt.SlotIx (NexPh (Option dt.KIx) PE)} {evalEntry : PE} {I : Type} {F : LaidFile dt A R' (NexPh (Option dt.KIx) PE) I} {betaS : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {botS : Option dt.KIx} (hR : PR.table.Reads) (h : IsLinOrd WMLe) {st : TapeSt dt A R' (NexPh (Option dt.KIx) PE) I} {v : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp} (hwkS : st.wk = fun (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp) => r = v) {v₁ x y y' s₀ s₁ v' : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp} (hvi₁ : WMIncr WMLe v v₁) (hwalk : WMSetLe WMLe v₁ x) (hxy : WMIncr WMLe x y) (hyy' : WMIncr WMLe y y') (hyv : WMSetLe WMLe v y) (hvs₀ : WMIncr WMLe v s₀) (hle : WMSetLe WMLe s₀ s₁) (hne₁ : ∃ (z : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd), s₁ z) (hvv' : WMIncr WMLe v v') {bg bg₀ : (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)dt.SlotIxA} (hframe : ∀ (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp), r vbg₀ r = bg r) (hwr : PR.passTracksAt F.cell Slot.mir bg₀ (fun (x : I) => False) v = Function.update (Function.update (PR.passTracksAt F.cell Slot.mir bg (fun (x : I) => False) v) Slot.wk PR.one) Slot.bot PR.one) (hback : bg₀ = dt.ixBack F.toLayout PR.zero PR.one st) (f : dt.CtlIxA) (hroll : betaS.Roll botS f) (hdone : betaS.Done botS f) (hstRoll : betaS.stRoll botS f (PR.passTracksAt F.cell Slot.mir bg₀ (fun (x : I) => False) y) = f) (hwrS : betaS.wr botS f (PR.passTracksAt F.cell Slot.mir bg₀ (fun (x : I) => False) y) = PR.passTracksAt F.cell Slot.mir bg₀ (fun (x : I) => False) y) (hexB : dt.exitG PR.one (PR.passTracksAt F.cell Slot.mir bg₀ (fun (x : I) => False) v)) (σ : dt.d.B.ι(Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp)Prop) (hout : ∀ (i : dt.d.B.ι) (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp), WMSetLt WMLe r s₀ ¬WMSetLt WMLe r s₁ → (σ i r st.old i r)) (hexG : dt.exitG PR.one (PR.passTracksAt F.cell Slot.mir (dt.ixBack F.toLayout PR.zero PR.one { mir := st.mir, tgt := st.tgt, sav := st.sav, val := st.val, old := σ, new := st.new, wk := st.wk, bot := st.bot, ltp := st.ltp }) (fun (x : I) => False) v)) {rEmbS : (i : NexSite SE) → NexSh SE (Option dt.KIx) (dt.d.B.ιBool) ShE iR'} (hrulesS : ∀ (i : NexSite SE) (ρ : NexSh SE (Option dt.KIx) (dt.d.B.ιBool) ShE i), PR.rules (rEmbS i ρ) = dt.nexRule PR.one betaS (dt.regionSpec PR.zero PR.one) ruleE evalEntry botS i ρ) {rHomeB rHomeG : HomeKit.HomeRuleR'} (hrulesHB : ∀ (ρ : HomeKit.HomeRule), PR.rules (rHomeB ρ) = { t := Slot.mir, wk := Slot.wk, ph := NexPh.homeBuildP }.rule PR.one ρ) (hrulesHG : ∀ (ρ : HomeKit.HomeRule), PR.rules (rHomeG ρ) = { t := Slot.mir, wk := Slot.wk, ph := NexPh.homeGuessP }.rule PR.one ρ) :
        (wideData (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)).ReachesIn (wideRank x - wideRank v₁ + (wideRank y - wideRank v) + (wideRank s₁ - wideRank s₀ + (wideRank s₁ - wideRank v)) + 7) { state := Sum.inr (PR.stElt NexPh.start f), head := Sum.inl v, tape := wideTape (PR.trackTapeAt F.cell Slot.mir bg fun (x : I) => False) (PR.syElt PR.blank) } { state := Sum.inr (PR.stElt (NexPh.evalP evalEntry) (betaS.st0 f (PR.passTracksAt F.cell Slot.mir bg₀ (fun (x : I) => False) v))), head := Sum.inl v', tape := wideTape (PR.trackTapeAt F.cell Slot.mir (dt.ixBack F.toLayout PR.zero PR.one { mir := st.mir, tgt := st.tgt, sav := st.sav, val := st.val, old := σ, new := st.new, wk := st.wk, bot := st.bot, ltp := st.ltp }) fun (x : I) => False) (PR.syElt PR.blank) }

        The whole opening of a program that is handed its file: plant the two marks, walk up, run the sweep that lays nothing, turn round, walk home, guess the certificate over the stretch, walk home again, and step into the evaluation. Its cost is the two walks up and back, the guess's stretch out and back, and six single steps.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.reachesIn_homeGuessTail {L : FirstOrder.Language} {dt : Data L} {A R' PE SE : Type} {ShE : SEType} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [LinearOrder R'] [Finite A] [Finite R'] [Finite dt.KIx] [LinearOrder (NexPh (Option dt.KIx) PE)] [Finite (NexPh (Option dt.KIx) PE)] [FirstOrder.Language.wide.Structure (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)] {PR : Prog A R' (NexPh (Option dt.KIx) PE) dt.CtlIx dt.SlotIx dt.KIx dt.dd} {ruleE : (e : SE) → ShE eRule A dt.CtlIx dt.SlotIx (NexPh (Option dt.KIx) PE)} {evalEntry : PE} {I : Type} {F : LaidFile dt A R' (NexPh (Option dt.KIx) PE) I} {betaS : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {botS : Option dt.KIx} (hR : PR.table.Reads) (h : IsLinOrd WMLe) {st : TapeSt dt A R' (NexPh (Option dt.KIx) PE) I} {v y v' : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp} (hwkS : st.wk = fun (r : Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.ddProp) => r = v) (hyv : WMSetLe WMLe v y) (hvv' : WMIncr WMLe v v') (f : dt.CtlIxA) (hexG : dt.exitG PR.one (PR.passTracksAt F.cell Slot.mir (dt.ixBack F.toLayout PR.zero PR.one st) (fun (x : I) => False) v)) {rEmbS : (i : NexSite SE) → NexSh SE (Option dt.KIx) (dt.d.B.ιBool) ShE iR'} (hrulesS : ∀ (i : NexSite SE) (ρ : NexSh SE (Option dt.KIx) (dt.d.B.ιBool) ShE i), PR.rules (rEmbS i ρ) = dt.nexRule PR.one betaS (dt.regionSpec PR.zero PR.one) ruleE evalEntry botS i ρ) {rHomeG : HomeKit.HomeRuleR'} (hrulesHG : ∀ (ρ : HomeKit.HomeRule), PR.rules (rHomeG ρ) = { t := Slot.mir, wk := Slot.wk, ph := NexPh.homeGuessP }.rule PR.one ρ) :
        (wideData (Univ A R' (NexPh (Option dt.KIx) PE) dt.KIx dt.dd)).ReachesIn (wideRank y - wideRank v + 1) { state := Sum.inr (PR.stElt NexPh.homeGuessP f), head := Sum.inl y, tape := wideTape (PR.trackTapeAt F.cell Slot.mir (dt.ixBack F.toLayout PR.zero PR.one st) fun (x : I) => False) (PR.syElt PR.blank) } { state := Sum.inr (PR.stElt (NexPh.evalP evalEntry) f), head := Sum.inl v', tape := wideTape (PR.trackTapeAt F.cell Slot.mir (dt.ixBack F.toLayout PR.zero PR.one st) fun (x : I) => False) (PR.syElt PR.blank) }

        The tail of the opening, from the walk home after the guess. The whole opening is a forward run, but a backward reading of an accepting run does not get the opening: it gets the first configuration the machine cannot leave, which is where the guess stopped and the walk home begins (DescriptiveComplexity.Draw.Data.exists_postGuess_shaped). From there on the run is forward again, and this is that piece: walk down to the marker from wherever the guess stopped, and step into the evaluation.

        Nothing of the guess is read here – the tracks are whatever the sweep left – so the same lemma serves the forward opening's last two steps and the backward reading's first.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.nexTotal_lt_two_pow {k j m o e a b : } (hkj : k + 1 < j) (hm : 0 < m) (he : e a * b) (ha : a 2 ^ (k * m)) (hb : b 2 ^ (k * m)) (hopen : o + 1 2 ^ (k * m)) :
        o + e + 1 < 2 ^ ((k + j) * m)

        The clock comparison: an opening of o steps, an evaluation of at most a · b, and the accepting step come to fewer than 2 ^ ((k + j) · m) as soon as each of a, b and o + 1 is at most 2 ^ (k · m) and j outruns k by two. The opening is left abstract: the file-laying one and the region-guessing one differ, and both are bounded by the number of addresses.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.nexTotal_lt_two_pow' {k j m o e a b : } (hk : 1 k) (hkj : k + 1 < j) (hm : 0 < m) (he : e a * b) (ha : a 2 ^ (k * m)) (hb : b 2 ^ (k * m)) (hopen : o + 1 2 ^ ((k + 1) * m)) :
        o + e + 1 < 2 ^ ((k + j) * m)

        The clock comparison, with the opening at twice the region: the shape a program that lays a file and guesses over the region actually meets – its opening is two sweeps, not a fraction of one. One working block is enough (1 ≤ k), and the rest is mul_add_lt_two_pow'.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.openingRegion_le_two_pow {A : Type} [Finite A] [FirstOrder.Language.wide.Structure A] {R base k m : } {top bot : AProp} (hm : 3 m) (htop : wideRank top + 1 2 ^ (k * m)) (hbase : base + 1 2 ^ (k * m)) (hfile : 2 * R + 5 2 ^ (k * m)) :
        2 * R + 2 * base + (wideRank top - wideRank bot + wideRank top) + 4 + 1 2 ^ ((k + 1) * m)

        The opening fits the region a few times over: the approach, the file's own stretch and the guess all stay inside the region, so with each of the program's numbers below the region's size 2 ^ (k · m) and a block worth at least eight addresses (3 ≤ m), the whole opening and the step that follows it are below 2 ^ ((k + 1) · m) – which is what DescriptiveComplexity.Draw.Data.nexTotal_lt_two_pow' asks of it. The region bound on a rank is wideRank_lt_two_pow_supported; the base is bounded the same way, being an address of the region like any other.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.openingRegion_le {A : Type} [Finite A] [FirstOrder.Language.wide.Structure A] (R base : ) (top bot : AProp) :
        2 * R + base + (wideRank top - wideRank bot + wideRank top) + 4 2 * R + base + 2 * Nat.card { p : WPoint A // (wideData A).Posn p } + 4

        The region-guessing opening is bounded by the addresses: its two sweeps are each shorter than the number of addresses, so the whole of it is 2 · R + base + 2 · N + 4 for N that number. This is the crude reading, above the clock; openingRegion_le_two_pow is the one a clocked program can pay.

        Dependency graph

        The forward direction at the assembled program #

        theorem DescriptiveComplexity.Draw.Data.nexProg_initBack {L : FirstOrder.Language} {dt : Data L} {A G : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [Finite A] [Finite dt.KIx] [Nonempty A] {zero one : A} [FirstOrder.Language.wide.Structure (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)] (hzo : zero one) (hpl : Fintype.card (dt.CtlIx dt.SlotIx) dt.dd) (coord : Fin dt.dddt.CtlIx) (β : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)) (γ : GuessSpec A dt.CtlIx dt.SlotIx (Option dt.KIx) G) (args : (v : dt.VarIx) → dt.VarArgs v) (bot : Option dt.KIx) :
        (dt.nexProg zero one hzo hpl coord β γ args bot).initBack = fun (x : Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.ddProp) (x_1 : dt.SlotIx) => zero

        A clocked program starts on a blank tape: it declines the input channel's marks – its mark is the blank – so its initial background is the constant blank, and the tape it starts on is the one its opening runs from whatever file it means to lay.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.nexProg_wideAccept {L : FirstOrder.Language} {dt : Data L} {A G : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [Finite A] [Finite dt.KIx] [Nonempty A] [LinearOrder (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] [Finite (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] {zero one : A} [LinearOrder dt.NexRIx] [Finite dt.NexRIx] [FirstOrder.Language.wide.Structure (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)] (hzo : zero one) (hpl : Fintype.card (dt.CtlIx dt.SlotIx) dt.dd) {coord : Fin dt.dddt.CtlIx} {β : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {γ : GuessSpec A dt.CtlIx dt.SlotIx (Option dt.KIx) G} {args : (v : dt.VarIx) → dt.VarArgs v} {bot : Option dt.KIx} (hR : (dt.nexProg zero one hzo hpl coord β γ args bot).table.Reads) (hlin : IsLinOrd WMLe) {n : } {cfg : Config (WPoint (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd))} (hreach : (wideData (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)).ReachesIn n { state := Sum.inr ((dt.nexProg zero one hzo hpl coord β γ args bot).stElt NexPh.start (dt.ctlOf coord (fun (x : dt.CtlIx) => zero) (blkBot A dt.KIx dt.dd).2)), head := Sum.inl fun (x : Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd) => False, tape := wideTape ((dt.nexProg zero one hzo hpl coord β γ args bot).trackTapeAt wmSeg Slot.mir (dt.nexProg zero one hzo hpl coord β γ args bot).initBack fun (x : Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd) => False) ((dt.nexProg zero one hzo hpl coord β γ args bot).syElt (dt.nexProg zero one hzo hpl coord β γ args bot).blank) } cfg) (hlt : n < 2 ^ Nat.card (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)) {fq : dt.CtlIxA} (hstate : cfg.state = Sum.inr ((dt.nexProg zero one hzo hpl coord β γ args bot).stElt NexPh.acceptP fq)) (hacc : (args none).accBit fq) :
        WideAccept.Holds (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)

        The clocked program's run makes its instance a yes-instance: an accepting run of fewer than 2 ^ n steps from the initial configuration – the head on the empty address, the tape blank because the program declines the channel's marks – is what DescriptiveComplexity.WideAccept asks for. Well-formedness comes free with the table and determinism is not asked for, which is exactly what a program that guesses needs.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.nexProg_wideAccept_of_legs {L : FirstOrder.Language} {dt : Data L} {A G : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [Finite A] [Finite dt.KIx] [Nonempty A] [LinearOrder (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] [Finite (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] {zero one : A} [LinearOrder dt.NexRIx] [Finite dt.NexRIx] [FirstOrder.Language.wide.Structure (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)] (hzo : zero one) (hpl : Fintype.card (dt.CtlIx dt.SlotIx) dt.dd) {coord : Fin dt.dddt.CtlIx} {β : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {γ : GuessSpec A dt.CtlIx dt.SlotIx (Option dt.KIx) G} {args : (v : dt.VarIx) → dt.VarArgs v} {bot : Option dt.KIx} (hR : (dt.nexProg zero one hzo hpl coord β γ args bot).table.Reads) (hlin : IsLinOrd WMLe) {o e a b k j m : } {c₁ c₂ c₃ : Config (WPoint (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd))} (hopen : (wideData (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)).ReachesIn o { state := Sum.inr ((dt.nexProg zero one hzo hpl coord β γ args bot).stElt NexPh.start (dt.ctlOf coord (fun (x : dt.CtlIx) => zero) (blkBot A dt.KIx dt.dd).2)), head := Sum.inl fun (x : Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd) => False, tape := wideTape ((dt.nexProg zero one hzo hpl coord β γ args bot).trackTapeAt wmSeg Slot.mir (dt.nexProg zero one hzo hpl coord β γ args bot).initBack fun (x : Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd) => False) ((dt.nexProg zero one hzo hpl coord β γ args bot).syElt (dt.nexProg zero one hzo hpl coord β γ args bot).blank) } c₁) (heval : (wideData (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)).ReachesIn e c₁ c₂) (hexit : (wideData (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)).Step c₂ c₃) (hk : 1 k) (hkj : k + 1 < j) (hm : 0 < m) (hcard : (k + j) * m Nat.card (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)) (he : e a * b) (ha : a 2 ^ (k * m)) (hb : b 2 ^ (k * m)) (hopenle : o + 1 2 ^ ((k + 1) * m)) {fq : dt.CtlIxA} (hstate : c₃.state = Sum.inr ((dt.nexProg zero one hzo hpl coord β γ args bot).stElt NexPh.acceptP fq)) (hacc : (args none).accBit fq) :
        WideAccept.Holds (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)

        The clocked program accepts, from its three legs: the opening, the evaluation and the step that leaves it, with the clock's arithmetic done once. What the two strands above owe is exactly what this asks: an opening of o steps with o + 1 below 2 ^ ((k + 1) · m) – two sweeps of the region, which is what laying the file and guessing over it costs – an evaluation of at most a · b with both factors below 2 ^ (k · m), and k + 1 < j with one working block; then the whole run is below 2 ^ ((k + j) · m), hence below the number of addresses (DescriptiveComplexity.Draw.Data.nexTotal_lt_two_pow').

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.nexProg_wideAccept_legs {L : FirstOrder.Language} {dt : Data L} {A G : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [Finite A] [Finite dt.KIx] [Nonempty A] [LinearOrder (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] [Finite (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] {zero one : A} [LinearOrder dt.NexRIx] [Finite dt.NexRIx] [FirstOrder.Language.wide.Structure (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)] (hzo : zero one) (hpl : Fintype.card (dt.CtlIx dt.SlotIx) dt.dd) {coord : Fin dt.dddt.CtlIx} {β : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {γ : GuessSpec A dt.CtlIx dt.SlotIx (Option dt.KIx) G} {args : (v : dt.VarIx) → dt.VarArgs v} {bot : Option dt.KIx} (hR : (dt.nexProg zero one hzo hpl coord β γ args bot).table.Reads) (hlin : IsLinOrd WMLe) {I : Type} {F : LaidFile dt A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) I} {st : TapeSt dt A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) I} (hmir : st.mir = fun (x : I) => False) {evalEntry : EvalPh dt.nv dt.PMF} {f₁ : dt.CtlIxA} {w : Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.ddProp} {o e : } (hopen : (wideData (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)).ReachesIn o { state := Sum.inr ((dt.nexProg zero one hzo hpl coord β γ args bot).stElt NexPh.start (dt.ctlOf coord (fun (x : dt.CtlIx) => zero) (blkBot A dt.KIx dt.dd).2)), head := Sum.inl fun (x : Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd) => False, tape := wideTape ((dt.nexProg zero one hzo hpl coord β γ args bot).trackTapeAt F.cell Slot.mir (fun (x : Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.ddProp) (x_1 : dt.SlotIx) => zero) fun (x : I) => False) ((dt.nexProg zero one hzo hpl coord β γ args bot).syElt (dt.nexProg zero one hzo hpl coord β γ args bot).blank) } { state := Sum.inr ((dt.nexProg zero one hzo hpl coord β γ args bot).stElt (NexPh.evalP evalEntry) f₁), head := Sum.inl w, tape := wideTape ((dt.nexProg zero one hzo hpl coord β γ args bot).trackTapeAt F.cell Slot.mir (dt.ixBack F.toLayout zero one st) fun (x : I) => False) ((dt.nexProg zero one hzo hpl coord β γ args bot).syElt (dt.nexProg zero one hzo hpl coord β γ args bot).blank) }) {cT : Config (WPoint (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd))} (heval : (wideData (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)).ReachesIn e { state := Sum.inr ((dt.nexProg zero one hzo hpl coord β γ args bot).stElt (NexPh.evalP evalEntry) f₁), head := Sum.inl w, tape := wideTape ((dt.nexProg zero one hzo hpl coord β γ args bot).trackTapeAt F.cell Slot.val (dt.ixBack F.toLayout zero one st) st.val) ((dt.nexProg zero one hzo hpl coord β γ args bot).syElt (dt.nexProg zero one hzo hpl coord β γ args bot).blank) } cT) {a b k j m : } (hk : 1 k) (hkj : k + 1 < j) (hm : 0 < m) (hcard : (k + j) * m Nat.card (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)) (he : e a * b) (ha : a 2 ^ (k * m)) (hb : b 2 ^ (k * m)) (hopenle : o + 1 2 ^ ((k + 1) * m)) {fq : dt.CtlIxA} (hstate : cT.state = Sum.inr ((dt.nexProg zero one hzo hpl coord β γ args bot).stElt NexPh.acceptP fq)) (hacc : (args none).accBit fq) :
        WideAccept.Holds (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)

        The clocked program accepts, from its opening and its evaluation: the two legs as they are actually proved – the opening from the state the program starts in, presented along the mirror at the file it lays, and the evaluation from the state the opening leaves, presented along VAL – with the two adjustments between them done here. There are exactly two: the initial tape is the blank one whatever track and whatever file it is presented along (trackTape_blank_congr at nexProg_initBack), and the opening's last configuration is the evaluation's first, because the state the opening leaves has an empty mirror (config_openingEnd_eq_evalStart). The clock is nexTotal_lt_two_pow', one step of slack over the run since the evaluation already ends in the accepting phase.

        Dependency graph

        Determinism after the guess #

        theorem DescriptiveComplexity.Draw.Data.nexProg_sepOn {L : FirstOrder.Language} {dt : Data L} {A G : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [Finite A] [Finite dt.KIx] [Nonempty A] {zero one : A} (hzo : zero one) (hpl : Fintype.card (dt.CtlIx dt.SlotIx) dt.dd) {coord : Fin dt.dddt.CtlIx} {β : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {γ : GuessSpec A dt.CtlIx dt.SlotIx (Option dt.KIx) G} {args : (v : dt.VarIx) → dt.VarArgs v} {bot : Option dt.KIx} :
        (dt.nexProg zero one hzo hpl coord β γ args bot).table.SepOn NexPh.PostGuess

        The clocked program separates after its guess: two of its rules firing in the same post-guess phase on the same data are the same rule. Across sites that is the owner map (nexOwner_nexRule); within a site it is nexSep_postGuess, and the guess site is where the two are allowed to differ – which is why the phase restriction is there.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.nexProg_uniqueFrom {L : FirstOrder.Language} {dt : Data L} {A G : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [Finite A] [Finite dt.KIx] [Nonempty A] [LinearOrder (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] [Finite (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] [LinearOrder dt.NexRIx] [Finite dt.NexRIx] [FirstOrder.Language.wide.Structure (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)] {zero one : A} (hzo : zero one) (hpl : Fintype.card (dt.CtlIx dt.SlotIx) dt.dd) {coord : Fin dt.dddt.CtlIx} {β : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {γ : GuessSpec A dt.CtlIx dt.SlotIx (Option dt.KIx) G} {args : (v : dt.VarIx) → dt.VarArgs v} {bot : Option dt.KIx} (hR : (dt.nexProg zero one hzo hpl coord β γ args bot).table.Reads) (hlin : IsLinOrd WMLe) {cfg : Config (WPoint (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd))} (hcfg : ∀ (p : NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) (f : Fin (Fintype.card (dt.CtlIx dt.SlotIx))A), cfg.state = Sum.inr (stateElt zero p f)p.PostGuess) :
        (wideData (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)).UniqueFrom cfg

        The clocked program is deterministic after its guess: from any configuration whose phase is post-guess, every reachable configuration has at most one successor. This is what a reduction reads its certificate off an arbitrary accepting run with – determinism where it is needed and nondeterminism where the guess is, which is the whole of the polarity.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.nexProg_srcPh_ne_acceptP {L : FirstOrder.Language} {dt : Data L} {A G : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [Finite A] [Finite dt.KIx] [Nonempty A] {zero one : A} (hzo : zero one) (hpl : Fintype.card (dt.CtlIx dt.SlotIx) dt.dd) {coord : Fin dt.dddt.CtlIx} {β : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {γ : GuessSpec A dt.CtlIx dt.SlotIx (Option dt.KIx) G} {args : (v : dt.VarIx) → dt.VarArgs v} {bot : Option dt.KIx} (r : dt.NexRIx) :
        (dt.nexProg zero one hzo hpl coord β γ args bot).table.srcPh r NexPh.acceptP

        No rule of the clocked program fires from its accepting phase: the accepting phase is owned by the accepting site (nexOwner), and that site has no rules at all – its shape is Empty.

        Dependency graph
        theorem DescriptiveComplexity.Draw.Data.nexProg_stuck_acceptP {L : FirstOrder.Language} {dt : Data L} {A G : Type} [Fintype dt.CtlIx] [Fintype dt.SlotIx] [DecidableEq dt.SlotIx] [LinearOrder A] [Finite A] [Finite dt.KIx] [Nonempty A] [LinearOrder (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF))] [LinearOrder dt.NexRIx] [FirstOrder.Language.wide.Structure (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)] {zero one : A} (hzo : zero one) (hpl : Fintype.card (dt.CtlIx dt.SlotIx) dt.dd) {coord : Fin dt.dddt.CtlIx} {β : SweepSpec A dt.CtlIx dt.SlotIx (Option dt.KIx)} {γ : GuessSpec A dt.CtlIx dt.SlotIx (Option dt.KIx) G} {args : (v : dt.VarIx) → dt.VarArgs v} {bot : Option dt.KIx} (hR : (dt.nexProg zero one hzo hpl coord β γ args bot).table.Reads) {x : Config (WPoint (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd))} {f : Fin (Fintype.card (dt.CtlIx dt.SlotIx))A} (hx : x.state = Sum.inr (stateElt zero NexPh.acceptP f)) (y : Config (WPoint (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd))) :
        ¬(wideData (Univ A dt.NexRIx (NexPh (Option dt.KIx) (EvalPh dt.nv dt.PMF)) dt.KIx dt.dd)).Step x y

        An accepting configuration of the clocked program is stuck: no rule fires from the accepting phase, so the run that reached it is the whole run. This is what a backward reading needs of the verdict: an accepting run ends where the evaluation's own run ends, and the two are the same run by nexProg_uniqueFrom.

        Dependency graph