Documentation

LeanPool.DomainTheory.Neighborhood.Exercise317

Exercise 3.17 (Scott 1981, PRG-19, §3) — B is a retract of T^∞ #

Using the binary system B (Example 1.B) and the three-element truth system T (Example 1.2), Scott asks for a one-one approximable map f : B → T^∞ and a map g : T^∞ → B with

gf = I_B and fg ⊑ I_{T^∞},

i.e. B is a retract of T^∞ (f a section, g a retraction). He then asks whether B ≅ T^∞ and BT × B (the point of the exercise being that retract ≠ isomorphism here).

The encoding. A binary string σ = b₀b₁…b_{k-1} (a neighbourhood σΣ* of B) is sent to the T^∞-neighbourhood encSet σ that pins copy i to the truth value bitNbhd bᵢ ({0} for false, {1} for true) for i < k, and leaves copies i ≥ k free (Δ_T). Concretely encSet σ is the pointwise set {(i, t) ∣ ∀ b, σ[i]? = some b → t ∈ bitNbhd b}.

gf = I_B (gf_eq_id) — decoding recovers the prefix, the key being prefix_of_encSet_subset (encSet σ ⊆ encSet τ ⟹ τ prefix σ), which uses that T-neighbourhoods are non-empty. fg ⊑ I_{T^∞} (fg_le_id) holds because re-encoding a decoded element can only lose the post-gap information. Hence f is one-one (f_injective).

T-neighbourhoods are non-empty (∅ ∉ T).

The encoding set encSet σ. #

encSet σ ⊆ ℕ × {0,1}: pin copy i to bitNbhd σ[i] for i < |σ|, free otherwise.

Equations
Instances For
    @[simp]
    theorem Domain.Neighborhood.Exercise317.mem_encSet {σ : ExampleB.Str} {p : × Token} :
    p encSet σ ∀ (b : Bool), σ[p.1]? = some bp.2 bitNbhd b

    encSet σ is a T^∞-neighbourhood.

    A longer prefix encodes to a smaller set: σ prefix σ' ⟹ encSet σ' ⊆ encSet σ.

    Comparability and the prefix recovery lemma. #

    theorem Domain.Neighborhood.Exercise317.encSet_agree {τ τ' : ExampleB.Str} {W : Set ( × Token)} (hW : (iterSys T).mem W) (h : W encSet τ) (h' : W encSet τ') {i : } {b b' : Bool} (hb : τ[i]? = some b) (hb' : τ'[i]? = some b') :
    b = b'

    Two prefixes that both bound a common non-empty T^∞-neighbourhood agree where both defined.

    theorem Domain.Neighborhood.Exercise317.comparable_of_agree {τ τ' : ExampleB.Str} :
    (∀ (i : ) (b b' : Bool), τ[i]? = some bτ'[i]? = some b'b = b')τ <+: τ' τ' <+: τ

    Prefix recovery. encSet σ ⊆ encSet τ forces τ to be an initial segment of σ.

    The section f : B → T^∞ and retraction g : T^∞ → B. #

    The encoding map f : B → T^∞. Relates the cone σΣ* to every T^∞-neighbourhood weaker than encSet σ.

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

      The decoding map g : T^∞ → B. Relates W to the cone τΣ* exactly when W ⊆ encSet τ, i.e. W pins the first |τ| copies to τ.

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

        gf = I_B and fg ⊑ I_{T^∞}. #

        Exercise 3.17 — g is a retraction of f. gf = I_B.

        Exercise 3.17 — f is a section of g. fg ⊑ I_{T^∞}.

        f is one-one. Since gf = I_B, the elementwise map of f is injective.