set_fixity : string -> fixity -> unit
- val thm = Psyntax.new_recursive_definition prim_recTheory.num_Axiom "f" (Term`(f 0 n = n) /\ (f (SUC n) m = SUC (SUC (f n m)))`); > val thm = |- (!n. f 0 n = n) /\ !n m. f (SUC n) m = SUC (SUC (f n m)) : thm - set_fixity "f" (Infixl 500); > val it = () : unit - thm; > val it = |- (!n. 0 f n = n) /\ !n m. SUC n f m = SUC (SUC (n f m)) : thm
- val t = Term`2 + 3 + 4 - 6`; > val t = `2 + 3 + 4 - 6` : term - set_fixity "+" (Infixr 501); > val it = () : unit - t; > val it = `(2 + 3) + 4 - 6` : term - dest_comb (Term`3 - 1 + 2`); > val it = (`$- 3`, `1 + 2`) : term * term
As with other functions in the Parse structure, there is a companion temp_set_fixity function, which has the same effect on the global grammar, but which does not cause this effect to persist when the current theory is exported.