Yes, it is possible to use the library metaphor to describe the differences between polymorphic and multi-typed lambda calculus. In this metaphor, the library represents lambda calculus, with its collection of expressions and functions. The books in the library represent the expressions and functions in lambda calculus, and the shelves in the library represent the different types of these expressions and functions.
In the case of polymorphic lambda calculus, the books in the library are like books that can be placed on multiple shelves. For example, a book about history could be placed on the “history” shelf, but it could also be placed on the “non-fiction” shelf, or the “paperback” shelf. This is similar to how polymorphic lambda calculus allows expressions to be assigned to multiple types.
In the case of multi-typed lambda calculus, the books in the library are like books that can change their location on the shelves over time. For example, a book about history could start out on the “history” shelf, but then be moved to the “non-fiction” shelf if it is borrowed and returned later. This is similar to how multi-typed lambda calculus allows the type of an expression to change dynamically during the course of a computation.
Overall, the library metaphor can be a useful way to think about the differences between polymorphic and multi-typed lambda calculus, and the ways in which these versions of lambda calculus provide more flexibility and expressiveness than a traditional typed lambda calculus.