From 5b4ac2b6e69b6929c5fd81d8f3206adb9b974efc Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Wed, 4 Jul 2007 20:19:24 +0000 Subject: [PATCH] Bug fixed: a ~with_cast is now inserted when appropriate to avoid translation of a bottom-up conversion into a top-down conversion. --- components/tactics/declarative.ml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/components/tactics/declarative.ml b/components/tactics/declarative.ml index b0615edb3..8e077c6bd 100644 --- a/components/tactics/declarative.ml +++ b/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 = -- 2.39.2