Documentation

DescriptiveComplexity.Problems.Machine.HornHardness

The unit-propagation machine of a Horn formula #

The program half of HORNSAT ≤ᶠᵒ[≤] DTMAccept, stage 4 of the machine bridge: the states, symbols and transitions of the deterministic machine computing the unit-propagation closure of a CNF instance and verifying it, on the tape laid out in DescriptiveComplexity.Problems.Machine.HornTape.

The program #

  init:      at ⊢, dispatch – first check sweep if a clause exists, else accept
  chk(r, c):  sweep right, f := f ∧ (negIn c x → marked x)
  mark(r, c): sweep back left; if the check succeeded, mark the positive
              literal of c in passing
  … next clause; after the last clause, next round; after the last round …
  ver(c):     sweep, f := f ∨ (posIn c x ∧ marked x) ∨ (negIn c x ∧ ¬marked x),
              alternating direction; a failed clause leaves no transition
  accept     after the last verified clause – gated on the Horn condition

n rounds of one check-and-mark pass per clause compute the propagation closure DescriptiveComplexity.Forced (DescriptiveComplexity.forced_forcedIn_card is the stabilization), and the verification phase accepts exactly when the closure, read as an assignment, satisfies every clause – which for a Horn instance is satisfiability itself (DescriptiveComplexity.satisfiable_iff_forced_model).

The machine is deterministic everywhere – there is no guess phase – and DescriptiveComplexity.TMData.Deterministic for the constructed machine is part of the statement, not bookkeeping: it is what makes the image a potential yes-instance of DTMAccept at all. The instance is read exactly as in stage 3 (DescriptiveComplexity.SatCl, DescriptiveComplexity.SatPos, …, imported from DescriptiveComplexity.Problems.Machine.Hardness together with the clause-order machinery), and the only two additions are the element order (rounds walk it) and the Horn gate on the accept transition.

The elements of the machine #

@[reducible, inline]

The universe of the machine: tagged triples.

Equations
Instances For
    Dependency graph
    noncomputable def DescriptiveComplexity.cstH {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (t : UPTag) :
    HV A

    A constant of the machine: a tag on the triple of least elements.

    Equations
    Instances For
      Dependency graph
      noncomputable def DescriptiveComplexity.oneH {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (t : UPTag) (a : A) :
      HV A

      A tag carrying one element.

      Equations
      Instances For
        Dependency graph
        noncomputable def DescriptiveComplexity.twoH {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (t : UPTag) (a b : A) :
        HV A

        A tag carrying two elements.

        Equations
        Instances For
          Dependency graph
          Dependency graph

          Symbols #

          @[reducible, inline]
          noncomputable abbrev DescriptiveComplexity.symHStart {A : Type} [LinearOrder A] [Finite A] [Nonempty A] :
          HV A

          The left-marker symbol.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]
            noncomputable abbrev DescriptiveComplexity.symHEnd {A : Type} [LinearOrder A] [Finite A] [Nonempty A] :
            HV A

            The right-marker symbol.

            Equations
            Instances For
              Dependency graph
              @[reducible, inline]
              noncomputable abbrev DescriptiveComplexity.symHBlank {A : Type} [LinearOrder A] [Finite A] [Nonempty A] :
              HV A

              The blank symbol.

              Equations
              Instances For
                Dependency graph
                @[reducible, inline]
                noncomputable abbrev DescriptiveComplexity.symCell {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (m : Bool) (x : A) :
                HV A

                The symbol of the cell of x, with mark m.

                Equations
                Instances For
                  Dependency graph

                  Positions #

                  @[reducible, inline]
                  noncomputable abbrev DescriptiveComplexity.posHStart {A : Type} [LinearOrder A] [Finite A] [Nonempty A] :
                  HV A

                  The left-marker cell.

                  Equations
                  Instances For
                    Dependency graph
                    @[reducible, inline]
                    noncomputable abbrev DescriptiveComplexity.posHCell {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (x : A) :
                    HV A

                    The cell of the element x.

                    Equations
                    Instances For
                      Dependency graph
                      @[reducible, inline]
                      noncomputable abbrev DescriptiveComplexity.posHEnd {A : Type} [LinearOrder A] [Finite A] [Nonempty A] :
                      HV A

                      The right-marker cell.

                      Equations
                      Instances For
                        Dependency graph

                        States #

                        @[reducible, inline]
                        noncomputable abbrev DescriptiveComplexity.stHInit {A : Type} [LinearOrder A] [Finite A] [Nonempty A] :
                        HV A

                        The dispatch state.

                        Equations
                        Instances For
                          Dependency graph
                          @[reducible, inline]
                          noncomputable abbrev DescriptiveComplexity.stHChk {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (f : Bool) (r c : A) :
                          HV A

                          Checking the clause c in round r, flag f.

                          Equations
                          Instances For
                            Dependency graph
                            @[reducible, inline]
                            noncomputable abbrev DescriptiveComplexity.stHMark {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (m : Bool) (r c : A) :
                            HV A

                            The return sweep of clause c in round r, marking iff m.

                            Equations
                            Instances For
                              Dependency graph
                              @[reducible, inline]
                              noncomputable abbrev DescriptiveComplexity.stHVer {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (f d : Bool) (c : A) :
                              HV A

                              Verifying the clause c, flag f, sweeping in direction d.

                              Equations
                              Instances For
                                Dependency graph
                                @[reducible, inline]
                                noncomputable abbrev DescriptiveComplexity.stHAcc {A : Type} [LinearOrder A] [Finite A] [Nonempty A] :
                                HV A

                                The accepting state.

                                Equations
                                Instances For
                                  Dependency graph

                                  Reading the order of the elements #

                                  a is the least element.

                                  Equations
                                  Instances For
                                    Dependency graph

                                    a is the greatest element.

                                    Equations
                                    Instances For
                                      Dependency graph

                                      b is the successor of a in the order of the elements: rounds walk this relation.

                                      Equations
                                      Instances For
                                        Dependency graph

                                        The satisfaction test of the verification phase: the cell x, with mark m, satisfies the clause c under the marked assignment. This is DescriptiveComplexity.SatLit with the marks as the valuation.

                                        Equations
                                        Instances For
                                          Dependency graph

                                          The transition table #

                                          Which tagged triples are transitions: the payload promises. Coordinates not pinned by the source state or the symbol read are pinned here, so that no junk element is a transition.

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

                                            The state a transition applies in.

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

                                              The symbol a transition reads.

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

                                                The state a transition moves to. The check and verification sweeps branch on a first-order test of the source instance; each pair of branches is exclusive, which is what keeps the table functional.

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

                                                  The symbol a transition writes: only the return sweep of a successful check writes anything new, and only at the positive literal of its clause.

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

                                                    Which transitions move the head right.

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

                                                      Accepting states.

                                                      Equations
                                                      Instances For
                                                        Dependency graph

                                                        Start states: the dispatch state alone.

                                                        Equations
                                                        Instances For
                                                          Dependency graph

                                                          The unit-propagation machine of a CNF instance.

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

                                                            The machine is well formed #

                                                            The machine is well formed: every conjunct comes from the tape layer.

                                                            Dependency graph

                                                            The machine is deterministic #

                                                            There is no guess phase, so – unlike stage 3 – the whole table is functional: the state and the symbol read pin the transition's tag up to promise-exclusive alternatives, the tag pins the payload, and the branching destinations and writes are separated by their first-order tests. This discharges the DescriptiveComplexity.TMData.Deterministic promise of the constructed instance, which is part of the correctness of the reduction.

                                                            theorem DescriptiveComplexity.hV_ext {A : Type} {τ τ' : HV A} (ht : τ.1 = τ'.1) (h0 : τ.2 0 = τ'.2 0) (h1 : τ.2 1 = τ'.2 1) (h2 : τ.2 2 = τ'.2 2) :
                                                            τ = τ'

                                                            Two elements agree when their tag and all three coordinates do.

                                                            Dependency graph
                                                            theorem DescriptiveComplexity.oneH_eq_oneH_iff {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {t t' : UPTag} {a a' : A} :
                                                            oneH t a = oneH t' a' t = t' a = a'
                                                            Dependency graph
                                                            theorem DescriptiveComplexity.twoH_eq_twoH_iff {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {t t' : UPTag} {a a' b b' : A} :
                                                            twoH t a b = twoH t' a' b' t = t' a = a' b = b'
                                                            Dependency graph
                                                            Dependency graph

                                                            The tag of the symbol a transition reads.

                                                            Equations
                                                            Instances For
                                                              Dependency graph
                                                              Dependency graph

                                                              Only transitions have transition tags.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hSrc_tag {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {τ q : HV A} (hs : HSrc τ q) :
                                                              q.1 = hStateTag τ.1

                                                              The state pins the transition's tag.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hRead_tag {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {τ a : HV A} (hr : HRead τ a) :
                                                              a.1 = hReadTag τ.1

                                                              The symbol read pins the transition's tag.

                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph

                                                              The state and the symbol determine the transition's tag, up to the promise-exclusive alternatives: the two dispatches, the three ends of a return sweep, and the two ends of a verification sweep. A finite check over the tags.

                                                              Dependency graph

                                                              The lowest clause is unique.

                                                              Dependency graph

                                                              The highest clause is unique.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.satNextCl_unique {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {c c' c'' : A} (h : SatNextCl c c') (h' : SatNextCl c c'') :
                                                              c' = c''

                                                              The next clause is unique.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.minElt_unique {A : Type} [LinearOrder A] {a a' : A} (h : MinElt a) (h' : MinElt a') :
                                                              a = a'

                                                              The least element is unique.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.succElt_unique {A : Type} [LinearOrder A] {a b b' : A} (h : SuccElt a b) (h' : SuccElt a b') :
                                                              b = b'

                                                              The successor of an element is unique.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hTr_payload {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {τ τ' q a : HV A} ( : HTr τ) (hτ' : HTr τ') (hs : HSrc τ q) (hs' : HSrc τ' q) (hr : HRead τ a) (hr' : HRead τ' a) (ht : τ.1 = τ'.1) :
                                                              τ = τ'

                                                              Equal tags force equal payloads: the source state and the symbol read pin two coordinates, the promises the rest.

                                                              Dependency graph

                                                              The promise-exclusive alternatives #

                                                              theorem DescriptiveComplexity.hTr_init_excl {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {τ τ' : HV A} (h : HTr τ) (h' : HTr τ') ( : τ.1 = UPTag.tInitChk) (hτ' : τ'.1 = UPTag.tInitAcc) :

                                                              The two dispatches exclude each other.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hTr_next_max_excl {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {c c' cm : A} (hnext : SatNextCl c c') (hmax : SatMaxCl cm) (hc : c = cm) :

                                                              A clause with a next one is not the last.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.succElt_maxElt_excl {A : Type} [LinearOrder A] {r r' rm : A} (hsucc : SuccElt r r') (hmax : MaxElt rm) (hr : r = rm) :

                                                              An element with a successor is not the greatest.

                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hSrc_eq {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {τ q : HV A} (hs : HSrc τ q) (t' : UPTag) :
                                                              τ.1 = t'match t' with | UPTag.tInitChk => q = stHInit | UPTag.tInitAcc => q = stHInit | UPTag.tChk m f => q = stHChk f (τ.2 0) (τ.2 1) | UPTag.tChkEnd f => q = stHChk f (τ.2 0) (τ.2 1) | UPTag.tMark m mrk => q = stHMark mrk (τ.2 0) (τ.2 1) | UPTag.tMarkEndNext mrk => q = stHMark mrk (τ.2 0) (τ.2 1) | UPTag.tMarkEndRound mrk => q = stHMark mrk (τ.2 0) (τ.2 2) | UPTag.tMarkEndVer mrk => q = stHMark mrk (τ.2 0) (τ.2 1) | UPTag.tVer m f d => q = stHVer f d (τ.2 0) | UPTag.tVerNext d => q = stHVer true d (τ.2 0) | UPTag.tVerAcc d => q = stHVer true d (τ.2 0) | x => False

                                                              Reading DescriptiveComplexity.HSrc off a concrete tag: the payload equations all flow through this.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hTr_at {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {τ : HV A} ( : HTr τ) (t' : UPTag) :
                                                              τ.1 = t'match t' with | UPTag.tInitChk => MinElt (τ.2 0) SatMinCl (τ.2 1) ∀ (a : A), τ.2 2 a | UPTag.tInitAcc => IsMinTup3 τ.2 ∀ (e : A), ¬SatCl e | UPTag.tChk m f => SatCl (τ.2 1) | UPTag.tChkEnd f => SatCl (τ.2 1) ∀ (a : A), τ.2 2 a | UPTag.tMark m mk => SatCl (τ.2 1) | UPTag.tMarkEndNext mk => SatNextCl (τ.2 1) (τ.2 2) | UPTag.tMarkEndRound mk => SuccElt (τ.2 0) (τ.2 1) SatMaxCl (τ.2 2) | UPTag.tMarkEndVer mk => MaxElt (τ.2 0) SatMaxCl (τ.2 1) ∀ (a : A), τ.2 2 a | UPTag.tVer m f d => SatCl (τ.2 0) ∀ (a : A), τ.2 2 a | UPTag.tVerNext d => SatNextCl (τ.2 0) (τ.2 1) ∀ (a : A), τ.2 2 a | UPTag.tVerAcc d => SatMaxCl (τ.2 0) (∀ (a : A), τ.2 1 a) (∀ (a : A), τ.2 2 a) AtMostOnePositive A | x => False

                                                              Reading DescriptiveComplexity.HTr off a concrete tag.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hTr_unique {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {τ τ' q a : HV A} ( : HTr τ) (hτ' : HTr τ') (hs : HSrc τ q) (hs' : HSrc τ' q) (hr : HRead τ a) (hr' : HRead τ' a) :
                                                              τ = τ'

                                                              At most one transition applies, everywhere: the machine has no guess phase, so this is the whole of transition-level determinism. The three ambiguity classes left by DescriptiveComplexity.hTag_cases are separated by their promises: a clause with a next one is not the last, an element with a successor is not the greatest, and an instance either has a clause or has none.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hDst_functional {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {τ q q' : HV A} (h : HDst τ q) (h' : HDst τ q') :
                                                              q = q'

                                                              A transition moves to exactly one state: the branching destinations are separated by their flags and their first-order tests, and the two relational destinations are pinned by uniqueness of the lowest clause.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hWrite_functional {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {τ a a' : HV A} (h : HWrite τ a) (h' : HWrite τ a') :
                                                              a = a'

                                                              A transition writes exactly one symbol: the marking write's two branches are separated by the marking bit and the positive-literal test.

                                                              Dependency graph

                                                              The machine is deterministic – the promise DescriptiveComplexity.DTMAccept folds into its yes-instances, discharged here for every image of the reduction, Horn or not.

                                                              Dependency graph

                                                              The positions of the tape, concretely #

                                                              The dimension-3 mirror of stage 3's marker and cell lemmas: the left marker is the lowest position, cells follow in the order of their elements, the right marker closes the chain, and ranks are what the budget compares.

                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hTagTupleLe_of_tag_lt {A : Type} [LinearOrder A] {p q : HV A} (h : p.1 < q.1) :
                                                              Dependency graph
                                                              theorem DescriptiveComplexity.hTagTupleLe_tag_le {A : Type} [LinearOrder A] {p q : HV A} (h : tagTupleLe p q) :
                                                              p.1 q.1
                                                              Dependency graph

                                                              Every tag other than the left marker's is above it.

                                                              Dependency graph

                                                              There is only one left marker.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.eq_posHEnd_of_posn {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {p : HV A} (hp : HPosn p) (h : p.1 = UPTag.pEnd) :

                                                              There is only one right marker.

                                                              Dependency graph
                                                              theorem DescriptiveComplexity.eq_posHCell_of_posn {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {p : HV A} (hp : HPosn p) (h : p.1 = UPTag.pCell) :
                                                              p = posHCell (p.2 0)

                                                              A cell is the cell of the element it carries.

                                                              Dependency graph

                                                              The left marker is the lowest position.

                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph

                                                              Cells are ordered as their elements are.

                                                              Dependency graph

                                                              Only the two lowest tags are at or below a cell's.

                                                              Dependency graph

                                                              Only the three bracketing tags are at or below the right marker's.

                                                              Dependency graph

                                                              Only the two highest bracketing tags lie between a cell's and the right marker's.

                                                              Dependency graph

                                                              The head's first move: the cell of the least element follows .

                                                              Dependency graph

                                                              The head moves from cell to cell along the instance.

                                                              Dependency graph

                                                              The head's last move of a sweep: follows the last cell.

                                                              Dependency graph

                                                              The intended run: marks and tapes #

                                                              The machine's working state is a set of marked elements, as a Bool-valued assignment. Processing one clause – a check sweep and a return sweep – applies DescriptiveComplexity.procB to it: unconditionally, because when the check fails the inner conjunction is false and nothing is added, exactly as the machine's return sweep writes nothing when its marking bit is off.

                                                              noncomputable def DescriptiveComplexity.procB {A : Type} [FirstOrder.Language.sat.Structure A] (M : ABool) (c : A) :
                                                              ABool

                                                              One clause processed on a marked set: if every negative literal of c is marked, its positive literals join the marks.

                                                              Equations
                                                              Instances For
                                                                Dependency graph
                                                                theorem DescriptiveComplexity.le_procB {A : Type} [FirstOrder.Language.sat.Structure A] (M : ABool) (c : A) {x : A} (h : M x = true) :
                                                                procB M c x = true

                                                                Processing a clause only adds marks.

                                                                Dependency graph
                                                                noncomputable def DescriptiveComplexity.hTape {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) :
                                                                HV AHV A

                                                                The tape carrying the marked set M: markers and blanks in place, the cell of y holding (y, M y). A junk cell tuple reads its initial, unmarked symbol forever – it is never written, so its value must not depend on M.

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

                                                                  The markers hold their symbols on every marked tape.

                                                                  Dependency graph
                                                                  Dependency graph
                                                                  theorem DescriptiveComplexity.hTape_posHCell {A : Type} [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (y : A) :
                                                                  hTape M (posHCell y) = symCell (M y) y

                                                                  A real cell reads its element's mark.

                                                                  Dependency graph
                                                                  theorem DescriptiveComplexity.hTape_congr {A : Type} [LinearOrder A] [Finite A] [Nonempty A] {M M' : ABool} (p : HV A) (h : ∀ (y : A), M y = M' y) :
                                                                  hTape M p = hTape M' p

                                                                  Marked tapes agree wherever the marks do – in particular junk cells never notice a change of marks.

                                                                  Dependency graph
                                                                  noncomputable def DescriptiveComplexity.markTape {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) (p : HV A) :
                                                                  HV AHV A

                                                                  The tape during a return sweep of the clause c with the head at p, moving left: the cells strictly above the head have been processed, the rest still carry the old marks.

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

                                                                    The intended run: configurations #

                                                                    noncomputable def DescriptiveComplexity.chkFlag {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) (p : HV A) :

                                                                    The flag of a check sweep with the head at p: every negative literal of c strictly below the head is marked.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      Dependency graph
                                                                      noncomputable def DescriptiveComplexity.confHChk {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (r c : A) (p : HV A) :

                                                                      The configuration during the check sweep of clause c in round r.

                                                                      Equations
                                                                      Instances For
                                                                        Dependency graph
                                                                        noncomputable def DescriptiveComplexity.confHMark {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (m : Bool) (r c : A) (p : HV A) :

                                                                        The configuration during the return sweep of clause c in round r, with marking bit m.

                                                                        Equations
                                                                        Instances For
                                                                          Dependency graph
                                                                          noncomputable def DescriptiveComplexity.verFlagL {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) (p : HV A) :

                                                                          The flag of a verification sweep, leftwards, with the head at p: some cell strictly above the head satisfies c under the marks – stage 3's DescriptiveComplexity.chkFlagL with the marks as valuation.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            Dependency graph
                                                                            noncomputable def DescriptiveComplexity.verFlagR {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) (p : HV A) :

                                                                            The flag of a verification sweep, rightwards.

                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              Dependency graph
                                                                              noncomputable def DescriptiveComplexity.confHVerL {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) (p : HV A) :

                                                                              The configuration during a leftward verification sweep.

                                                                              Equations
                                                                              Instances For
                                                                                Dependency graph
                                                                                noncomputable def DescriptiveComplexity.confHVerR {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) (p : HV A) :

                                                                                The configuration during a rightward verification sweep.

                                                                                Equations
                                                                                Instances For
                                                                                  Dependency graph
                                                                                  noncomputable def DescriptiveComplexity.confHInit {A : Type} [LinearOrder A] [Finite A] [Nonempty A] :

                                                                                  The initial configuration: the dispatch state at the left marker, all cells unmarked.

                                                                                  Equations
                                                                                  Instances For
                                                                                    Dependency graph

                                                                                    The machine starts at the dispatch configuration: the unmarked tape is the initial tape.

                                                                                    Dependency graph

                                                                                    The flags and tapes along a sweep #

                                                                                    A check sweep starts with a vacuously true flag: no cell lies strictly below the first one.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.chkFlag_succ {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) {p q : HV A} (hsucc : SuccPos tagTupleLe HPosn p q) (hp : p.1 = UPTag.pCell) :
                                                                                    chkFlag M c q = true chkFlag M c p = true (SatNeg c (p.2 0)M (p.2 0) = true)

                                                                                    Stepping right folds one cell into the check flag.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.chkFlag_posHEnd {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) :
                                                                                    chkFlag M c posHEnd = true ∀ (y : A), SatNeg c yM y = true

                                                                                    A completed check sweep has seen every cell: at the right marker the flag says every negative literal of the clause is marked.

                                                                                    Dependency graph

                                                                                    A leftward verification sweep starts with an empty flag.

                                                                                    Dependency graph

                                                                                    A rightward verification sweep starts with an empty flag.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.verFlagL_succ {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) {p q : HV A} (hsucc : SuccPos tagTupleLe HPosn p q) (hq : q.1 = UPTag.pCell) :
                                                                                    verFlagL M c p = true verFlagL M c q = true MLit c (q.2 0) (M (q.2 0))

                                                                                    Stepping down folds one cell into the leftward verification flag.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.verFlagR_succ {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) {p q : HV A} (hsucc : SuccPos tagTupleLe HPosn p q) (hp : p.1 = UPTag.pCell) :
                                                                                    verFlagR M c q = true verFlagR M c p = true MLit c (p.2 0) (M (p.2 0))

                                                                                    Stepping up folds one cell into the rightward verification flag.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.verFlagL_posHStart {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) :
                                                                                    verFlagL M c posHStart = true ∃ (y : A), MLit c y (M y)

                                                                                    A completed leftward verification sweep has seen every cell.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.verFlagR_posHEnd {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) :
                                                                                    verFlagR M c posHEnd = true ∃ (y : A), MLit c y (M y)

                                                                                    A completed rightward verification sweep has seen every cell.

                                                                                    Dependency graph

                                                                                    At the top of the return sweep nothing has been processed: the tape still carries the old marks.

                                                                                    Dependency graph

                                                                                    At the bottom of the return sweep everything has been processed: the tape carries the new marks.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.markTape_frame' {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) {p q r : HV A} (hsucc : SuccPos tagTupleLe HPosn q p) (hrne : r p) :
                                                                                    markTape M c q r = markTape M c p r

                                                                                    The return sweep only ever changes the cell under the head, exactly as stage 3's guess sweep: moving the head down brings its own cell into the processed region and nothing else.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.markTape_at_head {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (c : A) {p : HV A} (hp : HPosn p) (hcell : p.1 = UPTag.pCell) :
                                                                                    markTape M c p p = symCell (M (p.2 0)) (p.2 0)

                                                                                    What the return sweep reads at its own head: the old mark.

                                                                                    Dependency graph

                                                                                    The intended run: single steps #

                                                                                    The dispatch, when a clause exists: into the first check sweep of the lowest round and clause, with everything unmarked.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hInitAcc {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (hno : ∀ (e : A), ¬SatCl e) :
                                                                                    (hornMachine A).Step confHInit { state := stHAcc, head := posHCell botA, tape := hTape fun (x : A) => false }

                                                                                    The dispatch, when there is no clause at all: accept.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hChk {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {r c : A} (hc : SatCl c) {p q : HV A} (hsucc : SuccPos tagTupleLe HPosn p q) (hp : p.1 = UPTag.pCell) :
                                                                                    (hornMachine A).Step (confHChk M r c p) (confHChk M r c q)

                                                                                    One step of a check sweep: fold the cell under the head into the flag and move right.

                                                                                    Dependency graph

                                                                                    The turn at the right marker: the check sweep is over, the return sweep begins with the accumulated verdict as its marking bit.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hMark {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {m : Bool} {r c : A} (hc : SatCl c) (hm : m = true ∀ (y : A), SatNeg c yM y = true) {p q : HV A} (hsucc : SuccPos tagTupleLe HPosn q p) (hp : p.1 = UPTag.pCell) :
                                                                                    (hornMachine A).Step (confHMark M m r c p) (confHMark M m r c q)

                                                                                    One step of a return sweep: process the cell under the head – marking it if it is the positive literal of a successfully checked clause – and move left.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hMarkEndNext {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {m : Bool} {r c c' : A} (hnext : SatNextCl c c') :

                                                                                    The turn at the left marker, next clause: the processed marks become the working marks, and the next check sweep starts.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hMarkEndRound {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {m : Bool} {r r' c c₀ : A} (hsucc : SuccElt r r') (hmax : SatMaxCl c) (hmin : SatMinCl c₀) :
                                                                                    (hornMachine A).Step (confHMark M m r c posHStart) (confHChk (procB M c) r' c₀ (posHCell botA))

                                                                                    The turn at the left marker, next round: last clause processed, the round counter advances and the checks restart at the lowest clause.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hMarkEndVer {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {m : Bool} {r c c₀ : A} (hmaxr : MaxElt r) (hmax : SatMaxCl c) (hmin : SatMinCl c₀) :

                                                                                    The turn at the left marker, into verification: the last clause of the last round is processed, and the final marks are verified clause by clause, starting rightwards at the lowest clause.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hVerR {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {c : A} (hc : SatCl c) {p q : HV A} (hsucc : SuccPos tagTupleLe HPosn p q) (hp : p.1 = UPTag.pCell) :
                                                                                    (hornMachine A).Step (confHVerR M c p) (confHVerR M c q)

                                                                                    One step of a rightward verification sweep.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hVerL {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {c : A} (hc : SatCl c) {p q : HV A} (hsucc : SuccPos tagTupleLe HPosn p q) (hq : q.1 = UPTag.pCell) :
                                                                                    (hornMachine A).Step (confHVerL M c q) (confHVerL M c p)

                                                                                    One step of a leftward verification sweep.

                                                                                    Dependency graph

                                                                                    The verification turn at the right marker, another clause following: reverse into a leftward sweep of the next clause.

                                                                                    Dependency graph

                                                                                    The verification turn at the left marker – the mirror.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hVerAccR {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {c : A} (hmax : SatMaxCl c) (hhorn : AtMostOnePositive A) (hflag : verFlagR M c posHEnd = true) :
                                                                                    (hornMachine A).Step (confHVerR M c posHEnd) { state := stHAcc, head := posHCell topA, tape := hTape M }

                                                                                    Accepting at the right marker: the last clause is verified, and the instance is Horn – the gate.

                                                                                    Dependency graph
                                                                                    theorem DescriptiveComplexity.step_hVerAccL {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {c : A} (hmax : SatMaxCl c) (hhorn : AtMostOnePositive A) (hflag : verFlagL M c posHStart = true) :
                                                                                    (hornMachine A).Step (confHVerL M c posHStart) { state := stHAcc, head := posHCell botA, tape := hTape M }

                                                                                    Accepting at the left marker – the mirror.

                                                                                    Dependency graph

                                                                                    Ranks, sweeps, and one whole clause #

                                                                                    Dependency graph

                                                                                    The right marker sits one step above the last cell.

                                                                                    Dependency graph
                                                                                    Dependency graph

                                                                                    A sweep is short: only the left marker and the cells lie below the right marker, by injection into Option A.

                                                                                    Dependency graph

                                                                                    A whole check sweep, from the first cell to the right marker.

                                                                                    Dependency graph

                                                                                    A whole return sweep, from the last cell down to the left marker.

                                                                                    Dependency graph
                                                                                    Dependency graph
                                                                                    Dependency graph

                                                                                    One whole clause: check sweep, turn, return sweep, back at the left marker with the processed marks, in exactly 2 R steps for R the right marker's rank.

                                                                                    Dependency graph

                                                                                    The folds: what the rounds compute #

                                                                                    inductive DescriptiveComplexity.ClauseFold {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] :
                                                                                    A(ABool)(ABool)Prop

                                                                                    Processing the clauses from c to the last one, relationally: the marked set each clause leaves behind.

                                                                                    Instances For
                                                                                      Dependency graph
                                                                                      inductive DescriptiveComplexity.RoundFold {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] (c₀ : A) :
                                                                                      A(ABool)(ABool)Prop

                                                                                      Processing the rounds from r to the last one, each a pass over all the clauses from c₀.

                                                                                      Instances For
                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.ClauseFold.mono {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {c : A} {M M' : ABool} (h : ClauseFold c M M') {x : A} (hx : M x = true) :
                                                                                        M' x = true

                                                                                        The clause fold only adds marks.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.RoundFold.mono {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {c₀ r : A} {M M' : ABool} (h : RoundFold c₀ r M M') {x : A} (hx : M x = true) :
                                                                                        M' x = true

                                                                                        The round fold only adds marks.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.ClauseFold.subset_forced {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] {c : A} {M M' : ABool} (h : ClauseFold c M M') (hM : ∀ (x : A), M x = trueForced x) (x : A) :
                                                                                        M' x = trueForced x

                                                                                        Soundness of the fold: marks stay inside the propagation closure.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.RoundFold.subset_forced {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] {c₀ r : A} {M M' : ABool} (h : RoundFold c₀ r M M') (hM : ∀ (x : A), M x = trueForced x) (x : A) :
                                                                                        M' x = trueForced x

                                                                                        Soundness for the rounds.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.ClauseFold.dominates {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {c₀ : A} {M M' : ABool} (h : ClauseFold c₀ M M') {c x : A} (hc : SatCl c) (hpos : SatPos c x) :
                                                                                        c₀ c(∀ (y : A), SatNeg c yM y = true)M' x = true

                                                                                        One round dominates one propagation step: a clause whose negative literals are all marked at the start of the round has its positive literals marked at its end – the marks only grow until the clause's turn comes.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.RoundFold.forcedIn_subset {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] {c₀ : A} (hmin : SatMinCl c₀) {r : A} {M M' : ABool} (h : RoundFold c₀ r M M') (j : ) :
                                                                                        (∀ (y : A), ForcedIn j yM y = true)∀ (x : A), ForcedIn (j + {e : A | r e}.ncard) xM' x = true

                                                                                        The rounds reach every propagation stage: seed marks containing stage j become, after the remaining rounds, marks containing stage j + #rounds. Each round dominates one step because its marks only grow.

                                                                                        Dependency graph

                                                                                        The machine walks the folds #

                                                                                        theorem DescriptiveComplexity.exists_succElt {A : Type} [LinearOrder A] [Finite A] {r : A} (hnmax : ¬MaxElt r) :
                                                                                        ∃ (r' : A), SuccElt r r'

                                                                                        Every element that is not the greatest has a successor.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.ncard_ge_succElt {A : Type} [LinearOrder A] [Finite A] {r r' : A} (hsucc : SuccElt r r') :
                                                                                        {e : A | r e}.ncard = {e : A | r' e}.ncard + 1

                                                                                        Passing to the next round removes exactly one round from those left.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.steps_hClauses {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {c₀ : A} (hmin : SatMinCl c₀) (r c : A) :
                                                                                        SatCl c∀ (M : ABool), ∃ (M' : ABool), ClauseFold c M M' (∀ (r' : A), SuccElt r r'k{e : A | SatCl e c e}.ncard * (2 * bitRank tagTupleLe HPosn posHEnd + 1), (hornMachine A).StepsIn k (confHChk M r c (posHCell botA)) (confHChk M' r' c₀ (posHCell botA))) (MaxElt rk{e : A | SatCl e c e}.ncard * (2 * bitRank tagTupleLe HPosn posHEnd + 1), (hornMachine A).StepsIn k (confHChk M r c (posHCell botA)) (confHVerR M' c₀ (posHCell botA)))

                                                                                        The machine processes the clauses from c to the last one: it computes the clause fold, and then turns – to the next round if one follows, into verification otherwise – in at most 2R + 1 steps per clause.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.steps_hRounds {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {c₀ : A} (hmin : SatMinCl c₀) (r : A) (M : ABool) :
                                                                                        ∃ (M' : ABool), RoundFold c₀ r M M' k{e : A | r e}.ncard * ({e : A | SatCl e c₀ e}.ncard * (2 * bitRank tagTupleLe HPosn posHEnd + 1)), (hornMachine A).StepsIn k (confHChk M r c₀ (posHCell botA)) (confHVerR M' c₀ (posHCell botA))

                                                                                        The machine runs all the rounds: from any round to the start of the verification phase, computing the round fold.

                                                                                        Dependency graph

                                                                                        The verification phase #

                                                                                        theorem DescriptiveComplexity.steps_hVerClauseR {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {c c' : A} (hc : SatCl c) (hnext : SatNextCl c c') (hsat : ∃ (y : A), MLit c y (M y)) :

                                                                                        Verifying c rightwards and moving on to the next clause.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.steps_hVerClauseL {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {c c' : A} (hc : SatCl c) (hnext : SatNextCl c c') (hsat : ∃ (y : A), MLit c y (M y)) :

                                                                                        Verifying c leftwards and moving on to the next clause.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.steps_hVerClauseAccR {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {c : A} (hc : SatCl c) (hmax : SatMaxCl c) (hhorn : AtMostOnePositive A) (hsat : ∃ (y : A), MLit c y (M y)) :
                                                                                        kbitRank tagTupleLe HPosn posHEnd, ∃ (cfin : Config (HV A)), (hornMachine A).StepsIn k (confHVerR M c (posHCell botA)) cfin HAcc cfin.state

                                                                                        Verifying the last clause rightwards, and accepting.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.steps_hVerClauseAccL {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {c : A} (hc : SatCl c) (hmax : SatMaxCl c) (hhorn : AtMostOnePositive A) (hsat : ∃ (y : A), MLit c y (M y)) :
                                                                                        kbitRank tagTupleLe HPosn posHEnd, ∃ (cfin : Config (HV A)), (hornMachine A).StepsIn k (confHVerL M c (posHCell topA)) cfin HAcc cfin.state

                                                                                        Verifying the last clause leftwards, and accepting.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.hVer_accepts {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) (hhorn : AtMostOnePositive A) (hsat : ∀ (e : A), SatCl e∃ (y : A), MLit e y (M y)) (c : A) :
                                                                                        SatCl c(∃ (n : ) (cfin : Config (HV A)), n {e : A | SatCl e c e}.ncard * bitRank tagTupleLe HPosn posHEnd (hornMachine A).StepsIn n (confHVerR M c (posHCell botA)) cfin HAcc cfin.state) ∃ (n : ) (cfin : Config (HV A)), n {e : A | SatCl e c e}.ncard * bitRank tagTupleLe HPosn posHEnd (hornMachine A).StepsIn n (confHVerL M c (posHCell topA)) cfin HAcc cfin.state

                                                                                        The verification phase accepts: every remaining clause is satisfied by the marks, so the sweeps run through and the machine accepts after the last one – stage 3's clause induction, verbatim, with the marks as valuation.

                                                                                        Dependency graph

                                                                                        The machine accepts every Horn-satisfiable instance #

                                                                                        theorem DescriptiveComplexity.roundFold_marks_eq_forced {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {c₀ : A} (hmin : SatMinCl c₀) {M' : ABool} (h : RoundFold c₀ botA (fun (x : A) => false) M') (x : A) :
                                                                                        M' x = true Forced x

                                                                                        The final marks are exactly the propagation closure.

                                                                                        Dependency graph

                                                                                        The machine accepts every yes-instance of HORN-SAT, within the budget: dispatch, n rounds of propagation, and a verification pass that the closure – which satisfiability makes a model – lets run to acceptance.

                                                                                        Dependency graph

                                                                                        The machine accepts only Horn-satisfiable instances #

                                                                                        Determinism replaces stage 3's run-analysis induction: the run from the unique initial configuration is the intended trajectory, so it suffices that on a non-Horn-satisfiable instance the trajectory never carries an accepting state – either because no accept transition exists at all (the Horn gate), or because the trajectory gets stuck at the first failing verification sweep.

                                                                                        No transition applies in an accepting state: once accepted, the machine halts, so an accepting run cannot be a strict prefix of another.

                                                                                        Dependency graph

                                                                                        No transition applies in a failed verification state on a marker: the run dies there.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.hDst_acc_cases {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {τ q : HV A} (hd : HDst τ q) (hq : q.1 = UPTag.qAcc) :
                                                                                        τ.1 = UPTag.tInitAcc ∃ (d : Bool), τ.1 = UPTag.tVerAcc d

                                                                                        The only transitions into an accepting state are the two accept transitions.

                                                                                        Dependency graph

                                                                                        A failed rightward verification sweep is stuck at the right marker.

                                                                                        Dependency graph

                                                                                        A failed leftward verification sweep is stuck at the left marker.

                                                                                        Dependency graph
                                                                                        theorem DescriptiveComplexity.hVer_stuck {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (M : ABool) {cf : A} (hcf : SatCl cf) (hfail : ¬∃ (y : A), MLit cf y (M y)) (c : A) :
                                                                                        SatCl cc cf(∀ (e : A), SatCl ec ee < cf∃ (y : A), MLit e y (M y))(∃ (N : ) (S : Config (HV A)), (hornMachine A).StepsIn N (confHVerR M c (posHCell botA)) S (∀ (d : Config (HV A)), ¬(hornMachine A).Step S d) S.state.1 UPTag.qAcc) ∃ (N : ) (S : Config (HV A)), (hornMachine A).StepsIn N (confHVerL M c (posHCell topA)) S (∀ (d : Config (HV A)), ¬(hornMachine A).Step S d) S.state.1 UPTag.qAcc

                                                                                        The trajectory of an unsatisfiable Horn instance gets stuck: the verification sweeps run through the satisfied clauses and die at the first failing one, in a configuration that is not accepting and admits no step.

                                                                                        Dependency graph

                                                                                        Correctness of the unit-propagation machine: it accepts exactly the yes-instances of HORN-SAT.

                                                                                        Dependency graph