Yoneda is CPS

Jul 01, 2016 19:39

https://bartoszmilewski.com/2015/09/01/the-yoneda-lemma/

forall r . (a -> r) -> r ≅ a

Is it forall a or not? Yoneda says yes. Does this mean type system is boolean?

Leave a comment

ex_juan_gan July 1 2016, 20:59:38 UTC
The notation is kind of misleading.

It's about natural transformations from (a->_) to id, in Sets, and they are in one-to-one correspondence with the set a.

Hask is not Sets. Again, Hask is not Sets. I don't know where Bartosz takes all this, to me he seems over-creative.

So - never mind. He's just fantasizing.

Reply

sassa_nf July 1 2016, 21:09:50 UTC
ok, that's better.

The question actually comes from the allegation that CPS is isomorphic to "direct" expression. I cannot recall where I saw this allegation, so was looking for a confirmation.

Then if they are not isomorphic, it means one of the ways is "more expressive"?

Reply

ex_juan_gan July 1 2016, 21:15:05 UTC
Most probably, yes.

Reply

sassa_nf July 1 2016, 21:23:12 UTC
meaning, one of them is more expressive?

Reply

ex_juan_gan July 1 2016, 21:27:35 UTC
That's what I would expect.

I think continuation is like a closure, double adjunction. Generalized points.

Reply

sassa_nf July 4 2016, 08:45:11 UTC
Actially, it is just me getting confused.

Here we are not talking about an isomorphism ((A→⊥)→⊥)→A (from which booleanness would follow). Here we are talking about a _family_ of functions. That is, the type is also an input:

CPS transform is an isomorphism: ((X : Type)→(A→X)→X)→A

(Note it isn't a value of type X as the first argument, but the type X)

Reply


Leave a comment

Up