*)
(* The default of term is the thesis of the goal to be prooved *)
-let reduction_tac ~also_in_hypotheses ~reduction ~term ~status:(proof,goal) =
+let reduction_tac ~also_in_hypotheses ~reduction ~terms ~status:(proof,goal) =
let curi,metasenv,pbo,pty = proof in
let metano,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in
- let term =
- match term with None -> ty | Some t -> t
+ let terms =
+ match terms with None -> [ty] | Some l -> l
in
(* We don't know if [term] is a subterm of [ty] or a subterm of *)
(* the type of one metavariable. So we replace it everywhere. *)
(*CSC: siamo nel contesto errato. Metto il try, ma che schifo!!!! *)
(*CSC: Anche perche' cosi' catturo anche quelle del replace che non dovrei *)
try
- let term' = reduction context term in
- ProofEngineReduction.replace ~equality:(==) ~what:term ~with_what:term'
+ let terms' = List.map (reduction context) terms in
+ ProofEngineReduction.replace ~equality:(==) ~what:terms ~with_what:terms'
~where:where
with
_ -> where
(*CSC: ma si potrebbe ovviare al problema. Ma non credo *)
(*CSC: che si guadagni nulla in fatto di efficienza. *)
let replace =
- ProofEngineReduction.replace ~equality:(=) ~what:term' ~with_what:term
+ ProofEngineReduction.replace ~equality:(=) ~what:[term'] ~with_what:[term]
in
let ty' = replace ty in
let metasenv' =