4.7 Control Predicates
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Control Predicates
          • fail/0
          • false/0
          • true/0
          • repeat/0
          • !/0
          • ,/2
          • ;/2
          • |/2
          • ->/2
          • *->/2
          • \+/1
    • Packages
Availability:built-in
Source[ISO]\+ :Goal
True if‘Goal’cannot be proven (mnemonic: + refers to provable and the backslash (\) is normally used to indicate negation in Prolog). In contrast to the ISO standard, but compatible with several other Prolog systems, SWI-Prolog implements \+/1 as a control structure. This implies that its argument is compiled as part of the enclosing clause and possible variables in goal positions are translated to call/1. As a result, if such a variable is at runtime bound to a (!/0), the cut is scoped to the call/1 call rather than the enclosing \+/1.

Many Prolog implementations (including SWI-Prolog) provide not/1. The not/1 alternative is deprecated due to its strong link to logical negation.