let whd = call_tactic_with_goal_input ProofEngine.whd;;
let reduce = call_tactic_with_goal_input ProofEngine.reduce;;
let simpl = call_tactic_with_goal_input ProofEngine.simpl;;
-let fold = call_tactic_with_input ProofEngine.fold;;
+let fold_whd = call_tactic_with_input ProofEngine.fold_whd;;
+let fold_reduce = call_tactic_with_input ProofEngine.fold_reduce;;
let cut = call_tactic_with_input ProofEngine.cut;;
let change = call_tactic_with_input_and_goal_input ProofEngine.change;;
let letin = call_tactic_with_input ProofEngine.letin;;
let simplb =
GButton.button ~label:"Simpl"
~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in
- let foldb =
- GButton.button ~label:"Fold"
- ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in
- let cutb =
- GButton.button ~label:"Cut"
- ~packing:(hbox3#pack ~expand:false ~fill:false ~padding:5) () in
let hbox4 =
GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in
+ let foldwhdb =
+ GButton.button ~label:"Fold_whd"
+ ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in
+ let foldreduceb =
+ GButton.button ~label:"Fold_reduce"
+ ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in
+ let cutb =
+ GButton.button ~label:"Cut"
+ ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in
let changeb =
GButton.button ~label:"Change"
~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in
let clearb =
GButton.button ~label:"Clear"
~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in
+ let hbox5 =
+ GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in
let fourierb =
GButton.button ~label:"Fourier"
- ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in
+ ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
let rewritesimplb =
GButton.button ~label:"RewriteSimpl ->"
- ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in
+ ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
let reflexivityb =
GButton.button ~label:"Reflexivity"
- ~packing:(hbox4#pack ~expand:false ~fill:false ~padding:5) () in
- let hbox5 =
- GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in
+ ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
let symmetryb =
GButton.button ~label:"Symmetry"
~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
let splitb =
GButton.button ~label:"Split"
~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
+ let hbox6 =
+ GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in
let leftb =
GButton.button ~label:"Left"
- ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
+ ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in
let rightb =
GButton.button ~label:"Right"
- ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
+ ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in
let assumptionb =
GButton.button ~label:"Assumption"
- ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
+ ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in
let generalizeb =
GButton.button ~label:"Generalize"
- ~packing:(hbox5#pack ~expand:false ~fill:false ~padding:5) () in
- let hbox6 =
- GPack.hbox ~packing:(vbox1#pack ~expand:false ~fill:false ~padding:5) () in
+ ~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in
let absurdb =
GButton.button ~label:"Absurd"
~packing:(hbox6#pack ~expand:false ~fill:false ~padding:5) () in
ignore(whdb#connect#clicked whd) ;
ignore(reduceb#connect#clicked reduce) ;
ignore(simplb#connect#clicked simpl) ;
- ignore(foldb#connect#clicked fold) ;
+ ignore(foldwhdb#connect#clicked fold_whd) ;
+ ignore(foldreduceb#connect#clicked fold_reduce) ;
ignore(cutb#connect#clicked cut) ;
ignore(changeb#connect#clicked change) ;
ignore(letinb#connect#clicked letin) ;
let reduce_tac = reduction_tac ~reduction:ProofEngineReduction.reduce ;;
let whd_tac = reduction_tac ~reduction:CicReduction.whd ;;
-let fold_tac ~also_in_hypotheses ~term ~status:(proof,goal) =
+let fold_tac ~reduction ~also_in_hypotheses ~term ~status:(proof,goal) =
let curi,metasenv,pbo,pty = proof in
let metano,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in
- let term' = CicReduction.whd context term in
+ let term' = reduction context term 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: ma si potrebbe ovviare al problema. Ma non credo *)