LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,

Slides:



Advertisements
Similar presentations
LDK R Logics for Data and Knowledge Representation Exercises: First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified.
Advertisements

Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Logics for Data and Knowledge Representation Modeling Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang.
LDK R Logics for Data and Knowledge Representation Context Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
LDK R Logics for Data and Knowledge Representation Modeling First version by Alessandro Agostini and Fausto Giunchiglia Second version by Fausto Giunchiglia.
Logics for Data and Knowledge Representation Exercises: Modeling Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
Pattern-directed inference systems
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Logics for Data and Knowledge Representation Languages for Data Representation First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Chapter Three Truth Tables 1. Computing Truth-Values We can use truth tables to determine the truth-value of any compound sentence containing one of.
LDK R Logics for Data and Knowledge Representation Modal Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
LDK R Logics for Data and Knowledge Representation PL of Classes.
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.
CS6133 Software Specification and Verification
Logics for Data and Knowledge Representation
LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1.
LDK R Logics for Data and Knowledge Representation First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Logics for Data and Knowledge Representation Exercises: ClassL Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese.
LDK R Logics for Data and Knowledge Representation ClassL (part 2): Reasoning with a TBox 1.
Nikolaj Bjørner Microsoft Research DTU Winter course January 2 nd 2012 Organized by Flemming Nielson & Hanne Riis Nielson.
LDK R Logics for Data and Knowledge Representation Context Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
LDK R Logics for Data and Knowledge Representation Modal Logic: exercises Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
LDK R Logics for Data and Knowledge Representation Modal Logic: exercises Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Artificial Intelligence Logical Agents Chapter 7.
Propositional Logic (a.k.a. Sentential Logic)
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Propositional Calculus: Boolean Functions and Expressions
Knowledge Representation and Reasoning
Exercises: First Order Logics (FOL)
The Propositional Calculus
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
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
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Representations & Reasoning Systems (RRS) (2.2)
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Presentation transcript:

LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang and Vincenzo Maltese

2 Outline  Syntax  Semantics  Entailment and l ogical implication  Reasoning Services 2

Logical Modeling 3 Modeling Realization World Language L Theory T Domain D Model M Data Knowledge Meaning Mental Model SEMANTIC GAP Interpretation I Entailment ⊨ NOTE: the key point is that in logical modeling we have formal semantics

Language (Syntax)  The first step in setting up a formal language is to list the symbols of the alphabet 4 Σ0Σ0 Descriptive Logical , , , … Constants one proposition only A, B, C … Variables they can be substituted by any proposition or formula P, Q, ψ …  Auxiliary symbols: p arentheses: ( )  Defined symbols: ⊥ (falsehood symbol, false, bottom) ⊥ = df P ∧ ¬P T (truth symbol, true, top)T = df ¬ ⊥ SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Formation Rules (FR): well formed formulas  Well formed formulas (wff) in PL can be described by the following BNF grammar (codifying the rules): ::= A | B |... | P | Q |... | ⊥ | ⊤ ::= | ¬ | ∧ | ∨  Atomic formulas are also called atomic propositions  Wff are propositional formulas (or just propositions)  A formula is correct if and only if it is a wff  Σ 0 + FR define a propositional language 5 PARSER ψ, PL Yes, ψ is correct! No SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Propositional Theory  Propositional (or sentential) theory  A set of propositions  It is a (propositional) knowledge base (true facts)  It corresponds to a TBox (terminology) only, where no meaning is specified yet: it is a syntactic notion 6 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Semantics: formal model  Intensional interpretation We must make sure to assign the formal meanings out of our intended interpretation to the (symbols of the) language, so that formulas (propositions) really express what we intended.  The mental model: What we have in mind? In our mind (mental model) we have a set of properties that we associate to propositions. We need to make explicit (as much as possible) what we mean.  The formal model This is done by defining a formal model M. Technically: we have to define a pair (M, ⊨ ) for our propositional language  Truth-values In PL a sentence A is true (false) iff A denotes a formal object which satisfies (does not satisfy) the properties of the object in the real world. 7 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Truth-values  Definition: a truth valuation on a propositional language L is a mapping ν assigning to each formula A of L a truth value ν (A), namely in the domain D = {T, F}  ν (A) = T or F according to the modeler, with A atomic  ν (¬A) = T iff ν (A) = F  ν (A ∧ B) = T iff ν (A) = T and ν (B) = T  ν (A ∨ B) = T iff ν (A) = T or ν (B) = T  ν ( ⊥ ) = F (since ⊥ = df P ∧ ¬P)  ν ( ⊤ ) = T (since ⊤ = df ¬ ⊥ ) 8 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Truth Relation (Satisfaction Relation)  Let ν be a truth valuation on language L, we define the truth- relation (or satisfaction-relation) ⊨ and write ν ⊨ A (read: ν satisfies A) iff ν (A) = True  Given a set of propositions Γ, we define ν ⊨ Γν ⊨ Γ iff if ν ⊨ θ for all formulas θ ∈ Γ 9 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Model, Satisfiability, truth and validity  Let ν be a truth valuation on language L.  ν is a model of a proposition P (set of propositions Γ ) iff ν satisfies P ( Γ ).  P ( Γ ) is satisfiable if there is some (at least one) truth valuation ν such that ν ⊨ P ( ν ⊨ Γ ).  Let ν be a truth valuation on language L.  P is true under ν if ν ⊨ P  P is valid if ν ⊨ P for all ν (notation: ⊨ P). P is called a tautology 10 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Entailment and implication  Propositional entailment:  ⊨ ψ where  = { θ 1,..., θ n } is a finite set of propositions ν ⊨ θ i for all θ i in  implies ν ⊨ ψ  Entailment can be seen as the logical implication ( θ 1 ∧ θ 2 ∧... ∧ θ n ) → ψ to be read θ 1 ∧ θ 2 ∧... ∧ θ n logically implies ψ → is a new symbol that we add to the language 11 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

 We extend our alphabet of symbols with the following defined logical constants: → (implication) ↔ (double implication or equivalence) ::= A | B |... | P | Q |... | ⊥ | ⊤ ::= | ¬ | ∧ | ∨ | → | ↔ (new rules)  Let propositions ψ, θ, and finite set { θ 1,..., θ n } of propositions be given. We define:  ⊨ θ → ψ iff θ ⊨ ψ  ⊨ ( θ 1 ∧... ∧ θ n ) → ψ iff { θ 1,..., θ n } ⊨ ψ  ⊨ θ ↔ ψ iff θ → ψ and ψ → θ Implication and equivalence 12 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Reasoning Services Model Checking (EVAL) Is a proposition P true under a truth- valuation ν ? Check ν ⊨ P EVAL P, ν Yes No 13 Satisfiability (SAT) Is there a truth-valuation ν where P is true? find ν such that ν ⊨ P Unsatisfiability (UnSAT) the impossibility to find a truth- valuation ν SAT P ν No SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Reasoning Services 14 Validity (VAL) Is P true according to all possible truth- valuation ν ? Check if ν ⊨ P for all ν VAL P Yes No Entailment (ENT) All θ ∈ Γ true in ν (in all ν ) implies ψ true in ν (in all ν ). check Γ ⊨ ψ in ν (in all ν ) by checking that: given that ν ⊨ θ for all θ ∈ Γ implies ν ⊨ ψ ENT Γ, ψ, ν Yes No SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Reasoning Services: properties  EVAL is the easiest task. We just test one assignment.  SAT is NP complete. We need to test in the worst case all the assignments. We stop when we find one which is true.  UnSAT is CO-NP. We need to test in the worst case all the assignments. We stop when we find one which is true.  VAL is CO-NP. We need to test all the assignments and verify that they are all true. We stop when we find one which is false.  ENT is CO-NP. It can be computed using VAL (see next slide) 15 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES

Using DPLL for reasoning tasks  DPLL solves the CNFSAT-problem by searching a truth-assignment that satisfies all clauses θ i in the input proposition P = θ 1  …  θ n  Model checkingDoes ν satisfy P? ( ν ⊨ P?) Check if ν (P) = true  Satisfiability Is there any ν such that ν ⊨ P? Check that DPLL(P) succeeds and returns a ν  UnsatisfiabilityIs it true that there are no ν satisfying P? Check that DPLL(P) fails  Validity Is P a tautology? (true for all ν ) Check that DPLL(  P) fails 16 SYNTAX :: SEMANTICS :: ENTAILMENT AND LOGICAL IMPLICATION :: REASONING SERVICES