Documentation

LeanPool.DomainTheory.Neighborhood.Exercise425

Exercise 4.25 (Scott 1981, PRG-19, Lecture IV) — the unary sequence domain C₁ #

"Perhaps the domains N and C are not exactly analogous?" C (Example 4.4) was built over the two-letter alphabet {0,1}. Scott asks to build the analogue C₁ over {1}* — finite strings of 1s, which we encode by their length n ∈ ℕ (so 1ⁿ ↔ n). The neighbourhoods are the tails and the singletons:

C₁ = {{1ᵐ ∣ m ≥ n} ∣ n ∈ ℕ} ∪ {{1ⁿ} ∣ n ∈ ℕ} (tail n = {m ∣ n ≤ m}, {n}).

This is again a nested-or-disjoint system (ofNestedOrDisjoint): the tails form a descending chain and a singleton is either inside a tail or disjoint from it. The total elements are the finite strings 1ⁿ (oneElem n = ↑{n}) and the partial elements 1ⁿ⊥ ("at least n ones", oneBot n = ↑(tail n)).

The structure analogous to C is the single successor x ↦ 1x (consMap, prepending a 1, i.e. shifting the length up by one), with consMap_oneElem/consMap_oneBot. Crucially — and this is Scott's point that N and C are not analogous — C₁ is not flat like N: the successor has a genuine infinite fixed point 1^∞ = 1·1^∞ (infElt, infElt_eq), the limit ⊔ₙ 1ⁿ⊥ of the tails, which has no counterpart among the elements ⊥, 0̂, 1̂, 2̂, … of the flat domain N. So C₁ is the genuine unary analogue of C (= C₂), distinct from N.

Finally, the systems are related by approximable maps: e.g. relateNToC1 : N → C₁ sends the numeral to the finite string 1ⁿ and is strict (⊥ ↦ ⊥) — the natural "length ↦ unary expansion" map (relateNToC1_natElem, relateNToC1_bot).

The data (C₁, consMap, relateNToC1) is choice-free (#print axioms ⊆ {propext, Quot.sound}).

Tails, singletons, and the shift. #

The tail tail n = {1ᵐ ∣ m ≥ n} = {m ∣ n ≤ m} (the partial information "at least n ones").

Equations
Instances For

    Shifting a set up by one length: shift X = {m + 1 ∣ m ∈ X} (the token action of prepending a 1).

    Equations
    Instances For

      1·(1ⁿ⊥) = 1ⁿ⁺¹⊥: shifting a tail.

      1·{1ⁿ} = {1ⁿ⁺¹}: shifting a singleton.

      The neighbourhood system C₁. #

      Membership in C₁: a neighbourhood is a tail tail n or a singleton {n}.

      Equations
      Instances For

        Shifting keeps us inside C₁ (shift (tail n) = tail (n+1), shift {n} = {n+1}).

        A singleton and a tail are nested or disjoint.

        Any two neighbourhoods of C₁ are nested or disjoint.

        Exercise 4.25 (Scott 1981, PRG-19). The unary sequence system C₁ on Δ = {1}* ≅ ℕ.

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

          Elements: 1ⁿ (total) and 1ⁿ⊥ (partial). #

          The partial element 1ⁿ⊥ = ↑(tail n) ("at least n ones").

          Equations
          Instances For

            The total element 1ⁿ = ↑{n} (the finite string of exactly n ones).

            Equations
            Instances For

              The successor x ↦ 1x. #

              Exercise 4.25 — the successor x ↦ 1x (analogous to the two successors of C). The approximable map prepending a 1, i.e. shifting the length: X (1x) Y ↔ shift X ⊆ Y.

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

                1·(1ⁿ⊥) = 1ⁿ⁺¹⊥.

                The infinite element 1^∞ = 1·1^∞. #

                Exercise 4.25 — the infinite unary sequence 1^∞. Unlike the flat domain N (whose only elements are and the numerals ), C₁ has a genuine infinite element: the least fixed point of the successor x ↦ 1x, satisfying 1^∞ = 1·1^∞ (infElt_eq). This is what distinguishes the non-flat C₁ (the true analogue of C) from N.

                Equations
                Instances For

                  1^∞ = 1·1^∞: the infinite sequence is fixed by the successor.

                  An approximable map relating N and C₁. #

                  Exercise 4.25 — relating N and C₁. The "length ↦ unary expansion" map N → C₁ sending the numeral to the finite string 1ⁿ and to (strict). Built from the strict-lift combinator constLiftN of Example 4.3.

                  Equations
                  Instances For