Documentation

DescriptiveComplexity.Problems.CodeHalt.Hardness.Interp

The interpretation that draws an instance as a program #

The defining formulas of the reduction P ≤ᶠᵒ[≤] CODEHALT, and the interpretation DescriptiveComplexity.codeProgInterp they assemble, of dimension DescriptiveComplexity.dimOf V over the ordered expansion of the source vocabulary.

Three things make the formulas short.

The section “Characterization of the interpreted relations” reads each relation of FirstOrder.Language.code back through DescriptiveComplexity.FOInterpretation.relMap_map; the two semantic relations DescriptiveComplexity.Arg1On and DescriptiveComplexity.Arg2On are the only interface the correctness proof uses.

Selecting the coordinates of an argument #

The coordinates of the only argument of a unary symbol.

Equations
Instances For
    Dependency graph

    The coordinates of the first argument of a binary symbol.

    Equations
    Instances For
      Dependency graph

      The coordinates of the second argument of a binary symbol.

      Equations
      Instances For
        Dependency graph

        The first coordinate: the one the numeral chain walks.

        Equations
        Instances For
          Dependency graph

          The atomic builders #

          @[reducible, inline]

          A symbol of the source vocabulary, in the ordered expansion.

          Equations
          Instances For
            Dependency graph

            The symbol i of the source vocabulary holds of the first coordinates of the tuple held by the first argument, as a formula.

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

              The coordinate j of the first argument is a maximum, as a formula.

              Equations
              Instances For
                Dependency graph

                The coordinate j of the second argument is a minimum, as a formula.

                Equations
                Instances For
                  Dependency graph

                  The coordinate j of the second argument covers that of the first, as a formula.

                  Equations
                  Instances For
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.CodeProgRed.realize_relAtF {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [L.Structure A] [LinearOrder A] {v : Fin 2 × Fin (dimOf V)A} (i : Fin V.numSyms) :
                    (relAtF i).Realize v bitOf V i fun (j : Fin (dimOf V)) => v (selA V j)
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.CodeProgRed.realize_maxAF {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [L.Structure A] [LinearOrder A] {v : Fin 2 × Fin (dimOf V)A} (j : Fin (dimOf V)) :
                    (maxAF j).Realize v IsTop (v (selA V j))
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.CodeProgRed.realize_botBF {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [L.Structure A] [LinearOrder A] {v : Fin 2 × Fin (dimOf V)A} (j : Fin (dimOf V)) :
                    (botBF j).Realize v IsBot (v (selB V j))
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.CodeProgRed.realize_succCoF {L : FirstOrder.Language} {V : L.FinVocab} {A : Type} [L.Structure A] [LinearOrder A] {v : Fin 2 × Fin (dimOf V)A} (j : Fin (dimOf V)) :
                    (succCoF j).Realize v v (selA V j) < v (selB V j) ∀ (a : A), ¬(v (selA V j) < a a < v (selB V j))
                    Dependency graph

                    The bodies of the child relations #

                    Dependency graph

                    The body of the second-child relation, one case per pair of tags.

                    Equations
                    Instances For
                      Dependency graph

                      The defining formulas #

                      noncomputable def DescriptiveComplexity.CodeProgRed.guardF {L : FirstOrder.Language} (V : L.FinVocab) (cP : Nat.Partrec.Code) {γ : Type} (sel : Fin (dimOf V)γ) (t : ProgTag V cP) :

                      The guard of a tag on the argument selected by sel: the coordinates it does not use are minima.

                      Equations
                      Instances For
                        Dependency graph

                        The mark of a constructor, as a formula: the tag draws it, and the argument is canonically padded.

                        Equations
                        Instances For
                          Dependency graph

                          Being the root, as a formula.

                          Equations
                          Instances For
                            Dependency graph

                            The first-child relation, as a formula.

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

                              The second-child relation, as a formula.

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

                                The interpretation #

                                The interpretation drawing an instance as a program: the root of the drawn code composes the fixed procedure cP with the pair of the numeral of the universe size and the nest of the tables.

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

                                  The semantics of the drawing #

                                  def DescriptiveComplexity.progPt {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} (t : ProgTag V cP) (u : Fin (dimOf V)A) :

                                  The element of the drawn instance with a given tag and tuple.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    theorem DescriptiveComplexity.exists_progPt {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} (q : (codeProgInterp V cP).Map A) :
                                    ∃ (t : ProgTag V cP) (u : Fin (dimOf V)A), q = progPt t u
                                    Dependency graph
                                    def DescriptiveComplexity.OkOn {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} [LinearOrder A] (t : ProgTag V cP) (u : Fin (dimOf V)A) :

                                    The guard of an element: the coordinates its tag does not use are minima. Elements failing it carry no mark and no child, so they draw nothing.

                                    Equations
                                    Instances For
                                      Dependency graph
                                      def DescriptiveComplexity.Arg1On {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} [L.Structure A] [LinearOrder A] :
                                      ProgTag V cPProgTag V cP(Fin (dimOf V)A)(Fin (dimOf V)A)Prop

                                      The first-child relation of the drawing, one case per pair of tags.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        def DescriptiveComplexity.Arg2On {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} [LinearOrder A] :
                                        ProgTag V cPProgTag V cP(Fin (dimOf V)A)(Fin (dimOf V)A)Prop

                                        The second-child relation of the drawing, one case per pair of tags.

                                        Equations
                                        Instances For
                                          Dependency graph

                                          Characterization of the interpreted relations #

                                          theorem DescriptiveComplexity.realize_arg1Body {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (t t' : ProgTag V cP) (u u' : Fin (dimOf V)A) (v : Fin 2 × Fin (dimOf V)A) (hA : ∀ (j : Fin (dimOf V)), v (CodeProgRed.selA V j) = u j) (hB : ∀ (j : Fin (dimOf V)), v (CodeProgRed.selB V j) = u' j) :
                                          (CodeProgRed.arg1Body V cP t t').Realize v Arg1On t t' u u'
                                          Dependency graph
                                          theorem DescriptiveComplexity.realize_arg2Body {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (t t' : ProgTag V cP) (u u' : Fin (dimOf V)A) (v : Fin 2 × Fin (dimOf V)A) (hA : ∀ (j : Fin (dimOf V)), v (CodeProgRed.selA V j) = u j) (hB : ∀ (j : Fin (dimOf V)), v (CodeProgRed.selB V j) = u' j) :
                                          (CodeProgRed.arg2Body V cP t t').Realize v Arg2On t t' u u'
                                          Dependency graph
                                          Dependency graph
                                          theorem DescriptiveComplexity.mark_pt {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (s : CodeTag) (t : ProgTag V cP) (u : Fin (dimOf V)A) :
                                          Mark s (progPt t u) OkOn t u t.mark = s
                                          Dependency graph
                                          theorem DescriptiveComplexity.cArg1_pt {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (t t' : ProgTag V cP) (u u' : Fin (dimOf V)A) :
                                          CArg1 (progPt t u) (progPt t' u') OkOn t u OkOn t' u' Arg1On t t' u u'
                                          Dependency graph
                                          theorem DescriptiveComplexity.cArg2_pt {L : FirstOrder.Language} {V : L.FinVocab} {cP : Nat.Partrec.Code} {A : Type} [L.Structure A] [LinearOrder A] (t t' : ProgTag V cP) (u u' : Fin (dimOf V)A) :
                                          CArg2 (progPt t u) (progPt t' u') OkOn t u OkOn t' u' Arg2On t t' u u'
                                          Dependency graph