basic operations on terms (fold, ground, vars...)