| Rewrite of how * what * where * note
| Elim of what * using option * note
| Apply of what * note
+ | Whd of count * note
| Branch of step list list * note
(* annterm constructors *****************************************************)
let floc = H.dummy_floc
+let hole = C.AImplicit ("", Some `Hole)
+
let mk_note str = G.Comment (floc, G.Note (floc, str))
let mk_theorem name t =
mk_tactic tactic
let mk_rewrite direction what where =
- let hole = C.AImplicit ("", Some `Hole) in
let direction = if direction then `RightToLeft else `LeftToRight in
let pattern, rename = match where with
| None -> (None, [], Some hole), []
let tactic = G.Apply (floc, t) in
mk_tactic tactic
+let mk_whd i =
+ let pattern = None, [], Some hole in
+ let tactic = G.Reduce (floc, `Whd, pattern) in
+ mk_tactic tactic
+
let mk_dot = G.Executable (floc, G.Tactical (floc, G.Dot floc, None))
let mk_sc = G.Executable (floc, G.Tactical (floc, G.Semicolon floc, None))
| Rewrite (b, t, w, s) -> mk_note s :: cont sep (mk_rewrite b t w :: a)
| Elim (t, xu, s) -> mk_note s :: cont sep (mk_elim t xu :: a)
| Apply (t, s) -> mk_note s :: cont sep (mk_apply t :: a)
+ | Whd (c, s) -> mk_note s :: cont sep (mk_whd c :: a)
| Branch ([], s) -> a
| Branch ([ps], s) -> render_steps sep a ps
| Branch (pss, s) ->