]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/tactics/reductionTactics.ml
split into two major parts:
[helm.git] / helm / ocaml / tactics / reductionTactics.ml
index 55eacc234c3da15ffb057255dc73cf30391407f1..5a567b84aa75e6056814d845ea1a35e6d81a6120 100644 (file)
@@ -26,7 +26,7 @@
 (*
 let reduction_tac ~reduction ~status:(proof,goal) =
  let curi,metasenv,pbo,pty = proof in
- let metano,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in
+ let metano,context,ty = CicUtil.lookup_meta goal metasenv in
   let new_ty = reduction context ty in
    let new_metasenv = 
     List.map
@@ -42,7 +42,7 @@ let reduction_tac ~reduction ~status:(proof,goal) =
 (* The default of term is the thesis of the goal to be prooved *)
 let reduction_tac ~also_in_hypotheses ~reduction ~terms ~status:(proof,goal) =
  let curi,metasenv,pbo,pty = proof in
- let metano,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in
+ let metano,context,ty = CicUtil.lookup_meta goal metasenv in
   let terms =
    match terms with None -> [ty] | Some l -> l
   in
@@ -95,7 +95,7 @@ let whd_tac = reduction_tac ~reduction:CicReduction.whd ;;
 
 let fold_tac ~reduction ~also_in_hypotheses ~term ~status:(proof,goal) =
  let curi,metasenv,pbo,pty = proof in
- let metano,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in
+ let metano,context,ty = CicUtil.lookup_meta goal metasenv in
   let term' = reduction context term in
    (* We don't know if [term] is a subterm of [ty] or a subterm of *)
    (* the type of one metavariable. So we replace it everywhere.   *)