- Documentation
- Reference manual
- Built-in Predicates
- Analysing and Constructing Terms
- functor/3
- functor/4
- arg/3
- =../2
- compound_name_arity/3
- compound_name_arguments/3
- numbervars/3
- numbervars/4
- var_number/2
- term_variables/2
- nonground/2
- term_variables/3
- term_singletons/2
- is_most_general_term/1
- copy_term/2
- copy_term/4
- copy_term_nat/4
- term_factorized/3
- term_factorized/4
- term_minimal/2
- term_automaton/2
- automaton_minimal/2
- automaton_minimal/3
- Non-logical operations on terms
- Analysing and Constructing Terms
- Built-in Predicates
- Packages
- Reference manual
Availability:built-in
Var = Value giving those subterms. After
unifying all substitutions in Substitution, Term ==
Skeleton.
Term may be cyclic. The cycles come back through the substitutions, so Skeleton itself is acyclic:
?- X = a(X), term_factorized(b(X,X), Y, S). Y = b(_A, _A), S = [_A=a(_A)].
Subterms are the same when they are ==/2. For a rational tree that means when they denote the same infinite tree, so Term is factorized as far as it can be:
?- X = f(X), Y = f(f(Y)), term_factorized(p(X,Y), S, B). S = p(_A, _A), B = [_A=f(_A)].
The substitutions come in a canonical order, which makes
Skeleton-Substitution a key for =@=/2.