]> matita.cs.unibo.it Git - fireball-separation.git/blobdiff - ocaml/pure.ml
Added check for eta_subterm in `solve'
[fireball-separation.git] / ocaml / pure.ml
index 7963f8732132a75bab5620326e1c193278af16ff..11cb9af81638ca6f546cd2a7e67ed182a3f9f50c 100644 (file)
@@ -132,6 +132,19 @@ let omega should_explode =
 
 let diverged = (=) B;;
 
+(* Note: maps only variables <= freshno *)
+let env_of_sigma freshno sigma =
+ let rec aux n =
+  if n > freshno then
+   []
+  else
+   let e = aux (n+1) in
+   (try
+    e, lift (-n-1) (snd (List.find (fun (i,_) -> i = n) sigma)),[]
+   with
+    Not_found -> ([], V n, []) ) :: e
+ in aux 0
+
 end
 
 module Scott =