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 [Term`y:bool`, Term`z:bool`] (Term`x:bool`); > val it = `x` : term - variant [Term`x:bool`, Term`x':num`, Term`x'':num`] (Term `x:bool`); > val it = `x'''` : term
- variant [] (mk_var("T",bool)); > val it = `T'` : term
- with_flag (priming,SOME "_") (uncurry variant) ([Term`x:bool`, Term`x':num`, Term`x'':num`], Term `x:bool`); > val it = `x_1` : term