Example 1.B (Scott 1981, PRG-19, §1) — binary sequences #
Scott's recurring binary example, generalizing the finite binary tree of
Example 1.4 to
infinite sequences. Take Δ = Σ* with Σ = {0,1} (the finite binary strings,
Λ = the empty
string), and for σ ∈ Σ* let σΣ* be the set of all extensions of σ. The
neighbourhoods are
B = {σΣ* ∣ σ ∈ Σ*},
a neighbourhood being "all extensions of a fixed prefix σ". We encode Σ* = List Bool, the
empty sequence Λ = [], concatenation στ = σ ++ τ, and the initial-segment
relation
σ prefix τ by mathlib's list-prefix order σ <+: τ. The cone σΣ* is cone σ = {w ∣ σ <+: w}.
Deliverables (all of the Example-1.B paragraph, lines 281–315 of the source):
- Example 1.B / Exercise (
Bis a system).B : NeighborhoodSystem Str, built from the prefix trichotomy viaofNestedOrDisjoint— any two cones are nested or disjoint. σ⊥(the finite elements).sigmaBot σ = ↑(cone σ), the principal filter ofσΣ*; its minimal neighbourhood isσΔ = cone σ.- Factoid
σ₀⊥ ⊆ σ₁⊥ iff σ₀initial segment ofσ₁.sigmaBot_le_iff. - Exercise (
σx ∈ |B|).sigmaElt σ x, andsigmaElt σ ⊥ = σ⊥(sigmaElt_bot) justifying theσ⊥notation. - Factoid
x = ⋃ₙ σₙ⊥.mem_iff_exists_sigmaBot: everyx ∈ |B|is the union of the finite elementsσ⊥withσΣ* ∈ x— the concrete "limit of finite approximations" in|B|. (The countable chain form, withσₙ prefix σₙ₊₁enumerated, needs choice and is left to the prose.)
Everything is constructive (#print axioms ⊆ {propext, Quot.sound}):
list-prefix is decidable,
so the trichotomy is choice-free.
The neighbourhood σΣ*: all extensions of σ (sequences with σ as an
initial segment).
Equations
Instances For
Prefix trichotomy for cones. Any two cones are nested-or-disjoint: either
one contains the
other, or they are disjoint (incomparable prefixes have no common extension).
Choice-free: the
prefix relation on List Bool is decidable.
Exercise ("B is a neighbourhood system"). The family B = {σΣ* ∣ σ ∈ Σ*} is pairwise
nested-or-disjoint, by cone_trichotomy.
Prepending a prefix: σX = {στ ∣ τ ∈ X}. #
The finite elements σ⊥ and the initial-segment factoid. #
σ⊥, a finite element of |B|. The principal filter ↑(σΣ*) of the cone
of σ; its
minimal neighbourhood is σΔ = σΣ* (Scott). These are exactly the finite elements
of |B|.
Instances For
Factoid (Scott 1981, PRG-19). "σ₀⊥ ⊆ σ₁⊥ if and only if σ₀ is an
initial segment of
the sequence σ₁." The approximation order on finite elements is exactly the
prefix order:
σ₀⊥ ⊑ σ₁⊥ ↔ σ₀ <+: σ₁. (Via principal_le_iff — reversal — composed with
cone_subset_cone —
reversal again — which cancel to give the prefix order directly.)
The operation σx (Scott's left-multiplication on elements). #
Exercise (σx ∈ |B|). For x ∈ |B| and σ ∈ Σ*, Scott's
σx = {Y ∣ σX ⊆ Y for some X ∈ x} is again an element of |B|.
The filter laws: master uses X = Δ ∈ x (σΔ ⊆ Δ trivially); inter takes X₁ ∩ X₂ ∈ x and
the consistency witness σ(X₁∩X₂), which is a cone (hence in B, by
memB_prepend) contained in
both Y₁ and Y₂; up reuses the same X.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every element is a union of its finite approximations σ⊥. #
Factoid (Scott 1981, PRG-19). "x = ⋃ₙ σₙ⊥": every x ∈ |B| is the union
of the finite
elements σ⊥ whose generating cone σΣ* lies in x. In membership form, a
neighbourhood Z
belongs to x iff Z lies in some σ⊥ = ↑(σΣ*) with σΣ* ∈ x.
This is the concrete "an element is uniquely determined by its finite
approximations" in |B|
(Basic.eq_iUnion_principal specialized to B, where every neighbourhood is a
cone). The further
arrangement of the σ into a single increasing chain σ₀ prefix σ₁ prefix … requires
choice/enumeration and
is left to Scott's prose.