]> matita.cs.unibo.it Git - helm.git/blobdiff - components/tactics/inversion.ml
is_empty_listing fixed: the ls method normalizes away the .gz suffix
[helm.git] / components / tactics / inversion.ml
index 0ff369a9a6d4b4367cfeec9bce090c386eeeb029..74117f7109dd596602e0d1ee26a23c7a1cd132da 100644 (file)
@@ -171,6 +171,7 @@ let isSetType paramty = ((Pervasives.compare
   (get_sort_type paramty)
   (Cic.Sort Cic.Prop)) != 0) 
 
+exception EqualityNotDefinedYet
 let private_inversion_tac ~term =
  let module T = CicTypeChecker in
  let module R = CicReduction in
@@ -181,7 +182,11 @@ let private_inversion_tac ~term =
  
  (*DEBUG*) debug_print (lazy  ("private inversion begins"));
  let (_,metasenv,_,_) = proof in
- let uri_of_eq = LibraryObjects.eq_URI () in
+ let uri_of_eq =
+  match LibraryObjects.eq_URI () with
+     None -> raise EqualityNotDefinedYet
+  | Some uri -> uri
+ in
  let (_,context,goalty) = CicUtil.lookup_meta goal metasenv in
  let termty,_ = T.type_of_aux' metasenv context term CicUniv.empty_ugraph in
  let uri = baseuri_of_term termty in  
@@ -209,8 +214,7 @@ let private_inversion_tac ~term =
   (List.map 
    (fun t -> (
     match (T.type_of_aux' metasenv context t CicUniv.empty_ugraph) with
-     (term,graph) -> term
-     |_ -> assert false))
+     (term,graph) -> term))
    parameters) 
  in
  let consno = List.length cons_list in