720 likes | 959 Vues
L esson 3. Validity of arguments Marie Duží. Logical entailment. A formula A logically follows from a set of formulas M, denoted M |= A , iff A is true in every model of the set M.
E N D
Lesson 3 Validity of arguments Marie Duží
Logical entailment • A formula A logically follows from a set of formulas M, denotedM |= A, iff A is true in every model of the set M. • Recall Definition 1. The circumstancesare modelled in accordance with the expressive power of a given logic. • PLvaluations (True – 1, False - 0) of elementary atomic sentences • FOL interpretations of predicate and functional symbols • “Under all the circumstances” means in all valuations / interpretations that make premises true (i.e. in all models of the premises) the conclusion must be true as well.
Logical entailment in PL • He is at home (h) or he has gone to a pub (p) • If he is at home (h) then he is waiting for us (w) • If he is not waiting (w) for us then he has gone to the pub (p). h, p, w |h p, hw| w p 1 1 1 1 1 1conclusion 1 1 0 1 0 1 1 0 1 1 1 1is true in all 1 0 0 1 0 0 0 1 1 1 1 1the four models 0 1 0 1 1 1ofpremises 0 0 1 0 1 1 0 0 0 0 1 0
Logical entailment in PL • He is at home (h) or he has gone to a pub (p) • If he is at home (h) then he is waiting for us (w) • If he is not waiting (w) for us then he has gone to the pub (p). h p, h w| w p • The table has 2n lines!Hence, an indirect proof is more effective: • Assume that the argument is not valid. But then there must be a valuation that satisfies all the premises but not the conclusion: • h p, hw | w p 1 1 0 1 0 0 1 0 1 0 0 contradiction
Logical entailment in PL • All the arguments with the same logical form as a valid argument are valid: h p, h w |= w p For variables h, p, w any elementary sentence can be substituted: He plays a piano or studies logic. If he plays a piano then he is a virtuous. If he is not a virtuous then he studies logic. Valid argument – the same valid logical form
Logical entailment • An argument is valid, P1,...,Pn|= Z, iffthe implicative formula is a tautology: |= (P1 ... Pn) Z. • A proof that a formula is a tautology or that a conclusion Z logically follows from premises can be performed: • In thedirect way – for instance by a truth-value table (only in PL), by natural deduction, etc. • In theindirect way: P1 ... Pn Z is a contradiction; hence the set of premises + negated conclusion {P1, ..., Pn, Z}is contradictory, i.e., does not have a model: there is no valuation under which all the elements of the set are true.
A proof of a tautology |= ((p q) q) p Indirect: ((p q) q) p negated f., must be a contradiction 1 1 attempt whether it can be 1 1 1 1 1 0 contradiction There is no valuation under which the negated formula is true. Therefore, the original formula is a tautology
The most important tautologies in PL Tautologies with one propositional variable: |= p p |= p p the law of excluded middle |= (p p) the law of contradiction |= p p the law of double negation
Algebraic laws for conjunction, disjunction and equivalence • |= (p q) (q p) commutative laws • |= (p q) (q p) • |= (p q) (q p) • |= [(p q) r] [p (q r)] associative laws • |= [(p q) r] [p (q r)] • |= [(p q) r] [p (q r)] • |= [(p q) r] [(p r) (q r)] distributive laws • |= [(p q) r] [(p r) (q r)]
Laws of implication |= p (q p) law of simplification |= (p p) q Duns Scot’s law |= (p q) (q p) law of contra-position |= (p (q r)) ((p q) r)premises joint |= (p (q r)) (q (p r)) order of premises does not matter |= (p q) ((q r) (p r)) hypothetic sylogism |= ((p q) (q r)) (p r) transitivity of implication |= (p (q r)) ((p q) (p r)) Frege’s law |= (p p) p reductio ad absurdum |= ((p q) (p q)) p reductio ad absurdum |= (p q) p , |= (p q) q |= p (p q) , |= q (p q)
Laws of transformation |= (p q) (p q) (q p) |= (p q) (p q) (q p) |= (p q) (p q) (q p) |= (p q) (p q) |= (p q) (p q)Negation of implication |= (p q) (p q)De Morgan law |= (p q) (p q)De Morgan law These laws define a method for negating
Negation of implication Parents: If you behave well you’ll get a new ski at Christmas! (p q) Child: I did behave well all the year and there is no ski under the Christmas tree! p q (Did the parents fulfill their promise?) Attorney general: If the accused man is guilty then there was an accessory in the fact Defence lawyer: It is not true ! Question: Did the advocate (defence lawyer) help the accused man; what did he actually claim? (The man is guilty and he performed the illegal act alone!)
Negation of implication Sentence in the future tense: If you steel it I’ll kill you! (p q) It is not true: I will steel it and yet you will not kill me. p q OK, but: If the 3rd world war breaks out tomorrow then more than three million people will be killed. It is not true: The 3rd world war will break out tomorrow and less than three million people will be killed ??? Probably by negating the sentence we did not intend to claim that (certainly) the 3rd world war will break out tomorrow: There is an unsaid modality: Necessarily,if the 3rd world war breaks out tomorrow then more than three million people will be killed. It is not true: Possibly the 3rd world war breaks out tomorrow but at that case less than three million people will be killed. Handled by modal logics – not a subject of this course.
Some more arguments • Transformation from natural language may be ambiguous: If a man has high blood pressure and breathes with difficulties or he has a fever then he is sick. p – ”X has high blood pressure” q – ”X breathes with difficulties” r – ”X has a fever” s – ”X is sick” 1. possible analysis:[(p q) r] s 2. possible analysis: [p (q r)] s
Some more arguments If Charles has high blood pressure and breathes with difficulties or he has a fever then he is sick. Charles is not sick but he breathes with difficulties. What can be deduced from these facts? We have to distinguish between first and second reading because they are not equivalent. The conclusions will be different.
Analysis of the 1. reading • analysis: [(p q) r] s, s, q ??? • By means of equivalent transformations: [(p q) r] s, s [(p q) r] (de transposition Morgan) (p q) r (p q), r, but q holds p, r (consequences) Hence Charles does not have a high blood pressure and does not have a fever.
Analysis of the 2. reading • analysis: [p (q r)] s, s,q ??? • reasoning with equivalent transformations: [p (q r)] s,s [p (q r)] transposition de Morgan: p (q r) butqis true the second disjunct cannot be true the first is true: p (consequence) HenceCharles does not have a high blood pressure (we cannot conclude anything about his temperature r)
A proof of both cases 1. analysis: [(p q) r] s, s, q |= p,r 2. analysis: [p (q r)] s, s, q |= p home work • 1. case – by means of a table: home work • Indirect: premises + negated conclusion (p r) (p r) and we assume that every f. is true: • [(p q) r] s, s, q, p r • 1 1 0 1 1 • 0 0 • 0 0 • 0 1 p r = 0 contradiction
Summary • Typical tasks: • Verifying a valid argument • What can be deduced from given assumptions? • Add the missing assumptions • Is a given formula a tautology, contradiction, satisfiable? • Find models of a formula, find a model of a set of formulas • Methods we have learnt till now for PL: • Table method • reasoning and equivalent transformation • Indirect proof
First-order predicate logic We have seen that the question “Is a formula A true?” is reasonable only when we add “in the interpretation I for a valuation vof free variables”. Interpretation structureis ann-tuple: I= U, R1,...,Rn, F1,...,Fm, where F1,...,Fmarefunctionsover the universe of discourse assigned to the functional symbols occurring in the formula, and R1,...,Rnare relationsover the universe of discourse assigned to thepredicate symbolsoccurring in the formula. How to evaluate the truth-value of a formula in an interpretation structure I, or for short in the Interpretation I? 9/5/2014 FOPL: Interpretation, models 20
Interpretation, evaluation of a formula We evaluate bottom up, i.e., from the “inside out” : First, determine the elements of the universe denoted by terms, then determine the truth-values of atomic formulas, and finally, determine the truth-value of the (composed) formula Evaluation of terms: Let v be avaluationthat associates each variable x with an element of the universe: v(x) U. By evaluation e of terms induced by v we obtain an element e(x) of the universe U that is defined inductively as follows: e(x) = v(x) e(f(t1, t2,...,tn)) = F(e(t1), e(t2),...,e(tn)), whereFis the function assigned by I to the functional symbol f. 9/5/2014 FOPL: Interpretation, models 21
Interpretation, evaluation of a formula Evaluation of a formula Atomic formulas: |=I P(t1,...,tn)[v] – the formula is true in the interpretation I for a valuation v iff e(t1), e(t2),...,e(tn) R, where R is the relation assigned to the symbol P (we also say that R is thedomain of truthofP) Composed formulas: Propositionally composedA, A B, A B,A B, A B, dtto Propositional Logic Quantified Formulas xA(x), xA(x): |=IxA(x)[v], if for any individual i Uholds |=IA[v(x/i)], wherev(x/i) is a valuation identical to vup toassigning the individual i to the variable x |=IxA(x)[v], if for at least oneindividual i Uholds |=IA[v(x/i)]. 9/5/2014 FOPL: Interpretation, models 22
Quantifiers It is obvious from the definition of quantifiers that over a finite universe of discourse U = {a1,…,an} the following equivalences hold: x A(x) A(a1) … A(an) x A(x) A(a1) … A(an) Hence universal quantifier is a generalization of a conjunction; existential quantifier is a generalization of a disjunction. Therefore, the following equivalences obviously holds: x A(x) xA(x), x A(x) xA(x) de Morgan laws 9/5/2014 FOPL: Interpretation, models 23
Satisfiability and validity in interpretation Formula A is satisfiable in interpretationI, if thereexistsvaluation vof variables that|=I A[v]. Formula A istrue in interpretation I, |=I A, ifforallpossible valuationsvholds that |=I A[v]. Model of a formula Ais an interpretation I, in which A is true(that meansfor all valuations of free variables). Formula A is satisfiable, if there is interpretation I, in which Aissatisfied(i.e., if there is an interpretation I and valuationvsuch that |=I A[v].) Formula A isa tautology (logically valid), |= A, if A is true in every interpretation (i.e., for all valuations). Formula A isa contradiction, if there is nointerpretation I, that would satisfy A, sothere is no interpretation and valuation, in which A would be true: |I A[v], for any I and v.
Satisfiability and validity in interpretation A:x P(f(x), x)B:x P(f(x), x)C: P(f(x), x) Interpretation I: U=N, f x2, P relation > It is true that: |=I B. Formula B is in N, x2, > true. FormulasA and C are inN, >, x2 satisfied, but not true: fore0(x) = 0, e1(x) = 1 pairs0,0, 1,1 are not elements of>;fore2(x) = 2, e3(x) = 3, …, pairs4,2, 9,3, …are elements of the relation >. Formulas A, Care not inN, x2, >true: |I A[e0], |I A[e1],|I C[e0], |I C[e1], only:|=I A[e2], |=I A[e3], |=I C[e2], |=I C[e3], …
Empty universe? Consider an empty universe U = x P(x):is it true or not? By the definition of quantifiers it is false, because we can’t find any individual which would satisfy P, then it is true that x P(x), sox P(x), but this is false as well – contradiction. Or it is true, because there is no element of the universe that would not have the property P, but then xP(x) should be true as well, which is false – contradiction. Likewise forxP(x) leads to a contradiction So we always choose a non-empty universe of interpretation Logic“of an empty world” would not be not reasonable
Existential quantifier + implication? There is somebody such that if he/she is a genius, then everybody is a genius. This sentence cannot be false: |= x (G(x) xG(x)) For every interpretation I it holds: If the truth-domain GUof the predicate G is equal to the whole universe (GU = U), then the formula is true in I,because the subformula xG(x) is true; hence G(x) x G(x), and x (G(x) xG(x)) is true in I. If GUis a proper subset of U (GU U), then it suffices to find at least one individual a(assigned by valuation vtox) such that a is not an element of GU.Then G(a) x G(x) is true in I, because the antecedent G(a) is false.Hence x (G(x) xG(x))is true in I. 27
Existential quantifier +conjunction ! Similarly x (P(x) Q(x))is“almost”a tautology. It is true in every interpretationI such that PU U, because then |=I P(x) Q(x)[v] for v(x) PU or QU = U, because then |=I P(x) Q(x) for all valuations So this formula is false only in such an interpretation I where PU = U and QU U. Therefore,sentences of a type “Some P’sare Q’s” are analyzed by x (P(x) Q(x)).
Universal quantifier + conjunction? Usually no, but implication! Similarly x [P(x) Q(x)] is ”almost” a contradiction! The formula is false in every interpretation I such thatPU U or QU U. So the formula is true only in an interpretation I such that PU = U a QU = U Therefore,sentences of a type “All P’sare Q’s“ are analyzed byx [P(x) Q(x)] It holds for all individuals x thatif x is a P then x is a Q. (See the definition of the subset relation PU QU)
Satisfiability and validity in interpretation Formula A(x) witha free variablex: IfA(x) is true in I, then |=Ix A(x) If A(x) is satisfied in I, then|=Ix A(x). Formulas P(x) Q(x), P(x) Q(x) with the free variable x definethe intersection andunion, respectively, of truth-domains PU, QU. For every P, Q, PU, QU andan interpretation I it holds: |=I x [P(x) Q(x)] iff PU QU |=I x [P(x) Q(x)] iff PU QU |=I x [P(x) Q(x)] iff PU QU = U |=I x [P(x) Q(x)] iff PU QU
Model of a set of formulas, logical entailment A Model of the set of formulas{A1,…,An} isan interpretation I such that each of the formulas A1,...,An is true in I. Formula B logicallyfollows from A1, …, An, denotedA1,…,An|= B, iff B is true in every model of {A1,…,An}. Thus for every interpretation I in which the formulas A1, …, Anare true it holds that the formula B is true as well: A1,…,An|= B: If |=I A1,…, |=I Anthen |=I B, for all I. Note that the “circumstances“ under which a formula is, or is not, true (see the 1st lesson, Definition 1) are in FOL modelled by interpretations (of predicates andfunctional symbolsby relations andfunctions, respectively, over the universe).
Logical entailment inFOL P(x) |= x P(x), but the formula P(x) x P(x) is obviously not a tautology. Therefore, A1,...,An |= Z |=(A1…An Z)holds only for closed formulas, so-called sentences. x P(x) P(a) is also not a tautology, and thus the rulex P(x) |P(a) is not truth-preserving; P(a)does not logically follow form x P(x). Example of an interpretation I such that x P(x) is, and P(a) is not true in I: U = N(atural numbers), P even numbers, a 3
Semantic verification of an argument An argument is valid iff the conclusion is true in every model of the set of the premises. But the set of models can be infinite! And, of course, we cannot examine an infinite number of models; but we can verify the ‘logical form’ of the argument, and check whether the models of premises do satisfy the conclusion.
Semantic verification of an argument Example: All monkeys (P) like bananas (Q) Judy (a) is monkey Judy likes bananas x[P(x) Q(x)]QU P(a) PU Q(a) a
Relations Propositions withunary predicates (expressing properties of individuals) were studied already in the ancient times by Aristotle. Until quite recently Gottlob Frege, the founder of modern logic,developed the system of formal predicate logicwithn-ary predicatescharacterizing relations between individuals, and with quantifiers. Frege, however, used another language than the one of the current FOL.
Aristotle: (384 BC – March 7, 322 BC) • a Greekphilosopher, a student of Plato and teacher of Alexander the Great. • He wrote on diverse subjects, including physics, metaphysics, poetry (including theater), biology and zoology, logic, rhetoric, politics, government, and ethics. • Along with Socrates and Plato, Aristotle was one of the most influential of the ancient Greek philosophers. They transformed PresocraticGreek philosophy into the foundations of Western philosophy as we know it. • Plato and Aristotle have founded two of the most important schools of Ancient philosophy.
Gottlob Frege 1848 – 1925 German mathematician, logician andphilosopher, taught at the University of Jena. Founder of modern logic. 37
Semantic verification of an argument Marie likes only winners Karel is a winner -------------------------------------- invalid Marie likes Karel x [R(m,x) V(x)], V(k) R(m,k) ? RU U U: { <Marie, i1>, <Marie, i2>, …, <Marie, in> …} VU U: {…i1, i2, …, Karel,…, in…} The pair <Marie, Karel> doesn’t have to be an element of RU, it is not guaranteed by the validity of the premises. Being a winner is only anecessary condition for Marie’s liking somebody, but it is not a sufficient condition.
Semantic verification of an argument Marie likes only winners Karel is not a winner ------------------------------------- valid Marie does not like Karel x [R(m,x) V(x)], V(k) R(m,k) RU U U: {…<Marie, i1>, <Marie, i2>, <Marie, Karel>, …, <Marie, in> …} VU U: {…i1, i2, …, Karel, Karel,…, in…} Let the pair<Marie, Karel>be an element of RU; then by the first premise Karel has to be an element of VU, but it is not so if the second premise is true. Hence the pair<Marie, Karel>is not an element of RU. The validity of the conclusion is guaranteed by the validity of premises.
Semantic verification of an argument Anybody who knows Marie and Karel is sorry for Marie.x[(K(x,m) K(x,k))S(x,m)] Some are not sorry for Marie though they know her.x[S(x,m) K(x,m)] |= Somebody knows Marie but not Karel.x[K(x,m) K(x,k)] We illustrate the truth-domain of the predicates K andS, i.e., the relationsKU andSUthat satisfy the premises: KU={…, i1,m, i1,k, i2,m, i2,k,…, ,m,… } 1. premise 2. premise SU={…, i1,m, ...., i2,m,…........., ,m,… }
Semantic verification of an argument: an indirect proof Anybody who knows Marie and Karelis sorry for Marie.x[(K(x,m) K(x,k)) S(x,m)] Some are not sorry for Mariethough they know her.x[S(x,m) K(x,m)] |= Somebody knows Marie but not Karel.x[K(x,m) K(x,k)] Assume now that all the individuals who are paired with m in KU are also paired with k in KU: KU={…, i1,m, i1,k, i2,m, i2,k,…, ,m, ,k … } SU={…, i1,m, ...., i2,m,…........., ,m, ,m … } contradiction
Some important tautologies of FOL |= xAx Ax/t term t is substitutable for x in A |= Ax/txAx De Morgan |= x Axx Ax |= x Axx Ax The laws of quantifier distribution: |= x [A(x) B(x)] [x A(x) x B(x)] |= x [A(x) B(x)] [x A(x) x B(x)] |= x [A(x) B(x)] [x A(x) x B(x)] |= x [A(x) B(x)] [x A(x) x B(x)] |= [xA(x) xB(x)] x [A(x) B(x)] |= x [A(x) B(x)] [x A(x) x B(x)]
Semantic proofs: Let AU, BU be truth-domains of A, B x[A(x) B(x)] [xA(x) xB(x)] If the intersection (AU BU)= U, then AUand BUmust be equal to the whole universe U, andvice-versa. x[A(x) B(x)] [xA(x) xB(x)] If the union (AU BU) , then AUor BU must be non-empty (AU , or BU ),andvice-versa. |= x[A(x) B(x)] [xA(x) xB(x)] If AU BU,thenif AU = U then BU = U. |= x[A(x) B(x)] [xA(x) xB(x)] If AU BU,then if AU then BU . |= x[A(x) B(x)] [xA(x) xB(x)] If the intersection (AU BU) , then AUand BU must be non-empty(AU , BU ). |= [xA(x) xB(x)] x[A(x) B(x)] IfAU = U or BU = U, then the union (AU BU) = U
Some important tautologies FormulaA does not contain free variable x: |= x[A B(x)] [A xB(x)] |= x[A B(x)] [A xB(x)] |= x[B(x) A] [xB(x) A] |= x[B(x) A] [xB(x) A] |= x[A B(x)] [A xB(x)] |= x[A B(x)] [A xB(x)] |= x[A B(x)] [A xB(x)] |= x[A B(x)] [A xB(x)] The commutative law of quantifiers. |= xyA(x,y) yxA(x,y) |= xyA(x,y) yxA(x,y) |= xyA(x,y) yxA(x,y)but not vice-versa!
Semantic proofs: Let AU, BU betruth- domains of A, B (x not free in A x[A B(x)] [A xB(x)] – obvious x[A B(x)] [A xB(x)] – obvious x[B(x) A] [xB(x) A] x[B(x) A]x[B(x) A]: the complement BU or A is the whole universe: xB(x) A xB(x) AxB(x) A x[B(x) A] [xB(x) A] x[B(x) A]x[B(x) A]: the complement BU is non-empty or A: xB(x) A x B(x) A xB(x) A
Typical problems Prove the logical validity of a formula: A formula F is true in all interpretations,which meansthat every interpretation is a model |= F Prove the validity of an argument: P1, …, Pn |= Q forcloseformulas iff |= (P1… Pn Q) formula Q is true in all the models of the set of premises P1, …, Pn What is entailed by the given premises? P1, …, Pn |= ?
Typical problems Semantic solution over an infinite set of models is difficult, semantics proofs are tough. So we are trying to find some other methods One of them is the semantic-tableau method. Analogy, generalization ofthe same method in propositional logic Transformation toa disjunctive / conjunctive normal form.
Semantic tableau inFOL When proving a tautology by a direct proof– we use a conjunctivenormal form an indirect proof – disjunctive normal form In order to apply the propositional logic method of semantic tableau, we have to get rid of quantifiers. How to eliminate them? To this end we use the following rules: x A(x) | A(x/t), where t is a term which is substitutablefor x in A, usually t = x (x)A(x) | A(a),where a is a new constant(not used in the proof as yet)
Rules for quantifiers elimination x A(x) | A(x/t),term t issubstitutableforx Ifthe truth-domainAU= U, then the individual e(t) is an element of AU The rule is truth-preserving, OK (x)A(x) | A(a),where a is a new constant If the truth-domainAU , the individual e(a) might not be an element of AU The rule is not truth-preserving! x (y) B(x,y) | B(a, b),where a, b are suitable constants Though if for everyxthere is ay such that the pair<x,y> is inBU, the pair <a, b> might not be an element of BU. The rule is not truth-preserving! However, existential-quantifier elimination does not yield a contradiction:it is possible to interpret the constants a, b so that the formula on the right-hand side is true, whenever the formula on the left-hand side is true. For this reason we use the indirect proof (disjunctive tableau), whenever the premises contain existential quantifier(s)
Semantic tableau inFOL– disjunctive Example. Proof of the logical validity of a formula: |= x [P(x) Q(x)] [x P(x) x Q(x)] Indirect proof (non-satisfiable of formula): x [P(x) Q(x)] x P(x) x Q(x) (order!) x [P(x) Q(x)], P(a) Q(a), P(a), Q(a) x [P(x) Q(x)], P(a), P(a), Q(a) x [P(x) Q(x)], Q(a), P(a), Q(a) + + Both branches are closed, they are contradictory. Therefore, the original (blue) formula is tautology. 2. 3. 1.