Documentation

LeanPool.DomainTheory.Neighborhood.Exercise218

Exercise 2.18 (Scott 1981, PRG-19, ยง2) โ€” the "spacing" map h : ๐”น โ†’ ๐”น #

EXERCISE 2.18. What is the meaning in words of the approximable mapping h : ๐”น โ†’ ๐”น, where h(0x) = 00 h(x) and h(1x) = 10 h(x) for all x โˆˆ |๐”น|? Is h an isomorphism? Does there exist a map k : ๐”น โ†’ ๐”น where k โˆ˜ h = I_๐”น, and is k one-one?

Meaning in words. h spaces the sequence out: it copies each input symbol b and inserts a 0 immediately after it. So the input bit b becomes the block b0, and h doubles the length of every sequence, planting a 0 in every odd position (0-indexed positions 1, 3, 5, โ€ฆ).

We follow the Example24.runMap template: a guaranteed-output function on finite prefixes drives the neighbourhood relation X h Y โ†” โˆƒ ฯƒ, X = ฯƒฮฃ* โˆง Y โˆˆ ๐”น โˆง (hOut ฯƒ)ฮฃ* โІ Y.

Choice-free (#print axioms โІ {propext, Quot.sound}): everything is decidable list surgery.

The doubling output hOut and its monotonicity. #

The guaranteed output of h on a finite prefix: each symbol b becomes the block b0.

Equations
Instances For

    hOut grows under extension: hOut ฯƒ <+: hOut (ฯƒ ++ t).

    theorem Domain.Neighborhood.Exercise218.hOut_mono {ฯƒ ฯƒ' : ExampleB.Str} (h : ฯƒ <+: ฯƒ') :
    hOut ฯƒ <+: hOut ฯƒ'

    Prefix-monotonicity of hOut. ฯƒ <+: ฯƒ' โ†’ hOut ฯƒ <+: hOut ฯƒ'.

    The inverse output kOut and its monotonicity. #

    The guaranteed output of k on a finite prefix: keep the first bit of every complete pair, discard the inserted 0. A trailing odd bit is an incomplete pair, hence dropped.

    Equations
    Instances For

      k inverts h on prefixes. kOut (hOut ฯƒ) = ฯƒ.

      kOut grows under extension: kOut ฯƒ <+: kOut (ฯƒ ++ t).

      theorem Domain.Neighborhood.Exercise218.kOut_mono {ฯƒ ฯƒ' : ExampleB.Str} (h : ฯƒ <+: ฯƒ') :
      kOut ฯƒ <+: kOut ฯƒ'

      Prefix-monotonicity of kOut. ฯƒ <+: ฯƒ' โ†’ kOut ฯƒ <+: kOut ฯƒ'.

      The approximable maps hMap and kMap. #

      Exercise 2.18 โ€” the spacing map h : ๐”น โ†’ ๐”น. X h Y โ†” โˆƒ ฯƒ, X = ฯƒฮฃ* โˆง Y โˆˆ ๐”น โˆง (hOut ฯƒ)ฮฃ* โІ Y. Same shape as Example24.runMap, with the doubling hOut (hOut_mono gives Definition 2.1(iii)).

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

        Exercise 2.18 โ€” the left inverse k : ๐”น โ†’ ๐”น. X k Y โ†” โˆƒ ฯƒ, X = ฯƒฮฃ* โˆง Y โˆˆ ๐”น โˆง (kOut ฯƒ)ฮฃ* โІ Y.

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

          The elementwise value of hMap on the finite element โ†‘(ฯƒฮฃ*) is โ†‘((hOut ฯƒ)ฮฃ*).

          The elementwise value of kMap on the finite element โ†‘(ฯƒฮฃ*) is โ†‘((kOut ฯƒ)ฮฃ*).

          k โˆ˜ h = I, k not injective, h not surjective. #

          Exercise 2.18 โ€” k โˆ˜ h = I_๐”น. The composite recovers the identity: reading kOut (hOut ฯƒ) = ฯƒ through the cone relations.

          Exercise 2.18 โ€” k is not one-one. โ†‘(0ฮฃ*) and โ†‘(1ฮฃ*) are distinct finite elements that k collapses to โŠฅ (a length-1 prefix is an incomplete pair, so its bit is dropped).

          Exercise 2.18 โ€” h is not an isomorphism. It is not surjective: โ†‘(01ฮฃ*) is not in the range (any preimage x satisfies x = k(h(x)), forcing h(x) = โ†‘(00ฮฃ*) โ‰  โ†‘(01ฮฃ*)).