lambda - Which is the difference between these polymorphic types? -


in system f, difference between following 3 types: three formulas involving forall , implies below.

reproduced in text here:

∀x.((x → x) → (x → x)) ∀x.((x → x) → ∀x.(x → x)) ((∀x.x → x) → (∀x.x → x)) 

is second 1 more general first?

depends on how tight forall quantifier binds. lets assume binds on next terminal expression (variable or ()-block).

the first become (x0 -> x0) -> (x0 -> x0) x0 fresh type variable.

the second become (x0 -> x0) -> forall x1. (x1 -> x1) x0 , x1 fresh.

the third - (bot -> x) -> (bot -> x) x old binding , bot uninhabited forall x. x.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -