   Go backward to 2.2.2 NegationsGo up to 2.2 Propositional LogicGo forward to 2.2.4 Disjunctions ### 2.2.3 Conjunctions

If A and B are formulas, then
(A /\  B)
is a formula.

Alternative Forms  A conjunction of A and B may also appear in other syntactic forms, e.g. as

• A, B (comma);
• A * B, A & B, A `&&` B;
• "A and B", "A as well as B" ("sowohl A als auch B");
• `and(A, B)`.

The last form is the input syntax for the Logic Evaluator.

Definition 6 (Semantics of Conjunction) Let A and B be formulas. The meaning of A /\  B is defined by the following truth table:
 A B A /\  B false false false false true false true false false true true true
In other words, A /\  B is true if and only if both A and B are 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.

Proposition 4 (Conjunctive Laws) Conjunction is commutative, i.e., for all formulas A and B, we have
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.

Proof  Let A, B, and C be arbitrary formulas. We have to show that, for every possible truth value of A, B, and C, the formulas A /\  (B /\  C) and (A /\  B) /\  C have the same truth value.

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-1
for conjunctions of n formulas (for every n). Also the Logic Evaluator allows conjunctions
`and(A0, A1, ..., An-1)`
of an arbitrary number of formulas.
Author: Wolfgang Schreiner
Last Modification: October 4, 1999   