let module S = ProofEngineStructuralRules in
let module U = UriManager in
let (_,metasenv,_,_) = proof in
- let _,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in
+ let _,context,ty = CicUtil.lookup_meta goal metasenv in
let termty = CicTypeChecker.type_of_aux' metasenv context term in (* per ora non serve *)
T.then_ ~start:(T.repeat_tactic
let module T = Tacticals in
let module S = ProofEngineStructuralRules in
let _,metasenv,_,_ = proof in
- let _,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in
+ let _,context,ty = CicUtil.lookup_meta goal metasenv in
let old_context_len = List.length context in
let termty = CicTypeChecker.type_of_aux' metasenv context term in
warn ("nr_of_hyp_still_to_elim=" ^ (string_of_int nr_of_hyp_still_to_elim));
if nr_of_hyp_still_to_elim <> 0 then
let _,metasenv,_,_ = proof in
- let _,context,_ = List.find (function (m,_,_) -> m=goal) metasenv in
+ let _,context,_ = CicUtil.lookup_meta goal metasenv in
let old_context_len = List.length context in
let termty = CicTypeChecker.type_of_aux' metasenv context term' in
warn ("elim_clear termty= " ^ CicPp.ppterm termty);
(* clear the hyp that has just been eliminated *)
(fun ~status:((proof,goal) as status) ->
let _,metasenv,_,_ = proof in
- let _,context,_ = List.find (function (m,_,_) -> m=goal) metasenv in
+ let _,context,_ = CicUtil.lookup_meta goal metasenv in
let new_context_len = List.length context in
warn ("newcon=" ^ (string_of_int new_context_len) ^ " & oldcon=" ^ (string_of_int old_context_len) ^ " & old_nr_of_hyp=" ^ (string_of_int nr_of_hyp_still_to_elim));
let new_nr_of_hyp_still_to_elim = nr_of_hyp_still_to_elim + (new_context_len - old_context_len) - 1 in