]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/tactics/setoids.ml
parameter sintax added to axiom statement
[helm.git] / helm / software / components / tactics / setoids.ml
index d85df1c4b1e2de3b215524257ee15d71b2ec9474..1ef4e483e62f8ec8afdcb6435d54913d3442cdfc 100644 (file)
@@ -8,6 +8,10 @@
 
 (* $Id: setoid_replace.ml 8900 2006-06-06 14:40:27Z letouzey $ *)
 
+module T = Tacticals
+module RT = ReductionTactics
+module PET = ProofEngineTypes
+
 let default_eq () =
  match LibraryObjects.eq_URI () with
     Some uri -> uri
@@ -958,7 +962,7 @@ let int_add_relation id a aeq refl sym trans =
      rel_X_relation_class = Cic.Sort Cic.Prop; (* dummy value, overwritten below *)
      rel_Xreflexive_relation_class = Cic.Sort Cic.Prop (* dummy value, overwritten below *)
    } in
-  let x_relation_class =
+  let _x_relation_class =
    let subst =
     let len = List.length a_quantifiers_rev in
      list_map_i (fun i _ -> Cic.Rel (len - i + 2)) 0 a_quantifiers_rev in
@@ -979,7 +983,7 @@ let int_add_relation id a aeq refl sym trans =
       IsDefinition Definition) in
 *) () in
   let id_precise = id ^ "_precise_relation_class" in
-  let xreflexive_relation_class =
+  let _xreflexive_relation_class =
    let subst =
     let len = List.length a_quantifiers_rev in
      list_map_i (fun i _ -> Cic.Rel (len - i)) 0 a_quantifiers_rev
@@ -1840,6 +1844,11 @@ let setoid_reflexivity_tac =
  in
   ProofEngineTypes.mk_tactic tac
 
+let setoid_reflexivity_tac =
+   let start_tac = RT.whd_tac ~pattern:(PET.conclusion_pattern None) in
+   let fail_tac = T.then_ ~start:start_tac ~continuation:setoid_reflexivity_tac in 
+   T.if_ ~start:setoid_reflexivity_tac ~continuation:T.id_tac ~fail:fail_tac
+
 let setoid_symmetry  =
  let tac status =
   try