let irl = identity_relocation_list_for_metavariable context in
(*CSC: Bug: se ci sono due term uguali nella prova dovrei bucarne uno solo!!!*)
let bo' =
- ProofEngineReduction.replace (==) term (C.Meta (newmeta,irl)) bo
+ ProofEngineReduction.replace (==) [term] [C.Meta (newmeta,irl)] bo
in
(* It may be possible that some metavariables occurred only in *)
(* the term we are perforating and they now occurs no more. We *)
(************************************************************)
(* Reduces [term] using [reduction_function] in the current scratch goal [ty] *)
-let reduction_tactic_in_scratch reduction_function term ty =
+let reduction_tactic_in_scratch reduction_function terms ty =
let metasenv =
match !proof with
None -> []
None -> assert false
| Some metano -> List.find (function (m,_,_) -> m=metano) metasenv
in
- let term' = reduction_function context term in
+ let terms' = List.map (reduction_function context) terms in
ProofEngineReduction.replace
- ~equality:(==) ~what:term ~with_what:term' ~where:ty
+ ~equality:(==) ~what:terms ~with_what:terms' ~where:ty
;;
let whd_in_scratch = reduction_tactic_in_scratch CicReduction.whd
(* reduction tactics *)
-let whd term =
+let whd terms =
apply_tactic
- (ReductionTactics.whd_tac ~also_in_hypotheses:true ~term:(Some term))
-let reduce term =
+ (ReductionTactics.whd_tac ~also_in_hypotheses:true ~terms:(Some terms))
+let reduce terms =
apply_tactic
- (ReductionTactics.reduce_tac ~also_in_hypotheses:true ~term:(Some term))
-let simpl term =
+ (ReductionTactics.reduce_tac ~also_in_hypotheses:true ~terms:(Some terms))
+let simpl terms =
apply_tactic
- (ReductionTactics.simpl_tac ~also_in_hypotheses:true ~term:(Some term))
+ (ReductionTactics.simpl_tac ~also_in_hypotheses:true ~terms:(Some terms))
let fold_whd term =
apply_tactic