variant : term list -> term -> term
The exact form of the variable name should not be relied on, except that the original variable will be returned unmodified unless it is itself in the list to avoid clashing with, or if it is the name of a constant.
> variant [“y:bool”, “z:bool”] “x:bool”; val it = “x” : term > variant [“x:bool”, “x':num”, “x'':num”] “x:bool”; > val it = “x'''” : term
> variant [] (mk_var("T",bool)); val it = “T'” : term