Documentation

LeanPool.DomainTheory.Neighborhood.Exercise617

Exercise 6.17 (Scott 1981, PRG-19, Β§6) β€” the algebras for which C is initial #

EXERCISE 6.17. What are the algebras for which C is initial? If A of 6.2 is a generalization of B, what is the corresponding generalization of C? Prove that it exists and explain what are the algebras involved.

C (Example 4.4: finite-or-infinite binary sequences) satisfies the domain equation C β‰… {{Ξ›}} + C + C (Example 6.2, Example62C.lean). So C is a solution of the domain equation for the functor

T(X) = πŸ™ + X + X (one terminator + two successor copies).

This module proves that C is the initial T-algebra: for every T-algebra (E, k) there is a unique homomorphism C β†’ E. Concretely a T-algebra is a strict map `k : πŸ™ + E

so the algebras for which C is initial are the domains carrying a point and two strict unary operations, and the unique homomorphism C β†’ E interprets a finite-or-infinite binary sequence bβ‚€b₁b₂… as f_{bβ‚€}(f_{b₁}(… e …)).

Why a bespoke category of βˆ…-free domains #

Scott's separated sum π’Ÿβ‚€ + π’Ÿβ‚ (Exercise 3.18) is a neighbourhood system only under the standing assumption βˆ… βˆ‰ π’Ÿ (an empty neighbourhood of one summand would become a spurious consistency witness for the other tag, breaking inter_mem). Consequently the functor T(X) = πŸ™ + X + X does not extend to a total endofunctor of the all-systems category DomainObj, and the existence Theorem 6.14 (stated over DomainObj) cannot be instantiated directly.

Following Scott β€” who restricts to the category of βˆ…-free systems and strict maps in Exercise 6.19 β€” we instantiate the abstract categorical vocabulary (Definitions 6.3–6.5) on the bespoke object type StrictDomainObj of neighbourhood systems with no empty neighbourhood, with strict approximable maps as morphisms. The functor T then reuses the existing sum3 (Example 6.2, the genuine three-way separated sum) and a three-way sum map, and initiality of C is proved directly (we construct the homomorphism and prove its uniqueness by the finite-approximant argument), rather than routing through the colimit construction of Theorem 6.14.

Everything is choice-free where it is data; the homomorphism/uniqueness layer reuses the project's established machinery.

The category of βˆ…-free domains and strict maps #

An object of Scott's category (Exercise 6.19): a token type, a neighbourhood system on it, and the standing assumption βˆ… βˆ‰ π’Ÿ (every neighbourhood is non-empty).

Instances For
    @[implicit_reducible]

    The category of βˆ…-free domains and strict maps. Morphisms are strict approximable maps (StrictMap, Exercise 5.10); identities and associative composition come from Theorem 2.5, and strictness is preserved by isStrict_idMap / isStrict_comp.

    Equations
    • One or more equations did not get rendered due to their size.
    @[simp]
    theorem Domain.Neighborhood.StrictDomainObj.comp_val {D E F : StrictDomainObj} (g : Category.Hom E F) (f : Category.Hom D E) :
    ↑(g ⊚ f) = (↑g).comp ↑f

    The functor T(X) = πŸ™ + X + X on objects #

    theorem Domain.Neighborhood.sum3_nonempty {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} (W : Set (Option (Ξ± βŠ• Ξ² βŠ• Ξ³))) :
    (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚).mem W β†’ W.Nonempty

    Every neighbourhood of the three-way separated sum sum3 is non-empty (so sum3 is again an object of the βˆ…-free category).

    The functor T(X) = πŸ™ + X + X on objects. Over D, the system is the genuine three-way separated sum πŸ™ + D + D (Example 6.2's sum3, with πŸ™ = unitSys), again βˆ…-free by sum3_nonempty.

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

      Membership-shape lemmas for sum3 (no nesting through the wrong tag) #

      theorem Domain.Neighborhood.mem_subset_j0_inv {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {W : Set (Option (Ξ± βŠ• Ξ² βŠ• Ξ³))} {X : Set Ξ±} (hW : (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚).mem W) (hsub : W βŠ† j0 X) :
      βˆƒ (Xβ‚‚ : Set Ξ±), Vβ‚€.mem Xβ‚‚ ∧ W = j0 Xβ‚‚

      A sum3-neighbourhood contained in a 0-copy 0X is itself a 0-copy.

      theorem Domain.Neighborhood.mem_subset_j1_inv {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {W : Set (Option (Ξ± βŠ• Ξ² βŠ• Ξ³))} {Y : Set Ξ²} (hW : (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚).mem W) (hsub : W βŠ† j1 Y) :
      βˆƒ (Yβ‚‚ : Set Ξ²), V₁.mem Yβ‚‚ ∧ W = j1 Yβ‚‚

      A sum3-neighbourhood contained in a 1-copy 1Y is itself a 1-copy.

      theorem Domain.Neighborhood.mem_subset_j2_inv {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {W : Set (Option (Ξ± βŠ• Ξ² βŠ• Ξ³))} {Z : Set Ξ³} (hW : (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚).mem W) (hsub : W βŠ† j2 Z) :
      βˆƒ (Zβ‚‚ : Set Ξ³), Vβ‚‚.mem Zβ‚‚ ∧ W = j2 Zβ‚‚

      A sum3-neighbourhood contained in a 2-copy 2Z is itself a 2-copy.

      The three-way sum map fβ‚€ + f₁ + fβ‚‚ #

      def Domain.Neighborhood.sumMap3 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Ξ±' : Type u_4} {Ξ²' : Type u_5} {Ξ³' : Type u_6} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {Vβ‚€' : NeighborhoodSystem Ξ±'} {V₁' : NeighborhoodSystem Ξ²'} {Vβ‚‚' : NeighborhoodSystem Ξ³'} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {hβ‚€' : βˆ€ (X : Set Ξ±'), Vβ‚€'.mem X β†’ X.Nonempty} {h₁' : βˆ€ (Y : Set Ξ²'), V₁'.mem Y β†’ Y.Nonempty} {hβ‚‚' : βˆ€ (Z : Set Ξ³'), Vβ‚‚'.mem Z β†’ Z.Nonempty} (fβ‚€ : ApproximableMap Vβ‚€ Vβ‚€') (f₁ : ApproximableMap V₁ V₁') (fβ‚‚ : ApproximableMap Vβ‚‚ Vβ‚‚') :
      ApproximableMap (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚) (sum3 Vβ‚€' V₁' Vβ‚‚' hβ‚€' h₁' hβ‚‚')

      The three-way sum map fβ‚€ + f₁ + fβ‚‚ : π’Ÿβ‚€+π’Ÿβ‚+π’Ÿβ‚‚ β†’ π’Ÿβ‚€'+π’Ÿβ‚'+π’Ÿβ‚‚'. Routes each tagged copy iX through fα΅’ (to iYα΅’'), and sends everything to the codomain master. (The three-way analogue of Exercise 3.19's sumMap.)

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Domain.Neighborhood.isStrict_sumMap3 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Ξ±' : Type u_4} {Ξ²' : Type u_5} {Ξ³' : Type u_6} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {Vβ‚€' : NeighborhoodSystem Ξ±'} {V₁' : NeighborhoodSystem Ξ²'} {Vβ‚‚' : NeighborhoodSystem Ξ³'} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {hβ‚€' : βˆ€ (X : Set Ξ±'), Vβ‚€'.mem X β†’ X.Nonempty} {h₁' : βˆ€ (Y : Set Ξ²'), V₁'.mem Y β†’ Y.Nonempty} {hβ‚‚' : βˆ€ (Z : Set Ξ³'), Vβ‚‚'.mem Z β†’ Z.Nonempty} (fβ‚€ : ApproximableMap Vβ‚€ Vβ‚€') (f₁ : ApproximableMap V₁ V₁') (fβ‚‚ : ApproximableMap Vβ‚‚ Vβ‚‚') :
        Exercise510.IsStrict (sumMap3 fβ‚€ f₁ fβ‚‚)

        The three-way sum map is always strict: (fβ‚€+f₁+fβ‚‚)(βŠ₯) = βŠ₯. (The master only relates to the master, since master3 is not any tagged copy.)

        theorem Domain.Neighborhood.sumMap3_id {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} :
        sumMap3 (ApproximableMap.idMap Vβ‚€) (ApproximableMap.idMap V₁) (ApproximableMap.idMap Vβ‚‚) = ApproximableMap.idMap (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚)

        Functoriality (identities): I + I + I = I.

        theorem Domain.Neighborhood.sumMap3_comp {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Ξ±' : Type u_4} {Ξ²' : Type u_5} {Ξ³' : Type u_6} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {Vβ‚€' : NeighborhoodSystem Ξ±'} {V₁' : NeighborhoodSystem Ξ²'} {Vβ‚‚' : NeighborhoodSystem Ξ³'} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {hβ‚€' : βˆ€ (X : Set Ξ±'), Vβ‚€'.mem X β†’ X.Nonempty} {h₁' : βˆ€ (Y : Set Ξ²'), V₁'.mem Y β†’ Y.Nonempty} {hβ‚‚' : βˆ€ (Z : Set Ξ³'), Vβ‚‚'.mem Z β†’ Z.Nonempty} {Ξ±'' : Type u_7} {Ξ²'' : Type u_8} {Ξ³'' : Type u_9} {Vβ‚€'' : NeighborhoodSystem Ξ±''} {V₁'' : NeighborhoodSystem Ξ²''} {Vβ‚‚'' : NeighborhoodSystem Ξ³''} {hβ‚€'' : βˆ€ (X : Set Ξ±''), Vβ‚€''.mem X β†’ X.Nonempty} {h₁'' : βˆ€ (Y : Set Ξ²''), V₁''.mem Y β†’ Y.Nonempty} {hβ‚‚'' : βˆ€ (Z : Set Ξ³''), Vβ‚‚''.mem Z β†’ Z.Nonempty} (gβ‚€ : ApproximableMap Vβ‚€' Vβ‚€'') (g₁ : ApproximableMap V₁' V₁'') (gβ‚‚ : ApproximableMap Vβ‚‚' Vβ‚‚'') (fβ‚€ : ApproximableMap Vβ‚€ Vβ‚€') (f₁ : ApproximableMap V₁ V₁') (fβ‚‚ : ApproximableMap Vβ‚‚ Vβ‚‚') :
        sumMap3 (gβ‚€.comp fβ‚€) (g₁.comp f₁) (gβ‚‚.comp fβ‚‚) = (sumMap3 gβ‚€ g₁ gβ‚‚).comp (sumMap3 fβ‚€ f₁ fβ‚‚)

        Functoriality (composition): (gβ‚€βˆ˜fβ‚€) + (gβ‚βˆ˜f₁) + (gβ‚‚βˆ˜fβ‚‚) = (gβ‚€+g₁+gβ‚‚) ∘ (fβ‚€+f₁+fβ‚‚).

        The canonical injections D_i β†ͺ Dβ‚€+D₁+Dβ‚‚ #

        def Domain.Neighborhood.sinj0 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} (xβ‚€ : Vβ‚€.Element) :
        (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚).Element

        The 0-injection Dβ‚€ β†ͺ Dβ‚€+D₁+Dβ‚‚: send xβ‚€βˆˆ|Dβ‚€| to the sum element whose only proper neighbourhoods are the 0-copies 0X with X∈xβ‚€.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          def Domain.Neighborhood.sinj1 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} (x₁ : V₁.Element) :
          (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚).Element

          The 1-injection D₁ β†ͺ Dβ‚€+D₁+Dβ‚‚.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            def Domain.Neighborhood.sinj2 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} (xβ‚‚ : Vβ‚‚.Element) :
            (sum3 Vβ‚€ V₁ Vβ‚‚ hβ‚€ h₁ hβ‚‚).Element

            The 2-injection Dβ‚‚ β†ͺ Dβ‚€+D₁+Dβ‚‚.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[simp]
              theorem Domain.Neighborhood.sinj0_mem_j0 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {xβ‚€ : Vβ‚€.Element} {X : Set Ξ±} (hX : Vβ‚€.mem X) :
              (sinj0 xβ‚€).mem (j0 X) ↔ xβ‚€.mem X
              @[simp]
              theorem Domain.Neighborhood.sinj1_mem_j1 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {x₁ : V₁.Element} {Y : Set Ξ²} (hY : V₁.mem Y) :
              (sinj1 x₁).mem (j1 Y) ↔ x₁.mem Y
              @[simp]
              theorem Domain.Neighborhood.sinj2_mem_j2 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {xβ‚‚ : Vβ‚‚.Element} {Z : Set Ξ³} (hZ : Vβ‚‚.mem Z) :
              (sinj2 xβ‚‚).mem (j2 Z) ↔ xβ‚‚.mem Z

              Monotonicity of the injections, and the action of fβ‚€+f₁+fβ‚‚ on them #

              theorem Domain.Neighborhood.sinj1_mono {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {x x' : V₁.Element} (hx : x ≀ x') :
              theorem Domain.Neighborhood.sinj2_mono {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {x x' : Vβ‚‚.Element} (hx : x ≀ x') :
              theorem Domain.Neighborhood.sumMap3_sinj0 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Ξ±' : Type u_4} {Ξ²' : Type u_5} {Ξ³' : Type u_6} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {Vβ‚€' : NeighborhoodSystem Ξ±'} {V₁' : NeighborhoodSystem Ξ²'} {Vβ‚‚' : NeighborhoodSystem Ξ³'} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {hβ‚€' : βˆ€ (X : Set Ξ±'), Vβ‚€'.mem X β†’ X.Nonempty} {h₁' : βˆ€ (Y : Set Ξ²'), V₁'.mem Y β†’ Y.Nonempty} {hβ‚‚' : βˆ€ (Z : Set Ξ³'), Vβ‚‚'.mem Z β†’ Z.Nonempty} (fβ‚€ : ApproximableMap Vβ‚€ Vβ‚€') (f₁ : ApproximableMap V₁ V₁') (fβ‚‚ : ApproximableMap Vβ‚‚ Vβ‚‚') (xβ‚€ : Vβ‚€.Element) :
              (sumMap3 fβ‚€ f₁ fβ‚‚).toElementMap (sinj0 xβ‚€) = sinj0 (fβ‚€.toElementMap xβ‚€)

              (fβ‚€+f₁+fβ‚‚)(injβ‚€ x) = injβ‚€(fβ‚€ x).

              theorem Domain.Neighborhood.sumMap3_sinj1 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Ξ±' : Type u_4} {Ξ²' : Type u_5} {Ξ³' : Type u_6} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {Vβ‚€' : NeighborhoodSystem Ξ±'} {V₁' : NeighborhoodSystem Ξ²'} {Vβ‚‚' : NeighborhoodSystem Ξ³'} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {hβ‚€' : βˆ€ (X : Set Ξ±'), Vβ‚€'.mem X β†’ X.Nonempty} {h₁' : βˆ€ (Y : Set Ξ²'), V₁'.mem Y β†’ Y.Nonempty} {hβ‚‚' : βˆ€ (Z : Set Ξ³'), Vβ‚‚'.mem Z β†’ Z.Nonempty} (fβ‚€ : ApproximableMap Vβ‚€ Vβ‚€') (f₁ : ApproximableMap V₁ V₁') (fβ‚‚ : ApproximableMap Vβ‚‚ Vβ‚‚') (x₁ : V₁.Element) :
              (sumMap3 fβ‚€ f₁ fβ‚‚).toElementMap (sinj1 x₁) = sinj1 (f₁.toElementMap x₁)

              (fβ‚€+f₁+fβ‚‚)(inj₁ x) = inj₁(f₁ x).

              theorem Domain.Neighborhood.sumMap3_sinj2 {Ξ± : Type u_1} {Ξ² : Type u_2} {Ξ³ : Type u_3} {Ξ±' : Type u_4} {Ξ²' : Type u_5} {Ξ³' : Type u_6} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} {Vβ‚‚ : NeighborhoodSystem Ξ³} {Vβ‚€' : NeighborhoodSystem Ξ±'} {V₁' : NeighborhoodSystem Ξ²'} {Vβ‚‚' : NeighborhoodSystem Ξ³'} {hβ‚€ : βˆ€ (X : Set Ξ±), Vβ‚€.mem X β†’ X.Nonempty} {h₁ : βˆ€ (Y : Set Ξ²), V₁.mem Y β†’ Y.Nonempty} {hβ‚‚ : βˆ€ (Z : Set Ξ³), Vβ‚‚.mem Z β†’ Z.Nonempty} {hβ‚€' : βˆ€ (X : Set Ξ±'), Vβ‚€'.mem X β†’ X.Nonempty} {h₁' : βˆ€ (Y : Set Ξ²'), V₁'.mem Y β†’ Y.Nonempty} {hβ‚‚' : βˆ€ (Z : Set Ξ³'), Vβ‚‚'.mem Z β†’ Z.Nonempty} (fβ‚€ : ApproximableMap Vβ‚€ Vβ‚€') (f₁ : ApproximableMap V₁ V₁') (fβ‚‚ : ApproximableMap Vβ‚‚ Vβ‚‚') (xβ‚‚ : Vβ‚‚.Element) :
              (sumMap3 fβ‚€ f₁ fβ‚‚).toElementMap (sinj2 xβ‚‚) = sinj2 (fβ‚‚.toElementMap xβ‚‚)

              (fβ‚€+f₁+fβ‚‚)(injβ‚‚ x) = injβ‚‚(fβ‚‚ x).

              The functor T(X) = πŸ™ + X + X #

              The morphism action of T: T(f) = I_πŸ™ + f + f (identity on the terminator, f on each successor copy). Always strict (isStrict_sumMap3).

              Equations
              Instances For

                Exercise 6.17 β€” the functor T(X) = πŸ™ + X + X on the category of βˆ…-free domains and strict maps. On objects, T(D) = πŸ™ + D + D (Example 6.2's three-way sum); on maps, T(f) = I_πŸ™ + f + f.

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

                  C as a T-algebra #

                  theorem Domain.Neighborhood.isStrict_ofIso {Ξ± : Type u_1} {Ξ² : Type u_2} {Vβ‚€ : NeighborhoodSystem Ξ±} {V₁ : NeighborhoodSystem Ξ²} (e : Vβ‚€.Element ≃o V₁.Element) :

                  The map of an order-isomorphism is strict (an iso of domains preserves βŠ₯).

                  C (Example 4.4: finite-or-infinite binary sequences) as an object of the βˆ…-free category.

                  Equations
                  Instances For

                    The T-algebra structure on C. (tcObj Cobj).sys = πŸ™ + C + C (definitionally Example 6.2's CC), and the structure map i : πŸ™ + C + C β†’ C is the inverse of the domain-equation isomorphism ccEquiv (Example 6.2), realised as an approximable map by ofIso; it is strict by isStrict_ofIso. Concretely i sends the terminator to Ξ›Μ‚ and each b-copy of x to bΒ·x.

                    Equations
                    Instances For

                      C is a T-algebra, (C, i) with T(X) = πŸ™ + X + X.

                      Equations
                      Instances For

                        Initiality of (C, i): the unique homomorphism into any T-algebra #

                        We first relate the domain-equation isomorphism toCC = ccEquiv to the separated-sum injections: the terminator Ξ›Μ‚ lands on the πŸ™-copy, and prepending a bit (consMap b) lands on the b-th C-copy.

                        (bΒ·z).mem (bX) ↔ z.mem X: the b-successor's filter restricted to the b-copy is z.

                        (bΒ·z) never meets the (Β¬b)-copy: 0z avoids the 1-copies and vice versa (used to discharge the cross-tag cases in toCC_consMap).

                        (b·z) avoids the terminator {Λ} (since bσ ≠ Λ).

                        toCC ∘ (0Β·) = inj₁ and toCC ∘ (1Β·) = injβ‚‚. Prepending the bit b to z is, across the isomorphism C β‰… πŸ™+C+C, the injection of z into the b-th C-summand.

                        toCC Ξ›Μ‚ = injβ‚€. The finished empty sequence is the terminator (the πŸ™-summand).

                        The homomorphism desc : C β†’ E for a T-algebra B = (E, k) #

                        The distinguished point e = k(Ξ›): the image under k of the terminator (πŸ™-injection).

                        Equations
                        Instances For

                          The b-th successor operation f_b = k ∘ inj_b: fβ‚€ via the 0-copy (inj₁), f₁ via the 1-copy (injβ‚‚).

                          Equations
                          Instances For

                            The recursion Ο†(Ξ›)=z, Ο†(bΒ·Οƒ)=f_b(Ο†(Οƒ)) on a finite string, with base value z.

                            Equations
                            Instances For
                              theorem Domain.Neighborhood.descF_mono (B : TAlgebra Tc) (b : Bool) {y y' : B.carrier.sys.Element} (h : y ≀ y') :
                              descF B b y ≀ descF B b y'
                              theorem Domain.Neighborhood.descVal_mono_z (B : TAlgebra Tc) {z z' : B.carrier.sys.Element} (h : z ≀ z') (Οƒ : ExampleB.Str) :
                              descVal B z Οƒ ≀ descVal B z' Οƒ
                              theorem Domain.Neighborhood.descVal_append (B : TAlgebra Tc) (z : B.carrier.sys.Element) (Οƒ ρ : ExampleB.Str) :
                              descVal B z (Οƒ ++ ρ) = descVal B (descVal B z ρ) Οƒ
                              theorem Domain.Neighborhood.descMap_hcone (B : TAlgebra Tc) {Οƒ Ο„ : ExampleB.Str} (h : Οƒ <+: Ο„) :
                              theorem Domain.Neighborhood.descMap_hsing (B : TAlgebra Tc) {Οƒ Ο„ : ExampleB.Str} (h : Οƒ <+: Ο„) :
                              descVal B B.carrier.sys.bot Οƒ ≀ descVal B (descE B) Ο„

                              The homomorphism C β†’ E. Built by liftC from the head-recursion: Ο†(ΟƒβŠ₯) = f_{Οƒ}(βŠ₯) and Ο†(Οƒ) = f_{Οƒ}(e), interpreting bβ‚€b₁… ↦ f_{bβ‚€}(f_{b₁}(…)).

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

                                The bundled strict homomorphism C β†’ E.

                                Equations
                                Instances For

                                  The homomorphism square and uniqueness #

                                  The composite injβ‚€βˆ˜(...) of T(g) applied to a successor reduces to the operation f_b. The single computational step behind both existence and uniqueness, for an arbitrary g.

                                  T(g) on the terminator is the terminator; precomposed with k it is e.

                                  T(g) on βŠ₯ is βŠ₯; precomposed with k it is βŠ₯ (both maps are strict).

                                  Any map satisfying the homomorphism recursion equals descMap. This is both the existence witness (descMap satisfies it) and the uniqueness driver.

                                  The homomorphism square, read off at the level of underlying approximable maps: desc ∘ i = k ∘ T(desc).

                                  The descent homomorphism (C, i) β†’ (E, k) as a T-algebra homomorphism.

                                  Equations
                                  Instances For

                                    Uniqueness. Any T-algebra homomorphism out of (C, i) equals descAlgHom.

                                    Exercise 6.17 (existence half) β€” (C, i) is an initial T-algebra for T(X) = πŸ™ + X + X. The descent map Ο† : C β†’ E is the closed-form head-recursion Ο†(Ξ›) = e, Ο†(bΒ·x) = f_b(Ο† x) (f_b = k ∘ inj_b), built choice-free via liftC; it is the unique T-algebra homomorphism, so C is determined (up to iso, Proposition 6.6) as the initial algebra of X ↦ πŸ™ + X + X.

                                    Equations
                                    Instances For