From 09ecd6ebdb7d96386bd79a7117930aba4635f778 Mon Sep 17 00:00:00 2001 From: acondolu Date: Thu, 13 Jul 2017 20:35:10 +0200 Subject: [PATCH] Fixed bug in eta_subterm --- ocaml/num.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ocaml/num.ml b/ocaml/num.ml index 71f4935..82c4b38 100644 --- a/ocaml/num.ml +++ b/ocaml/num.ml @@ -343,9 +343,9 @@ let rec eta_subterm sub t = eta_subterm sub (u :> nf) || List.exists (fun (_, t) -> eta_subterm sub (lift liftno t)) !bs || List.exists (eta_subterm sub) (args :> nf list) - | `I(v, args) -> List.exists (eta_subterm sub) ((Listx.to_list args) :> nf list) || (match sub with - | `Var v' -> v = v' - | `I(v', args') -> v = v' + | `I((v,_), args) -> List.exists (eta_subterm sub) ((Listx.to_list args) :> nf list) || (match sub with + | `Var(v',_) -> v = v' + | `I((v',_), args') -> v = v' && Listx.length args' < Listx.length args && List.for_all (fun (x,y) -> eta_eq x y) (List.combine (Util.take (Listx.length args') (Listx.to_list args :> nf list)) (Listx.to_list args' :> nf list)) | _ -> false -- 2.39.2