Documentation

DescriptiveComplexity.TransitiveClosureDecideReachDet

Deciding reachability in a deterministic walk: a step budget #

The atom case of the normal form for FO(DTC): the reachability relation of a walk read through its determinization (DescriptiveComplexity.ParamTCSpec.det) has a functional DescriptiveComplexity.Decider (DescriptiveComplexity.ParamTCSpec.detReachDecider). No inductive counting is involved: the decider follows the one run of the walk from the first endpoint, exits yes on standing at the second, and exits no when the run is stuck – either because the walk has no step to take, or because a step budget is exhausted.

The budget is the walk's own set of nodes: a second node, carried beside the current one and advanced by one at every step in the mode-major lexicographic order of nodes (DescriptiveComplexity.ParamTCSpec.cntSuccF), so that the run may take exactly as many steps as there are nodes. A node reachable along a functional relation is reached in fewer steps than that (DescriptiveComplexity.exists_iterate_lt_card), so a run that has not arrived when the budget runs out never will. This is the argument of DescriptiveComplexity.LOGSPACE_eq_coLOGSPACE, with parameters.

The counter #

@[instance_reducible]

An arbitrary linear order on the modes, for the counter.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The counter's values: the nodes of the walk, mode-major then lexicographically on tuples.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      The counter holding a mode and a tuple.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        The coordinates of the decider: the current tuple, then the counter's.

        Equations
        Instances For
          Dependency graph

          The formulas #

          The variables of the determinized step, in the decider's step.

          Equations
          Instances For
            Dependency graph

            “The current tuple is the second endpoint, and the mode is its mode.”

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

              The counter advances by one: same mode and the successor tuple, or the next mode with the tuple going from the maximum to the minimum.

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

                The run step: the determinized step of the walk, off the target, the counter advancing.

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

                  The variables of a step, with the next tuple quantified.

                  Equations
                  Instances For
                    Dependency graph

                    “Some run step is available.”

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

                      The decider of reachability in the deterministic reading between two modes, at the two endpoints and the parameters: it enters the walk at the first endpoint with the counter at its least value, follows the one run, exits yes on standing at the second endpoint and no when no run step is available.

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

                        Semantics of the formulas #

                        Steps and exits of the decider #

                        theorem DescriptiveComplexity.ParamTCSpec.detReachDecider_stepAt_none_some {L : FirstOrder.Language} (W : ParamTCSpec (L.sum FirstOrder.Language.order)) {A : Type} [L.Structure A] [LinearOrder A] (ma mb : W.Mode) (w : W.AtomPar → A) (m c : W.Mode) (t t' : W.DCoord → A) :
                        (W.detReachDecider ma mb).StepAt w (none, t) (some (m, c), t') ↔ m = ma ∧ (∀ (c' : W.Mode), c ≤ c') ∧ t' ∘ Sum.inl = w ∘ W.leftIx ∧ ∀ (i : Fin W.k) (a : A), t' (Sum.inr i) ≤ a
                        Dependency graph
                        Dependency graph
                        Dependency graph
                        Dependency graph
                        Dependency graph

                        The run #

                        @[reducible, inline]

                        The one step of the determinized walk, as a function.

                        Equations
                        Instances For
                          Dependency graph
                          theorem DescriptiveComplexity.ParamTCSpec.detNext_functional {L : FirstOrder.Language} (W : ParamTCSpec (L.sum FirstOrder.Language.order)) {A : Type} [L.Structure A] [LinearOrder A] (w : W.AtomPar → A) (u v v' : W.Node A) (hv : W.det.StepAt (w ∘ W.parIx) u v) (hv' : W.det.StepAt (w ∘ W.parIx) u v') :
                          v = v'
                          Dependency graph
                          Dependency graph

                          The deciders of a family, read deterministically #

                          The deterministic reachability deciders of a family: one per relation variable of its block, deciding the reachability relations of the family's deterministic reading.

                          Equations
                          Instances For
                            Dependency graph

                            The deciders decide the deterministic reading's reachability relations.

                            Dependency graph
                            Dependency graph