Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the name of `liftM` inspired by lifts in mathematics? [closed]

I'm a math PhD student minoring in CS and currently taking a class in Haskell. We just learned about liftM.

The concepts seem similar but I haven't been able to figure out exactly how liftM can be thought of as a lift in the category-theoretical sense (I know very little category theory and was introduced to lifts in a Topology class).

like image 699
Aphyd Avatar asked May 05 '20 22:05

Aphyd


People also ask

What is lifting in mathematics?

Given a map from a space to a space and another map from a space to a space , a lift is a map from to such that . In other words, a lift of is a map. such that the diagram (shown below) commutes.

What is lift function?

A lifting function's role is to lift a function into a context (typically a Functor or Monad). So lifting a function of type a -> b into a List context would result in a function of type List[a] -> List[b] .


Video Answer


1 Answers

Given the lack of activity -- and the lack of an obvious connection -- I think it's safe to say that liftM was not named because of its connection to topological and category-theoretic lifts.

Instead, I think the term "lift" has come to generically mean any transformation from one domain of reasoning to another, and it is this sense of "lift" that was the historical reason for the name liftM. Specifically: liftM transforms a pure function, "lift"ing it into the domain of a specific monad.

like image 199
Daniel Wagner Avatar answered Oct 03 '22 03:10

Daniel Wagner