diff --git a/what-is-an-intensional-model.org b/what-is-an-intensional-model.org new file mode 100644 index 0000000000000000000000000000000000000000..5e88d7539faabb0c9e2ae62991aa4940ee87c911 --- /dev/null +++ b/what-is-an-intensional-model.org @@ -0,0 +1,105 @@ +* Term Model + +** CBPV + +A judgmental cbpv model is + +1. A cartesian category ð“’ of "pure functions" +2. A subset of the objects of ð“’ called the "value types" +3. A ð“Ÿð“’-enriched category ð“” of "linear functions", whose objects are + "computation types" +4. ð“Ÿð“’-enriched presheaf W on ð“” + +Type structure: +1. ð“’ has product types if the value types are closed under products +2. ð“’ has pure function types if the vtypes are closed under exponentials +3. ð“’ has sum types if the value types are closed under *distributive* + coproducts +4. ð“’ has a â–¹ type if for every A ∈ VType, the presheaf + P(Γ) = â–¹ (ð“’ [ Γ , A ]) is representable +5. ð“’ has linear function types if every Hom_ð“”(B,B') is representable +6. ð“’ has thunks if every W B is representable + +Similarly: +1. ð“” has function types if it has powers of ð“’-types +2. ð“” has returners if for every vtype A, the enriched covariant + presheaf Q(B)_Γ = W B (Γ × A) is (enriched) representable +3. ð“” has product types if it has enriched products +4. ð“” has +This isn't quite right tho, because W needs to respect the powers... +*** Alt + +A judgmental cbpv model is + +1. A cartesian category ð“’ of "pure functions" +2. A distinguished subset of ð“’ objects called "value types" +3. A ð“Ÿ ð“’-enriched category ð“” of "linear functions" +4. A distinguished object W ∈ ð“” of "machines" +5. A distinguished subset of ð“” objects called "computation types" + +** CBV/CBN + +Special cases: +1. a judgmental cbv model is + - A cartesian category ð“’ + - A subset of types, which determines a ð“Ÿð“’-enriched category ð“£ + - A ð“Ÿð“’-enriched presheaf ð“” on ð“£ + - A ð“Ÿð“’-enriched promonad structure on ð“£ with underlying profunctor: + (ð“› A B) Γ = ð“” B (Γ × A) + + From this data, we can generate a cbpv model with ð“’ as the + cartesian category and defining a "Kleisli" category whose objects + are ð“£ + 1 with + (ð“” (inl A) B) Γ = ð“› A B Γ + (ð“” (inr *) B) Γ = 𓔠Γ B + + This can be generated for instance from + - A cartesian category ð“’ and a strong monad T on ð“’ +2. a judgmental cbn model is + - A cartesian category ð“’ + - a subset of types determining a wide subcategory ð“£ + - A subcategory? ð“› of ð“£ of "linear" functions or should it be a + procomonad? + + This can be generated for instance from a cartesian category ð“’ and a (strong?) comonad W on ð“’ + +3. A cartesian category ð“’ of contexts and "pure functions" +4. Chosen subsets of the objects of ð“’ called "types" +5. For each type A ∈ Types, a presheaf Eff A ∈ ð“Ÿ ð“’ + 1. A natural element ret ∈ Y A ⇒ Eff A + 2. A natural transformation bind ∈ (Y A ⇒ Eff B) ⇒ Eff A ⇒ Eff B + 3. satisfying ... + + +* Relational Model + +To get a "relational" model, take the above and do it all internal to +Cat. To make it more like relations, we should require it to be +2-posetal (i.e. at most one 2-cell) and be fibrant (i.e., functions +induce relations). + +This is all in the internal language of the topos of trees. + +An intensional cbv λ model with relations consists of: + +1. A double category ð“’ that is cartesian, locally posetal and fibrant. +2. A chosen subset of objects of ð“’ called types. +3. For each type A ∈ Types, a double presheaf that is locally posetal and fibrant + + + +1. A cartesian locally posetal double category ð“’. + + Locally posetal means that there is at most one two cell of any + given framing. + + Cartesian means it has finite products + +2. A locally posetal double category of types and effectful morphisms + ð“” + + + +3. A locally posetal double profunctor Tm : ð“’ o-* Eff + +