| [ IDENT "replace" ];
t1 = tactic_term; "with"; t2 = tactic_term ->
TacticAst.Replace (loc, t1, t2)
- (* TODO Rewrite *)
+ | [ IDENT "rewrite" ; IDENT "left" ] ; t = term ->
+ TacticAst.Rewrite (loc,`Left, t, None)
+ | [ IDENT "rewrite" ; IDENT "right" ] ; t = term ->
+ TacticAst.Rewrite (loc,`Right, t, None)
(* TODO Replace_pattern *)
| [ IDENT "right" ] -> TacticAst.Right loc
| [ IDENT "ring" ] -> TacticAst.Ring loc
[]
(context2pres context)) in
let pres_goal = term2pres ty in
- (Box.b_v
- []
- [pres_context;
- b_ink [None,"width","4cm"; None,"height","1px"];
- pres_goal])
+ (Box.b_h [] [
+ Box.b_space;
+ (Box.b_v
+ []
+ [Box.b_space;
+ pres_context;
+ b_ink [None,"width","4cm"; None,"height","2px"]; (* sequent line *)
+ Box.b_space;
+ pres_goal])
+ ])
;;
(*
| Replace (_, t1, t2) ->
sprintf "replace %s with %s" (pp_term_ast t1) (pp_term_ast t2)
| Replace_pattern (_, _, _) -> assert false (* TODO *)
- | Rewrite (_, _, _, _) -> assert false (* TODO *)
+ | Rewrite (_, pos, t, None) ->
+ sprintf "rewrite %s %s"
+ (if pos = `Left then "left" else "right") (pp_term_ast t)
+ | Rewrite _ -> assert false (* TODO *)
| Right _ -> "right"
| Ring _ -> "ring"
| Split _ -> "split"