principles = ident_list1; where = IDENT ->
TacticAst.Decompose (loc, where, principles)
| [ IDENT "discriminate" ];
- hyp = IDENT ->
- TacticAst.Discriminate (loc, hyp)
+ t = tactic_term ->
+ TacticAst.Discriminate (loc, t)
| [ IDENT "elimType" ]; t = tactic_term ->
TacticAst.ElimType (loc, t)
| [ IDENT "elim" ];
| Contradiction of loc
| Cut of loc * 'term
| Decompose of loc * 'ident * 'ident list (* where, which principles *)
- | Discriminate of loc * 'ident
+ | Discriminate of loc * 'term
| Elim of loc * 'term * 'term option (* what to elim, which principle to use *)
| ElimType of loc * 'term
| Exact of loc * 'term
List.fold_left
(fun size s -> size + (String.length s))
(current_size + 11 + String.length ident) principles
- | Discriminate (_, ident) -> current_size + 12 + (String.length ident)
+ | Discriminate (_, term) -> countterm (current_size + 12) term
| Elim (_, term, using) ->
let size1 = countterm (current_size + 5) term in
(match using with
Box.V([],principles);
Box.Text([],"]")]);
Box.Text([],ident)])
- | Discriminate (_, ident) ->
- Box.V([],[Box.Text([],"discriminate");
- Box.Text([],ident)])
+ | Discriminate (_, term) ->
+ Box.V([],pretty_append [Box.Text([],"discriminate")] term)
| Elim (_, term, using) ->
let using =
(match using with
| Cut (_, term) -> "cut " ^ pp_term_ast term
| Decompose (_, ident, principles) ->
sprintf "decompose %s %s" (pp_idents principles) ident
- | Discriminate (_, ident) -> "discriminate " ^ ident
+ | Discriminate (_, term) -> "discriminate " ^ pp_term_ast term
| Elim (_, term, using) ->
sprintf "elim " ^ pp_term_ast term ^
(match using with None -> "" | Some term -> " using " ^ pp_term_ast term)