let pall str ~status:(proof,goal) t =
debug ("tac "^str^" :\n" );
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
debug ("th = "^ CicPp.ppterm t ^"\n");
debug ("ty = "^ CicPp.ppterm ty^"\n");
in
(debug "2\n";let r = (Tacticals.then_ ~start:(
fun ~status:(proof,goal as status) ->
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
debug("!!!!!!!!!1: unify "^CicPp.ppterm _Rle_not_lt^" with "
^ CicPp.ppterm ty ^"\n");
let r = PrimitiveTactics.apply_tac ~term:_Rle_not_lt ~status in
debug("stat tac_zero_infeq_false\n");
let r =
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
debug("faccio fold di " ^ CicPp.ppterm
(Cic.Appl
let apply_type_tac ~cast:t ~applist:al ~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 fresh_meta = ProofEngineHelpers.new_meta_of_proof proof in
let irl =
CicMkImplicit.identity_relocation_list_for_metavariable context in
let my_cut ~term:c ~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
debug("my_cut di "^CicPp.ppterm c^"\n");
let tac_use h ~status:(proof,goal as status) =
debug("Inizio TC_USE\n");
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
debug ("hname = "^ CicPp.ppterm h.hname ^"\n");
debug ("ty = "^ CicPp.ppterm ty^"\n");
let module C = Cic in
let proof,goal = status in
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 a_eq_b = C.Appl [ _eqT ; _R ; a ; b ] in
let fresh_meta = ProofEngineHelpers.new_meta_of_proof proof in
let irl =
(* Galla: moved in variousTactics.ml
let assumption_tac ~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 num = ref 0 in
let tac_list = List.map
( fun x -> num := !num + 1;
let rec fourier ~status:(s_proof,s_goal)=
let s_curi,s_metasenv,s_pbo,s_pty = s_proof in
- let s_metano,s_context,s_ty = List.find (function (m,_,_) -> m=s_goal)
- s_metasenv in
-
+ let s_metano,s_context,s_ty = CicUtil.lookup_meta s_goal s_metasenv in
debug ("invoco fourier_tac sul goal "^string_of_int(s_goal)^" e contesto :\n");
debug_pcontext s_context;
(* now we have all the right environment *)
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
(* now we want to convert hp to inequations, but first we must lift
fun ~status ->
debug ("inizio t1 strict\n");
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
debug ("th = "^ CicPp.ppterm _Rfourier_lt ^"\n");
debug ("ty = "^ CicPp.ppterm ty^"\n");
PrimitiveTactics.apply_tac ~term:_Rfourier_lt ~status)
fun ~status ->
debug("INIZIO TAC 1 2\n");
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
debug ("th = "^ CicPp.ppterm _Rfourier_lt_le ^"\n");
debug ("ty = "^ CicPp.ppterm ty^"\n");
PrimitiveTactics.apply_tac ~term:_Rfourier_lt_le ~status)
~continuations:[(*Tacticals.id_tac;Tacticals.id_tac*)(**)Tacticals.then_
~start:(fun ~status:(proof,goal as status) ->
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
PrimitiveTactics.change_tac ~what:ty
~with_what:(Cic.Appl [ _not; ineq]) ~status)
~continuation:(Tacticals.then_
(
fun ~status:(proof,goal as status) ->
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
(* check if ty is of type *)
let w1 =
debug("qui c'e' gia' l'or "^CicPp.ppterm ty^"\n");