
~?Goal

   The sound negation operator.  If Goal is not ground, the predicate delays.



Arguments
   ?Goal               Callable term or a variable.

Type
   Control

Description

   This is the sound negation operator.  It can be used instead of
   not/1, or \+/1 (the negation as failure operators).  It is known
   that negation as failure may yield non-logical results if the Goal
   contains free variables.  To avoid this, ~/1 delays if Goal is not
   ground.  If the free variables are bound later in the execution,
   the delayed predicate is woken and executed and may yield success
   or failure.  While ~/1 always behaves logically, in some cases it
   delays where negation as failure or constructive negation would
   have immediately (and correctly) failed.




Resatisfiable
      No.

Fail Conditions
      Fails if Goal can be satisfied



Examples
   
Success:
    ~ 3 = 4.
    ~ 3 = X,            (delays ...
        X = 4.             ... and succeeds with X = 4)
Fail:
    ~ 3 = 3.
    ~ 3 = X,            (delays ...
        X = 3.             ... and fails)
    ~ X = X,            (delays ...
        X = 3.             ... and fails)





See Also
   not / 1, \+ / 1, suspend / 3
