Vous êtes sur la page 1sur 8

Propositional Logic

Propositional logic, also known as sentential logic and statement logic, is the branch of logic that studies ways of joining and/or modifying entire propositions, statements or sentences to form more complicated propositions, statements or sentences, as well as the logical relationships and properties that are derived from these methods of combining or altering statements. In propositional logic, the simplest statements are considered as indivisible units, and hence, propositional logic does not study those logical properties and relations that depend upon parts of statements that are not themselves statements on their own, such as the subject and predicate of a statement. The most thoroughly researched branch of propositional logic is classical truthfunctional propositional logic, which studies logical operators and connectives that are used to produce complex statements whose truth-value depends entirely on the truth-values of the simpler statements making them up, and in which it is assumed that every statement is either true or false and not both. However, there are other forms of propositional logic in which other truthvalues are considered, or in which there is consideration of connectives that are used to produce statements whose truth-values depend not simply on the truth-values of the parts, but additional things such as their necessity, possibility or relatedness to one another A well-formed formula (wff) in propositional logic is: (1) An atom is a wff (2) If P is a wff, then ~P is a wff.

(3) If P and Q are wffs then PQ, PQ, PQ si PQ are wffs. (4) The set of all wffs can be generated by repeatedly applying rules (1)..(3).

Syntax In Propositional Logic, there are two types of sentences -- simple sentences and compound sentences. Simple sentences express ``atomic'' propositions about the world. Compound sentences express logical relationships between the simpler sentences of which they are composed. Simple sentences in Propositional Logic are often called propositional constants or, sometimes, logical constants. In what follows, we refer to a logical constant using a sequence of alphanumeric characters beginning with a lower case character. For example, raining is a logical constant, as are rAiNiNg and r32aining. Raining is not a

logical constant because it begins with an upper case character. 324567 fails because it begins with a number. raining-or-snowing fails because it contains nonalphanumeric characters. Compound sentences are formed from simpler sentences and express relationships among the constituent sentences. There are six types of compound sentences, viz. negations, conjunctions, disjunctions, implications, reductions, and equivalences. A negation consists of the negation operator and a simple or compound sentence, called the target. For example, given the sentence p, we can form the negation of p as shown below. p A conjunction is a sequence of sentences separated by occurrences of the operator and enclosed in parentheses, as shown below. The constituent sentences are called conjuncts. For example, we can form the conjunction of p and q as follows. (p q) A disjunction is a sequence of sentences separated by occurrences of the operator and enclosed in parentheses. The constituent sentences are called disjuncts. For example, we can form the disjunction of p and q as follows. (p q) An implication consists of a pair of sentences separated by the operator and enclosed in parentheses. The sentence to the left of the operator is called the antecedent, and the sentence to the right is called the consequent. The implication of p and q is shown below. (p q) A reduction is the reverse of an implication. It consists of a pair of sentences separated by the operator and enclosed in parentheses. In this case, the sentence to the left of the operator is called the consequent, and the sentence to the right is called the antecedent. The reduction of pto q is shown below. (p q) An equivalence is a combination of an implication and a reduction. For example, we can express the equivalence of p and q as shown below.

(p q) Note that the constituent sentences within any compound sentence can be either simple sentences or compound sentences or a mixture of the two. For example, the following is a legal compound sentence. ((p q) r) One disadvantage of our notation, as written, is that the parentheses tend to build up and need to be matched correctly. It would be nice if we could dispense with parentheses, e.g. simplifying the preceding sentence to the one shown below. p q r Unfortunately, we cannot do without parentheses entirely, since then we would be unable to render certain sentences unambiguously. For example, the sentence shown above could have resulted from dropping parentheses from either of the following sentences. ((p q) r) (p (q r)) The solution to this problem is the use of operator precedence. The following table gives a hierarchy of precedences for our operators. The operator has higher precedence than ; has higher precedence than ; and has higher precedence than , , and . In unparenthesized sentences, it is often the case that an expression is flanked by operators, one on either side. In interpreting such sentences, the question is whether the operator associates with the operator on its left or the one on its right. We can use precedence to make this determination. In particular, we agree that an operand in such a situation always associates with the operator of higher precedence. When an operand is surrounded by operators of equal precedence, the operand associates to the left. The following examples show how these rules work in various cases. The expressions on the right are the fully parenthesized versions of the expressions on the left.

pq p q pqr pqr pqr pqr

( p q) (p q) ((p q) r) (p (q r) ((p q) r) ((p q) r)

Note that just because precedence allows us to delete parentheses in some case does not mean that we can dispense with parentheses entirely. Consider the example shown above. Precedence eliminates the ambiguity by dictating that the unparenthesized sentence is an implication with a disjunction as antecedent. However, this makes for a problem for those cases when we want to express a disjunction with an implication as a disjunct. In such cases, we must retain at least one pair of parentheses.
Semantics of Propositional Logic

We have defined the syntax of propositional Logic. However, this is of no use without talking about the meaning, or semantics, of the sentences. Suppose our logic contained only atoms; e.g. no logical connectives. This logic is very silly because any subset of these atoms is consistent; e.g. beautiful(misspiggy) andugly(misspiggy) are consistent because we cannot represent ugly(misspiggy) beautiful(misspiggy) So we now need a way in our logic to define which sentences are true.

Example: Models Define Truth

Suppose a language contains only one object constant misspiggy and two relation constants ugly and beautiful. The following models define different facts about Miss Piggy.

M= : In this model Miss Piggy is neither ugly nor beautiful.

M={ugly(misspiggy)}: In this model Miss Piggy is ugly and not beautiful. M={beautiful(misspiggy)}: In this model Miss Piggy is beautiful and not ugly. M={ugly(misspiggy), beautiful(misspiggy)}: In this model Miss Piggy is both ugly and beautiful. The last statement is intuitively wrong but the model selected commits the truth of the atoms in the language.

Compound Sentences So far we have restricted our attention to the semantics of atoms: an atom is true if it is a member of the model M; otherwise it is false. Extending the semantics to compound sentences is easy. Notice that in the definitions below and do not need to be atoms because these definitions work recursively until atoms are reached. Conjunction: is true in M iff So the conjunct
loves(misspiggy, kermit) loves(misspiggy, voiceof(kermit))

and

are true in M individually.

is true only when both


Miss Piggy loves Kermit; and Miss Piggy loves Kermit's voice

Disjunction: is true in M iff at least one of So the disjunct


loves(misspiggy, kermit) loves(misspiggy, voiceof(kermit))

or

is true in M.

is true whenever

Miss Piggy loves Kermit; Miss Piggy loves Kermit's voice; or Miss Piggy loves both Kermit and his voice.

Therefore the disjunction is weaker than either disjunct and the conjunction of these disjuncts. Negation:

is true in M iff Implication:

is not true in M.

is true in M iff

is not true in M or

is true in M.

We have been careful about the definition of implication to say that they normally imply that is true iff is true. But if

. When people use an causes . So if is true we are happy

is false the causal link causes

confusion because we can't tell whether should be true or not. Logic requires that the connectives are truth functional and so the truth of the compound sentence must be determined from the truth of its component parts. Logic defines that if then is true regardless of the truth of . is false

So both of the following implications are true (provided you believe pigs do not fly!):
fly(pigs) fly(pigs) beautiful(misspiggy) beautiful(misspiggy)

Example: Implications and Models

In which of the following models is


ugly(misspiggy) beautiful(misspiggy) true?

M= Miss Piggy is not ugly and so the antecedent fails. Therefore the implication holds. (Miss Piggy is also not beautiful in this model.) M={beautiful(misspiggy)} Again, Miss Piggy is not ugly and so the implication holds. M={ugly(misspiggy)} Miss Piggy is not beautiful and so the conclusion is valid and hence the implication holds.

M={ugly(misspiggy),

beautiful(misspiggy)}

Miss Piggy is ugly and so the antecedent holds. But she is also beautiful and so beautiful(misspiggy) is not true. Therefore the conclusion does not hold and so the implication fails in this (and only this) case. Validity, Satisfiability, Unsatisfiability A sentence is valid if and only if it is satisfied by every interpretation. The following sentence is valid. p p A sentence is satisfiable if and only if it is satisfied by at least one interpretation. A sentence is falsifiable if and only if there is at least one interpretation that makes it false. We have already seen several examples of satisfiable and falsifiable sentences. A sentence is unsatisfiable if and only if it is not satisfied by any interpretation. The following sentence is unsatisfiable. No matter what interpretation we take, the sentence is always false. p p
Definition:wff is a tautology if and only if it is true for all possible truth-value assignments to the statement letters making it up. For example, consider the formula Result= There are 8 possible valuations for the propositional variables A, B, C, represented by the first three columns of the following table. The remaining columns show the truth of subformulas of the formula above, culminating in a column showing the truth value of the original formula under each valuation. ABC Result

TTT

TTF

TFT

TFF

F TT

F TF

F FT

F FF

Because each row of the final column shows T, the sentence in question is verified to be a tautolog

Definition: two wffs are consistent if and only if there is at least one possible truth-value assignment to the statement letters making them up that makes both wffs true. Definition: two wffs are inconsistent if and only if there is no truth-value assignment to the statement letters making them up that makes them both true.

Vous aimerez peut-être aussi