From: Claudio Sacerdoti Coen Date: Wed, 4 Jul 2007 20:19:24 +0000 (+0000) Subject: Bug fixed: a ~with_cast is now inserted when appropriate to avoid translation X-Git-Tag: make_still_working~6218 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=3c5ae672d701c15b24fba38f38f583ef9e7414af;p=helm.git Bug fixed: a ~with_cast is now inserted when appropriate to avoid translation of a bottom-up conversion into a top-down conversion. --- diff --git a/helm/software/components/tactics/declarative.ml b/helm/software/components/tactics/declarative.ml index b0615edb3..8e077c6bd 100644 --- a/helm/software/components/tactics/declarative.ml +++ b/helm/software/components/tactics/declarative.ml @@ -63,18 +63,24 @@ let by_term_we_proved ~dbd ~universe t ty id ty' = ~continuation:just ) | Some id -> - let continuation = + let ty',continuation = match ty' with - None -> Tacticals.id_tac + None -> ty,just | Some ty' -> - Tactics.change ~pattern:(None,[id,Cic.Implicit (Some `Hole)],None) - (fun _ metasenv ugraph -> ty',metasenv,ugraph) + ty', + Tacticals.then_ + ~start: + (Tactics.change + ~with_cast:true + ~pattern:(None,[id,Cic.Implicit (Some `Hole)],None) + (fun _ metasenv ugraph -> ty,metasenv,ugraph)) + ~continuation:just in Tacticals.thens ~start: - (Tactics.cut ty + (Tactics.cut ty' ~mk_fresh_name_callback:(fun _ _ _ ~typ -> Cic.Name id)) - ~continuations:[ continuation ; just ] + ~continuations:[ Tacticals.id_tac ; continuation ] ;; let bydone ~dbd ~universe t =