Exercise 2.21 (Scott 1981, PRG-19) — the system 𝒞, total finite sequences, #
juxtaposition
The system 𝔹 of 2.3 has as its total elements only the infinite sequences: a
finite prefix σ
only ever yields the partial element σ⊥ = ↑(σΣ*), which can always be
sharpened by a longer
prefix. We modify 𝔹 to a system 𝒞 having both finite and infinite
sequences as total
elements (Scott's hint 𝔹 ⊆ 𝒞).
The idea: keep the cones σΣ* = cone σ of 𝔹 (these give the partial σ⊥ and,
in the limit, the
infinite total sequences), and add for every finite σ a terminator token — the
singleton
{σ}. The neighbourhood {σ} asserts "the sequence is exactly σ (terminated)".
Because {σ} is
a minimal nonempty neighbourhood, ↑{σ} is a total (maximal) element — this is
the total finite
sequence σ. We thus distinguish:
Λ = ↑{[]}— the total empty sequence (terminated), and⊥ = ↑Δ = ↑(cone [])— the undefined sequence, with⊥ ⊏ Λ.
𝒞 = {σΣ*} ∪ {{σ}} is again pairwise nested-or-disjoint (a singleton sits inside
a cone exactly
when its string extends the cone's prefix; two distinct singletons are disjoint),
so it is a
neighbourhood system via ofNestedOrDisjoint, and visibly 𝔹 ⊆ 𝒞.
Juxtaposition xy. We build juxtapose : ApproximableMap₂ 𝒞 𝒞 𝒞 realizing
the
left-to-right-biased concatenation:
- if
xextends the prefixσbut is not known to terminate (a cone neighbourhoodσΣ* ∈ x), the result only commits to the prefixσ—xy ⊒ σ⊥, independent ofy. Hence for an infinite (total)x,xy = xfor ally(juxtapose_cone); - if
xis the total finite sequenceσ(the terminator{σ} ∈ x), the result isσfollowed byy:xyprependsσtoy(juxtapose_singleton_mem).
This is the "strong left-to-right bias" Scott describes: y is consulted only
after x is known to
have terminated.
The neighbourhood system 𝒞: cones together with terminator singletons. #
Membership in 𝒞: X is either a cone σΣ* (as in 𝔹) or a terminator
singleton {σ}.
Equations
Instances For
A singleton is never a cone (a cone has at least two elements σ and σ0).
Cones and singletons are distinct neighbourhoods.
Nested-or-disjoint for a cone vs. a terminator singleton: {τ} ⊆ σΣ* iff σ prefix τ, else
disjoint. Choice-free (σ <+: τ is decidable).
Nested-or-disjoint for a terminator singleton vs. a cone (the mirror of
cone_singleton_nd).
𝒞 is pairwise nested-or-disjoint. Cone/cone is the 𝔹 trichotomy; the
mixed and
singleton/singleton cases are the three lemmas above.
The system 𝒞 on Δ = Σ*: cones and terminator singletons.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every cone is a neighbourhood of 𝒞 — this is the inclusion 𝔹 ⊆ 𝒞.
Every terminator singleton {σ} is a neighbourhood of 𝒞.
𝔹 ⊆ 𝒞. Every neighbourhood of 𝔹 is a neighbourhood of 𝒞.
Every neighbourhood of 𝒞 is nonempty (there is no empty token).
A nonempty 𝒞-neighbourhood contained in a singleton is that singleton.
Total elements: finite sequences ↑{σ}, and ⊥ ⊏ Λ. #
The total finite sequence σ as an element of |𝒞|: the principal filter
↑{σ}.
Equations
Instances For
Λ, the total empty sequence (terminated): ↑{[]}.
Instances For
Total finite sequences. ↑{σ} is a total (maximal) element of |𝒞|: any
element above it
must equal it, because {σ} is a minimal nonempty neighbourhood. This is what was
false in 𝔹,
where finite sequences gave only the partial σ⊥.
Prepending a string to a 𝒞-neighbourhood. #
σ{ρ} = {σρ}: prepending σ to a terminator singleton.
Prepending preserves 𝒞-membership (cone ↦ cone, singleton ↦ singleton).
σY ⊆ σΣ* = cone σ: prepending σ always lands inside the cone of σ.
Prepending is monotone in the suffix set.
Juxtaposition xy as an approximable map of two variables. #
Juxtaposition xy as an approximable map 𝒞 × 𝒞 → 𝒞.
The relation X, Y j Z reads off the left-to-right bias: if the first input
neighbourhood X is
a cone σΣ* (x extends σ but is undetermined), the output only commits to the
prefix σ
(σΣ* ⊆ Z), ignoring Y; if X is a terminator {σ} (x is the total finite
sequence σ), the
output prepends σ to the second input Y (σY ⊆ Z).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Left-to-right bias / "x infinite ⟹ xy = x". On a partial input σ⊥ = ↑(σΣ*) the
juxtaposition returns σ⊥ itself, independently of y. Since an infinite
(total) sequence is the
directed union of its finite approximants σ⊥, this says xy = x for total
infinite x.
σy for a total finite x = ↑{σ}. When the first argument is the total
finite sequence
σ, juxtaposition prepends σ to y: Z ∈ (↑{σ})y iff Z contains σY' for
some Y' ∈ y. The
coarser cone witnesses σΣ* ∈ ↑{σ} add nothing, since σΔ = σΣ* is itself of the
form σY'.