X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fng_tactics%2FnDestructTac.ml;h=be991484079afe4510396a93d27bde7d237f55cc;hb=e4328c9691fa85434acfb24eaedcb15ea2263b28;hp=c9e46dc2af1b8523109f4b594705afb33c7435f7;hpb=432d0f324b7246c91f20545867c0da4bd25f588e;p=helm.git diff --git a/matita/components/ng_tactics/nDestructTac.ml b/matita/components/ng_tactics/nDestructTac.ml index c9e46dc2a..be9914840 100644 --- a/matita/components/ng_tactics/nDestructTac.ml +++ b/matita/components/ng_tactics/nDestructTac.ml @@ -471,7 +471,9 @@ let subst_tac ~context ~dir skip cur_eq = | _ -> cascade_select_in_ctx status ~subst:(get_subst status) context skip cur_eq in let varname = match var with | NCic.Rel var -> - let name,_ = List.nth context var in [name] + let name,_ = List.nth context (var+cur_eq-1) in + HLog.warn (Printf.sprintf "destruct: trying to remove variable: %s" name); + [name] | _ -> [] in let names_to_gen = List.filter (fun n -> n <> eq_name) names_to_gen in @@ -495,7 +497,7 @@ let subst_tac ~context ~dir skip cur_eq = (* XXX: temo che la clear multipla funzioni bene soltanto se * gli identificatori sono nell'ordine giusto. * Per non saper né leggere né scrivere, usiamo due clear - * invece di una *) + * invece di una *) NTactics.try_tac (NTactics.clear_tac [eq_name]); NTactics.try_tac (NTactics.clear_tac varname); ]@