propositional logic. grammatical complexity a natural language is complex. e.g. –the dog chased...

55
Propositional Logic

Post on 19-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Propositional Logic

Page 2: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Grammatical Complexity• A natural language is complex. E.g.

– The dog chased the cat.

– The dog that ate the rat chased the cat.

– The cherry blossoms in the spring … sank.

Page 3: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Ambiguity• A natural language has ambiguity, e.g.:

– There’s a girl in the room with a telescope.• Which one of the figures the sentence intends to capture?

• In short we need to define a syntax.

Page 4: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Syntax

Page 5: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Propositional Constants• Examples:

– raining

– r32aining

– rAiNiNg

– rainingorsnowing

• Non-Examples:– 324567

– raining.or.snowing

Page 6: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Compound Sentences• Negations:

raining

• Conjunctions:(rainingsnowing)

• The arguments of a conjunction are called conjuncts.

• Disjunctions:(rainingsnowing)

• The arguments of a disjunction are called disjuncts.

Page 7: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Compound Sentences• Implications:

(raining cloudy)

• The left argument of an implication is the antecedent.

• The right argument of an implication is the consequent.

• Reductions:

(cloudy raining)

• The left argument of a reduction is the consequent.

• The right argument of a reduction is the antecedent.

• Equivalences:

(cloudy raining)

Notice that the constituent sentences within any compound sentence can be either simple sentences or compound sentences or a mixture of two.

Page 8: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Parenthesis Removal• 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

((pq) r) into

pq 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 ))

Page 9: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Operator Precedence• 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 .

Page 10: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Parenthesis• Note that just because precedence allows us to delete

parentheses in some cases, this doesn’t mean that we can dispense with parentheses entirely.

E.g.

(p q) sr)

Here, we cannot remove the parenthesis

Page 11: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Semantics

Page 12: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Algebra and Logic• The semantics of logic is similar to the semantics of algebra. • Algebra is unconcerned with the real-world meaning of variables

like x and y. – What is interesting is the relationship between the variables

expressed in the equations we write; and – algebraic methods are designed to respect these relationships, no

matter what meanings or values are assigned to the constituent variables.

• In a similar way, logic itself is unconcerned with what sentences say about the world being described. – What is interesting is the relationship between the truth of simple

sentences and the truth of compound sentences within which the simple sentences are contained.

– Also, logical reasoning methods are designed to work no matter what meanings or values are assigned to the logical “variables” used in sentences.

Page 13: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Interpretation• Although the values assigned to variables are not crucial in the

sense just described, in talking about logic itself, it is sometimes useful to make these assignments explicit and to consider various assignments or all assignments and so forth. Such an assignment is called an interpretation.

• A propositional logic interpretation (i) is an association between the propositional constants in a propositional language and the truth values T or F.

• p iT pi T

• q iF can be written also qi F

• r iT ri T

Page 14: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Operator Semantics• The notion of interpretation can be extended to all sentences by

application of operator semantics.

• Negation:

T FF T

• For example, if the interpretation of p is F, then the interpretation of p is T.

• For example, if the interpretation of p is T, then the interpretation of p is F.

Page 15: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Operator Semantics (continued)• Conjunction:

T T T

T F F

F T F

F F F

• Disjunction:

T T T

T F T

F T T

F F F

Page 16: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Operator Semantics (continued)• Implication:

T T T

T F F

F T T

F F T

• Reduction:

T T T

T F T

F T F

F F T

Page 17: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Evaluation• We can easily determine for any given interpretation whether or not any

sentence is true or false under that interpretation.• The technique is simple. We substitute true and false values for the

propositional constants and replace complex expressions with the corresponding values, working from the inside out.

• We say that an interpretation i satisfies a sentence if and only if it is true under that interpretation.

• As an example, consider the interpretation i show below.pitrueqi falseri true

• We can see that i satisfies (pq)(qr). (true false) (false true)

true (false true)true (true true)

true truetrue

Page 18: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Evaluation (continued)• Now consider interpretation j defined as follows.

pjtrueqj truerj false

• In this case, j does not satisfy (pq)(qr).(true true) (true false)

true(true false)true ( false false)

truefalsefalse

• Using this technique, we can evaluate the truth of arbitrary sentences in our language.

• The cost is proportional to the size of the sentence.

Page 19: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Reverse Evaluation• Reverse evaluation is the opposite of evaluation.

We begin with one or more compound sentences and try to figure out which interpretations satisfy those sentences.– One way to do this is using a truth table for the

language.

• A truth table for a propositional language is a table showing all of the possible interpretations for the propositional constants in the language.– The interpretations i and j correspond to the third

and seventh rows of this table, respectively.

• Note that, for a propositional language with n logical constants, there are n columns in the truth tables 2n rows.

p q r

T T T

T T F

T F T

T F F

F T T

F T F

F F T

F F F

Page 20: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Validity, Satisfiability, Unsatisfiability

• A sentence is valid if and only if it is satisfied by every interpretation. – p p is valid.

• A sentence is satisfiable if and only if it is satisfied by at least one interpretation.– We have already seen several examples of

satisfiable sentences.

• A sentence is unsatisfiable if and only if it is not satisfied by any interpretation.– p p is unsatisfiable. No matter what

interpretation we take, the sentence is always false.

• In one sense, valid sentences and unsatisfiable sentences are useless. Valid sentences do not rule out any possible interpretations; unsatisfiable sentences rule out all interpretations; thus they say nothing about the world.

• On the other hand, from a logical perspective, they are extremely useful in that, as we shall see, they serve as the basis for legal transformations that we can perform on other logical sentences.

• Note that we can easily check the validity, satisfiability, or unsatisfiability of a sentence can easily by looking at the truth table for the propositional constants in the sentence.

• In one sense, valid sentences and unsatisfiable sentences are useless. • Valid sentences do not rule out

any possible interpretations; • Unsatisfiable sentences rule out

all interpretations; thus they say nothing about the world.

• On the other hand, they are very useful in that, they serve as the basis for legal transformations that we can perform on other logical sentences.

• Note that we can easily check the validity, satisfiability, or unsatisfiability of a sentence by looking at the truth table for the propositional constants in the sentence.

Page 21: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Entailment• We would like to know, given some sentences, whether other sentences are

or are not logical conclusions.

• This relative property is known as logical entailment.

• A set of sentences logically entails a sentence |=

iff every interpretation that satisfies also satisfies .

E.g.

The sentence p logically entails the sentence (p q).

Since a disjunction is true whenever one of its disjuncts is true, then (p q) must be true whenever p is true.

On the other hand, the sentence p does not logically entail (p q).

A conjunction is true if and only if both of its conjuncts are true, and q may be false.

Page 22: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Semantic Reasoning Methods

Several basic methods for determining whether a given set of premises propositionally entails a

given conclusion.

Page 23: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Truth Table Method• One way of determining whether or not a set of premises

logically entails a possible conclusion is to check the truth table for the logical constants of the language.

• This is called the truth table method and can be formalized as follows. – Starting with a complete truth table for the propositional

constants, iterate through all the premises of the problem, for each premise eliminating any row that does not satisfy the premise.

– Do the same for the conclusion.

– Finally, compare the two tables. If every row that remains in the premise table, i.e. is not eliminated, also remains in the conclusion table, i.e. is not eliminated, then the premises logically entail the conclusion.

Page 24: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Simple sentences:

Amy loves Pat.loves(amy, pat)Since we don’t have vars but only constants, it the same as saying lovesAmyPat.

Amy loves Quincy.loves(amy, quincy)Same as lovesAmyQuincy

It is Monday.ismonday

Amy’s …Premises:If Amy loves Pat, Amy loves Quincy.

lovesAmyPat lovesAmyQuincy If it Monday, Amy loves Pat or

Quincy.ismonday

lovesAmyPat lovesAmyQuincy

Question:If it is Monday, does Amy love

Quincy? I.e. is ismonday lovesAmyQuincyentailed by the premises?

Page 25: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Truth table for the premises

lovesAmyPat lovesAmyQuincy ismonday lovesAmyPat

lovesAmyQuincy

ismonday lovesAmyPat lovesAmyQuincy

T T T T T

T T F T T

T F T F T

T F F F T

F T T T T

F T F T T

F F T T F

F F F T T

Page 26: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Crossing out non-sat interpretations

lovesAmyPat lovesAmyQuincy ismonday lovesAmyPat

lovesAmyQuincy

ismonday lovesAmyPat lovesAmyQuincy

T T T T T

T T F T T

T F T F T

T F F F T

F T T T T

F T F T T

F F T T F

F F F T T

Page 27: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Truth table for the conclusion

lovesAmyPat lovesAmyQuincy ismonday ismonday lovesAmyQuincy

T T T T

T T F T

T F T F

T F F T

F T T T

F T F T

F F T F

F F F T

Page 28: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Crossing out non-sat interpretations

lovesAmyPat lovesAmyQuincy ismonday ismonday lovesAmyQuincy

T T T T

T T F T

T F T F

T F F T

F T T T

F T F T

F F T F

F F F T

Page 29: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Comparing tables• Finally, in order to make the determination of logical

entailment, we compare the two rightmost tables and notice that every row remaining in the premise table also remains in the conclusion table. – In other words, the premises logically entail the conclusion.

• The truth table method has the merit that it is easy to understand. It is a direct implementation of the definition of logical entailment.

• In practice, it is awkward to manage two tables, especially since there are simpler approaches in which only one table needs to be manipulated.

Page 30: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Validity checking• One of these approaches is the validity checking method. It goes as follows. • To determine whether a set of sentences

{1,…,n} • logically entails a sentence , we form the sentence

(1 …n ) • and check that it is valid.

• To see how this method works, consider the problem of Amy and Pat and Quincy once again. In this case, we write the tentative conclusion as shown below.

(lovesAmyPat lovesAmyQuincy) (ismonday lovesAmyPat lovesAmyQuincy) ismonday lovesAmyQuincy)

• We then form a truth table for our language with an added column for this sentence and check its satisfaction under each of the possible interpretations for our logical constants.

Page 31: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Unsatisfability Checking• The satisfiability checking method is another single table

approach. It is almost exactly the same as the validity checking method, except that it works negatively instead of positively.

• To determine whether a finite set of sentences {1,…,n} logically entails a sentence , we form the sentence

(1 …n )

and check that it is unsatisfiable.

• Both the validity checking method and the satisfiability checking method require about the same amount of work as the truth table method, but they have the merit of manipulating only one table.

Page 32: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

A truth table…p q r p q p r p r q (p q) (p

r) (p r q)

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

T T T T T T T T T

T T F T F T T F T

T F T F T T T F T

T F F F F F T F T

F T T T T T T T T

F T F T T T T T T

F F T T T T T T T

F F F T T T T T T

Page 33: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Proofs

Page 34: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Intro• Semantic methods for checking logical entailment have the

merit of being conceptually simple; they directly manipulate interpretations of sentences.

• Unfortunately, the number of interpretations of a language grows exponentially with the number of logical constants. – When the number of logical constants in a propositional language

is large, the number of interpretations may be impossible to manipulate.

• Proof methods provide an alternative way of checking and communicating logical entailment that addresses this problem. – In many cases, it is possible to create a “proof” of a conclusion

from a set of premises that is much smaller than the truth table for the language;

– moreover, it is often possible to find such proofs with less work than is necessary to check the entire truth table.

Page 35: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Schemata• An important component in the treatment of proofs is the notion of

a schema. A schema is an expression satisfying the grammatical rules of our language except for the occurrence of metavariables in place of various subparts of the expression.

• For example, the following expression is a pattern with metavariables and .

()

• An instance of a sentence schema is the expression obtained by substituting expressions for the metavariables.

• For example, the following is an instance of the preceding schema.p (qp)

Page 36: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Rules of Inference• The basis for proof methods is the use of correct rules of

inference that can be applied directly to sentences to derive conclusions that are guaranteed to be correct under all interpretations. – Since the interpretations are not enumerated, time and space can

often be saved.

• A rule of inference is a pattern of reasoning consisting of: – one set of sentence schemata, called premises, and

– a second set of sentence schemata, called conclusions.

• A rule of inference is sound if and only if, for every instance, the premises logically entail the conclusions.

Page 37: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

E.g. Modus Ponens

rainingwet

raining

wet

wet slippery

wet

slippery

p (qr)

p

q r

(p q)r

p q

r• I.e. we can substitute for the metavariables

complex sentences

• Note that, by stringing together applications of rules of inference, it is possible to derive conclusions that cannot be derived in a single step. This idea of stringing together rule applications leads to the notion of a proof.

Page 38: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Axiom schemata• The implication introduction schema (II), together with Modus Ponens, allows us to

infer implications. ()• The implication distribution schema (ID) allows us to distribute one implication over

another. (()) (() ())

• The contradiction realization schemata (CR) permit us to infer a sentence if the negation of that sentence implies some sentence and its negation.() (() )() (())

• The equivalence schemata (EQ) capture the meaning of the operator. ()()()()()(()())

• The meaning of the other operators in propositional logic is captured in the following axiom schemata.()()()()()()

• The axiom schemata in this section are jointly called the standard axiom schemata for Propositional Logic. They all are valid.

Page 39: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Proofs• A proof of a conclusion from a set of premises is a sequence of

sentences terminating in the conclusion in which each item is either (1) a premise, (2) an instance of an axiom schema, or (3) the result of applying a rule of inference to earlier items in sequence.

1. p q Premise

2. q r Premise

3. (q r)(p (q r)) II

4. p (qr) MP : 3,2

5. (p (qr)) (( pq) (p r)) ID

6. (p q)(p r ) MP : 5,4

7. p r MP : 6,1

Page 40: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Proofs (continued)• If there exists a proof of a sentence from a set of premises and the standard

axiom schemata using Modus Ponens, then is said to be provable from (written as |- ) and is called a theorem of .

• Earlier, it was suggested that there is a close connection between provability and logical entailment. In fact, they are equivalent. A set of sentences logically entails a sentence if and only if is provable from .

• Soundness Theorem: If is provable from , then logically entails .• Completeness Theorem: If logically entails , then is provable from .

• The concept of provability is important because it suggests how we can automate the determination of logical entailment. – Starting from a set of premises , we enumerate conclusions from this set. – If a sentence appears, then it is provable from and is, therefore, a logical

consequence. – If the negation of appears, then is a logical consequence of and is

not logically entailed (unless is inconsistent). – Note that it is possible that neither nor will appear.

Page 41: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Resolution

Page 42: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Intro• Propositional resolution is an extremely powerful rule of

inference for Propositional Logic. Using propositional resolution (without axiom schemata or other rules of inference), it is possible to build a theorem prover that is sound and complete for all of Propositional Logic.

• What's more, the search space using propositional resolution is much smaller than for standard propositional logic.

Page 43: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Clausal Form• Propositional resolution works only on expressions in clausal form. Before

the rule can be applied, the premises and conclusions must be converted to this form.

• A literal is either an atomic sentence or a negation of an atomic sentence. For example, if p is a logical constant, the following sentences are both literals: p, p

• A clause expression is either a literal or a disjunction of literals. If p and q are logical constants, then the following are clause expressions

p, p, p q• A clause is the set of literals in a clause expression. For example, the

following sets are the corresponding clauses: {p}, {p}, {p,q}

• Note that the empty set {} is also a clause. It is equivalent to an empty disjunction and, therefore, is unsatisfiable.

Page 44: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Converting to clausal form1. Implications (I):

1 2 1 2

1 2 1 2

1 2 (1 2 ) (1 2 )2. Negations (N):

(1 2 ) 1 2

(1 2 ) 1 2

3. Distribution (D):

1 (2 3 ) (1 2) (1 3 )

(1 2 ) 3 (1 3 ) (2 3)

(1 2 ) 3 1 (2 3 )

(1 2 ) 3 1 (2 3)4. Operators (O):

1 ... n {1,...,n}

1 ...n {1}...{n}

Page 45: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Examplesg (r f )

I g (r f )

N g (r f )

D g (r f )

O {g}

{r, f}

(g (rf ))

I (g (r f ))

N g (r f ))

g (r f )

g (r f )

D (g r) (g f )

O {g,r}

{g,f}

Page 46: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Propositional Resolution{1,..., ,...,m}

{1,...,,...,n}

{1,...,m,1,...,n}

E.g.

{p,q}

{p,r}

{q,r}

The idea of resolution is simple.

• Suppose we know that p is true or q is true, and suppose we also know that p is false or r is true.

• One clause contains p, and the other contains p.

• If p is false, then by the first clause q must be true.

• If p is true, then, by the second clause, r must be true.

• Since p must be either true or false, then it must be the case that q is true or r is true.

• In other words, we can cancel the p literals.

Page 47: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Example1. {p,q} Premise

2. {p, q} Premise

3. {p,q} Premise

4. {p,q} Premise

5. {q} 1,2

6. {q} 3,4

7. {} 5,6

Page 48: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Two finger (or pointer) method• We keep two pointers (the slow and the fast); • On each step we compare the sentences under the pointers. If

we can resolve, we add the new derived sentence at the end of the list.

• At the start of the inference we initialize slow and fast at the top of the list.

• As long as the two pointers point to different positions, we leave the slow where it is and advance the fast.

• When they meet, we move the fast at the top of the list and we move the slow one position down the list.

Page 49: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Example (two finger method)1. {p,q} Premise

2. {p,r} Premise

3. {q, r} Premise

4. {r} Premise

5. {q,r} 1,2

6. {p,r} 1,3

7. {p} 2,4

8. {q} 3,4

9. {r} 3,510. {q} 4,511. {r} 2,612. {p} 4,613. {q} 1,714. {r} 6,715. {p} 1,816. {r} 5,817. {} 4,9

Page 50: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

TFM With Identical Clause Elimination

1. {p,q} Premise

2. {p,r} Premise

3. {q, r} Premise

4. {r} Premise

5. {q,r} 1,2

6. {p,r} 1,3

7. {p} 2,4

8. {q} 3,4

9. {r} 3,5

10. {q} 4,5

11. {p} 4,6

12. {} 4,9

Page 51: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Another TFM example1. {p,q}

2. {p,q}

3. {p,q}

4. {p,q}

5. {p} 1,2

6. {q} 1,3

7. {q, q} 2,3

8. {p,p} 2,3

9. {q,q} 1,4

9.5 {p,p} 1,4

10. {q} 2,4

11. {p} 3, 412. {q} 3,513. {q} 4,514. {p} 2,615. {p} 4,616. {p,q} 1,717. {q, p} 2,718. {p,q} 3,719. {q,p} 4,720. {q} 6,7

Page 52: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

continued21. {q, q} 7, 7

22. {q, q} 7, 7

23. {q, p} 1,8

24. {q, p} 2,8

25. {p,q} 3,8

26. {p,q} 4,8

27. {p} 5,8

28. {p, p} 8,8

29. {p, p} 8,8

30. {p,q} 1,9

31. {q, p} 2,932. {p, q} 3,933. {q,p} 4, 934. {q} 6,935. {q,q} 7,936. {q,q} 9,937. {q,q} 9,938. {p} 1,1039. {p} 3,1040. {} 6,10

Page 53: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Proof With Identical Clause Elimination

1. {p,q}

2. {p,q}

3. {p,q}

4. {p,q}

5. {p} 1,2

6. {q} 1,3

7. {q, q} 2,3

8. {p,p} 2,3

9. {q,q} 1,4

10. {q} 2,4

11. {p} 3,4

12. {} 6,10

Page 54: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Motivation for Tautology Elimination

A tautology is a clause with a complementary pair of literals.

1. {p,q} Premise

2. {p,p} Premise

3. {p,q} 1,2

Page 55: Propositional Logic. Grammatical Complexity A natural language is complex. E.g. –The dog chased the cat. –The dog that ate the rat chased the cat. –The

Proof with TE and ICE1. {p, q}

2. {p,q}

3. {p, q}

4. {p,q}

5. {p} 1,2

6. {q} 1,3

7. {q} 2, 4

8. {p} 3,4

9. {} 6,7