Logical Connectives

Complex sentences can be built up out of atomic sentences or other complex sentences by using logical connectives, which are special constants analogous to the logical operators of formal logic. The most important logical connectives in CycL are #$not, #$and, #$or, and #$implies.

2.5.1. #$not

The connective #$not takes a single sentence as an argument. Like the "not" of formal logic, it reverses the truth value of its argument. Thus,

(#$not (#$colorOfObject #$FredsBike #$RedColor))

will be true if and only if (#$colorOfObject #$FredsBike #$RedColor) is false. Likewise,

(#$not (#$not (#$colorOfObject #$FredsBike #$RedColor)))

will have the same truth value as (#$colorOfObject #$FredsBike #$RedColor).

2.5.2. #$and

The connective #$and takes one or more sentences as arguments. Like the "and" of formal logic, the conjunction is true if and only if each of its arguments is true.

This sentence states that Fred's bike is red and that it is located in Fred's garage. If both of those things are true then the whole sentence is true, but if one or both are false, then the whole sentence is false.

2.5.3. #$or

The connective #$or takes one or more sentences as arguments. Like the "or" of formal logic, the disjunction is true if and only if at least one of its arguments is true. Here's an example:

This assertion states that either Fred's bike is red, or it is located in Fred's garage, or Fred owns it, or all three. (The word "or" in English is sometimes taken to imply that one alternative or the other is true, but not both. That is not the case with #$or.) If any or all of these three statements is true, then the whole sentence is true. All would have to be false for the sentence as a whole to be false.

2.5.4. #$implies

The connective #$implies takes exactly two sentences as arguments. Like the "if-then" statement of formal logic, the implication is true if and only if it is not the case that its first argument is true and its second argument is false. Here's an example:

This assertion states that if #$Bike001 is owned by #$Fred, then it is red. Newcomers to formal logic may misinterpret #$implies as implying a causal relationship. But, strictly speaking, a #$implies assertion says only that either the first argument is false, or the second argument is true. So, for example, the assertion

Assertions involving #$implies are very common in the CYC KB. We also call them conditionals or rules, and we refer to the first argument as the antecedent and the second argument as the consequent. Note, however, that the particular sentence above is not representative of assertions likely to be found in the CYC KB. We will come to some more representative examples in a moment.

2.5.5. Well-Formedness of Complex Sentences

Any complex sentence formed by using the logical connectives will be well-formed if the sentences given as arguments to the connectives are also well-formed and if the right number of arguments are given. (The sentences given as arguments to the logical connectives need not be atomic sentences, like most of the examples above, but can be any well-formed sentence.) Another way of saying this is that #$not, #$and, #$or and #$implies produce CycLSentences when they are given arguments which are also CycLSentences.

Suppose A and B are syntactically legal, and C is not. Then,

(#$not A)
(#$and A)
(#$and A B)
(#$or A)
(#$or A B)
(#$implies A B)

would all be CycLSentences. But

(#$not A B)
(#$and)
(#$and A C)
(#$implies A)

would NOT be CycLSentences. Why? (#$not A B) violates the requirement that #$not take only one sentence as an argument. (#$and) and (#$implies A) also violate restrictions on the number of sentences these connectives take as arguments. (#$and A C) is not well-formed because C is not; any complex sentence that contained C would be syntactically bad for the same reason.

It should also be noted that #$and and #$or are elements of #$VariableArityRelation: hence, if A, B, C, and D are well-formed CycL expressions,