Example 6.2 (Scott 1981, PRG-19, §6) — B and C as solutions of domain #
equations
Following Dana Scott, Lectures on a Mathematical Theory of Computation, PRG-19
(1981), Lecture VI,
Introduction to domain equations. Scott observes that the staple examples B
(binary sequences,
Example 1.B) and C (finite-or-infinite binary sequences, Example 4.4) satisfy
domain equations:
where, "if we liked", both systems can be presented over {0,1}* as the least
families
B = {Σ*} ∪ {0X ∣ X ∈ B} ∪ {1X ∣ X ∈ B},
C = {Σ*} ∪ {{Λ}} ∪ {0X ∣ X ∈ C} ∪ {1X ∣ X ∈ C}.
This module formalizes the B ≅ B + B half. (See Example62C.lean for C's
three-way
equation C ≅ 𝟙 + C + C.)
The point of the equation is that a neighbourhood of B is either the master Σ*
(= cone []), a
0-prefixed copy 0X (= embBit false X), or a 1-prefixed copy 1X (= embBit true X) — exactly
the three shapes that build the sum B + B (Exercise 3.18): the fresh basepoint,
the left copy 0X,
and the right copy 1Y. We exhibit the order-isomorphism bbEquiv : |B| ≃o |B + B| directly from the
filter maps toBB (forward) / fromBB (inverse), mirroring
Example61.dsharpEquiv.
All data is choice-free (#print axioms ⊆ {propext, Quot.sound}).
Prepending a single bit: bX = {bw' ∣ w' ∈ X}. #
bX = {b :: w' ∣ w' ∈ X}: the b-prefixed copy of a neighbourhood X
(Scott's 0X for
b = false and 1X for b = true).
Equations
Instances For
bX = b·X is exactly the single-bit prepend of Example 1.B.
b(σΣ*) = (bσ)Σ*: prepending a bit to a cone gives the cone of the longer
prefix.
Prepending a bit lands back in B.
If bW ∈ B then W ∈ B: a b-prefixed neighbourhood that lands in B must
be b·(cone w'),
so W = cone w'.
Scott's standing assumption ∅ ∉ B: every neighbourhood of B is nonempty
(cones contain their
generating prefix).
Example 6.2 — the shape of a B-neighbourhood. Every neighbourhood of B
is either the
master Σ* = cone [], a 0-copy 0X with X ∈ B, or a 1-copy 1X with X ∈ B.
The two halves are mutually inverse. #
Example 6.2 (Scott 1981, PRG-19) — the isomorphism |B| ≃o |B + B|.
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 B ≅ B + B.
Scott's binary-sequence
domain B is, as a domain, isomorphic to B + B: a sequence is bottom, or begins
with 0, or begins
with 1, the two non-bottom cases giving the two summands.