Documentation

DescriptiveComplexity.Invariant.OrderedPebble

The canonical order on ≡ᵏ-classes, as an inflationary refinement #

The k-pebble refinement (DescriptiveComplexity.Invariant.Pebble) splits classes round by round; this file runs the ordered version of the same refinement: a strict order DescriptiveComplexity.ordStage on k-tuples that grows round by round – tuples split apart become comparable, and stay comparable for ever after. The initial data is a coloring c₀ of the tuples in a linear order (over a structure: the atomic type, read as a tuple of bits); one round (DescriptiveComplexity.ordRefine) keeps the current order and, inside one incomparability class, compares first the colors, then the move sets – at the first pebble where they differ, the sets of current classes reachable by moving that pebble, compared through their least separating class (DescriptiveComplexity.SetLess).

The point of the construction, and the reason it is phrased as a growing chain, is twofold:

Everything is stated over a bare type and an abstract coloring, with no vocabulary in sight, exactly as in DescriptiveComplexity.Invariant.Pebble; the instantiation at the atomic coloring of a structure, and the first-order definition of one round, live with the invariant structure.

Incomparability, move sets, and set comparison #

Incomparability in a relation on k-tuples: the current classes.

Equations
Instances For
    Dependency graph
    theorem DescriptiveComplexity.IncompRel.symm {A : Type} {k : } {O : PebbleRel A k} {u v : Fin kA} (h : IncompRel O u v) :
    IncompRel O v u
    Dependency graph
    def DescriptiveComplexity.InMoves {A : Type} {k : } (O : PebbleRel A k) (j : Fin k) (u x : Fin kA) :

    The class of x belongs to the move set of u at pebble j: some move of pebble j from u lands in the class of x.

    Equations
    Instances For
      Dependency graph
      def DescriptiveComplexity.MovesEq {A : Type} {k : } (O : PebbleRel A k) (j : Fin k) (u v : Fin kA) :

      The move sets of u and v at pebble j coincide.

      Equations
      Instances For
        Dependency graph
        def DescriptiveComplexity.MovesDiff {A : Type} {k : } (O : PebbleRel A k) (j : Fin k) (u v x : Fin kA) :

        The class of x separates the move sets of u and v at pebble j.

        Equations
        Instances For
          Dependency graph
          theorem DescriptiveComplexity.MovesDiff.symm {A : Type} {k : } {O : PebbleRel A k} {j : Fin k} {u v x : Fin kA} (h : MovesDiff O j u v x) :
          MovesDiff O j v u x
          Dependency graph
          def DescriptiveComplexity.SetLess {A : Type} {k : } (O : PebbleRel A k) (j : Fin k) (u v : Fin kA) :

          Comparison of move sets at pebble j: a class in the move set of u but not of v is minimal among the separating classes.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Dependency graph
            def DescriptiveComplexity.MovesLess {A : Type} {k : } (O : PebbleRel A k) (u v : Fin kA) :

            Lexicographic comparison of the move sets over the pebbles: equal before some pebble, less at it.

            Equations
            Instances For
              Dependency graph

              One round of the ordered refinement, and the chain #

              def DescriptiveComplexity.colorAgree {A : Type} {k : } {β : Type u_1} (c₀ : (Fin kA)β) :

              Agreement on the coloring: the initial relation of the refinement.

              Equations
              Instances For
                Dependency graph
                theorem DescriptiveComplexity.colorAgree_equivalence {A : Type} {k : } {β : Type u_1} (c₀ : (Fin kA)β) :
                Dependency graph
                def DescriptiveComplexity.ordRefine {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) (O : PebbleRel A k) :

                One round of the ordered refinement: keep the current order; inside one incomparability class, compare the colors, then the move sets.

                Equations
                Instances For
                  Dependency graph
                  def DescriptiveComplexity.ordStage {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) :
                  PebbleRel A k

                  The ordered refinement chain, from the empty order.

                  Equations
                  Instances For
                    Dependency graph
                    def DescriptiveComplexity.OrdK {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) :

                    The canonical order: the union of the ordered refinement chain. Its incomparability is ≡ᵏ (DescriptiveComplexity.incompRel_ordK_eq), and it is transitive and asymmetric, so it is a linear order on the ≡ᵏ-classes.

                    Equations
                    Instances For
                      Dependency graph
                      theorem DescriptiveComplexity.ordStage_le_succ {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) (n : ) {u v : Fin kA} (h : ordStage c₀ n u v) :
                      ordStage c₀ (n + 1) u v

                      The chain grows: one round only ever adds pairs.

                      Dependency graph
                      theorem DescriptiveComplexity.ordStage_le_of_le {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) {m n : } (hmn : m n) {u v : Fin kA} (h : ordStage c₀ m u v) :
                      ordStage c₀ n u v

                      The chain grows, monotonically.

                      Dependency graph

                      Structural lemmas #

                      Each lemma of this section holds for any relation with the listed fragments of the stage invariant – asymmetry, transitivity, transitivity of incomparability – which the master induction (DescriptiveComplexity.ordStage_invariant) establishes stage by stage.

                      theorem DescriptiveComplexity.IncompRel.congr_left {A : Type} {k : } {O : PebbleRel A k} (htrans : ∀ (u v w : Fin kA), O u vO v wO u w) (hinc : ∀ (u v w : Fin kA), IncompRel O u vIncompRel O v wIncompRel O u w) {u v w : Fin kA} (h : O u v) (hvw : IncompRel O v w) :
                      O u w

                      Comparability is a congruence for incomparability, on the right.

                      Dependency graph
                      theorem DescriptiveComplexity.IncompRel.congr_right {A : Type} {k : } {O : PebbleRel A k} (htrans : ∀ (u v w : Fin kA), O u vO v wO u w) (hinc : ∀ (u v w : Fin kA), IncompRel O u vIncompRel O v wIncompRel O u w) {u v w : Fin kA} (huv : IncompRel O u v) (h : O v w) :
                      O u w

                      Comparability is a congruence for incomparability, on the left.

                      Dependency graph
                      theorem DescriptiveComplexity.InMoves.congr {A : Type} {k : } {O : PebbleRel A k} (hinc : ∀ (u v w : Fin kA), IncompRel O u vIncompRel O v wIncompRel O u w) {j : Fin k} {u x y : Fin kA} (h : InMoves O j u x) (hxy : IncompRel O x y) :
                      InMoves O j u y

                      Membership in a move set only depends on the class of the target.

                      Dependency graph
                      theorem DescriptiveComplexity.setLess_or {A : Type} {k : } {O : PebbleRel A k} (hasymm : ∀ (u v : Fin kA), O u v¬O v u) (htrans : ∀ (u v w : Fin kA), O u vO v wO u w) [Finite A] {j : Fin k} {u v : Fin kA} (h : ¬MovesEq O j u v) :
                      SetLess O j u v SetLess O j v u

                      If the move sets differ, one compares below the other: the least separating class lands on one of the two sides.

                      Dependency graph
                      theorem DescriptiveComplexity.setLess_asymm {A : Type} {k : } {O : PebbleRel A k} (hinc : ∀ (u v w : Fin kA), IncompRel O u vIncompRel O v wIncompRel O u w) {j : Fin k} {u v : Fin kA} (h : SetLess O j u v) :
                      ¬SetLess O j v u

                      Set comparison is asymmetric: the two candidate least separating classes would be incomparable, hence equal as classes, hence on the same side.

                      Dependency graph
                      theorem DescriptiveComplexity.SetLess.congr_right {A : Type} {k : } {O : PebbleRel A k} {j : Fin k} {u v w : Fin kA} (h : SetLess O j u v) (hvw : MovesEq O j v w) :
                      SetLess O j u w

                      Set comparison is invariant under move-set equality on the right.

                      Dependency graph
                      theorem DescriptiveComplexity.SetLess.congr_left {A : Type} {k : } {O : PebbleRel A k} {j : Fin k} {u v w : Fin kA} (huv : MovesEq O j u v) (h : SetLess O j v w) :
                      SetLess O j u w

                      Set comparison is invariant under move-set equality on the left.

                      Dependency graph
                      theorem DescriptiveComplexity.setLess_trans {A : Type} {k : } {O : PebbleRel A k} (htrans : ∀ (u v w : Fin kA), O u vO v wO u w) (hinc : ∀ (u v w : Fin kA), IncompRel O u vIncompRel O v wIncompRel O u w) {j : Fin k} {u v w : Fin kA} (h₁ : SetLess O j u v) (h₂ : SetLess O j v w) :
                      SetLess O j u w

                      Set comparison is transitive: compare the two least separating classes, and reuse the smaller one.

                      Dependency graph
                      theorem DescriptiveComplexity.SetLess.not_movesEq {A : Type} {k : } {O : PebbleRel A k} {j : Fin k} {u v : Fin kA} (h : SetLess O j u v) (heq : MovesEq O j u v) :

                      Move-set equality contradicts set comparison at the same pebble.

                      Dependency graph
                      theorem DescriptiveComplexity.movesLess_asymm {A : Type} {k : } {O : PebbleRel A k} (hinc : ∀ (u v w : Fin kA), IncompRel O u vIncompRel O v wIncompRel O u w) {u v : Fin kA} (h : MovesLess O u v) :

                      Lexicographic move-set comparison is asymmetric.

                      Dependency graph
                      theorem DescriptiveComplexity.movesLess_trans {A : Type} {k : } {O : PebbleRel A k} (htrans : ∀ (u v w : Fin kA), O u vO v wO u w) (hinc : ∀ (u v w : Fin kA), IncompRel O u vIncompRel O v wIncompRel O u w) {u v w : Fin kA} (h₁ : MovesLess O u v) (h₂ : MovesLess O v w) :
                      MovesLess O u w

                      Lexicographic move-set comparison is transitive.

                      Dependency graph
                      theorem DescriptiveComplexity.movesLess_or {A : Type} {k : } {O : PebbleRel A k} (hasymm : ∀ (u v : Fin kA), O u v¬O v u) (htrans : ∀ (u v w : Fin kA), O u vO v wO u w) [Finite A] {u v : Fin kA} (h : ¬∀ (j : Fin k), MovesEq O j u v) :
                      MovesLess O u v MovesLess O v u

                      If the move sets differ at some pebble, the tuples compare one way or the other lexicographically: cut at the first differing pebble.

                      Dependency graph

                      The stage invariant #

                      theorem DescriptiveComplexity.ordStage_invariant {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) [Finite A] (n : ) :
                      (∀ (u v : Fin kA), ordStage c₀ n u v¬ordStage c₀ n v u) (∀ (u v w : Fin kA), ordStage c₀ n u vordStage c₀ n v wordStage c₀ n u w) IncompRel (ordStage c₀ n) = pebbleStage (colorAgree c₀) n

                      The stage invariant of the ordered refinement: every stage is asymmetric and transitive, and its incomparability is the corresponding pebble stage relative to color agreement. One simultaneous induction establishes all three.

                      Dependency graph

                      The limit #

                      theorem DescriptiveComplexity.ordK_asymm {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) [Finite A] {u v : Fin kA} (h : OrdK c₀ u v) :
                      ¬OrdK c₀ v u

                      The canonical order is asymmetric.

                      Dependency graph
                      theorem DescriptiveComplexity.ordK_trans {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) [Finite A] {u v w : Fin kA} (h₁ : OrdK c₀ u v) (h₂ : OrdK c₀ v w) :
                      OrdK c₀ u w

                      The canonical order is transitive.

                      Dependency graph
                      theorem DescriptiveComplexity.incompRel_ordK_eq {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) [Finite A] :

                      Incomparability in the canonical order is ≡ᵏ: the limit linearly orders the ≡ᵏ-classes.

                      Dependency graph
                      theorem DescriptiveComplexity.ordK_or_of_not_equivK {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) [Finite A] {u v : Fin kA} (h : ¬EquivK (colorAgree c₀) u v) :
                      OrdK c₀ u v OrdK c₀ v u

                      Inequivalent tuples are comparable in the canonical order.

                      Dependency graph
                      theorem DescriptiveComplexity.incompRel_ordK_trans {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) [Finite A] {u v w : Fin kA} (h₁ : IncompRel (OrdK c₀) u v) (h₂ : IncompRel (OrdK c₀) v w) :
                      IncompRel (OrdK c₀) u w

                      Incomparability in the canonical order is transitive.

                      Dependency graph
                      theorem DescriptiveComplexity.OrdK.congr_left {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) [Finite A] {u v w : Fin kA} (h : OrdK c₀ u v) (hvw : EquivK (colorAgree c₀) v w) :
                      OrdK c₀ u w

                      The canonical order is a congruence for ≡ᵏ on the right.

                      Dependency graph
                      theorem DescriptiveComplexity.OrdK.congr_right {A : Type} {k : } {β : Type u_1} [LinearOrder β] (c₀ : (Fin kA)β) [Finite A] {u v w : Fin kA} (huv : EquivK (colorAgree c₀) u v) (h : OrdK c₀ v w) :
                      OrdK c₀ u w

                      The canonical order is a congruence for ≡ᵏ on the left.

                      Dependency graph