Cours 5: Computational λ-calculus

Call-by-value + computational effects ⟶ evaluation strategy

In a cartesian closed category:

MβηNM=N

where

  • M,N are λ-terms
  • βη means β-reduction/η-expansion applied at any position / occurence of the λ-term

Keep in mind the specific monad:

Partiality monad:

T:{SetSetA1+A

Whenever we have a monad:

Kleisli category Kl(T) of T:
  • sets as objects

  • functions T:{ATBA1+B as morphisms: i.e. partial function from A to B.

  • Composition: f:AKlB and g:BKlC are composed in the following way: f;Tg;μT

Does it corresponds to the way we compose partial functions ? Yes:

A1+B1+1+C1+C

If T is the partiality monad:

Kl(T)=pSet

where pSet is the category of sets and partial functions.

If P:A, [P]:TA ⟶ turn an implicit effect into an explicit one.

Strong monads

tA,B:A×TBT(A×B)

In the case of the partiality monad T:SetSet:

{A×(1+B)tA,B1+(A×B)(a,inrb)inr(a,b)(a,)

where 1+B={}{inrbbB}


Cartesian category equipped with the identity strong monad is a cartesian closed category.

NB: The diagram going from TA×TB to T(A×B) doesn’t commute in general, but it does indeed if you have only ONE exception (partiality monad): it doesn’t matter when it is triggered.

Leave a comment