X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2Fassignment4_hint.mdwn;h=666b46036e2fe7e2ff1ec3dbc58505923faa18ae;hp=339bb1628d8302b58abd3a5e78f4ca7094194dc5;hb=67cb14b0d6067d3024d34c8e72febd07b8f33b3f;hpb=4e92456d3dda2c68b8ff0151a0d01fa0750c1971 diff --git a/exercises/assignment4_hint.mdwn b/exercises/assignment4_hint.mdwn index 339bb162..666b4603 100644 --- a/exercises/assignment4_hint.mdwn +++ b/exercises/assignment4_hint.mdwn @@ -67,6 +67,11 @@ where `X1` happens also to be the lambda term that is the head of `ξ1`; and `X2` happens also to be the lambda term that is the head of `ξ2`. +* Where we have `H` in `X1` (the head of `ξ1`), there we could just use the bound variable `u`, right? Similarly for `G` we could just use the bound variable `v`, right? And similarly for `X2` (the head of `ξ2`). So: + + ξ1 ≡ (\u v. h (X1 u v) (X2 u v)) H G + ξ2 ≡ (\u v. g (X1 u v) (X2 u v)) H G + * Can you solve it yet? * Don't bring in `Y` or any other already-familiar fixed point combinator; that's a false path. You don't need it. @@ -79,8 +84,6 @@ * `H` is `X1` and `G` is `X2`. -* Also, where we have `H` in `X1` (the head of `ξ1`), there we could just use the bound variable `u`, right? Similarly for `G` we could just use the bound variable `v`, right? And similarly for `X2` (the head of `ξ2`). - * Now can you figure out how to get rid of the explicit self-referencing whereby `X1` contains the free variable `X1`, meant to refer to the lambda abstract that contains it? If `X1` is just `H`, also known inside the body of `X1` as `u`, we could just write `ξ1` like this, right: ξ1 ≡ (\u v. h (u u v) (X2 u v)) H G