(* Testing properties about lambda expressions *) (* Author: Carsten Schuermann, Adam Poswolsky *) exp -> exp> exp) -> exp> not : -> = |--> | |--> ; or : -> -> = |--> |--> | |--> |--> | |--> |--> | |--> |--> ; conj : -> -> = |--> |--> | |--> |--> ; const : exp> -> < bool> = {{y:exp}} <[x:exp] y> |--> | <[x:exp] x> |--> | <[x:exp] app (E1 x) (E2 x)> |--> conj (const <[x:exp] E1 x>) (const <[x:exp] E2 x>) | <[x:exp] lam [y:exp] E x y> |--> {y:exp} case const <[x:exp] E x y> of ( |--> pop ) ; c1 = const <[x:exp] x>; c2 = const <[x:exp] app x x>; c3 = const <[x:exp] app (lam [y:exp] y) (lam [y:exp] y)>; c4 = const <[x:exp] lam [y] x>; betatest : -> < bool> = [f:exp -> exp] |--> | |--> case of ( |--> | |--> ) ; b1 = betatest ; b2 = betatest ; b3 = betatest ; b4 = betatest ; idtest : exp> -> = <[x:exp] x> |--> | {{y:exp}} <[x:exp] y> |--> | <[x:exp] app (E1 x) (E2 x)> |--> | <[x:exp] lam [y:exp] E x y> |--> ; i1 = idtest <[x:exp] x>; i2 = idtest <[x:exp] app x x>; i3 = idtest <[x:exp] app (lam [y:exp] y) (lam [y:exp] x)>; i4 = idtest <[x:exp] lam [y:exp] x>; etatest : -> < bool> = |--> case of ( <[x:exp] lam [y:exp] E' x y> |--> | <[x:exp] app (E1' x) (E2' x)> |--> conj (const ) (idtest ) | <[x:exp] x> |--> ) | |--> ; e1 = etatest ; e2 = etatest ; e3 = etatest ; e4 = etatest ; e4 = etatest ;