From: TomᚠMusil Date: Fri, 12 Dec 2014 21:00:32 +0000 (+0100) Subject: we need alpha-equivalence X-Git-Url: http://git.tomasm.cz/fp.git/commitdiff_plain/6429a37e59f5616e7d3091a0317d82d073401d55?hp=356502c3cf71bb0e19a1c2166fcbbf5ae88a1805 we need alpha-equivalence --- diff --git a/src/Lambda.hs b/src/Lambda.hs index 0cedf4a..199d7a8 100644 --- a/src/Lambda.hs +++ b/src/Lambda.hs @@ -39,6 +39,9 @@ import Control.Monad.State -- >>> let aTerm n = oneof [aVar, liftA2 Lambda aVarName $ aTerm (n - 1), liftA2 App (aTerm (n `div` 2)) (aTerm (n `div` 2))] -- >>> instance Arbitrary Term where arbitrary = sized aTerm +cP :: Term +cP = tRead "(λa d c.(λa.e) b (λc.d)) ((λa.(λd.a) (λd c.b ((λa.a) a)) (a ((λa.(λd.e) ((λe.(λd b.a) (λa c.(λa a d.(λd.b (λa d.c) e) (λb b.c a (a d (λb d d e a.d (λb b.d))))) ((λb.a) c)) (d ((λc.(λd.a (λe.e)) (c d)) ((λe.b) a))) c (λa.d (e (λe.(λd c.b) a))) (c (b a)) a (λe.(λa b e b a.d) b)) ((λe.b) (λa.b)) ((λe d.b) b) e) b) ((λc c.a e) (λb.(λb.e) a)))) (λe.e) b (λd c e e c a.c)) a)" + cY :: Term cY = tRead "λf.(λx.f (x x)) (λx.f (x x))"