remove_termtok : {term_name : string, tok : string} -> unit
- remove_termtok {term_name = "COND", tok = "if"};
> val it = () : unit
- Term`if p then q else r`;
<<HOL message: inventing new type variable names: 'a, 'b, 'c, 'd, 'e, 'f.>>
> val it = `if p then q else r` : term
- Term`p => q | r`;
<<HOL message: inventing new type variable names: 'a.>>
> val it = `COND p q r` : term
The fact that the pretty-printer does not print the term using the old-style syntax, even after the if-then-else rule has been removed, is due to the fact that the corresponding rule in the grammar does not have its preferred flag set. This can be accomplished with prefer_form_with_tok as follows:
- prefer_form_with_tok {term_name = "COND", tok = "=>"};
> val it = () : unit
- Term`p => q | r`;
<<HOL message: inventing new type variable names: 'a.>>
> val it = `p => q | r` : term
The specification of a rule by term_name and one of its tokens is not perfect, but seems adequate in practice.