X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Ftactics%2FeliminationTactics.ml;h=cd401a2ec94cdaa66a0200c3bb516907b9ef3460;hb=b38de2d3fa8bbe346c59c18bbeb889f29e493f63;hp=b6141094fc2c7cbd2cb8be8c2e2cf34131b1fe2f;hpb=bac72fcaa876137ab7a5630e0c1badc2a627dce8;p=helm.git diff --git a/helm/ocaml/tactics/eliminationTactics.ml b/helm/ocaml/tactics/eliminationTactics.ml index b6141094f..cd401a2ec 100644 --- a/helm/ocaml/tactics/eliminationTactics.ml +++ b/helm/ocaml/tactics/eliminationTactics.ml @@ -44,7 +44,7 @@ let induction_tac ~term ~status:((proof,goal) as status) = 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 @@ -137,7 +137,7 @@ let decompose_tac ?(uris_choice_callback=(function l -> l)) term ~status:((proof 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 @@ -178,7 +178,7 @@ let decompose_tac ?(uris_choice_callback=(function l -> l)) term ~status:((proof 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); @@ -193,7 +193,7 @@ let decompose_tac ?(uris_choice_callback=(function l -> l)) term ~status:((proof (* 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