set
Entity: predicate

Usage:
set(Pred(Arg1, ... , ArgN))

Retracts all axioms which have predicate symbol Pred and asserts the axiom Pred(Arg1, ... , ArgN) .
 
Pred predicate symbol.
Arg1, ... , ArgN  some list of arguments. 

Succeeds always.

Example:

?- test(X), write(X), nl, set(test(2)), test(Y), write(Y), nl.

test(1).

See also:

assert
assert_in