LDK R Logics for Data and Knowledge Representation Exercise 2: PL, ClassL, Ground ClassL.

Slides:



Advertisements
Similar presentations
TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
Advertisements

Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
John Rosson Thursday February 15, 2007 Survey of Mathematical Ideas Math 100 Chapter 3, Logic.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 3 Syntax of Propositional Logic Parse trees revised Construction of parse trees Semantics of propositional.
Logic Chapter 2. Proposition "Proposition" can be defined as a declarative statement having a specific truth-value, true or false. Examples: 2 is a odd.
Snick  snack CPSC 121: Models of Computation 2011 Winter Term 1 Propositional Logic, Continued Steve Wolfman, based on notes by Patrice Belleville and.
2/17/2008Sultan Almuhammadi1 ICS Logic & Sets (An Overview) Week 1.
1 Section 1.2 Propositional Equivalences. 2 Equivalent Propositions Have the same truth table Can be used interchangeably For example, exclusive or and.
1 Math 306 Foundations of Mathematics I Math 306 Foundations of Mathematics I Goals of this class Introduction to important mathematical concepts Development.
Snick  snack CPSC 121: Models of Computation 2010/11 Winter Term 2 Propositional Logic, Continued Steve Wolfman, based on notes by Patrice Belleville.
Propositional Logic Lecture 2: Sep 9. Conditional Statement If p then q p is called the hypothesis; q is called the conclusion “If your GPA is 4.0, then.
Phil 120 week 1 About this course. Introducing the language SL. Basic syntax. Semantic definitions of the connectives in terms of their truth conditions.
TRUTH TABLES. Introduction Statements have truth values They are either true or false but not both Statements may be simple or compound Compound statements.
Lecture 8 Introduction to Logic CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
The Foundations: Logic and Proofs
Propositional Logic.
Intro to Discrete Structures
Chapter 1 Section 1.4 More on Conditionals. There are three statements that are related to a conditional statement. They are called the converse, inverse.
The Foundations: Logic and Proofs
Course Outline Book: Discrete Mathematics by K. P. Bogart Topics:
Valid and Invalid Arguments
Chapter 1, Part I: Propositional Logic With Question/Answer Animations.
Normal Forms, Tautology and Satisfiability 2/3/121.
Propositional Equivalences
Math 240: Transition to Advanced Math Deductive reasoning: logic is used to draw conclusions based on statements accepted as true. Thus conclusions are.
Fall 2002CMSC Discrete Structures1 Let’s get started with... Logic !
Pattern-directed inference systems
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
HAWKES LEARNING Students Count. Success Matters. Copyright © 2015 by Hawkes Learning/Quant Systems, Inc. All rights reserved. Section 3.2 Truth Tables.
LDK R Logics for Data and Knowledge Representation PL of Classes.
Chapter 3: Semantics PHIL 121: Methods of Reasoning March 13, 2013 Instructor:Karin Howe Binghamton University.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
October 17, 2012Introduction to Artificial Intelligence Lecture 11: Knowledge Representation and Reasoning I 1Semantics In propositional logic, we associate.
Lecture 9 Conditional Statements CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
How do I show that two compound propositions are logically equivalent?
Logical Form and Logical Equivalence M Logical Form Example 1 If the syntax is faulty or execution results in division by zero, then the program.
CS6133 Software Specification and Verification
1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. 
Logics for Data and Knowledge Representation
TRUTH TABLES. Introduction The truth value of a statement is the classification as true or false which denoted by T or F. A truth table is a listing of.
Logics for Data and Knowledge Representation Exercises: ClassL Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese.
Metalogic. TWO CONCEPTIONS OF LOGICAL CONSEQUENCE.
Dr. Naveed Riaz Design and Analysis of Algorithms 1 1 Formal Methods in Software Engineering Lecture # 25.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
TRUTH TABLES Edited from the original by: Mimi Opkins CECS 100 Fall 2011 Thanks for the ppt.
Spring 2003CMSC Discrete Structures1 Let’s get started with... Logic !
Week 8 Discussion: Ch 8, TA: Karin Howe PHIL 121 Spring 2012.
3/6/20161 Let’s get started with... Logic !. 3/6/20162 Logic Crucial for mathematical reasoningCrucial for mathematical reasoning Used for designing electronic.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Chapter 1. Chapter Summary  Propositional Logic  The Language of Propositions (1.1)  Logical Equivalences (1.3)  Predicate Logic  The Language of.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Artificial Intelligence Logical Agents Chapter 7.
Logical Operators (Connectives) We will examine the following logical operators: Negation (NOT,  ) Negation (NOT,  ) Conjunction (AND,  ) Conjunction.
Chapter 7. Propositional and Predicate Logic
Knowledge Representation and Reasoning
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Back to “Serious” Topics…
Logics for Data and Knowledge Representation
Presentation transcript:

LDK R Logics for Data and Knowledge Representation Exercise 2: PL, ClassL, Ground ClassL

Outline  Reasoning  Truth Table  Deduction  Logics  PL  ClassL  Ground ClassL 2

Summary of Logics Mentioned by Now (1)  Language / Syntax Choose proper logics for the following symbols ⊓  ⊤ ⊢ ∨ ≡ ⊔ ⊑ → ↔ ⊥ ∧ ⊨ 3 PLClassL Ground ClassL

Summary of Logics Mentioned by Now (2)  Semantics  PL  p I ={True, False}  ClassL  p I ={set 1, …, set n }  Ground ClassL  p I ={set 1, …, set n }, q I ={element 1, …, element m } 4

Truth Table  What is a Truth valuation?  Def. A truth valuation on a propositional language L is a mapping ν assigning to each formula P of L a truth value ν(P).  What is a Truth Table?  A truth table is composed of one column for each input variable and one final column for all of the possible results of the logical operation that the table is meant to represent. Each row of the truth table therefore contains one possible assignment of the input variables, and the result of the operation for those values. 5

Example  Calculate the Truth Table of the following formulas A∧BA∧B P∨QP∨Q  X↔Y  What about this?  (A∨B→C∨D∨E)∧(¬F↔A)∧(¬F∨G∧¬H∨F)∧(¬I→ ¬(D∧J))∧(¬J∨¬D∨E)∧F 6 AB A∧BA∧BA∨BA∨B A↔B TTTTT TFFTF FTFTF FFFFT

Deduction  Deduction  Double negative elimination   P ⊢ P  Conjunction introduction / elimination  {P, Q} ⊢ P ∧ Q; P ∧ Q ⊢ P, P ∧ Q ⊢ Q  Disjunction introduction / elimination  P ⊢ P ∨ Q, Q ⊢ P ∨ Q; {P ∨ Q, P → R, Q → R} ⊢ R  Bi-conditional introduction / elimination  (P → Q) ∧ (P ← Q) ⊢ (P ↔ Q)  De Morgan   (P ∧ Q) ⊢  P ∨  Q,  (P ∨ Q) ⊢  P ∧  Q 7

Proofs of Deduction Rules PQ ¬¬ PP→QP→QQ→PQ→P ¬( P ∧ Q) ¬ P ∨¬ Q ¬( P ∨ Q) ¬ P ∧¬ Q TTTTFFFFF TFTFTTTFF FTFTFTTFF FFFTTTTTT 8 PQ P∧QP∧QP∨QP∨Q P↔Q TTTTT TFFTF FTFTF FFFFT

Soundness and Completeness  A deduction system is sound if any sentence P that is derivable from a set Г of sentences is also a logical consequence of that set Г.  A deductive system is complete if every sentence P that is a semantic consequence of a set of sentences Γ can be derived in the deduction system from that set.  A soundness property provides the initial reason for counting a logical system as desirable. The completeness property means that every validity (truth) is provable. 9

Outline  Reasoning  Truth Table  Deduction  Logics  PL  ClassL  Ground ClassL 10

Warming up  List the number of models for the following formulas 1. (A ∧ B) ∨ (B ∧ C) 2. A ∨ B → D 3. ¬ A ↔ B ↔ C 4. (A ↔¬ B) ∧( A ↔ B)  Something has to be mentioned: Suppose the formulas are represented by a PL with 4 propositions: A, B, C and D. 11 Wait!

PL Exercises 1  Let A, B, C be propositional sentences, if A ⊨ B ∧ C, then A ⊨ B or A ⊨ C or both? What if A ⊨ B ∨ C?  The model of ‘B ∧ C’ is I={B=T, C=T};  If ‘A ⊨ B ∧ C’, I should be also a model of ‘A’;  Because I assigns True to ‘B’, I is a model of ‘B’;  Similarly, I is also a model of ‘C’;  So, the proposition is true.  If ‘A ⊨ B ∨ C’, a model of ‘B ∨ C’ can be I’={B=T, C=F};  I’ is not a model of either ‘A ⊨ B ’ and ‘A ⊨ C ’. 12

PL Exercises 2  Given that P=(A ∨ B) ∧ (  C ∨  D ∨ E), Q 1 =A ∨ B, Q 2 =(A ∨ B ∨ C) ∧ (B ∧ C ∧ D→E), Q 3 =(A ∨ B) ∧ (  D ∨ E), list i that P ⊨ Q i. 13 ABCDEPQ1Q2Q3 TTTTTTTTT FTTTT… TFTTT TTFTT TTTFT …… FFFFF…

PL Exercises 2 cont.  Given that P=(A ∨ B) ∧ (  C ∨  D ∨ E), Q 1 =A ∨ B, Q 2 =(A ∨ B ∨ C) ∧ (B ∧ C ∧ D→E), Q 3 =(A ∨ B) ∧ (  D ∨ E), list i that P ⊨ Q i.  Notice that let X= A ∨ B, Y=  D ∨ E, then we rewrite  P=X ∧(¬ C ∨ Y),  Q 1 =X  Q 2 =(X ∨ C) ∧ ( ¬ B ∨¬ C ∨ Y),  Q 3 =X ∧Y  So, P ⊨ Q 1 ;  X ⊨X∨ C, (¬ C ∨ Y) ⊨ ( ¬ B ∨¬ C ∨ Y) thus P ⊨ Q 2,  Y ⊨ ( ¬ C ∨ Y) thus Q 3 ⊨ P. 14

PL Exercises 3  Suppose p, q, r, s are four propositional sentences, is the following sentence valid? (p→r) ∧ (q→s) ∧ (  r ∨  s)→(  p ∨  q) A=(p→r) ∧ (q→s) ∧ ( ¬ r ∨ ¬ s)→(  ¬ p ∨ ¬ q) = ¬( (p→r) ∧ (q→s) ∧ ( ¬ r ∨ ¬ s) )∨ ¬ p ∨ ¬ q =(p ∧¬ r) ∨ (q ∧¬ s) ∨ (r ∧ s) ∨ ¬ p ∨ ¬ q =⊤=⊤ 15 pQrsA TTTTT TTTFT TTFTT TTFFT TFTTT TFTFT TFFTT TFFFT FTTTT FTTFT FTFTT FTFFT FFTTT FFTFT FFFTT FFFFT

Are you ‘Sherlock Holmes’? There was a robbery in which a lot of goods were stolen. The robber(s) left in a truck. It is known that : (1) Nobody else could have been involved other than A, B and C. (2) C never commits a crime without A's participation. (3) B does not know how to drive.  So, is A innocent or guilty? A∨B∨CA∨B∨C  C→A BB 16 A

Knights and Knaves  A very special island is inhabited only by knights and knaves. Knights always tell the truth, and knaves always lie. You meet two inhabitants: Zoey and Mel. Zoey tells you that Mel is a knave. Mel says, ‘Neither Zoey nor I are knaves.’ Can you determine what are they? (who is a knight and who is a knave? )  Z:  M  M: Z ∧ M proof: If M, then Z ∧ M, then Z, then  M. 17 Contradictory!

ClassL Exercises 1  T={A ⊑ B, B ⊑ A}, is  (A ⊓ B) satisfiable in ClassL? 18 AB A B

ClassL Exercises 2  T={C ⊑ A, C ⊑ B} is  (A ⊓ B) satisfiable in ClassL? 19 AB c A B C A B C A B C A B C

ClassL Exercises 3  Suppose a ⊨ A, ⊨ B, is the following sentence A ∧ B satisfiable in PL, what about A ⊓ B in ClassL? 20 AB A∧BA∧B TTT TFF FTF FFF ABABAB

PL vs. ClassL For any PL sentence P, suppose a corresponding ClassL P’ is built by changing ∧, ∨,→, into ⊓, ⊔, ⊑, (not wff’s are not considered). Then do we have that ⊨ P iff ⊨ P’? The transmission of truth VS. coverage.  For all wff’s P of PL, there exists a truth valuation ν that ν(P) = True iff there exists a class valuations σ, σ(P’) ≠ ∅ with P’ as the corresponding proposition in ClassL.  NOTE: although there are more possible assignments in ClassL for the ‘same’ formula, some of them may collapse into one case in PL. 21

Example  Suppose a PL wff ¬ A ⋀ B and a corresponding ClassL wff ¬ A ⊓ B, the possible assignments (interpretations) are as the following:  More than one model in ClassL collapse into one model in PL. (All non-empty are mapped to T. ) 22 AB ¬A⋀B¬A⋀B TTF TFF FTT FFF A B B A …

Ground ClassL  What distincts Ground ClassL from ClassL? The expressiveness to represent ‘instance’.  What for? To capture the instance/individual in the world. 23

Black Hair White Hair Exercise: LDKR Class IDNameNationalityHair 1FaustoItalianWhite 2EnzoItalianBlack 3RuiChineseBlack 4BisuIndianBlack ………… 24 TBox={Italian ⊑ LDKR, BlackHair ⊑ LDKR, Indian ⊑ LDKR} ABox={Italian(Fausto), Italian(Enzo), Chinese(Rui), Indian(Bisu), BlackHair(Enzo), BlackHair(Rui), BlackHair(Bisu), WhiteHair(Fausto)} LDKR Italian Chinese People Indian LDKRItalian Chinese Indian White Hair Black Hair