]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_paramodulation/nCicBlob.ml
using = instead of alpha conversions. context metasenv and subst are not
[helm.git] / helm / software / components / ng_paramodulation / nCicBlob.ml
index 05867b00e15a7baa205a576547a8fa734a3d7fec..4c3c1320558f39f424a0c510d21404608ae675cb 100644 (file)
 
 (* $Id: terms.mli 9822 2009-06-03 15:37:06Z tassi $ *)
 
-let reference_of_oxuri = ref (fun _ -> assert false);;
-let set_reference_of_oxuri f = reference_of_oxuri := f;;
+let eqPref = ref (fun _ -> assert false);;
+let set_eqP t = eqPref := fun _ -> t;;
+
+let default_eqP() = 
+  let uri = NUri.uri_of_string "cic:/matita/ng/Plogic/equality/peq.ind" in
+  let ref = NReference.reference_of_spec uri (NReference.Ind(true,0,2)) in
+    NCic.Const ref
+
+let set_default_eqP() = eqPref := default_eqP
+
+let set_reference_of_oxuri f = 
+  let eqnew = function 
+      _ -> 
+       let r = f(UriManager.uri_of_string 
+          "cic:/matita/logic/equality/eq.ind#xpointer(1/1)")
+       in
+         NCic.Const r
+  in
+    eqPref := eqnew
+;;
+
 
 module type NCicContext =
   sig
@@ -26,7 +45,8 @@ with type t = NCic.term and type input = NCic.term = struct
 
   type t = NCic.term
 
-  let eq x y = NCicReduction.alpha_eq C.metasenv C.subst C.context x y;;
+  let eq x y = x = y;;
+    (* NCicReduction.alpha_eq C.metasenv C.subst C.context x y;; *)
 
   let rec compare x y = 
     match x,y with
@@ -44,7 +64,8 @@ with type t = NCic.term and type input = NCic.term = struct
   ;;
   
   let compare x y = 
-    if NCicReduction.alpha_eq C.metasenv C.subst C.context x y then 0 
+    (* if NCicReduction.alpha_eq C.metasenv C.subst C.context x y  then 0 *)
+    if x = y  then 0
     else compare x y
   ;;
 
@@ -80,14 +101,8 @@ with type t = NCic.term and type input = NCic.term = struct
     let sty = embed sty in
     proof, sty
   ;;
-
-  let eqP = 
-    let r = 
-      !reference_of_oxuri 
-       (UriManager.uri_of_string 
-         "cic:/matita/logic/equality/eq.ind#xpointer(1/1)")
-    in
-    NCic.Const r
+  
+  let eqP = (!eqPref)()
   ;;
 
  end