Go backward to Structured value notation.
Go up to The condition side.
Go forward to Negated conjunctions of conditions.
Negated conditions
..................
In addition to the positive tests for elements in working memory, conditions
can also test for the absence of patterns. A condition preceded by a dash
(i.e., "-") is called a *negated condition* and will be satisfied only if
there does not exist a working memory element consistent with its tests and
variable bindings. Thus it is a test for the absence of a working memory
element. For example, the following condition tests the absence of a working
memory element augmentation of the object bound to <P1> of type father.
-(<P1> ^type father)
A negation can be used within an object with many attribute-value pairs by
having it precede a specific attribute:
(<P1> ^name john -^type father ^spouse <p2>)
A negation can also be used for a path description, in which case it test for
the complete test of the path.
(<P1> ^name john ^type father -^spouse.sister.name sally)
A negation can also precede an attribute with multiple values. In this case
it test for the absence of the conjunction of the values. For example
(<P1> ^name john -^children <c1> <c2>)
tests *(not ((children <c1>) and (children <c2>)))*. This can be combined
with a path description:
(<P1> ^name john ^type father -^spouse.sister.name sally judy)
which gets expanded to:
(<P1> ^name john ^type father)
-{(<P1> ^spouse <s*1>)
(<s*1> ^sister <s*2>)
(<s*2> ^name sally)
(<s*2> ^name judy)}
This will match if john does not have at least two sister-in-laws with names
sally and judy: *(not ((spouse.sister sally) and (spouse.sister judy)))*