/
Semantics  ( meaning )  of the Semantics  ( meaning )  of the

Semantics ( meaning ) of the - PowerPoint Presentation

anastasia
anastasia . @anastasia
Follow
0 views
Uploaded On 2024-03-13

Semantics ( meaning ) of the - PPT Presentation

PL1 formulas Introduction to Logical Thinking Lesson 6 Course Guarantor Marek Menšík Author of the slides Marie Duží 1 Logical vs special symbols Consider formulas x P af ID: 1047443

formula true formulas interpretation true formula interpretation formulas pl1 universe set relation valid validity symbols argument model elements number

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Semantics ( meaning ) of the" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1. Semantics (meaning) of the PL1 formulasIntroduction to Logical Thinking, Lesson 6Course Guarantor: Marek MenšíkAuthor of the slides: Marie Duží1

2. Logical vs. special symbols Consider formulas x P(a,f(x)) and x P(a,f(x)). Question whether these formulas are true is a futile question; we cannot answer because we do not know the meaning of the symbols P, a, f. We only know that P is a predicate symbol with arity 2, a is a functional symbol with arity 0, i.e. a constant, and f is a functional symbol with arity 1. Logical symbols (i.e. connectives and quantifiers) have a fixed meaning, whereas special symbols must be interpreted. A predicate symbol with arity 1 denotes a property (e.g., of being a winner, being a prime) whereas a predicate symbol with arity 2 or greater denotes a relation (e.g., loving somebody, being greater). Functional symbols stand for (extensional and total) functions. Function f: A  B has been defined as a mapping from A to B that associates every element of A with just one element of B.2

3. The notion of property / relationExamples. The property of being a prime number can be viewed as a subset of the set of natural numbers, to which belong those numbers that have exactly two divisors. Primes = {2, 3, 5, 7, 11, 13, …}The property of being even can be defined as a subset of natural numbers, to which belong those numbers that are divisible by 2. Even = {2, 4, 6, 8, 10, 12, …}Similarly can be viewed non-mathematical properties. For instance, the property of being a student is understood as the set of those individuals (i.e. a subset of the universe) that are students.Relation between natural numbers ‘greater than’ is defined as the set of ordered pairs such that the first number is greater than the second: > = {1,0, 2,0, …, 2,1, 3,1, …, 3,2, …}; >  N  NIn general, binary relation R on a set A is a set of ordered pairs, i.e., a subset of the Cartesian product: R  A  A3

4. The notion of relationMnožina všech možných uspořádaných dvojic prvků množin A a B (v tomto pořadí) se nazývá Kartézský součin množin A, B, značíme AB.Definice: Binární relace R na množině M je podmnožina Kartézského součinu MM. Obecně, n-ární relace na množině M je podmnožina Kartézského součinu M…M.Pozn.: Podmnožiny universa, které přiřazujeme interpretací predikátům s aritou 1, můžeme chápat jako unární relace.Pozn.: Funkce chápána extenzionálně je rovněž speciální příklad relace, a to zprava jednoznačná relace. Tedy podmínka pro to, aby relace R byla funkcí se dá zapsat takto:xyz {[R(x,y)  R(x,z)]  y=z}4

5. Semantics of PL1 formulasPL1 language is symbolic; it means that formulas are just sequences of symbols. They must be interpreted to get a meaning. Even those formulas that have been obtained by formalization of natural language sentences have no meaning without interpretation. For instance, the proposition John admires only winners can be formalized as x [A(j,x)  W(x)]. In the intended interpretation, the predicate A stands for the relation ‘admire’, W for the property ‘Winner’ and constant j denotes John. But the symbols A, W, j can be interpreted in another way. For instance, if we vote for the universe of integers, then the predicate A can denote the relation less than (<), constant j the number 0 and predicate W the subset of positive numbers. In this interpretation is the formula true, as it holds for all x that if 0 < x then x is a positive number.5

6. Semantics of PL1 formulas; interpretationInterpretation of a formula F consists of three steps.First, we vote for a domain of interest, i.e. universe of discourse U. It can be any non-empty set.Then we interpret predicate symbols P, Q, … occurring in F. It means that to each such symbol with arity n, n-ary relation R over the universe is assigned; R  U … U. Unary predicate symbols with arity 1 are associated with subsets of universe. Finally we interpret functional symbols f, g, … occurring in F. It means that to each such symbol with arity n, function, i.e. mapping U … U  U, is assigned. Since constants are functional symbols with 0 arity, we assign to them elements of the universe.6

7. Interpretation of PL1 formulasExample. Consider formulas x P(a,f(x)) and x P(a,f(x)).Interpretation 1. 1) Universe U = N (the set of natural numbers). 2) P  relation < 3) a  the number 0 4) f  the function square (x2) Evaluating the truth value in I1: for v(x) = 0, f(x) = x2 = 0; for v(x) = 1 is f(x) = x2 = 1; for v(x) = 2 is f(x) = x2 = 4; for v(x) = 3 is f(x) = x2 = 9; for v(x) = 4 is f(x) = x2 = 16, etc.Now we evaluate the atomic formula P(a,f(x)). Since the symbol P is interpreted by the relation <, we have:for v(x) = 0: P(a,f(x)) = (0 < x2) = (0 < 0), False for v(x) = 1: P(a,f(x)) = (0 < x2) = (0 < 1), True for v(x) = 2: P(a,f(x)) = (0 < x2) = (0 < 4), True for v(x) = 3: P(a,f(x)) = (0 < x2) = (0 < 9), True, etc.Hence, the formula x P(a,f(x)) is false in I1 because it is not true that all elements of the universe satisfy the sub-formula P(a,f(x)). The number 0 does not. The formula x P(a,f(x)) is in this interpretation true, as it is true that some elements of the universe satisfy the sub-formula P(a,f(x)); actually, all the elements do except of zero.7

8. Interpretation of PL1 formulasInterpretation in which a formula is true is called a model of the formula. Hence, Interpretation 1 is not a model of the formula x P(a,f(x)) butit is a model of the formula x P(a,f(x)).Let us adjust the interpretation so that it be a model of both the formulas. It suffices to assign to P the relation . We have got this interpretation structure:Interpretation 2:Universe U = N (the set of naturals).P  relation  a  number 0f  function square (x2) It is easy to check that this interpretation is a model of both the formulas. 8

9. Interpretation of PL1 formulasConsider the formulas x P(x,f(x)) and x P(x,f(x)).Interpretation 3:Universe U = the set of peopleP  relation of being younger that f  function that associates each person with his/her biological mother It is easy to check that both the formulas are true this interpretation; it holds for all people (hence also for some) that they are younger than their mother. Interpretation 3 is a model of the formulas x P(x,f(x)) and x P(x,f(x)).9

10. Interpretation of open PL1 formulasHow shall we evaluate in a given interpetation open formulas with free variables? Example.y P(x, y)The variable x is free, as it does not occur in the scope of any quantifier.Interpretation 4:Universe U = N (the set of natural numbers).P  relation < Evaluation of an open formula depends not only on an interpretation structure, but also on the valuation of the free variable x: v(x) = 0  P(x,y) is true for v(y) = 1, 2, 3, ….v(x) = 1  P(x,y) is true for v(y) = 2, 3, 4, ….v(x) = 2  P(x,y) is true for v(y) = 3, 4, 5, ….v(x) = 3  P(x,y) is true for v(y) = 4, 5, 6, …. etc.For any valuation of x there is a valuation of y such that P(x,y) is true in I4. Hence, the formula y P(x, y) is true in I4 for any valuation of x. The interpretation 4 is a model of y P(x, y).10

11. Interpretation of open PL1 formulasConsider atomic open formula P(a,x)Interpretation 5:Universe U = Z (the set of integers).P  relation  a  the number 0In this interpretation, the formula P(a,x) is satisfiable, but not true. For those valuations of x that associate x with a positive number or 0, the formula is true, but it is not true for those valuations that associate x with negative numbers.11

12. Interpretation of open PL1 formulasIt should be clear now thata formula A(x) with a free variable x is true in a given interpretation I iff the closed formula x A(x) is true in I. a formula A(x) with a free variable x is satisfiable in a given interpretation I iff the closed formula x A(x) is true in I. In symbolsA(x) is true in I (|=I A(x))  |=I x A(x)A(x) is satisfiable in I  |=I x A(x)Hence, while in propositional logic there are just three kinds of formulas, namely logically valid (tautology), satisfiable and contradiction, in PL1 it is more complicated; we distinguish:logically valid (tautology), satisfiable, which are either true in an interpretation or satisfied in an interpretationnon-satisfieble (contradiction).12

13. Definition of the types of PL1 formulasA formula F of the PL1 language is logically true (tautology), denoted |= F, if A is true in every interpretation for each valuation of free variables. A formula F of the PL1 language is non-satisfiable (contradiction), if it is not satisfied in any interpretation; it means that it is false in each interpretation for each valuation of free variables.A formula F of the PL1 language is true in an interpretation I, denoted |=I F, iff F is true in I for all valuation of variables. A formula F of the PL1 language is satisfiable in an interpretation I, iff there is a valuation v, for which F is evaluated as true in I, denoted |=I F[v].13

14. Open formulas defining subsets of universeConsider formulas that contain only unary predicate symbols P, Q that are interpreted as subsets of the universe. Let us denote these subsets, i.e. domains of truth of P and Q, by PU  U a QU  U.The formula P(x)  Q(x) defines intersection PU  QU. In a given interpretation, it is true for those valuations of x that associate the variable x with those elements of the universe that belong to both PU and QU. The formula P(x)  Q(x) defines union PU  QU. In a given interpretation, it is true for those valuations of x that associate the variable x with those elements of the universe that belong to PU or QU. 14

15. Models of formulas vs subsets of the universeFor any unary predicates P, Q, and their truth domains PU, QU, in an interpretation I, the following holds. |=I x [P(x)  Q(x)]  PU  QU PU is a subset of QU|=I x [P(x)  Q(x)]  PU  QU  The intersection of PU and QU is nonempty|=I x [P(x)  Q(x)]  PU  QU = UThe union of PU and QU is the whole universe|=I x [P(x)  Q(x)]  PU  QU   The union of PU and QU is nonempty15

16. Models of formulas and subsets of the universeexample. All whales are mammalsx [W(x)  M(x)]Necessarily, population of whales is a subset of the population of mammals.Some students have a jobx [S(x)  J(x)]The intersection of the set of students and those who have a job is nonempty.16

17. Valid arguments in PL1Recall the definition of a valid argument: Conclusion must be true in all the circumstances in which premises are true. In PL1, these circumstances are models of the premises. Definition. Model of a formula F is interpetation I in which F is true; |=I F.Model of a set of formulas {F1,…,Fn} is interpetation I in which all the formulas of this set are true: |=I F1, …, |=I Fn.Definition (logical entailment in PL1). Let P1, …, Pn, C are PL1 formulas. Then C logically follows from the premises P1, …, Pn, iff C is true in all models of the premises {P1,…,Pn}.17

18. Valid arguments in PL1Corollary 1. The argument P1,…,Pn |= C is deductively valid iff each model of the premises {P1,…,Pn} is also a model of C.Corollary 2. The argument P1,…,Pn |= C is deductively valid iff the set {P1, …, Pn, C} does not have a model; it is inconsistent.Corollary 1 is a hint for a direct proof while Corollary 2 for a indirect proof of the validity of an argument.18

19. Semantic theorem of deduction in PL1Semantic theorem of deduction is in PL1 valid only for closed formulas. It is due to the way of defining a model of a formula. It is such an interpretation in which the formula takes the value True for all valuations of free variables. Example. The following argument is valid according to the definition of logical entailment:P(x) |= x P(x)Sure, if the formula P(x) is true in some interpretation, then according to the definition of general quantifier the formula x P(x) is true in this interpretation as well. But the formula P(x)  x P(x) is not logically true.19

20. Semantic theorem of deduction in PL1As a counterexample to the logical validity of P(x)  x P(x) take this interpretation: U = N (the set of natural numbers)P  PU = the set of even numbers ( N) It is easy to find a valuation of the variable x for which the formula takes the value False. For instance, v(x) = 2 or v(x) = 4, 6, etc. For these valuation is the antecedent P(x) true but the consequent x P(x) is false (it is not true that all natural number are even).TheoremLet P1, …, Pn, C are closed formulas of PL1. Then the argument P1, …, Pn |= C is deductively valid iff the formula (P1 … Pn)  C is logically true, i.e. |= (P1 … Pn)  C.P1, …, Pn |= C  |= (P1 … Pn)  C20

21. Semantic proofs of the validity of an argumentIn simple cases it is possible to decide by set-theoretical considerations whether an argument is valid. x [P(x)  Q(x)] QU P(a)  Q(a)Direct proof. According to the first premise, PU is a subset of QU, i.e. PU  QU. According to the second premise the element a belongs to PU, a  PU. Hence, a must also be an element of QU, a  PU, as all the elements of PU are also elements of QU.Indirect proof. Let the premises be true and a not an element of QU; a  QU. But then it is not true that all the elements of PU belong to QU, which contradicts the first premise.21aPU

22. Semantic proofs of the validity of an argument x [P(x)  Q(x)] QU Q(a)  a P(a)Direct proof. According to the first premise, PU  QU. According to the second premise, a  QU. Hence, a  PU, as all elements of PU belong to QU as well. Indirect proof. Assume that the premises are true and a  PU. But then it is not true that a  QU because all elements of PU belong to QU as well, contra the asumption.22PU

23. Semantic proofs of the validity of an argumentThe situation gets more complicated when formulas contain predicates with arity n > 1. Since such predicate symbols are interpreted by n-ary relations, we cannot simply illustrate the truth of the premises and conclusion by a figure. Yet, the way of reasoning remains the same.Example. Check the validity of this argument schema:x [P(a,x)  Q(x)]Q(b)P(a,b)It can be formalization of, e.g., this argument:Adam admires only winners.Barty is not a winner. Adam does not admire Barty.23

24. Semantic proofs of the validity of an argumentFirst, we illustrate the truth domains of the predicates P and Q over an arbitrary universe. Then we check whether such a situation guarantees the truth of the conclusion.First premise. Those individuals that are in the relation PU with Adam must be elements of QU: PU = {Adam, i1, Adam, i2, ..., Adam, in, ... } QU = { i1, i2, ..., in, ..., Barty }According to the second premise, Barty is not an element of QU.Hence, the pair Adam, Barty is not an element of PU because if it were then Barty would have to be an element of QU. But it is not. The truth of the premises guarantees the truth of the conclusion, QED. 24

25. Semantic proofs of the validity of an argumentWe can see that such semantic checking of the validity of an argument by considering the ‘shape’ of the models would hardly be automatized. Moreover, in more complicated cases these proofs are difficult to understand. Yet in simpler cases there are nice semantic methods of proving. One such a method is the method of Venn’s diagrams that we will introduce next.Finally, in the rest of this course, we introduce a syntactic method of proving, namely resolution method, that does not deal with models. Instead, it deals with syntactic structure of the formulas. Remarks. In propositional logic, it is easy to decide whether a formula is a tautology, contradiction or just satisfiable, or whether an argument is valid. These issues are simply decidable by a finite truth table. However, in the first-order predicate logic, formulas can have infinitely many models. Recall that we can vote for any (possibly infinite) universe of discourse over which there are uncountably many functions or relations. Hence, we cannot make an infinite table of models to decide validity of a formula or argument. 25

26. Logical validity in PL1The problem of logical validity is not decidable in PL1.In other words, there is no algorithm that would decide any formula; it means that there is no such algorithm that would take any input formula and after a finite number of steps answered Yes/No the question whether the input formula is logically valid. Yet, the situation is not so hopeless, as the problem of logical validity is in PL1 semi-decidable. It means that there are algorithms that operate like this. If the input formula is logically valid, then after a finite number of steps the algorithm outputs the answer Yes. However, if the input formula is only satisfiable, the algorithm can loop and never output an answer. 26