Exercise 6.18 (Scott 1981, PRG-19, Β§6) β π^β as an initial algebra #
EXERCISE 6.18. With reference back to Exercise 3.16 discuss the construction of
π^βas an initial algebra and as a solution to the domain equationπ^β β π Γ π^β.
Exercise 3.16 already constructs the infinite iterate π^β (iterSys, over β Γ Ξ) and proves the
domain-equation half, π^β β
π Γ π^β (iter_isomorphic, with the explicit
element iso
iterProdIso). This module supplies the initial-algebra half.
For a fixed β
-free domain π consider the (product) endofunctor
T(X) = π Γ X. The domain equation π^β β
T(π^β) makes π^β a T-algebra, with
structure map
i : π Γ π^β β π^β the "cons" isomorphism (Exercise 3.16's iterProdIsoβ»ΒΉ). We
prove π^β is the
initial T-algebra: for every T-algebra (E, k) there is a unique (strict)
homomorphism
π^β β E, namely h(β¨xβ,xβ,β¦β©) = k(xβ, k(xβ, k(xβ, β¦))), the least fixed point
of
Ξ»h. k β T(h) β j.
Architecture #
The genuine analysis is done at the level of plain approximable maps (over
iterSys V,
prod V (iterSys V), and a target E), then packaged into the bespoke category
StrictDomainObj
of β
-free domains and strict maps (Exercise 6.17), where IsInitial directly
expresses Scott's
universal property among strict algebras (cf. Theorem 6.14, which is initiality
among strict
algebras β the product functor grows the token set, so Theorem 6.14's
same-carrier colimit tower
does not apply, and π^β must be built directly as in Exercise 3.16).
- Existence.
descMap = ββ hβ,hβ = β₯,hβββ = k β T(hβ) β j. It is strict and satisfies the fixed-point equationdescMap = k β T(descMap) β j, hence the homomorphism squaredescMap β i = k β T(descMap)(sincej β i = I). - Uniqueness. The truncation chain
Οβ : π^β β π^β,Οβ = β₯,Οβββ = i β T(Οβ) β j, computes toΟβ(β¨xα΅’β©) = β¨xβ,β¦,x_{n-1},β₯,β₯,β¦β©(rho_apply) and satisfiesββ Οβ = I(iSupRho_eq_id, the cofinite-Ξstructure ofiterSys). For any strict homomorphismg, the sequenceg β Οβisg-independent (the recursiongβΟβββ = kβT(gβΟβ)βj), sog = ββ gβΟβis forced.
Everything is choice-free where it is data.
The product of two β
-free systems is β
-free.
The infinite iterate of an β
-free system is β
-free (each fibre is a
non-empty
neighbourhood).
The "cons" description of the Exercise 3.16 isomorphism #
The forward iso reads off head and tail. iterProdIso z = β¨zβ, β¨zβ,zβ,β¦β©β©: the first
component is the 0-coordinate component z 0, the second is the shifted
sequence.
The "cons" of a head a : |π| and a tail b : |π^β|, as a sequence β¨a, bβ, bβ, β¦β©.
Equations
- Domain.Neighborhood.Exercise618.consSeq a b i = Nat.casesOn i a fun (k : β) => Domain.Neighborhood.component b k
Instances For
The inverse iso is "cons". iterProdIsoβ»ΒΉ β¨a, bβ© = β¨a, bβ, bβ, β¦β©.
Bottom-element computations #
β₯ of π^β is the all-β₯ sequence.
The n-th coordinate of β₯ is β₯.
β₯ of a product is the pair of β₯s.
The structure isomorphism i, j as approximable maps #
j : π^β β π Γ π^β, the splitting iso (iterProdIso).
Equations
Instances For
i : π Γ π^β β π^β, the "cons" iso (iterProdIsoβ»ΒΉ); the T-algebra
structure map.
Equations
Instances For
j β i = I on π Γ π^β.
Monotonicity of the product action #
T(Β·) = (id_π Γ Β·) is monotone.
Approximable maps are monotone in the map argument: f β€ g βΉ f(x) β€ g(x).
The homomorphism operator and the descent chain #
The homomorphism operator Op(f) = k β T(f) β j.
Equations
Instances For
The defining action of the operator: Op(f)(z) = k(zβ, f(β¨zβ,zβ,β¦β©)).
The descent chain hβ = β₯, hβββ = Op(hβ).
Equations
Instances For
The bottom map is below everything.
The descent map h = ββ hβ : π^β β E.
Equations
Instances For
Generic chain helpers #
The descent chain is increasing element-wise.
The descent map as a directed union. h(x) = ββ hβ(x).
The continuity helper k(a, Β·) : E β E as an approximable map.
Equations
Instances For
The fixed-point equation h = k β T(h) β j #
The descent map is a fixed point of Op = k β T(Β·) β j.
Strictness of the descent map #
The homomorphism square h β i = k β T(h) #
Existence of the algebra homomorphism. The descent map makes the square
commute:
descMap β i = k β T(descMap) (using j β i = I and the fixed-point equation).
The truncation chain Οβ and ββ Οβ = I #
The descent chain for the structure map i itself, Οβ = (descSeq i)β : π^β β π^β, truncates a
sequence to its first n coordinates. Its supremum is the identity
(iSupRho_eq_id), the key fact
behind uniqueness: every strict homomorphism is determined on the finite
truncations.
The truncation formula Οβ(β¨xβ,xβ,β¦β©) = β¨xβ,β¦,x_{n-1},β₯,β₯,β¦β©.
ββ Οβ = I. Every z is the directed union of its truncations: the
cofinite-Ξ structure
of π^β means each neighbourhood of z is already realised by a finite
truncation.
Uniqueness of strict homomorphisms #
The descent chain for any strict g starts at the constant β₯: g β Οβ = β₯.
g-independence step. If g is a homomorphism (g β i = k β T(g)) then
g β Οβββ = k β T(g β Οβ) β j = Op_k(g β Οβ): the composite depends only on g β Οβ.
Uniqueness. Any two strict homomorphisms g, g' : π^β β E into a
T-algebra (E,k) are
equal. By g-independence they agree on every truncation (g β Οβ = g' β Οβ),
and ββ Οβ = I
forces g = g'.
The endofunctor T(X) = π Γ X and π^β as its initial algebra #
We package the analysis into the bespoke category StrictDomainObj of β
-free
domains and strict
maps (Exercise 6.17), exactly the setting in which IsInitial expresses Scott's
universal property.
The fixed domain π is an arbitrary StrictDomainObj.
T(fβ Γ fβ) is strict when both factors are: (fβ Γ fβ)(β₯,β₯) = (fβ β₯, fβ β₯) = (β₯,β₯).
The morphism action T(f) = id_π Γ f, strict by isStrict_prodMap.
Equations
Instances For
The product endofunctor T(X) = π Γ X on β
-free domains and strict
maps, for a fixed
domain π. On objects T(X) = π Γ X; on maps T(f) = id_π Γ f.
Equations
- One or more equations did not get rendered due to their size.
Instances For
π^β (Exercise 3.16's iterSys) as an β
-free object.
Equations
- Domain.Neighborhood.Exercise618.iterObj Dom = { carrier := β Γ Dom.carrier, sys := Domain.Neighborhood.iterSys Dom.sys, nonempty := β― }
Instances For
π^β as a T-algebra, (π^β, i) with i : π Γ π^β β π^β the "cons" iso
(imap,
Exercise 3.16's iterProdIsoβ»ΒΉ), strict by isStrict_imap.
Equations
- Domain.Neighborhood.Exercise618.iterAlg Dom = { carrier := Domain.Neighborhood.Exercise618.iterObj Dom, str := β¨Domain.Neighborhood.Exercise618.imap Dom.sys, β―β© }
Instances For
The descent homomorphism (π^β, i) β (E, k): the strict map descMap k
(existence half),
with the homomorphism square supplied by descMap_comm.
Equations
- Domain.Neighborhood.Exercise618.descAlgHom Dom B = { hom := β¨Domain.Neighborhood.Exercise618.descMap βB.str, β―β©, comm := β― }
Instances For
Exercise 6.18 (initial-algebra half) β π^β is the initial T-algebra for
T(X) = π Γ X.
For every T-algebra (E, k) the descent map h(β¨xβ,xβ,β¦β©) = k(xβ, k(xβ, β¦)) is
the unique
strict homomorphism π^β β E. Together with Exercise 3.16's π^β β
π Γ π^β (the
domain-equation
half), this exhibits π^β both as the canonical solution of the domain equation
and as the initial
algebra (determined up to iso by Proposition 6.6).
Equations
- Domain.Neighborhood.Exercise618.iterIsInitial Dom = { desc := Domain.Neighborhood.Exercise618.descAlgHom Dom, uniq := β― }