From: acondolu Date: Sun, 10 Jun 2018 15:27:16 +0000 (+0200) Subject: Improved definition of eta_eq X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=6e922f4eb4a947f1e3a9a957f465102e143164f1;p=fireball-separation.git Improved definition of eta_eq Probably still not just right --- diff --git a/ocaml/simple.ml b/ocaml/simple.ml index 079774e..34f9f72 100644 --- a/ocaml/simple.ml +++ b/ocaml/simple.ml @@ -23,8 +23,11 @@ let rec is_stuck = function ;; let eta_eq' = - let rec aux l1 l2 t1 t2 = match t1, t2 with - | _, _ when is_stuck t1 || is_stuck t2 -> true + let rec aux l1 l2 t1 t2 = + let stuck1, stuck2 = is_stuck t1, is_stuck t2 in + match t1, t2 with + | _, _ when not stuck1 && stuck2 -> false + | _, _ when stuck1 -> true | L t1, L t2 -> aux l1 l2 (fst t1) (fst t2) | L t1, t2 -> aux l1 (l2+1) (fst t1) t2 | t1, L t2 -> aux (l1+1) l2 t1 (fst t2)