Documentation

DescriptiveComplexity.SecondOrderTransitiveClosureFree

SO(TC) needs no order: the order is a guessed state component #

DescriptiveComplexity.SOTCDefinable, like the clausal fragments and the reachability logics, reads its three sentences over the ordered expansion of the vocabulary and asks for the equivalence at every linear order on the universe. For SO(TC) that hypothesis is removable, and this file removes it.

The reason it is removable here and not for SO-Horn, SO-Krom, FO(TC) or FO(DTC) is the reason Fagin's theorem needs no order either: a walk over assignments of a block can guess the order and carry it along. A state of the walk is an assignment of relation variables, so one more binary variable holds a candidate order; the source condition checks that it is a linear one (DescriptiveComplexity.linearGuard), the transition condition says it does not change, and every sentence of the original specification reads it in place of the order symbol (DescriptiveComplexity.orderElimLHom and its two-copy analogue below). The order is then a component of the certificate, exactly as it is in the first block of a Σₖ₊₁ sentence (DescriptiveComplexity.SecondOrderOrdered), and nothing outside the specification sees it.

A deterministic fragment cannot do this – guessing is what the Horn and Krom kernels do not have, and their capture theorems are genuinely statements about ordered structures – so DescriptiveComplexity.PTIME, DescriptiveComplexity.NL and DescriptiveComplexity.LOGSPACE keep the hypothesis while DescriptiveComplexity.PSPACE loses it.

What this file contains #

Order-free specifications #

An SO(TC) specification that does not see a linear order: as in DescriptiveComplexity.SOTCSpec, the states of the walk are the assignments of a block, but the three sentences live over the bare vocabulary expanded by copies of the block, with no order symbol available.

  • The block whose assignments are the states of the walk.

  • step : ((L.sum self.B.lang).sum self.B.lang).Sentence

    The transition sentence, over two copies of the block: the current state reads the first copy, the next state the second.

  • src : (L.sum self.B.lang).Sentence

    The sentence defining the admissible starting states.

  • tgt : (L.sum self.B.lang).Sentence

    The sentence defining the accepting states.

Instances For
    Dependency graph
    @[reducible, inline]

    A state of the walk: an assignment of the block.

    Equations
    Instances For
      Dependency graph

      One step of the walk: the transition sentence, read with the current state in the first copy of the block and the next state in the second.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]
        abbrev DescriptiveComplexity.SOTCSpecFree.Reach {L : FirstOrder.Language} (spec : SOTCSpecFree L) {A : Type} [L.Structure A] :
        spec.State A → spec.State A → Prop

        Reachability in the walk: the reflexive-transitive closure of DescriptiveComplexity.SOTCSpecFree.Step.

        Equations
        Instances For
          Dependency graph

          A state is a starting state when it satisfies the source sentence.

          Equations
          Instances For
            Dependency graph

            A state is accepting when it satisfies the target sentence.

            Equations
            Instances For
              Dependency graph

              The structure is accepted: some accepting state is reachable from some starting state. No order on A is involved.

              Equations
              Instances For
                Dependency graph

                Reading an order-free specification as an ordinary one #

                The easy direction: a specification that does not mention the order is one that happens never to use it. The language morphism below adds the order symbol to the vocabulary, and the two structures agree on everything else.

                Adding the order to the vocabulary, over one copy of a block.

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

                  Adding the order to the vocabulary, over two copies of a block.

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

                    An order-free specification, read as an ordinary one: the three sentences are transported along DescriptiveComplexity.addOrderOne and DescriptiveComplexity.addOrderTwo, so the order symbol is present in the vocabulary and used nowhere.

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

                      Acceptance does not depend on the order, for a specification that does not mention it.

                      Dependency graph

                      The order symbol, eliminated in favor of a state component #

                      The hard direction. The block of the walk is extended by one binary relation variable (DescriptiveComplexity.SOBlock.withOrder, shared with the order elimination of DescriptiveComplexity.SecondOrderOrdered), the three sentences read that variable in place of the order symbol, the source condition adds DescriptiveComplexity.linearGuard and the transition condition adds that the variable does not change.

                      @[reducible, inline]

                      The order variable of the current state, as a symbol of the two-copy expansion.

                      Equations
                      Instances For
                        Dependency graph
                        @[reducible, inline]

                        The order variable of the next state, as a symbol of the two-copy expansion.

                        Equations
                        Instances For
                          Dependency graph

                          x ≤ y for the order variable of the current state.

                          Equations
                          Instances For
                            Dependency graph

                            x ≤ y for the order variable of the next state.

                            Equations
                            Instances For
                              Dependency graph

                              The guessed order does not change: the order variables of the two copies of the block agree.

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

                                The language morphism eliminating the order symbol of the ordered expansion, over two copies of a block: the order is read in the copy holding the current state.

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

                                  The order-free reading of a specification #

                                  The order-free reading of an SO(TC) specification: its state carries one extra binary relation variable holding a guessed order, the source condition checks that the guess is a linear order, every step freezes it, and the three sentences read it in place of the order symbol.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Dependency graph
                                    theorem DescriptiveComplexity.realize_orderElim_one {L : FirstOrder.Language} {A : Type} [instL : L.Structure A] [lo : LinearOrder A] {B : SOBlock} (ρ : B.withOrder.Assignment A) (hord : ∀ (w : Fin 2 → A), ρ (Sum.inl ()) w ↔ w 0 ≤ w 1) (φ : ((L.sum FirstOrder.Language.order).sum B.lang).Sentence) :

                                    A sentence over the ordered expansion and one copy of a block says, read through DescriptiveComplexity.orderElimLHom at a state whose order variable holds the order, what it says of the underlying assignment.

                                    Dependency graph
                                    theorem DescriptiveComplexity.SOTCSpec.orderFree_isSrc_iff {L : FirstOrder.Language} {spec : SOTCSpec L} {A : Type} [instL : L.Structure A] [lo : LinearOrder A] {ρ : spec.B.withOrder.Assignment A} (hord : ∀ (w : Fin 2 → A), ρ (Sum.inl ()) w ↔ w 0 ≤ w 1) :
                                    spec.orderFree.IsSrc ρ ↔ spec.IsSrc (spec.B.restPart ρ)
                                    Dependency graph
                                    theorem DescriptiveComplexity.SOTCSpec.orderFree_isTgt_iff {L : FirstOrder.Language} {spec : SOTCSpec L} {A : Type} [instL : L.Structure A] [lo : LinearOrder A] {ρ : spec.B.withOrder.Assignment A} (hord : ∀ (w : Fin 2 → A), ρ (Sum.inl ()) w ↔ w 0 ≤ w 1) :
                                    spec.orderFree.IsTgt ρ ↔ spec.IsTgt (spec.B.restPart ρ)
                                    Dependency graph

                                    Acceptance by the order-free reading is acceptance under a guessed order: the walk accepts exactly when the original one accepts for some linear order on the universe. Together with order-invariance – the equivalence required at every linear order in DescriptiveComplexity.SOTCDefinable – this is what removes the hypothesis.

                                    Dependency graph

                                    Order-free SO(TC) definability #

                                    A decision problem is order-free SO(TC) definable if it is defined by a DescriptiveComplexity.SOTCSpecFree on nonempty finite structures – with no linear order in the statement at all, unlike DescriptiveComplexity.SOTCDefinable.

                                    Equations
                                    Instances For
                                      Dependency graph

                                      The order of SO(TC) can be guessed: order-invariant SO(TC) definability over ordered structures and order-free SO(TC) definability are the same notion. Left to right the order is guessed into the state (DescriptiveComplexity.SOTCSpec.orderFree) – a linear order exists on every finite universe, and by order-invariance any one of them will do; right to left a specification that never mentions the order is one that ignores it. Registered in the Lax archive as Lax134656.TransitiveClosureWithoutOrder.sotcDefinable_iff_free.

                                      Dependency graph

                                      PSPACE needs no order: membership is definability by an order-free SO(TC) specification. Registered in the Lax archive as Lax134656.TransitiveClosureWithoutOrder.mem_PSPACE_iff_sotcDefinableFree.

                                      Dependency graph