Go backward to 2.2.2 Negations Go up to 2.2 Propositional Logic Go forward to 2.2.4 Disjunctions |
(A /\ B)is a formula.
Alternative Forms A conjunction of A and B may also appear in other syntactic forms, e.g. as
&&
B;
and(A, B)
.
The last form is the input syntax for the Logic Evaluator.
In other words, A /\ B is true if and only if both A and B are true.
A B A /\ B false false false false true false true false false true true true
Operational Interpretation In the Logic Evaluator, a conjunction is represented by an object of the Java type
public final class And implements Formula { private Formula formula0; private Formula formula1; public And(Formula _formula0, Formula _formula1) { formula0 = _formula0; formula1 = _formula1; } public boolean eval() throws EvalException { if (formula0.eval()) { if (formula1.eval()) return true; else return false; } else return false; } }
The Java expression (new And(A, B)).eval()
computes the
truth value of A /\ B. As one can see, if A
evaluates to false, the result is immediately false, i.e.,
the truth value of B does not matter any more. Only if A
evaluates to true, also B is evaluated; the result is
true only if both formulas are true.
From Definition Semantics of Conjunction, we can deduce the following properties of conjunctions.
A /\ B iff B /\ A.Conjunction is also associative, i.e., for all formulas A, B, and C, we have
A /\ (B /\ C) iff (A /\ B) /\ C.
We will now argue for the correctness of the second part of this proposition, i.e., the associativity of conjunction.
From the truth table of A /\ B we can determine the meaning of A /\ (B /\ C):
A B C B /\ C A /\ (B /\ C) false false false false false false false true false false false true false false false false true true true false true false false false false true false true false false true true false false false true true true true true
Likewise, we can determine the meaning of (A /\ B) /\ C:
A B C A /\ B (A /\ B) /\ C false false false false false false false true false false false true false false false false true true false false true false false false false true false true false false true true false true false true true true true true
Since the final results are identical in all lines of both tables, the meanings of both formulas are the same.
Convention Because of associativity, it does not matter in which particular way parentheses are placed in nestings of conjunctive formulas. We will therefore write A /\ B /\ C instead of A /\ (B /\ C) respectively (A /\ B) /\ C and, in general,
A0 /\ A1 /\ ... /\ An-1for conjunctions of n formulas (for every n). Also the Logic Evaluator allows conjunctions
and(A0, A1, ..., An-1)
of an arbitrary number of formulas.