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 k → A} (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 k → A) :

    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 k → A) :

      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 k → A) :

        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 k → A} (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 k → A) :

          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 k → A) :

            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 k → A) → β) :

              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 k → A) → β) :
                Dependency graph
                def DescriptiveComplexity.ordRefine {A : Type} {k : ℕ} {β : Type u_1} [LinearOrder β] (c₀ : (Fin k → A) → β) (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 k → A) → β) :
                  ℕ → 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 k → A) → β) :

                    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

                      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 k → A), O u v → O v w → O u w) (hinc : ∀ (u v w : Fin k → A), IncompRel O u v → IncompRel O v w → IncompRel O u w) {u v w : Fin k → A} (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 k → A), O u v → O v w → O u w) (hinc : ∀ (u v w : Fin k → A), IncompRel O u v → IncompRel O v w → IncompRel O u w) {u v w : Fin k → A} (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 k → A), IncompRel O u v → IncompRel O v w → IncompRel O u w) {j : Fin k} {u x y : Fin k → A} (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.congr_right {A : Type} {k : ℕ} {O : PebbleRel A k} {j : Fin k} {u v w : Fin k → A} (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 k → A} (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

                      The stage invariant #

                      theorem DescriptiveComplexity.ordStage_invariant {A : Type} {k : ℕ} {β : Type u_1} [LinearOrder β] (c₀ : (Fin k → A) → β) [Finite A] (n : ℕ) :
                      (∀ (u v : Fin k → A), ordStage c₀ n u v → ¬ordStage c₀ n v u) ∧ (∀ (u v w : Fin k → A), ordStage c₀ n u v → ordStage c₀ n v w → ordStage 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 k → A) → β) [Finite A] {u v : Fin k → A} (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 k → A) → β) [Finite A] {u v w : Fin k → A} (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 k → A) → β) [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 k → A) → β) [Finite A] {u v : Fin k → A} (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.OrdK.congr_left {A : Type} {k : ℕ} {β : Type u_1} [LinearOrder β] (c₀ : (Fin k → A) → β) [Finite A] {u v w : Fin k → A} (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 k → A) → β) [Finite A] {u v w : Fin k → A} (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