Documentation

LeanPool.DomainTheory.Neighborhood.Example62C

Example 6.2 (Scott 1981, PRG-19, §6) — C ≅ {{Λ}} + C + C #

Following Dana Scott, Lectures on a Mathematical Theory of Computation, PRG-19 (1981), Lecture VI. This module formalizes the second domain equation of Example 6.2, for the system C of finite or infinite binary sequences (Example 4.4):

C ≅ {{Λ}} + C + C,

where {{Λ}} = 𝟙 is the one-point (unit) domain (Exercise 3.15). Presented over {0,1}*,

C = {Σ*} ∪ {{Λ}} ∪ {0X ∣ X ∈ C} ∪ {1X ∣ X ∈ C},

so a neighbourhood of C is the master Σ* (= cone []), the terminator {Λ} = {[]}, a 0-copy 0X = embBit false X, or a 1-copy 1X = embBit true X. These four shapes are exactly those of a three-way separated sum 𝟙 + C + C: a fresh basepoint, plus one 𝟙-copy (the lone {Λ}), plus two C-copies.

Crucially this is a genuine three-way sum: nesting the binary sum (𝟙 + (C + C)) would introduce a spurious extra bottom element (the inner sum's basepoint) with no counterpart in C. So we first build the three-way separated sum sum3 (mirroring Exercise 3.18), then exhibit the order-isomorphism ccEquiv : |C| ≃o |𝟙 + C + C|.

All data is choice-free (#print axioms ⊆ {propext, Quot.sound}).

The three-way separated sum D₀ + D₁ + D₂. #

Tokens are Option (α ⊕ β ⊕ γ): a fresh basepoint Λ = none below three disjoint tagged copies.

def Domain.Neighborhood.t0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (a : α) :
Option (α β γ)

Left tag 0a = some (inl a).

Equations
Instances For
    def Domain.Neighborhood.t1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (b : β) :
    Option (α β γ)

    Middle tag 1b = some (inr (inl b)).

    Equations
    Instances For
      def Domain.Neighborhood.t2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (c : γ) :
      Option (α β γ)

      Right tag 2c = some (inr (inr c)).

      Equations
      Instances For
        def Domain.Neighborhood.j0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (X : Set α) :
        Set (Option (α β γ))

        The tagged left copy 0X.

        Equations
        Instances For
          def Domain.Neighborhood.j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (Y : Set β) :
          Set (Option (α β γ))

          The tagged middle copy 1Y.

          Equations
          Instances For
            def Domain.Neighborhood.j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (Z : Set γ) :
            Set (Option (α β γ))

            The tagged right copy 2Z.

            Equations
            Instances For
              @[simp]
              theorem Domain.Neighborhood.t0_mem_j0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {X : Set α} {a : α} :
              t0 a j0 X a X
              @[simp]
              theorem Domain.Neighborhood.t1_mem_j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Y : Set β} {b : β} :
              t1 b j1 Y b Y
              @[simp]
              theorem Domain.Neighborhood.t2_mem_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Z : Set γ} {c : γ} :
              t2 c j2 Z c Z
              @[simp]
              theorem Domain.Neighborhood.none_not_mem_j0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {X : Set α} :
              nonej0 X
              @[simp]
              theorem Domain.Neighborhood.none_not_mem_j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Y : Set β} :
              nonej1 Y
              @[simp]
              theorem Domain.Neighborhood.none_not_mem_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Z : Set γ} :
              nonej2 Z
              @[simp]
              theorem Domain.Neighborhood.t1_not_mem_j0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {X : Set α} {b : β} :
              t1 bj0 X
              @[simp]
              theorem Domain.Neighborhood.t2_not_mem_j0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {X : Set α} {c : γ} :
              t2 cj0 X
              @[simp]
              theorem Domain.Neighborhood.t0_not_mem_j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Y : Set β} {a : α} :
              t0 aj1 Y
              @[simp]
              theorem Domain.Neighborhood.t2_not_mem_j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Y : Set β} {c : γ} :
              t2 cj1 Y
              @[simp]
              theorem Domain.Neighborhood.t0_not_mem_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Z : Set γ} {a : α} :
              t0 aj2 Z
              @[simp]
              theorem Domain.Neighborhood.t1_not_mem_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Z : Set γ} {b : β} :
              t1 bj2 Z
              theorem Domain.Neighborhood.j0_inter_j0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (X X' : Set α) :
              j0 X j0 X' = j0 (X X')
              theorem Domain.Neighborhood.j1_inter_j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (Y Y' : Set β) :
              j1 Y j1 Y' = j1 (Y Y')
              theorem Domain.Neighborhood.j2_inter_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (Z Z' : Set γ) :
              j2 Z j2 Z' = j2 (Z Z')
              theorem Domain.Neighborhood.j0_inter_j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (X : Set α) (Y : Set β) :
              j0 X j1 Y =
              theorem Domain.Neighborhood.j0_inter_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (X : Set α) (Z : Set γ) :
              j0 X j2 Z =
              theorem Domain.Neighborhood.j1_inter_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (Y : Set β) (Z : Set γ) :
              j1 Y j2 Z =
              theorem Domain.Neighborhood.j0_nonempty {α : Type u_1} {β : Type u_2} {γ : Type u_3} {X : Set α} (hX : X.Nonempty) :
              theorem Domain.Neighborhood.j1_nonempty {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Y : Set β} (hY : Y.Nonempty) :
              theorem Domain.Neighborhood.j2_nonempty {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Z : Set γ} (hZ : Z.Nonempty) :
              theorem Domain.Neighborhood.j0_subset_j0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {X X' : Set α} :
              j0 X j0 X' X X'
              theorem Domain.Neighborhood.j1_subset_j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Y Y' : Set β} :
              j1 Y j1 Y' Y Y'
              theorem Domain.Neighborhood.j2_subset_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Z Z' : Set γ} :
              j2 Z j2 Z' Z Z'
              theorem Domain.Neighborhood.j0_injective {α : Type u_1} {β : Type u_2} {γ : Type u_3} {X X' : Set α} (h : j0 X = j0 X') :
              X = X'
              theorem Domain.Neighborhood.j1_injective {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Y Y' : Set β} (h : j1 Y = j1 Y') :
              Y = Y'
              theorem Domain.Neighborhood.j2_injective {α : Type u_1} {β : Type u_2} {γ : Type u_3} {Z Z' : Set γ} (h : j2 Z = j2 Z') :
              Z = Z'
              def Domain.Neighborhood.master3 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (V₀ : NeighborhoodSystem α) (V₁ : NeighborhoodSystem β) (V₂ : NeighborhoodSystem γ) :
              Set (Option (α β γ))

              The master neighbourhood of the three-way sum: {Λ} ∪ 0Δ₀ ∪ 1Δ₁ ∪ 2Δ₂.

              Equations
              Instances For
                @[simp]
                theorem Domain.Neighborhood.none_mem_master3 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {V₀ : NeighborhoodSystem α} {V₁ : NeighborhoodSystem β} {V₂ : NeighborhoodSystem γ} :
                none master3 V₀ V₁ V₂
                theorem Domain.Neighborhood.j0_subset_master3 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {V₀ : NeighborhoodSystem α} {V₁ : NeighborhoodSystem β} {V₂ : NeighborhoodSystem γ} {X : Set α} (hX : V₀.mem X) :
                j0 X master3 V₀ V₁ V₂
                theorem Domain.Neighborhood.j1_subset_master3 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {V₀ : NeighborhoodSystem α} {V₁ : NeighborhoodSystem β} {V₂ : NeighborhoodSystem γ} {Y : Set β} (hY : V₁.mem Y) :
                j1 Y master3 V₀ V₁ V₂
                theorem Domain.Neighborhood.j2_subset_master3 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {V₀ : NeighborhoodSystem α} {V₁ : NeighborhoodSystem β} {V₂ : NeighborhoodSystem γ} {Z : Set γ} (hZ : V₂.mem Z) :
                j2 Z master3 V₀ V₁ V₂
                theorem Domain.Neighborhood.master3_inter_j0 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {V₀ : NeighborhoodSystem α} {V₁ : NeighborhoodSystem β} {V₂ : NeighborhoodSystem γ} {X : Set α} (hX : V₀.mem X) :
                master3 V₀ V₁ V₂ j0 X = j0 X
                theorem Domain.Neighborhood.master3_inter_j1 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {V₀ : NeighborhoodSystem α} {V₁ : NeighborhoodSystem β} {V₂ : NeighborhoodSystem γ} {Y : Set β} (hY : V₁.mem Y) :
                master3 V₀ V₁ V₂ j1 Y = j1 Y
                theorem Domain.Neighborhood.master3_inter_j2 {α : Type u_1} {β : Type u_2} {γ : Type u_3} {V₀ : NeighborhoodSystem α} {V₁ : NeighborhoodSystem β} {V₂ : NeighborhoodSystem γ} {Z : Set γ} (hZ : V₂.mem Z) :
                master3 V₀ V₁ V₂ j2 Z = j2 Z
                theorem Domain.Neighborhood.eq_master3_of_subset {α : Type u_1} {β : Type u_2} {γ : Type u_3} {V₀ : NeighborhoodSystem α} {V₁ : NeighborhoodSystem β} {V₂ : NeighborhoodSystem γ} {W : Set (Option (α β γ))} (hsub : master3 V₀ V₁ V₂ W) (hsub' : W master3 V₀ V₁ V₂) :
                W = master3 V₀ V₁ V₂
                def Domain.Neighborhood.sum3 {α : Type u_1} {β : Type u_2} {γ : Type u_3} (V₀ : NeighborhoodSystem α) (V₁ : NeighborhoodSystem β) (V₂ : NeighborhoodSystem γ) (h₀ : ∀ (X : Set α), V₀.mem XX.Nonempty) (h₁ : ∀ (Y : Set β), V₁.mem YY.Nonempty) (h₂ : ∀ (Z : Set γ), V₂.mem ZZ.Nonempty) :

                Example 6.2 — the three-way separated sum D₀ + D₁ + D₂ over {Λ} ∪ 0Δ₀ ∪ 1Δ₁ ∪ 2Δ₂, under the standing assumption that no neighbourhood of any factor is empty.

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

                  The domain equation C ≅ 𝟙 + C + C. #

                  𝟙 is positive: its single neighbourhood univ (over the inhabited Unit) is nonempty.

                  Scott's standing assumption ∅ ∉ C: every neighbourhood of C is nonempty.

                  b{σ} = {bσ}: prepending a bit to a singleton.

                  Prepending a bit lands back in C.

                  Example 6.2 — the shape of a C-neighbourhood. Every neighbourhood of C is the master Σ* = cone [], the terminator {Λ} = {[]}, a 0-copy 0X with X ∈ C, or a 1-copy 1X.

                  @[reducible, inline]

                  The right-hand side of the domain equation: the three-way sum 𝟙 + C + C.

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

                    The forward half toCC : |C| → |𝟙 + C + C|. #

                    Example 6.2 — forward half of C ≅ 𝟙 + C + C.

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

                      The inverse half fromCC : |𝟙 + C + C| → |C|. #

                      Example 6.2 — inverse half of C ≅ 𝟙 + C + C.

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

                        The two halves are mutually inverse. #

                        The domain equation C ≅ 𝟙 + C + C. #

                        Example 6.2 (Scott 1981, PRG-19) — the isomorphism |C| ≃o |𝟙 + C + C|.

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

                          Example 6.2 (Scott 1981, PRG-19) — the domain equation C ≅ {{Λ}} + C + C. Scott's domain C of finite-or-infinite binary sequences is, as a domain, isomorphic to the three-way separated sum 𝟙 + C + C: a sequence is bottom, the finished empty sequence Λ (the 𝟙 summand), or begins with 0 or 1 (the two C summands).