Documentation

PartialCombinatoryAlgebras.GraphModel

We derive from a given section-retraction List α → α the combinatory algebra structure on Set α.

class Listing (α : Type) :

An encoding of lists of α's as α.

Instances
    instance Listing.inhabited {α : Type} [Listing α] :

    A set equipped with Listing has as its canonical element the encoding of [].

    Equations
    @[reducible]
    def toSet {α : Type} [Listing α] (x : α) :
    Set α

    [x] qua subset of elements listed by x.

    Equations
    Instances For
      @[simp]
      theorem eq_toSet_fromList {α : Type} [Listing α] {ys : List α} :
      toSet (Listing.fromList ys) = fun (a : α) => List.Mem a ys
      def Listing.pair {α : Type} [Listing α] (x y : α) :
      α

      We encode pairs as lists of length two.

      Equations
      Instances For
        def Listing.fst {α : Type} [Listing α] (x : α) :
        α

        The first projection from a pair.

        Equations
        Instances For
          def Listing.snd {α : Type} [Listing α] (x : α) :
          α

          The second projection from a pair.

          Equations
          Instances For
            theorem Listing.eq_fst_pair {α : Type} [Listing α] (x y : α) :

            Computation rule for the first projection from a pair.

            theorem Listing.eq_snd_pair {α : Type} [Listing α] (x y : α) :

            Computation rule for the second projection from a pair.

            def GraphModel.continuous {α : Type} [Listing α] (f : Set αSet α) :

            A map Set α → Set α is continuous when its values are determined on finite subsets. This is continuity in the sense of Scott topology, but we avoid developing a general theory of domains, so we will specialize all definitions to the situation at hand.

            Equations
            Instances For
              def GraphModel.monotone {α : Type} (f : Set αSet α) :

              Monotonicity of a map Set α → Set α with respect to subset inclusion.

              Equations
              Instances For

                A continuous map is monotone

                def GraphModel.continuous₂ {α : Type} [Listing α] (f : Set αSet αSet α) :

                Continuity of a binary map

                Equations
                Instances For
                  def GraphModel.monotone₂ {α : Type} (f : Set αSet αSet α) :

                  Monotonicity of a binary map.

                  Equations
                  Instances For

                    A continuous binary map is monotone.

                    theorem GraphModel.continuous₂_separately {α : Type} [Listing α] (f : Set αSet αSet α) :
                    (∀ (S : Set α), GraphModel.continuous (f S))(∀ (T : Set α), GraphModel.continuous fun (S : Set α) => f S T)GraphModel.continuous₂ f

                    If a binary map is continuous in each arguments separately, then it is continuous.

                    theorem GraphModel.continuous₂_fst {α : Type} [Listing α] (h : Set αSet αSet α) :

                    A continuous binary map is continuous as a map of its first argument

                    theorem GraphModel.continuous₂_snd {α : Type} [Listing α] (h : Set αSet αSet α) :
                    GraphModel.continuous₂ h∀ (T : Set α), GraphModel.continuous fun (S : Set α) => h S T

                    A continuous binary map is contunuous as a map of its second argument

                    The identity map is continuous.

                    Equations
                    • =
                    Instances For
                      def GraphModel.continuous_const {α : Type} [Listing α] (T : Set α) :
                      GraphModel.continuous fun (x : Set α) => T

                      A constant map is continuous.

                      Equations
                      • =
                      Instances For
                        theorem GraphModel.continuous_finite {α : Type} [Listing α] {f : Set αSet α} (ys : List α) (S : Set α) :
                        GraphModel.continuous f(∀ yys, y f S)∃ (z : α), toSet z S yys, y f (toSet z)

                        If f is continuous then any finite subset of f S is already a subset of some f S' where S' ⊆ S is finite (in the statement S' is toSet z). The lemma is used in the theorem showing that composition preserves continuity.

                        The composition of continuous maps is continuous.

                        theorem GraphModel.continuous₂_compose {α : Type} [Listing α] (f g : Set αSet α) (h : Set αSet αSet α) :

                        The composition of a binary continuous map and continuous maps is continuous.

                        def GraphModel.graph {α : Type} [Listing α] (f : Set αSet α) :
                        Set α

                        The graph of a function

                        Equations
                        Instances For
                          def GraphModel.continuous_graph {α : Type} [Listing α] (f : Set αSet αSet α) :

                          Currying combined with graph is continuous

                          Equations
                          • =
                          Instances For
                            def GraphModel.apply {α : Type} [Listing α] (S : Set α) :
                            Set αSet α

                            Combinatory application on the graph model

                            Equations
                            Instances For
                              @[reducible]
                              instance GraphModel.Listing.hasDot {α : Type} [Listing α] :
                              HasDot (Set α)
                              Equations
                              • GraphModel.Listing.hasDot = { dot := GraphModel.apply }
                              theorem GraphModel.apply.monotone₂ {α : Type} [Listing α] :
                              GraphModel.monotone₂ GraphModel.apply

                              Application is monotone.

                              theorem GraphModel.apply.monotone_fst {α : Type} [Listing α] {T : Set α} :

                              Application is monotone in the first argument.

                              Application is monotone in the second argument.

                              Application is continuous in the first argument.

                              Application is continuous in the second argument.

                              Application is continuous.

                              def GraphModel.K {α : Type} [Listing α] :
                              Set α
                              Equations
                              Instances For
                                theorem GraphModel.eq_K {α : Type} [Listing α] {A B : Set α} :
                                GraphModel.K A B = A
                                def GraphModel.S {α : Type} [Listing α] :
                                Set α
                                Equations
                                Instances For
                                  theorem GraphModel.S.continuous₁ {α : Type} [Listing α] {B C : Set α} :
                                  GraphModel.continuous fun (A : Set α) => A C (B C)
                                  theorem GraphModel.S.continuous₂ {α : Type} [Listing α] {A C : Set α} :
                                  GraphModel.continuous fun (B : Set α) => A C (B C)
                                  theorem GraphModel.S.continuous₃ {α : Type} [Listing α] {A B : Set α} :
                                  GraphModel.continuous fun (C : Set α) => A C (B C)
                                  theorem GraphModel.eq_S {α : Type} [Listing α] {A B C : Set α} :
                                  GraphModel.S A B C = A C (B C)
                                  instance GraphModel.isCA {α : Type} [Listing α] :
                                  CA (Set α)

                                  The graph model

                                  Equations
                                  • GraphModel.isCA = CA.mk GraphModel.K GraphModel.S