First Order Logic (1A) Young W. Lim 11/18/13

Similar documents
First Order Logic (1A) Young W. Lim 11/5/13

Logic (3A) Young W. Lim 11/2/13

Logic (3A) Young W. Lim 10/31/13

Logic (3A) Young W. Lim 10/29/13

Logic Background (1A) Young W. Lim 12/14/15

Logic Background (1A) Young W. Lim 5/14/18

Resolution (14A) Young W. Lim 8/15/14

Propositional Logic Arguments (5A) Young W. Lim 11/8/16

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

Propositional Logic Logical Implication (4A) Young W. Lim 4/21/17

First Order Logic Implication (4A) Young W. Lim 4/6/17

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

Propositional Logic Logical Implication (4A) Young W. Lim 4/11/17

Propositional Logic (2A) Young W. Lim 11/8/15

Propositional Logic Arguments (5A) Young W. Lim 2/23/17

Propositional Logic Arguments (5A) Young W. Lim 11/29/16

First Order Logic Semantics (3A) Young W. Lim 9/17/17

Propositional Logic Arguments (5B) Young W. Lim 11/30/16

First Order Logic Semantics (3A) Young W. Lim 8/9/17

Propositional Logic Resolution (6A) Young W. Lim 12/12/16

Logic (3A) Young W. Lim 12/5/13

Propositional Logic. Fall () Propositional Logic Fall / 30

cis32-ai lecture # 18 mon-3-apr-2006

THE LOGIC OF COMPOUND STATEMENTS

Propositional Logic Resolution (6A) Young W. Lim 12/31/16

Advanced Topics in LP and FP

2. The Logic of Compound Statements Summary. Aaron Tan August 2017

First Order Logic Arguments (5A) Young W. Lim 2/24/17

Propositional Logic. Spring Propositional Logic Spring / 32

Logic. Propositional Logic: Syntax

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Learning Goals of CS245 Logic and Computation

Proseminar on Semantic Theory Fall 2013 Ling 720 Propositional Logic: Syntax and Natural Deduction 1

First Order Logic Arguments (5A) Young W. Lim 3/10/17

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

Propositional Logic Not Enough

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

MAI0203 Lecture 7: Inference and Predicate Calculus

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

3. The Logic of Quantified Statements Summary. Aaron Tan August 2017

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Logic: Propositional Logic (Part I)

Propositional Logic: Part II - Syntax & Proofs 0-0

The Logic of Compound Statements cont.

Introduction to Sets and Logic (MATH 1190)

Propositional Logic: Syntax

It rains now. (true) The followings are not propositions.

INTRODUCTION TO LOGIC. Propositional Logic. Examples of syntactic claims

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

3 The Semantics of the Propositional Calculus

Reasoning. Inference. Knowledge Representation 4/6/2018. User

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Mat 243 Exam 1 Review

THE LOGIC OF COMPOUND STATEMENTS

Logic. Propositional Logic: Syntax. Wffs

3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations

Examples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:

First Order Logic: Syntax and Semantics

Chapter 1 Elementary Logic

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

A Little Deductive Logic

Propositional logic (revision) & semantic entailment. p. 1/34

Logic for Computer Science - Week 4 Natural Deduction

GÖDEL S COMPLETENESS AND INCOMPLETENESS THEOREMS. Contents 1. Introduction Gödel s Completeness Theorem

Language of Propositional Logic

A Little Deductive Logic

AI Principles, Semester 2, Week 2, Lecture 5 Propositional Logic and Predicate Logic

Glossary of Logical Terms

Logic and Proofs. (A brief summary)

(Refer Slide Time: 02:20)

CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Section 1.2: Propositional Logic

Symbolic Logic 3. For an inference to be deductively valid it is impossible for the conclusion to be false if the premises are true.

Introduction to Metalogic

Deductive Systems. Lecture - 3

CITS2211 Discrete Structures. Propositional Logic

Mathematics 114L Spring 2018 D.A. Martin. Mathematical Logic

HANDOUT AND SET THEORY. Ariyadi Wijaya

8. Reductio ad absurdum

Chapter 4, Logic using Propositional Calculus Handout

03 Propositional Logic II

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Propositional Logic: Methods of Proof (Part II)

2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic

Propositional Logic: Logical Agents (Part I)

1 The Foundation: Logic and Proofs

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

Propositional Logic Review

Propositional Logic Language

185.A09 Advanced Mathematical Logic

Discrete Mathematical Structures. Chapter 1 The Foundation: Logic

Proposition logic and argument. CISC2100, Spring 2017 X.Zhang

Where are my glasses?

Transcription:

Copyright (c) 2013. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". Please send corrections (or suggestions) to youngwlim@hotmail.com. This document was produced by using OpenOffice.

Proposition a broad use in contemporary philosophy the primary bearers of truth-value the objects of belief and other propositional attitudes (i.e., what is believed, doubted) the referents of that-clauses the meanings of sentences Propositions are the sharable objects of the attitudes the primary bearers of truth and falsity Does not certain candidates for propositions, thought- and utterance-tokens, which presumably are not sharable concrete events or facts, which presumably cannot be false. 3

Predicate (grammar) The part of the sentence (or clause) which states something about the subject or the object of the sentence. In "The dog barked very loudly", the subject is "the dog" and the predicate is "barked very loudly". (logic) A term of a statement, where the statement may be true or false depending on whether the thing referred to by the values of the statement's variables has the property signified by that (predicative) term. From Middle French predicate (French prédicat), from post-classical Late Latin praedicatum ( thing said of a subject ), a noun use of the neuter past participle of praedicare ( proclaim ). 4

Predicate and Proposition A nullary predicate is a proposition. Also, an instance of a predicate whose terms are all constant e.g., P(2,3) acts as a proposition. A predicate can be thought of as either a relation (between elements of the domain of discourse) or as a truth-valued function (of said elements). A predicate is either valid, (all interpretations make the predicate true) satisfiable, or (an interpretation makes the predicate true) unsatisfiable. (no interpretations make the predicate true) There are two ways of binding a predicate's variables: one is to assign constant values to those variables, the other is to quantify over those variables (using universal or existential quantifiers). If all of a predicate's variables are bound, the resulting formula is a proposition. 5

Satisfiability and Validity In mathematical logic, satisfiability and validity are elementary concepts of semantics. A formula is satisfiable if it is possible to find an interpretation (model) that makes the formula true. some S are P A formula is valid if all interpretations make the formula true. every S is a P A formula is unsatisfiable if none of the interpretations make the formula true. no S are P A formula is invalid if some such interpretation makes the formula false. some S are not P a theory is satisfiable if one of the interpretations makes each of the axioms of the theory true. a theory is valid if all of the interpretations make each of the axioms of the theory true. a theory is unsatisfiable if all of the interpretations make each of the axioms of the theory false. a theory is invalid if one of the interpretations makes each of the axioms of the theory false. These four concepts are related to each other in a manner exactly analogous to Aristotle's square of opposition. 6

Reduction of Validity to Unsatisfiability For classical logics, can reexpress the validity of a formula to satisfiability, because of the relationships between the concepts expressed in the square of opposition. In particular φ is valid if and only if φ is unsatisfiable, which is to say it is not true that φ is satisfiable. Put another way, φ is satisfiable if and only if φ is invalid. 7

Square of Opposition A categorical proposition is a simple proposition containing two terms, subject and predicate, in which the predicate is either asserted or denied of the subject. four logical forms. The 'A' proposition, the universal affirmative (universalis affirmativa), 'omne S est P', usually translated as 'every S is a P'. The 'E' proposition, the universal negative (universalis negativa), 'nullum S est P', usually translated as 'no S are P'. The 'I' proposition, the particular affirmative (particularis affirmativa), 'quoddam S est P', usually translated as 'some S are P'. The 'O' proposition, the particular negative (particularis negativa), Latin 'quoddam S non est P', usually translated as 'some S are not P'. 8

Material Conditional (1) a logical connective (or a binary operator) that is often symbolized by a forward arrow " " is used to form statements of the form "p q" (termed a conditional statement) which is read as "if p then q" and conventionally compared to the English construction "If...then...". But unlike as the English construction may, the conditional statement "p q" does not specify a causal relationship between p and q is to be understood to mean "if p is true, then q is also true" such that the statement "p q" is false only when p is true and q is false. antecedent p q consequent The material conditional is also to be distinguished from logical consequence. In classical logic p q is logically equivalent to (p q) and by De Morgan's Law to p q 9

Material Conditional (2) is to be understood to mean "if p is true, then q is also true" such that the statement "p q" is false only when p is true and q is false. the negative compound: not both p and not q. p q is false if and only if both p is true and q is false. p q is true if and only if either p is false or q is true (or both). The compound p q is logically equivalent also to p q (either not p, or q (or both)), and to q p (if not q then not p). But it is not equivalent to p q, which is equivalent to q p. In classical logic p q is logically equivalent to (p q) and by De Morgan's Law to p q p q p q T T T T F F F T T F F T q p p q p q T T T T F F F T T F F T 10

Comparison implication if P then Q first statement implies truth of second inverse if ~P then ~Q negation of both statements converse if Q then P reversal of both statements contrapositive if ~Q then ~P reversal and negation of both statements negation P and ~Q contradicts the implication p q converse q p inverse contrapositive inverse p q q p converse 11

Contraposition In logic, contraposition is a law, which says that a conditional statement is logically equivalent to its contrapositive. The contrapositive of the statement has its antecedent and consequent inverted and flipped: the contrapositive of P Q is thus Q P. For instance, the proposition "All bats are mammals" can be restated as the conditional "If something is a bat, then it is a mammal". Now, the law says that statement is identical to the contrapositive "If something is not a mammal, then it is not a bat." Note that if P Q is true and we are given that Q is false, Q, it can logically be concluded that P must be false, P. This is often called the law of contrapositive, or the modus tollens rule of inference. 12

Conversion and Negation The contrapositive can be compared with three other relationships between conditional statements: Inversion (the inverse): P Q "If something is not a bat, then it is not a mammal." Unlike the contrapositive, the inverse's truth value is not at all dependent on whether or not the original proposition was true, as evidenced here. The inverse here is clearly not true. Conversion (the converse): Q P. "If something is a mammal, then it is a bat." The converse is actually the contrapositive of the inverse and so always has the same truth value as the inverse, which is not necessarily the same as that of the original proposition. Negation: (P Q) = P and Q "There exists a bat that is not a mammal. " If the negation is true, the original proposition (and by extension the contrapositive) is untrue. Here, of course, the negation is untrue. ~(~PVQ) = P and ~Q 13

Contradiction (falsum): represents an arbitrary contradiction Upside-down T (tee): denotes an arbitrary tautology (turnstile): "yields", "proves" T ϕ a proposition is a contradiction iff In the classical logic, especially for a contradictory proposition ϕ propositional and it is true that first for all ( ) order logic ϕ ψ ψ ψ "from falsity, whatever you like" one may prove any proposition from a set of axioms which contains contradictions. principle of explosion (ex falso quodlibet) ϕ a proposition ϕ is a contradiction iff it is unsatisfiable In complete logic 14

Formal System A formal system is broadly defined as any well-defined system of abstract thought based on the model of mathematics. In mathematics, a theorem is a statement that has been proven on the basis of previously established statements, such as other theorems, and generally accepted statements, such as axioms. a tautology (from the Greek word ταυτολογία) is a formula which is true in every possible interpretation. previously established statements axiom 0 theorem 0 axiom i theorem j theorem j+1 proves An axiom, or postulate, is a premise or starting point of reasoning. As classically conceived, an axiom is a premise so evident as to be accepted as true without controversy. 15

Complete Logic In logic, semantic completeness is the converse of soundness for formal systems. a tautology (from the Greek word ταυτολογία) is a formula which is true in every possible interpretation. A formal system is "semantically complete" when all its tautologies are theorems A formal system is "sound" when all theorems are tautologies semantically complete every tautology theorem sound every theorem tautology (that is, they are semantically valid formulas: formulas that are true under every interpretation of the language of the system that is consistent with the rules of the system). A formal system is consistent if for all formulas φ of the system, the formulas φ and φ (the negation of φ) are not both theorems of the system (that is, they cannot be both proved with the rules of the system). 16

Soundness An argument is sound if and only if The argument is valid. All of its premises are true. For instance, All men are mortal. Socrates is a man. Therefore, Socrates is mortal. (true) (true) (sound) sound valid The argument is valid (because the conclusion is true based on the premises, that is, that the conclusion follows the premises) and since the premises are in fact true, the argument is sound. The following argument is valid but not sound: All organisms with wings can fly. Penguins have wings. Therefore, penguins can fly. (false) (true) (valid) Since the first premise is actually false, the argument, though valid, is not sound. 17

Soundness and Completeness The crucial properties of this set of rules are that they are sound and complete. Informally this means that the rules are correct and that no other rules are required. 18

Well Formed Formula (1) WFF is a word (i.e. a finite sequence of symbols from a given alphabet) which is part of a formal language. A formal language can be considered to be identical to the set containing all and only its formulas. A formula is a syntactic formal object that can be informally given a semantic meaning. formula Symbols and string of symbols WFF A key use of formulas is in propositional logic and predicate logics such as first-order logic. formal language formal logic Theorem a formula is a string of symbols φ for which it makes sense to ask "is φ true?", once any free variables in φ have been instantiated. In formal logic, proofs can be represented by sequences of formulas with certain properties, and the final formula in the sequence is what is proven. 19

Well Formed Formula (2) This diagram shows the syntactic entities which may be constructed from formal languages. The symbols and strings of symbols may be broadly divided into nonsense and well-formed formulas. A formal language can be thought of as identical to the set of its well-formed formulas. The set of well-formed formulas may be broadly divided into theorems and nontheorems. nonsense formal language Symbols and string of symbols WFF Theorem 20

Well Formed Formula (3) Although the term "formula" may be used for written marks (for instance, on a piece of paper or chalkboard), it is more precisely understood as the sequence being expressed, with the marks being a token instance of formula. It is not necessary for the existence of a formula that there be any actual tokens of it. A formal language may thus have an infinite number of formulas regardless whether each formula has a token instance. Moreover, a single formula may have more than one token instance, if it is written more than once. Symbols and string of symbols WFF Theorem Formulas are quite often interpreted as propositions (as, for instance, in propositional logic). However formulas are syntactic entities, and as such must be specified in a formal language without regard to any interpretation of them. An interpreted formula may be the name of something, an adjective, an adverb, a preposition, a phrase, a clause, an imperative sentence, a string of sentences, a string of names, etc. A formula may even turn out to be nonsense, if the symbols of the language are specified so that it does. Furthermore, a formula need not be given any interpretation. 21

Syntax (1) Symbols A symbol is an idea, abstraction or concept, tokens of which may be marks or a configuration of marks which form a particular pattern. Symbols of a formal language need not be symbols of anything. For instance there are logical constants which do not refer to any idea, but rather serve as a form of punctuation in the language (e.g. parentheses). A symbol or string of symbols may comprise a well-formed formula if the formulation is consistent with the formation rules of the language. Symbols of a formal language must be capable of being specified without any reference to any interpretation of them. Formal language A formal language is a syntactic entity which consists of a set of finite strings of symbols which are its words (usually called its well-formed formulas). Which strings of symbols are words is determined by fiat by the creator of the language, usually by specifying a set of formation rules. Such a language can be defined without reference to any meanings of any of its expressions; it can exist before any interpretation is assigned to it that is, before it has any meaning. Formation rules Formation rules are a precise description of which strings of symbols are the wellformed formulas of a formal language. It is synonymous with the set of strings over the alphabet of the formal language which constitute well formed formulas. However, it does not describe their semantics (i.e. what they mean). 22

Syntax (2) Propositions A proposition is a sentence expressing something true or false. A proposition is identified ontologically as an idea, concept or abstraction whose token instances are patterns of symbols, marks, sounds, or strings of words. Propositions are considered to be syntactic entities and also truthbearers. Formal theories A formal theory is a set of sentences in a formal language. Formal systems A formal system (also called a logical calculus, or a logical system) consists of a formal language together with a deductive apparatus (also called a deductive system). The deductive apparatus may consist of a set of transformation rules (also called inference rules) or a set of axioms, or have both. A formal system is used to derive one expression from one or more other expressions. Formal systems, like other syntactic entities may be defined without any interpretation given to it (as being, for instance, a system of arithmetic). 23

Syntax (3) Syntactic consequence within a formal system A formula A is a syntactic consequence within some formal system FS of a set Г of formulas if there is a derivation in formal system FS of A from the set Г. Г Ⱶ FS A Syntactic consequence does not depend on any interpretation of the formal system. Syntactic completeness of a formal system A formal system S is syntactically complete (also deductively complete, maximally complete, negation complete or simply complete) iff for each formula A of the language of the system either A or A is a theorem of S. In another sense, a formal system is syntactically complete iff no unprovable axiom can be added to it as an axiom without introducing an inconsistency. Truth-functional propositional logic and first-order predicate logic are semantically complete, but not syntactically complete (for example the propositional logic statement consisting of a single variable "a" is not a theorem, and neither is its negation, but these are not tautologies). Interpretations An interpretation of a formal system is the assignment of meanings to the symbols, and truth values to the sentences of a formal system. The study of interpretations is called formal semantics. Giving an interpretation is synonymous with constructing a model. An interpretation is expressed in a metalanguage, which may itself be a formal language, and as such itself is a syntactic entity. 24

Propositional Calculus and WFF The well-formed formulas of propositional logic are obtained by using the construction rules Wffs are constructed using the following rules: (1) An atomic proposition is A is a wff (2) If A and B, and C are wffs, then so are A, (A B), (A B), (A B), and (A B). (3) If A is a wff, then so is (A). 25

and WFF Not all strings can represent propositions of the predicate logic. Those which produce a proposition when their symbols are interpreted must follow the rules given below, and they are called wffs(well-formed formulas) of the first order predicate logic. Rules for constructing Wffs A predicate name followed by a list of variables such as P(x, y), where P is a predicate name, and x and y are variables, is called an atomic formula. Wffs are constructed using the following rules: (1) True and False are wffs. (2) Each propositional constant (i.e. specific proposition), and each propositional variable (i.e. a variable representing propositions) are wffs. (3) Each atomic formula (i.e. a specific predicate with variables) is a wff. (4) If A and B are wffs, then so are A, (A B), (A B), (A B), and (A B). (5) If x is a variable (representing objects of the universe of discourse), and A is a wff, then so are x A and x A. 26

References [1] en.wikipedia.org [2] en.wiktionary.org [3] U. Endriss, Lecture Notes : Introduction to Prolog Programming [4] http://www.learnprolognow.org/ Learn Prolog Now! [5] http://www.csupomona.edu/~jrfisher/www/prolog_tutorial [6] www.cse.unsw.edu.au/~billw/cs9414/notes/prolog/intro.html [7] http://www.cs.odu.edu/~toida/nerzic/content/logic/ 27

28