datatype term = AST_ID of string | AST_NUM of int | AST_BOOL of bool | AST_FUN of (string * term) | AST_APP of (term * term) | AST_SUCC | AST_PRED | AST_ISZERO | AST_IF of (term * term * term) | AST_REC of (string * term) | AST_ERROR