| `Match(u,ar,liftno,bs,args) ->
eta_subterm sub (u :> nf)
|| List.exists (fun (_, t) -> eta_subterm sub (lift liftno t)) !bs
- || List.exists (eta_subterm sub) args
- | `I(v, args) -> List.exists (eta_subterm sub) (Listx.to_list args) || (match sub with
- | `Var v' -> v = v'
- | `I(v', args') -> v = v'
+ || 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'
&& 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)) (Listx.to_list args'))
| _ -> false