Documentation

DescriptiveComplexity.Problems.Wide.Reduce

The EXPSPACE reduction, assembled #

Everything the reduction stands on is built elsewhere; this file chooses the constants and puts them together.

The payload bound Fintype.card (CtlIx ⊕ SlotIx) ≤ dd is not here, and the reason is worth recording. It is true because no budget of the record reads the dimension, but it is not rfl: DescriptiveComplexity.Draw.Data.nOf and every budget above it is defined by a match on dt.VarIx, so the matcher takes the whole record as a parameter and two records differing in any field are opaque to each other. What closes it is Finset.sup_congr down the chain, each step instantiated at a constructor of the index so that the matcher reduces.

The extremes of the doubled universe #

Dependency graph
Dependency graph

The budgets do not read the dimension #

Every budget of a DescriptiveComplexity.Draw.Data is a function of the expansion, the step definition and the packs; none reads the dimension. That is not rfl, though: DescriptiveComplexity.Draw.Data.nOf and its relatives are defined by a match, so their compiled matchers take the whole record as a parameter and two records differing in the dimension are opaque to each other. What closes it is a congruence at every level, each instantiated at a constructor of the scrutinee, where the matcher reduces.

Dependency graph
Dependency graph
Dependency graph
Dependency graph
theorem DescriptiveComplexity.Draw.ofSource_kindArgs {L : FirstOrder.Language} {X : ExpExpansion L} {d : StepDef (X.E.sum FirstOrder.Language.order)} {dd dd' : } (h : encDim X dd) (h' : encDim X dd') {n : } (κ : MatAtom X d.B n) :
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph

The control inventory does not read the dimension.

Dependency graph

Nor does the track inventory.

Dependency graph

The record a source is packed into, at a dimension that fits #

The record at the bare encoding budget: only its slot and control inventories are read, and neither depends on the dimension.

Equations
Instances For
    Dependency graph

    The dimension the reduction works at: one coordinate of slack beyond the encoding budget, and wide enough for a rule's payload.

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

      A rule's payload fits the dimension: the inventories do not read it, so the count taken at the bare encoding budget is the count at the real one.

      Dependency graph

      The block index of the packed record is nonempty: the output pack was padded.

      Equations
      Instances For
        Dependency graph

        The interpretation the reduction emits #

        @[reducible, inline]

        The record the reduction runs at: the relativized expansion, packed.

        Equations
        Instances For
          Dependency graph
          noncomputable def DescriptiveComplexity.Draw.srcAccept {L : FirstOrder.Language} [L.IsRelational] (X : ExpExpansion L) (d : StepDef (X.E.sum FirstOrder.Language.order)) (e : Env (newLang L)) :
          (srcDt X d).PF((srcDt X d).CtlIxe.α)Prop

          The accepting predicate of the emitted program: the output machinery's exit phase, with its verdict read from the control.

          Equations
          Instances For
            Dependency graph
            theorem DescriptiveComplexity.Draw.uGDefinable_srcAccept {L : FirstOrder.Language} [L.IsRelational] (X : ExpExpansion L) (d : StepDef (X.E.sum FirstOrder.Language.order)) (p : (srcDt X d).PF) :
            UGDefinable fun (e : Env (newLang L)) (f : (srcDt X d).CtlIxe.α) (x : (srcDt X d).SlotIxe.α) => srcAccept X d e p f
            Dependency graph
            Dependency graph

            The machine of a source, written down in the instance: the machine over the doubled universe, composed with the doubling. The dimension is unchanged – the doubling is one-dimensional – and the tags only gain a Boolean per coordinate.

            Equations
            Instances For
              Dependency graph

              The composite's universe is the machine's #

              The composite interpretation's universe is the machine's over the doubled universe: the composition equivalence, followed by the order extension's.

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

                The interpreted structure reads the program's table #

                @[reducible, inline]

                The two orders the run layer wants on the rule names and the phases: an arbitrary one on each, the same one the interpretation compares tags with.

                Equations
                Instances For
                  Dependency graph
                  Dependency graph

                  The interpreted structure reads the emitted program's table.

                  Dependency graph

                  The machine decides the fixed point #

                  The environment the reduction runs at: the doubled universe, with the marked copy of the instance's minimum and the junk copy of its maximum as the two designated elements.

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

                    The emitted machine accepts exactly when the partial fixed point holds, read over the doubled universe and at the order the encoding pulls back.

                    Dependency graph

                    The transport from the doubled universe to the instance, for any question asked of the emitted machine. Three isomorphisms and nothing else: the composite's universe is the machine's (wideInterpEquiv), the caller says what the machine decides over the doubled universe, and the relativized expansion's points are the original's (relExpMapEquiv). Which problem PW is – acceptance in bounded space, acceptance on a clock, deterministic or not – the transport never asks.

                    Dependency graph

                    The emitted instance is a yes-instance of acceptance on a clock exactly when the source is, given the clocked machine's own correctness at the doubled universe. The transport is wideProblem_wideInterp_iff's and nothing else – which problem the machine is asked about it never reads – so this half of the NEXPTIME reduction is free: what is not is the hypothesis, the clocked program's run against the kernel.

                    Dependency graph

                    The emitted instance is a yes-instance exactly when the source is: the composite's universe is the machine's over the doubled universe, the machine decides the fixed point there, the fixed point is the problem of the relativized expansion, and that expansion's points are the original's.

                    Dependency graph

                    The reduction, and EXPSPACE-hardness #

                    Every SO(≤, PFP) definable problem reduces to deterministic acceptance in bounded space on a wide machine.

                    Dependency graph

                    Every NEXPTIME source problem reduces to acceptance on a clock, given the clocked machine's correctness at each doubled universe. The reduction is the EXPSPACE one's drawing at the kernel's own step definition – the record is the same one (DescriptiveComplexity.Draw.Data.ofKernel is ofSource at NexKernel.toStepDef), so the dimension, the tags and the transport are all as they were, and only what the machine decides changes.

                    Dependency graph

                    Deterministic acceptance in bounded space on a wide machine is EXPSPACE-hard.

                    Dependency graph

                    Deterministic acceptance in bounded space on a wide machine is EXPSPACE-complete. The membership half is DescriptiveComplexity.dwideAcceptSpace_mem_EXPSPACE; the hardness half is the reduction above, run at the doubled universe so that the machine always has two elements to write bits with.

                    Dependency graph
                    theorem DescriptiveComplexity.wideAccept_NEXPTIME_hard (hmach : ∀ {L' : FirstOrder.Language} [inst : L'.IsRelational] (X : ExpExpansion L') (d : StepDef (X.E.sum FirstOrder.Language.order)) (Q₀ : DecisionProblem X.E) (A : Type) [inst_1 : L'.Structure A] [inst_2 : LinearOrder A] [inst_3 : Finite A] [inst_4 : Nonempty A], WideAccept.Holds ((Draw.dblWideInterp X d).Map (Draw.srcEnv L' A).α) Q₀.Holds ((Draw.relExp X).Map ((Draw.dblInterp L').Map A))) :

                    Acceptance on a clock on a wide machine is NEXPTIME-hard, given the clocked machine's correctness. Everything but that hypothesis is the EXPSPACE route's: the same drawing, the same transport, the same discharge – which is why the estimate for this half was «no design».

                    Dependency graph
                    theorem DescriptiveComplexity.wideAccept_NEXPTIME_complete (hmach : ∀ {L' : FirstOrder.Language} [inst : L'.IsRelational] (X : ExpExpansion L') (d : StepDef (X.E.sum FirstOrder.Language.order)) (Q₀ : DecisionProblem X.E) (A : Type) [inst_1 : L'.Structure A] [inst_2 : LinearOrder A] [inst_3 : Finite A] [inst_4 : Nonempty A], WideAccept.Holds ((Draw.dblWideInterp X d).Map (Draw.srcEnv L' A).α) Q₀.Holds ((Draw.relExp X).Map ((Draw.dblInterp L').Map A))) :

                    Acceptance on a clock on a wide machine is NEXPTIME-complete, given the clocked machine's correctness. The membership half is DescriptiveComplexity.wideAccept_mem_NEXPTIME and is unconditional; the hardness half is the reduction above.

                    Dependency graph

                    Acceptance in bounded space on a wide machine is EXPSPACE-hard: hardness travels forward along the reduction that adds the determinism promise.

                    Dependency graph

                    Acceptance in bounded space on a wide machine is EXPSPACE-complete.

                    Dependency graph