]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/cic/libraryObjects.ml
- some fixes regarding URIs of equality that now should be coherent with the
[helm.git] / helm / software / components / cic / libraryObjects.ml
index df653eb9a7ab3657d59d97691a5de2e3407ba532..7a4112ad5a67350a9110b54d1cc4516fd848a451 100644 (file)
@@ -82,6 +82,12 @@ let eq_URI () =
 let is_eq_URI uri =
  List.exists (fun (eq,_,_,_,_) -> UriManager.eq eq uri) !eq_URIs_ref
 
+let is_eq_refl_URI uri =
+  let urieq = UriManager.strip_xpointer uri in
+  is_eq_URI urieq &&
+  not (UriManager.eq urieq uri)
+;;
+
 let is_eq_ind_URI uri =
  List.exists (fun (_,_,_,eq_ind,_) -> UriManager.eq eq_ind uri) !eq_URIs_ref
 
@@ -92,6 +98,10 @@ let is_trans_eq_URI uri =
 let is_sym_eq_URI uri =
  List.exists (fun (_,sym_eq,_,_,_) -> UriManager.eq sym_eq uri) !eq_URIs_ref
 
+let eq_refl_URI ~eq:uri =
+  let uri = UriManager.strip_xpointer uri in
+  UriManager.uri_of_string (UriManager.string_of_uri uri ^ "#xpointer(1/1/1)")
 let sym_eq_URI ~eq:uri =
  try
   let _,x,_,_,_ = List.find (fun eq,_,_,_,_ -> UriManager.eq eq uri) !eq_URIs_ref in x