Anda di halaman 1dari 6

2.

Simple & Compound Propositions

2.1

Simple & Compound Propositions

Propositional Logic can be used to analyse, simplify and establish the equivalence of statements. A knowledge of logic is essential to the study of mathematics. In order to prove theorems, the rules of logic must be known. In logic, the process of establishing the validity of a deduction is called an argument. In mathematics, the deduced statement whose truth is to be established is called a theorem and the process of establishing its validity is called a proof. Aristotle (384-322B.C.) has been called the father of traditional logic as he is generally credited with being the rst to develop a framework of logical knowledge. He believed that logical thought according to his methods was the only certain way of attaining scientic knowledge. The organisation and formalisation of logic and the deductive reasoning process as a branch of mathematics (rather than philosophy) was carried out largely by De Morgan (1806-1871) and Boole (1815-1864). They believed that the use of language was a major hindrance to the reasoning process. Thus they devised a system of symbolic logic in which the validity of a deduction depends entirely on the form or structure of the thought processes involved (and no knowledge of the subject matter in question is necessary). Conclusions are then reached by manipulating the symbols according to a set of rules. Practical applications of propositional logic include the ecient operation of computer-based expert systems where the user may phrase questions dierently or answer in dierent ways and yet the computer can decide when the answers are logically equivalent. A proposition is a statement for which it is immediately decidable whether it is true (T ) or false (F ) but not both. T and F are called the truth values of a proposition. Questions, commands and exclamations are not propositions. Examples: Propositions: p1 : The year 1973 was a leap year (read as p1 is the proposition that the year . . . ). p2 : 7 is a prime number. p3 : It is raining. Statements which are not propositions: s1 : Maths is fun. s2 : n is a prime number. s3 : He is the President of the United States. Note that s1 is a subjective judgement and hence is not a proposition. Statements that involve pronouns or variables (such as s2 , s3 ) are not readily decidable as true or false and are therefore not propositions. However, as soon as the pronoun or variable is specied these statements become propositionssuch statements are called predicates (or sometimes open sentences). Given any proposition p, there is an associated proposition called the negation of p. This is denoted by p and read as not p. The negation, p, of a proposition p always has precisely the opposite truth value to that of p itself, i.e. when p is true, p is false and vice versa. Examples: From above p1 : The year 1973 is not a leap year. p2 : 7 is not a prime number. p3 : It is not raining. p4 : 2n = n2 for some positive integer n. p4 : 2n = n2 for all positive integers n.

2.1

Simple & Compound Propositions

Note: sometimes p or p is used to denote not p. Simple propositions can be combined to give compound propositions using connectives. Examples: Simple propositions: p1 : It is raining. p2 : I am wet. Compound propositions: p3 : It is raining and I am wet. p4 : It is raining or I am wet. p5 : It is raining and I am not wet. The symbol is used for and; the symbol is used for or. Thus p3 could be written as p1 p2 , p4 could be written as p1 p2 and p5 as p1 p2 . p q is called the conjunction of p and q, whereas p q is called the disjunction of p and q. Note that is the inclusive or, i.e. p q is true whenever at least one of the propositions p, q is true, including the possibility that both are true.1 Thus, p q has the truth value F only when p and q both have value F . A truth table summarises or lists the possible truth values for a proposition. It is best to list the possibilities systematically to ensure none have been missed. To construct a truth table for a p T F p F T

Table 1: Truth table for p. p T T F F q T F T F pq T T T F

Table 2: Truth table for p q. p T T F F q T F T F pq T F F F

Table 3: Truth table for p q.

compound or complex formulae, work out the truth values for the various components and work up to the formula step by step.
1 The word or is sometimes used to mean the exclusive or in general usage. For instance, you may have tea or coee generally means that you may have tea or you may have coee, but you may not have both.

2.1

Simple & Compound Propositions

Example: p T T F F q T F T F pq T T T F (p q) F F F T

Table 4: Truth table for (p q). p T T F F q T F T F p F F T T q F T F T (p) (q) F F F T

Table 5: Truth table for (p) (q).

In the example above, it is evident that the truth values of (p) (q) are exactly the same as those of (p q), i.e. when p and q are both true, (p) (q) is false, as is (p q) and so on. (p) (q) and (p q) are said to be logically equivalent, denoted (p) (q) (p q). As an illustration of this equivalence suppose p is the proposition Mary attended class yesterday and q is the proposition John attended class yesterday. Then (p q) means neither Mary nor John attended class yesterday and (p) (q) means that both Mary and John skipped class yesterday. The following is a list of equivalent formulae: Commutative Laws: pq qp pq qp Associative Laws: (p q) r p (q r) (p q) r p (q r) Idempotent Laws: p pp p pp Distributive Laws: p (q r) (p q) (p r) p (q r) (p q) (p r) Double Negation Law: (p) p De Morgans Laws: (p q) p q (p q) p q All of these equivalences can be veried using truth tables.

2.1

Simple & Compound Propositions

Such equivalences allow many formulae to be simplied. Examples: 1. (p q) p ( q) p q. 2. (q p) p ( q (p)) p ( q p) p q (p p) q p. Some formulae are either always true or always false. Formulae which are always true are called tautologies; whereas formulae which are always false are called contradictions. For instance, p p is a tautology and p p is a contradiction. Truth tables can be used to verify these assertions. p T F p F T p p T T p p F F

Table 6: Truth table for p p and p p .

Example: The truth table for p (q p) shows it to be a tautology. p T T F F q T F T F p F F T T q p T F T T p (q p) T T T T

Table 7: Truth table for p (q p) . In the following, suppose t is a tautology, c is a contradiction and p is any proposition. Tautology Laws: p tp p tt t c Contradiction Laws: p cc p cp c t (Once again truth tables can be used to verify these laws.) Example: Reconsider the expression p (q p) it can be manipulated using the equivalences above to give p (q p) p (p q) (p p ) q t q t where t is a tautology. Thus, p (q p) has been shown to a tautology (without recourse to a truth table).

2.1

Simple & Compound Propositions

Note on Sets An analogy can be drawn between propositional logic and set algebra. Suppose A, B, C are sets and p(x), q(x), r(x) are propositions2 where p(x) : x is an element of A, q(x) : x is an element of B, r(x) : x is an element of C. Now x A B is equivalent to (x A and x B) which corresponds to p(x) q(x). Likewise, x A B is equivalent to (x A or x B) which A which corresponds to p(x). In this analogy, x is an element of the null set ({} or ), corresponds to a contradiction and x is an element of the universal set, U , to a tautology. All the laws seen previously, carry over to the algebra of sets. The Use of Logic in Circuits Consider an electronic circuit with various switches that may be on (closed) or o (open).
P c PP c

Input

P c PP c

Output

Current will ow along a particular path when the switches are closed. Current will ow from the input to the output when all switches along some path from input to output are closed. Let c, p, q, r be the following propositions: c: p: q: r: current ows from input to output, current ows through switch p, current ows through switch q, current ows through switch r, 1. Suppose there are two switches in the circuit connected in parallel. p
P c PP c

and consider the circuits given below and overleaf.

Input

P c PP c

Output

Current ows from input to output when p alone is closed, or q alone is closed or both switches are closed. Here c p q.
2 p(x), q(x), r(x) are used here instead of p, q, r to stress that these are statements about x. Recall that a statement containing a variable cannot be described as being true or false until the value of the variable is known. The set of all values of x for which p(x) is true is then called the truth set of p(x).

2.1

Simple & Compound Propositions

2. Suppose there are two switches in the circuit connected in series.


P c PP c P c PP c

Input

Output

Current will only ow from input to output when both p and q are closed. Here c p q. 3. Suppose three switches are connected as shown below. p
P c PP c

Input

q
P c PP c

Output

P c PP c

Here c p q r. 4. Suppose three switches are connected as shown below. p


P c PP c

Input

PP c Pc

P c PP c

Output

q Here c p (q r).

Anda mungkin juga menyukai