Documentation

LeanPool.PartialCombinatoryAlgebras.GraphModel

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

An encoding of lists of α's as α.

  • fromList : List αα

    Encode a list as a single element.

  • toList : αList α

    Decode an element back into a list.

  • eq_list (xs : List α) : toList (fromList xs) = xs

    Encoding followed by decoding is the identity.

Instances
    @[implicit_reducible]

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

    Equations
    @[reducible]

    [x] qua subset of elements listed by x.

    Equations
    Instances For
      @[simp]

      Computation rule for the first projection from a pair.

      Computation rule for the second projection from a pair.

      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
      • One or more equations did not get rendered due to their size.
      Instances For

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

        Equations
        Instances For

          A continuous map is monotone

          Continuity of a binary map

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

            Monotonicity of a binary map.

            Equations
            Instances For

              A continuous binary map is monotone.

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

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

              theorem LeanPool.PartialCombinatoryAlgebras.GraphModel.continuous₂_fst {α : Type} [Listing α] (h : Set αSet αSet α) :
              continuous₂ h∀ (S : Set α), continuous (h S)

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

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

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

              A constant map is continuous.

              theorem LeanPool.PartialCombinatoryAlgebras.GraphModel.continuous_finite {α : Type} [Listing α] {f : Set αSet α} (ys : List α) (S : Set α) :
              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 LeanPool.PartialCombinatoryAlgebras.GraphModel.continuous₂_compose {α : Type} [Listing α] (f g : Set αSet α) (h : Set αSet αSet α) :
              continuous fcontinuous gcontinuous₂ hcontinuous fun (U : Set α) => h (f U) (g U)

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

              The graph of a function

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem LeanPool.PartialCombinatoryAlgebras.GraphModel.continuous_graph {α : Type} [Listing α] (f : Set αSet αSet α) :
                continuous₂ fcontinuous fun (S : Set α) => graph (f S)

                Currying combined with graph is continuous

                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.

                The graph of a continuous map applied (via apply) recovers the map.

                The K combinator of the graph model.

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

                  The graph-model K combinator satisfies the K equation.

                  The S combinator of the graph model.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    theorem LeanPool.PartialCombinatoryAlgebras.GraphModel.S.continuous₁ {α : Type} [Listing α] {B C : Set α} :
                    continuous fun (A : Set α) => A C (B C)

                    Continuity component used in eq_S.

                    theorem LeanPool.PartialCombinatoryAlgebras.GraphModel.S.continuous₂ {α : Type} [Listing α] {A C : Set α} :
                    continuous fun (B : Set α) => A C (B C)

                    Continuity component used in eq_S.

                    theorem LeanPool.PartialCombinatoryAlgebras.GraphModel.S.continuous₃ {α : Type} [Listing α] {A B : Set α} :
                    continuous fun (C : Set α) => A C (B C)

                    Continuity component used in eq_S.

                    theorem LeanPool.PartialCombinatoryAlgebras.GraphModel.eq_S {α : Type} [Listing α] {A B C : Set α} :
                    S A B C = A C (B C)

                    The graph-model S combinator satisfies the S equation.

                    @[implicit_reducible]

                    The graph model

                    Equations
                    • One or more equations did not get rendered due to their size.